--- /dev/null
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Comment: LEDE GnuPG key for unattended build jobs
+
+mQINBFeXZ7wBEAC3QZ+jhWrdj2XW9AdZpZrgHETZCW7lXxI3pJ2kS4UXNq+40KR2
+GJOdsXDnLb7ZiHNn6yio6qKLXFD/bimxK+22HSJlc3LSF2kKzNrgKoFR2rIKbL3c
+Us7GpWY8VqGTrfwR6OQNcoWqa1n5/tK9xuqKhfpoA2Eci8K+w5YCzCmnOz2vzbgS
+ptuFshTKYI2Z/DLQZyP+OQkEYPfCdani2KsISn4DTx8xFjmW/sb/zf0isemTwWyK
+Oh76FTa0tYdjTtAv3JHqyr2XkddM/oUSc09baCOfhUdo7Ep5rUqKw7BQsjreBYoZ
+WcL/hmlIksUrFlqo/HRpoBgCZpSjsF/Z9otZpSugMHVVlRCnAKQiWxWAd+V+y2FG
+q79myPgiMkbkaIrCelrUhDFRQ5wTnfAppFolw+xtT9bwdkwxZDNBe6PCYuLqD8wg
+jtDtt3q5UaUOMGJrMDKZ0Wi6ycdl/sM59kLfyBV4ybmYkwOLTlMvOATiyUZeJJZO
+2bTKBvD+izsx3Ea4VLPWYSFmk6QwaOMtj6tcXwBgtljzqMJ0S9Gubmopy3WAkP/m
+/6ETJpuIupqEtvbRTX4O/+qnBgY40aQX7B4NgJi2SypP/WML5v2B2amLlhTcN+we
+ULWyH9KvfKny5mrtG5C9xq1eAgKtB2QEDEbRyz34DWVWGpqIY1mscaNv8wARAQAB
+tFtMRURFIEJ1aWxkIFN5c3RlbSAoTEVERSBHbnVQRyBrZXkgZm9yIHVuYXR0ZW5k
+ZWQgYnVpbGQgam9icykgPGxlZGUtYWRtQGxpc3RzLmluZnJhZGVhZC5vcmc+iQI4
+BBMBAgAiBQJXl2e8AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDNhLzt
+YmRx8aJ2D/9eRQWekaeX8eAcAgzguFS12ODlg23lJx00d0zLhZcA6LycYJRmFN+M
+0tsVDZ6y7bLy1/h0YFYvYlJk4ZE+6sb4I/GSkMyqeZAy8whELYfEphXVYx0/wgyn
+d57wE0lDo8/zmt3rK1eD0zJioN7cL3A/t3L++al4gwmqtTfUIl96AXc3YBe/rwXS
+i7ShENVKYjTaMugP5BJ9kUZuaIjmXZWvREbURgBMWR7uR56XKJBwDBQMtHq2AoZs
+2iNR3dG8r70Sb/cMSgAqhwDZfeV71r7+Pd+asvxYb0JeNNgZ2ss/BA5yapUKZLgu
+hV6y7JSfHdb7q1t1j/wfqgYtQJB5K31JGxj+yaRxcF8LbvGZBNhaIJV+s4HmTeq4
+yI20pCRNd8lLY80XAISTk8DPwgTLOvMPKbDYW4+/FC8J6qoD9DByQxDduUWn5uD4
+LbVZ96v9+Ltf9LJzaxFVSE/dSsvgFNjo6u29ueG6aTxUIOc4Wi3mC0qNhqoyAbg6
+Xg922EF/sd6hf3aQU9rpcPbcsNognGgrKfyREvMlBsQ9U3pRcKPlG05bfUcayXkh
+59qIVU4kKCaW6LBy1fkBYyY3Nj5eoCAe9fm9ivi58FdI+7sKc2A1fMuVS83B370s
+qAsu6v2rvqYz6nS5VFIWYJmL8kbUmf5FWwbucH7/jr9s3bB0wUHcI7kCDQRXl2h/
+ARAAztMdT5ig5MKM02TFsmGvdc0SQVHPJymPTh6i/XwAbSeaTErvGLP3ke+2cdCj
+MOes4steII5MU6aD57i1zU/6xhZ2Zr8sZ4fCOzfqoI4AOIeeuiO+I5by2P+M+vj2
+v/U7KMWeixFjTkotWcvGGriP1jcRY1FHMrTfq/5lZYNHHzz/2zvszq02/WP+b/Gh
+1Rf1yfr5DlXKw6Q+7fkCg8BWfLichTtHiR0OcO0mtD6ECxz+iqDElbSAeE9Q02fO
+FTF4snHwCJvykHQ4EKudEoXcIEOR8TyH2tKorD821E/DSV9OA9XIBpDHavFQ3GCs
+29GQcqci46nOLn/LWqgTB86sgH4mnQrGsceVYzf8avM8c8TyxkufBd/k01lPn1sK
+/573AWdFRXVmOCMmlxPcI8k1+iGH1C7z0aX43NvhEI3xfbgTK8E/7Klrn/5xXUu2
+UBYov0gKaZRy3LpGF/ySR1pvnHZmUP58my2LDfWDHdHrGmkjLaqyk/+qC9NKwUQB
+S7jV7Mm15B0bkR7grLx+vN5lXVeGwyDL2dbRT0+cH8loHb+lBOR8AbDm4SJXdaRd
+DtPyq85KN+jm+9NToRz+oydL9rmguU5zRcIDtaFiYr7ZtkLJU3U02rp0uf/DdytF
+tzS/YEbpgg2Ui37q55ml707zJL2DvBffy/F2kiNpVfZ4u5cAEQEAAYkEPgQYAQIA
+CQUCV5dofwIbAgIpCRDNhLztYmRx8cFdIAQZAQIABgUCV5dofwAKCRD5NSWoi2mQ
+KQ/PD/9c/snQ2iok9H9PFinYmuOA6tf4Nbn0yX9oOTslDJ8ot6SB4OXGXGeT0lvq
+ytbYVeAlifBElYRVFYZt76dbjhqmsmDMZsYHbaXIYLZSPuTETVE3pZrpWhm9Qkhb
+eEyihAofgWleBmJcd8VXnrzsNkJGNokA6gqZ/ldqJtzMwkeHM58DHo/gFNNNlxe8
+M83PHA0rN48F6DU4tZeEvz+/QGrnn4DWcBhmWo+2ZLvTLI4cB9389j8ks7FFFXLi
+1gnWigWr29uGv8iZpAneY6414cZW3G79wTIwAATRvIvrI9pcvriUrMdOycTcwXOa
+d9eXq/mJdg8dEpKiIA8Vc9UNdT93aZt8r610LbORmdq+wFjEhWvh7xKu9hFm/3UM
+QUaVl3jsIlqZT4G8es+RLHnKVOzLMRovqRKRbsCsXxIxsVqxzhKQ5+wLCpisVNfH
+51WCTSLoAz7s0jKLCSzueUIbhV2vNBM5lFLNCl35UgN1aYuRusI7GyqkPT/A8VWj
+xVxn7o2SBIwyu4hZ4jFsq3qHOygIuRtdOHRX1vREmp7FA3+fVnx0CJUilfnGjhf/
+oydfEC6GuWUn9kTEf2eJsONwQ9gPQ9QC9cFGRFRrVwQcejr7V+DBZSdzY8YLvn7R
+qR3MmlXdpWijqj7noi2C+kbVqbLiX/LWe2axgKE+UTB7lGdl7v25D/99uFIzJmqA
+dhEAEQgb17L7kOV0MOBwFtZ6fElJaQEQV49JiQmgTzALDgXD0ACpT5qoQYCBTwuz
+m2D93ekfMnzxF8PmwW6a2czrG1KoRir2EayhgEoOJuWHLneb5nUc7X3krGNSJ3my
++lMw2QA3wIX7EAS6JJUnZFp7wawecdCekRF9ZE1Z/ZBiUZR17DkbAoYjEYZFxiXA
+cG6sFEM9uTG+y91RcQPq8tY+jw2d76ZjHSnoKjnP2VxsmtiWQ7yLj/5tjrVzQftI
+bbQQTK4V4O4aV2Y1wgkDbNPNJ6t0biQkHQv+4vaLMonOfMgGdWdYJ4hE9nlt61Aq
+GidOnyMxOb+2XpVypOoOPcTyTqe8BUjCcvHQwukZLk3XE7OQoR0wZBFhOr4JCYzT
+xIz9XYrSykZgkZMp8O4zbP+j1ZTXtJEvvPHjOS1HkL1O1H+W98dnl+oQMNQhHvvE
+6UfWEolfuWvBpfP12pUnRQAAyCBql4JAFeoCJEdJGkz8oFOFxv0kCpd7JM1gWEs2
+u0w61+5MelmliHImWiyhgV4XyKW6jeKWIpe9E5L7b8SPI5HHdT7opy3G7aD1XI3k
+jdaIiMnJbq0nSvc5VqRE7Uv0EEcepvFeiuYHYydluxRyNf/ts2JskfEnsOc1JiS+
+GPeIoGmFL85qtFOzc4sqYQGhLj9iMRfmNw==
+=W2Tk
+-----END PGP PUBLIC KEY BLOCK-----
--- /dev/null
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Comment: LEDE 17.01 "Reboot" public key
+
+mQINBFh9DQ8BEACmjR9z4mEXjTWBTcqHI8U38III55qStU4zX4mtYEm8KjaNyBu0
+F8ghe22IAPQcHuvQh0lzr2AoTYi+ZAUlHrLb3s+YdJJD2KoSD1nXW8PgtoT92tai
+utJjSKsB2ZWJc4nskAYXTkDmhTuuHBEg9hvljhXkrPxmcEDN/v1f5fv82U8JLYwt
+g1mGJmW7SsdKtkJbAmEMCi/MFFA2fxLNV33qGhzm4UeAsUrLIGBjbCtU/BK8Im28
+eAF9VP08OUK/QX7te6K6qumvuEIIc/GG4yatdbxltS1SjWYMS0vpqXm4v50CoMaB
+/XCcdq1zlIyIxQW9UF6xJDLhsHv/3iOginR/vRDbdRWk/YPwlx/d9h9GK309YhXu
+GUK/lrBHIZwZ4VEowYjK76isXmRuU9ZeTK9SeKdIyLzYg5NIXW9cvGR+4NKIqfmE
+xxbVupm7Vc+3n4KUdS2t9SLXdkG+YYmyDabftyuACU2+xeHyKcUBn4yxbrcBp5Rs
+5RgOIn/2BtiEQNSc8AagU1ie57VGErrwrpdW/Cmxrs+KG7Io8Pwv+nG9M53DqPwb
+Zuun75iuni9wAR5IVUsUWdIoalb/I4ht58FDOt2iS/KdVwi8yyCHS8gH1J3MzZWP
+Yy9k0pgup54CTXGv/KzDOAsPZzkwNiziWIVE0N49bZFkO0CXgAufOAEtewARAQAB
+tFNMRURFIFJlbGVhc2UgQnVpbGRlciAoMTcuMDEgIlJlYm9vdCIgU2lnbmluZyBL
+ZXkpIDxsZWRlLWRldkBsaXN0cy5sZWRlLXByb2plY3Qub3JnPokCPgQTAQIAKAUC
+WH0NDwIbAwUJA8JnAAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQgzxgENUr
+u2tMaA//aRvfrOoMTVtjw+Pru+hBC7IhkusJ70x8gUxSPmHZX0+KvIvILyAeVEho
+TW5lMwwo6b66GcBmP53qu/rech8HyunyyDUYFEvdE/ym3uO6NpE/3N/Z69TJiC+k
+1imElx5njTZkH/qZSClqN8j6ehspywnSKWNfSOM/9K1G7qtWgiqIaDYa+sdtRHjx
+oh4dtKiauUced0C1i7V1vT1ko8iZKWFiwj9GJSaoVxyUwI2fG3iV2qdcinPCL0nU
+BfVIhU5cXMZ6VtVg5Ly6NqUbrhZzVVl8DMnu5z4MOLZWseob4LhK5W0v+DUTezJS
+Cvei+woJ3SIy0CLXe6eDKwbCS5kCaoNbExeTnSz7/Mg14NjREhtWkq79rnHrH9MV
+QAXyjmd3q0D5sDLzk8nQ3fGaH1Zg+o+VECkwEwz4ypctXqRAcHyIkYHmv8rFYlQY
+dJlfs1NgZzk9EWfZ0/RLUdqNx6beKm27r2W1j+gcaM01sk5q9TPZeuNHh8psFlCD
+b5mq6XBstA9NwN9pg5zS+UkfjjMU5FiBIEVv4Lt/dblNkjID/+XUBkHpSAz13GDW
+k0ElkSBgBvz8TSm68EUGTfTVhK21x+1x15/8AUoV8V+4txncMhnJNmrEcKolnMeF
+96xgcoHpPszlHxjiwS6hrFPDyhfYwU9plDI7ojcIleqK98XjRHY=
+=aN5O
+-----END PGP PUBLIC KEY BLOCK-----
git:
depth: 10
+ quiet: true
+
language: c
dist: trusty
sudo: false
+++ /dev/null
------BEGIN PGP PUBLIC KEY BLOCK-----
-Comment: LEDE GnuPG key for unattended build jobs
-
-mQINBFeXZ7wBEAC3QZ+jhWrdj2XW9AdZpZrgHETZCW7lXxI3pJ2kS4UXNq+40KR2
-GJOdsXDnLb7ZiHNn6yio6qKLXFD/bimxK+22HSJlc3LSF2kKzNrgKoFR2rIKbL3c
-Us7GpWY8VqGTrfwR6OQNcoWqa1n5/tK9xuqKhfpoA2Eci8K+w5YCzCmnOz2vzbgS
-ptuFshTKYI2Z/DLQZyP+OQkEYPfCdani2KsISn4DTx8xFjmW/sb/zf0isemTwWyK
-Oh76FTa0tYdjTtAv3JHqyr2XkddM/oUSc09baCOfhUdo7Ep5rUqKw7BQsjreBYoZ
-WcL/hmlIksUrFlqo/HRpoBgCZpSjsF/Z9otZpSugMHVVlRCnAKQiWxWAd+V+y2FG
-q79myPgiMkbkaIrCelrUhDFRQ5wTnfAppFolw+xtT9bwdkwxZDNBe6PCYuLqD8wg
-jtDtt3q5UaUOMGJrMDKZ0Wi6ycdl/sM59kLfyBV4ybmYkwOLTlMvOATiyUZeJJZO
-2bTKBvD+izsx3Ea4VLPWYSFmk6QwaOMtj6tcXwBgtljzqMJ0S9Gubmopy3WAkP/m
-/6ETJpuIupqEtvbRTX4O/+qnBgY40aQX7B4NgJi2SypP/WML5v2B2amLlhTcN+we
-ULWyH9KvfKny5mrtG5C9xq1eAgKtB2QEDEbRyz34DWVWGpqIY1mscaNv8wARAQAB
-tFtMRURFIEJ1aWxkIFN5c3RlbSAoTEVERSBHbnVQRyBrZXkgZm9yIHVuYXR0ZW5k
-ZWQgYnVpbGQgam9icykgPGxlZGUtYWRtQGxpc3RzLmluZnJhZGVhZC5vcmc+iQI4
-BBMBAgAiBQJXl2e8AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDNhLzt
-YmRx8aJ2D/9eRQWekaeX8eAcAgzguFS12ODlg23lJx00d0zLhZcA6LycYJRmFN+M
-0tsVDZ6y7bLy1/h0YFYvYlJk4ZE+6sb4I/GSkMyqeZAy8whELYfEphXVYx0/wgyn
-d57wE0lDo8/zmt3rK1eD0zJioN7cL3A/t3L++al4gwmqtTfUIl96AXc3YBe/rwXS
-i7ShENVKYjTaMugP5BJ9kUZuaIjmXZWvREbURgBMWR7uR56XKJBwDBQMtHq2AoZs
-2iNR3dG8r70Sb/cMSgAqhwDZfeV71r7+Pd+asvxYb0JeNNgZ2ss/BA5yapUKZLgu
-hV6y7JSfHdb7q1t1j/wfqgYtQJB5K31JGxj+yaRxcF8LbvGZBNhaIJV+s4HmTeq4
-yI20pCRNd8lLY80XAISTk8DPwgTLOvMPKbDYW4+/FC8J6qoD9DByQxDduUWn5uD4
-LbVZ96v9+Ltf9LJzaxFVSE/dSsvgFNjo6u29ueG6aTxUIOc4Wi3mC0qNhqoyAbg6
-Xg922EF/sd6hf3aQU9rpcPbcsNognGgrKfyREvMlBsQ9U3pRcKPlG05bfUcayXkh
-59qIVU4kKCaW6LBy1fkBYyY3Nj5eoCAe9fm9ivi58FdI+7sKc2A1fMuVS83B370s
-qAsu6v2rvqYz6nS5VFIWYJmL8kbUmf5FWwbucH7/jr9s3bB0wUHcI7kCDQRXl2h/
-ARAAztMdT5ig5MKM02TFsmGvdc0SQVHPJymPTh6i/XwAbSeaTErvGLP3ke+2cdCj
-MOes4steII5MU6aD57i1zU/6xhZ2Zr8sZ4fCOzfqoI4AOIeeuiO+I5by2P+M+vj2
-v/U7KMWeixFjTkotWcvGGriP1jcRY1FHMrTfq/5lZYNHHzz/2zvszq02/WP+b/Gh
-1Rf1yfr5DlXKw6Q+7fkCg8BWfLichTtHiR0OcO0mtD6ECxz+iqDElbSAeE9Q02fO
-FTF4snHwCJvykHQ4EKudEoXcIEOR8TyH2tKorD821E/DSV9OA9XIBpDHavFQ3GCs
-29GQcqci46nOLn/LWqgTB86sgH4mnQrGsceVYzf8avM8c8TyxkufBd/k01lPn1sK
-/573AWdFRXVmOCMmlxPcI8k1+iGH1C7z0aX43NvhEI3xfbgTK8E/7Klrn/5xXUu2
-UBYov0gKaZRy3LpGF/ySR1pvnHZmUP58my2LDfWDHdHrGmkjLaqyk/+qC9NKwUQB
-S7jV7Mm15B0bkR7grLx+vN5lXVeGwyDL2dbRT0+cH8loHb+lBOR8AbDm4SJXdaRd
-DtPyq85KN+jm+9NToRz+oydL9rmguU5zRcIDtaFiYr7ZtkLJU3U02rp0uf/DdytF
-tzS/YEbpgg2Ui37q55ml707zJL2DvBffy/F2kiNpVfZ4u5cAEQEAAYkEPgQYAQIA
-CQUCV5dofwIbAgIpCRDNhLztYmRx8cFdIAQZAQIABgUCV5dofwAKCRD5NSWoi2mQ
-KQ/PD/9c/snQ2iok9H9PFinYmuOA6tf4Nbn0yX9oOTslDJ8ot6SB4OXGXGeT0lvq
-ytbYVeAlifBElYRVFYZt76dbjhqmsmDMZsYHbaXIYLZSPuTETVE3pZrpWhm9Qkhb
-eEyihAofgWleBmJcd8VXnrzsNkJGNokA6gqZ/ldqJtzMwkeHM58DHo/gFNNNlxe8
-M83PHA0rN48F6DU4tZeEvz+/QGrnn4DWcBhmWo+2ZLvTLI4cB9389j8ks7FFFXLi
-1gnWigWr29uGv8iZpAneY6414cZW3G79wTIwAATRvIvrI9pcvriUrMdOycTcwXOa
-d9eXq/mJdg8dEpKiIA8Vc9UNdT93aZt8r610LbORmdq+wFjEhWvh7xKu9hFm/3UM
-QUaVl3jsIlqZT4G8es+RLHnKVOzLMRovqRKRbsCsXxIxsVqxzhKQ5+wLCpisVNfH
-51WCTSLoAz7s0jKLCSzueUIbhV2vNBM5lFLNCl35UgN1aYuRusI7GyqkPT/A8VWj
-xVxn7o2SBIwyu4hZ4jFsq3qHOygIuRtdOHRX1vREmp7FA3+fVnx0CJUilfnGjhf/
-oydfEC6GuWUn9kTEf2eJsONwQ9gPQ9QC9cFGRFRrVwQcejr7V+DBZSdzY8YLvn7R
-qR3MmlXdpWijqj7noi2C+kbVqbLiX/LWe2axgKE+UTB7lGdl7v25D/99uFIzJmqA
-dhEAEQgb17L7kOV0MOBwFtZ6fElJaQEQV49JiQmgTzALDgXD0ACpT5qoQYCBTwuz
-m2D93ekfMnzxF8PmwW6a2czrG1KoRir2EayhgEoOJuWHLneb5nUc7X3krGNSJ3my
-+lMw2QA3wIX7EAS6JJUnZFp7wawecdCekRF9ZE1Z/ZBiUZR17DkbAoYjEYZFxiXA
-cG6sFEM9uTG+y91RcQPq8tY+jw2d76ZjHSnoKjnP2VxsmtiWQ7yLj/5tjrVzQftI
-bbQQTK4V4O4aV2Y1wgkDbNPNJ6t0biQkHQv+4vaLMonOfMgGdWdYJ4hE9nlt61Aq
-GidOnyMxOb+2XpVypOoOPcTyTqe8BUjCcvHQwukZLk3XE7OQoR0wZBFhOr4JCYzT
-xIz9XYrSykZgkZMp8O4zbP+j1ZTXtJEvvPHjOS1HkL1O1H+W98dnl+oQMNQhHvvE
-6UfWEolfuWvBpfP12pUnRQAAyCBql4JAFeoCJEdJGkz8oFOFxv0kCpd7JM1gWEs2
-u0w61+5MelmliHImWiyhgV4XyKW6jeKWIpe9E5L7b8SPI5HHdT7opy3G7aD1XI3k
-jdaIiMnJbq0nSvc5VqRE7Uv0EEcepvFeiuYHYydluxRyNf/ts2JskfEnsOc1JiS+
-GPeIoGmFL85qtFOzc4sqYQGhLj9iMRfmNw==
-=W2Tk
------END PGP PUBLIC KEY BLOCK-----
+++ /dev/null
------BEGIN PGP PUBLIC KEY BLOCK-----
-Comment: LEDE 17.01 "Reboot" public key
-
-mQINBFh9DQ8BEACmjR9z4mEXjTWBTcqHI8U38III55qStU4zX4mtYEm8KjaNyBu0
-F8ghe22IAPQcHuvQh0lzr2AoTYi+ZAUlHrLb3s+YdJJD2KoSD1nXW8PgtoT92tai
-utJjSKsB2ZWJc4nskAYXTkDmhTuuHBEg9hvljhXkrPxmcEDN/v1f5fv82U8JLYwt
-g1mGJmW7SsdKtkJbAmEMCi/MFFA2fxLNV33qGhzm4UeAsUrLIGBjbCtU/BK8Im28
-eAF9VP08OUK/QX7te6K6qumvuEIIc/GG4yatdbxltS1SjWYMS0vpqXm4v50CoMaB
-/XCcdq1zlIyIxQW9UF6xJDLhsHv/3iOginR/vRDbdRWk/YPwlx/d9h9GK309YhXu
-GUK/lrBHIZwZ4VEowYjK76isXmRuU9ZeTK9SeKdIyLzYg5NIXW9cvGR+4NKIqfmE
-xxbVupm7Vc+3n4KUdS2t9SLXdkG+YYmyDabftyuACU2+xeHyKcUBn4yxbrcBp5Rs
-5RgOIn/2BtiEQNSc8AagU1ie57VGErrwrpdW/Cmxrs+KG7Io8Pwv+nG9M53DqPwb
-Zuun75iuni9wAR5IVUsUWdIoalb/I4ht58FDOt2iS/KdVwi8yyCHS8gH1J3MzZWP
-Yy9k0pgup54CTXGv/KzDOAsPZzkwNiziWIVE0N49bZFkO0CXgAufOAEtewARAQAB
-tFNMRURFIFJlbGVhc2UgQnVpbGRlciAoMTcuMDEgIlJlYm9vdCIgU2lnbmluZyBL
-ZXkpIDxsZWRlLWRldkBsaXN0cy5sZWRlLXByb2plY3Qub3JnPokCPgQTAQIAKAUC
-WH0NDwIbAwUJA8JnAAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQgzxgENUr
-u2tMaA//aRvfrOoMTVtjw+Pru+hBC7IhkusJ70x8gUxSPmHZX0+KvIvILyAeVEho
-TW5lMwwo6b66GcBmP53qu/rech8HyunyyDUYFEvdE/ym3uO6NpE/3N/Z69TJiC+k
-1imElx5njTZkH/qZSClqN8j6ehspywnSKWNfSOM/9K1G7qtWgiqIaDYa+sdtRHjx
-oh4dtKiauUced0C1i7V1vT1ko8iZKWFiwj9GJSaoVxyUwI2fG3iV2qdcinPCL0nU
-BfVIhU5cXMZ6VtVg5Ly6NqUbrhZzVVl8DMnu5z4MOLZWseob4LhK5W0v+DUTezJS
-Cvei+woJ3SIy0CLXe6eDKwbCS5kCaoNbExeTnSz7/Mg14NjREhtWkq79rnHrH9MV
-QAXyjmd3q0D5sDLzk8nQ3fGaH1Zg+o+VECkwEwz4ypctXqRAcHyIkYHmv8rFYlQY
-dJlfs1NgZzk9EWfZ0/RLUdqNx6beKm27r2W1j+gcaM01sk5q9TPZeuNHh8psFlCD
-b5mq6XBstA9NwN9pg5zS+UkfjjMU5FiBIEVv4Lt/dblNkjID/+XUBkHpSAz13GDW
-k0ElkSBgBvz8TSm68EUGTfTVhK21x+1x15/8AUoV8V+4txncMhnJNmrEcKolnMeF
-96xgcoHpPszlHxjiwS6hrFPDyhfYwU9plDI7ojcIleqK98XjRHY=
-=aN5O
------END PGP PUBLIC KEY BLOCK-----
wget "$SDK_PATH/sha256sums.gpg" -O sha256sums.asc
# LEDE Build System (LEDE GnuPG key for unattended build jobs)
- gpg --import $PACKAGES_DIR/.travis/626471F1.asc
+ gpg --import $PACKAGES_DIR/.keys/626471F1.asc
echo '54CC74307A2C6DC9CE618269CD84BCED626471F1:6:' | gpg --import-ownertrust
# LEDE Release Builder (17.01 "Reboot" Signing Key)
- gpg --import $PACKAGES_DIR/.travis/D52BBB6B.asc
+ gpg --import $PACKAGES_DIR/.keys/D52BBB6B.asc
echo 'B09BE781AE8A0CD4702FDCD3833C6010D52BBB6B:6:' | gpg --import-ownertrust
echo_blue "=== Verifying sha256sums signature"
echo_blue "=== $pkg_name: Starting quick tests"
exec_status '^ERROR' make "package/$pkg_name/download" V=s || RET=1
- exec_status '^ERROR' make "package/$pkg_name/check" V=s || RET=1
+ badhash_msg_regex="HASH does not match "
+ badhash_msg_regex="$badhash_msg_regex|HASH uses deprecated hash,"
+ badhash_msg_regex="$badhash_msg_regex|HASH is missing,"
+ exec_status '^ERROR'"|$badhash_msg_regex" make "package/$pkg_name/check" V=s || RET=1
echo_blue "=== $pkg_name: quick tests done"
done
# Contributing Guidelines
-(See <http://wiki.openwrt.org/doc/devel/packages> for overall format and construction)
+Ref: <https://openwrt.org/docs/guide-developer/packages> for overall format and construction
### Basic guidelines
All packages you commit or submit by pull-request should follow these simple guidelines:
-* Package a version which is still maintained by the upstream author.
-* Will be updated regularly to maintained and supported versions.
+
+* Package a version which is still maintained by the upstream author and will be updated regularly with supported versions.
* Have no dependencies outside the OpenWrt core packages or this repository feed.
* Have been tested to compile with the correct includes and dependencies. Please also test with "Compile with full language support" found under "General Build Settings" set if language support is relevant to your package.
-* Do NOT use a rolling source file (e.g. foo-latest.tar.gz) or the head of a branch as source for the package since that would create unpredictable builds which change over time.
* Best of all -- it works as expected!
+### Package Sources (archives and repositories)
+
+* PKG_SOURCE should reference the smallest available archive. In order of preference: xz (most compressed), bzip2, gz and zip. As a last resort, downloads from source repositories can be used.
+* PKG_SOURCE_URL should link to an official release archive. Use of HTTPS: is preferred. If a source archive is not available, a locally generated archive fetched using git, svn, cvs or in rare circumstances, hg or bzr.
+* Convenience macros for popular mirrors are defined. Using these macros will make your package downloads more robust by mapping to a list of possible source mirrors for archive availability.
+ - @SF - Sourceforge (downloads.sourceforge.net) with 5 retries due to re-directs
+ - @GITHUB - Github (raw.githubusercontent.com) with 5 retries due to re-directs
+ - @GNU - 8 regional servers
+ - @GNOME - 8 regional servers
+ - @SAVANNAH - 8 regional servers
+ - @APACHE - 8 regional servers
+ - @KERNEL - Linux kernel archives & mirrors
+* Please *DO NOT* use an archive which changes over time. A version labeled "latest" is not constant each download. Also, using the head of a branch will create unpredictable results which can be different each build.
+
#### Makefile contents should contain:
-* An up-to-date copyright notice. Use OpenWrt if no other present or supply your own.
-* A (PKG_)MAINTAINER definition listing either yourself or another person in the field.
- (E.g.: PKG_MAINTAINER:= Joe D. Hacker `<jdh@jdhs-email-provider.org`>)
+* Provide an up-to-date Copyright notice or **none**. Copyright should not be assigned to OpenWrt unless you are explicitly requested by or working under contract to OpenWrt. Assigning a Copyright to yourself or organization you represent is acceptable.
+* A (PKG_)MAINTAINER definition listing either yourself and/or another person responsible for this package (E.g.: PKG_MAINTAINER:= Joe D. Hacker `<jdh@jdhs-email-provider.org`>). Listing multiple maintainers is encouraged in order to keep the package active and up-to-date. Leaving this blank will also be accepted, however the review process may not be as quick as one with a maintainer.
* A PKG_LICENSE tag declaring the main license of the package.
(E.g.: PKG_LICENSE:=GPL-2.0+) Please use SPDX identifiers if possible (see list at the bottom).
* An optional PKG_LICENSE_FILES tag including the filenames of the license-files in the source-package.
* PKG_RELEASE should be initially set to 1 or reset to 1 if the software version is changed. You should increment it if the package itself has changed. For example, modifying a support script, changing configure options like --disable* or --enable* switches, or if you changed something in the package which causes the resulting binaries to be different. Changes like correcting md5sums, changing mirror URLs, adding a maintainer field or updating a comment or copyright year in a Makefile do not require a change to PKG_RELEASE.
* Avoid reuse of PKG_NAME in call, define and eval lines to improve readability.
+
#### Commits in your pull-requests should:
* Have a useful description prefixed with the package name
(E.g.: "foopkg: Add libzot dependency")
-* Include Signed-off-by in the comment
- (See <https://dev.openwrt.org/wiki/SubmittingPatches#a10.Signyourwork>)
+* Include Signed-off-by tag in the commit comments.
+ See: [Sign your work](https://openwrt.org/docs/guide-developer/submittingpatches-tomerge?s[]=sign#sign_your_work)
### Advice on pull requests:
This is the OpenWrt "packages"-feed containing community-maintained build scripts, options and patches for applications, modules and libraries used within OpenWrt.
-Installation of pre-built packages is handled directly by the **opkg** utility within your running OpenWrt system or by using the [OpenWrt SDK](http://wiki.openwrt.org/doc/howto/obtain.firmware.sdk) on a build system.
+Installation of pre-built packages is handled directly by the **opkg** utility within your running OpenWrt system or by using the [OpenWrt SDK](https://openwrt.org/docs/guide-developer/obtain.firmware.sdk) on a build system.
## Usage
-This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: [OpenWrt Buildroot – Installation](http://wiki.openwrt.org/doc/howto/buildroot.exigence) on the OpenWrt support site.
+This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: [OpenWrt Buildroot – Installation](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem) on the OpenWrt support site.
This feed is enabled by default. To install all its package definitions, run:
```
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=atop
+PKG_RELEASE:=1
+PKG_VERSION:=2.3.0
+PKG_LICENSE:=GPL-2.0
+PKG_SOURCE_URL:=https://www.atoptool.nl/download/
+PKG_HASH:=73e4725de0bafac8c63b032e8479e2305e3962afbe977ec1abd45f9e104eb264
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/atop
+ SECTION:=admin
+ CATEGORY:=Administration
+ TITLE:=System and process monitor for Linux
+ DEPENDS:=+zlib +libncurses
+ URL:=https://www.atoptool.nl/
+ MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
+endef
+
+define Package/atop/description
+ Atop is an ASCII full-screen performance monitor for
+ Linux that is capable of reporting the activity of all
+ processes (even if processes have finished during the
+ interval), daily logging of system and process activity
+ for long-term analysis, highlighting overloaded system
+ resources by using colors, etcetera. At regular
+ intervals, it shows system-level activity related to the
+ CPU, memory, swap, disks (including LVM) and network
+ layers, and for every process (and thread) it shows e.g.
+ the CPU utilization, memory growth, disk utilization,
+ priority, username, state, and exit code. In combination
+ with the optional kernel module netatop, it even shows
+ network activity per process/thread.
+endef
+
+MAKE_FLAGS += \
+ CFLAGS+="-Wno-misleading-indentation -Wno-unused-const-variable -Wno-format-truncation"
+
+define Package/atop/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/atop $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,atop))
include $(TOPDIR)/rules.mk
PKG_NAME:=htop
-PKG_VERSION:=2.1.0
-PKG_RELEASE:=1
+PKG_VERSION:=2.2.0
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://hisham.hm/htop/releases/$(PKG_VERSION)/
-PKG_HASH:=3260be990d26e25b6b49fc9d96dbc935ad46e61083c0b7f6df413e513bf80748
+PKG_SOURCE_URL:=https://hisham.hm/htop/releases/$(PKG_VERSION)/
+PKG_HASH:=d9d6826f10ce3887950d709b53ee1d8c1849a70fa38e91d5896ad8cbc6ba3c57
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:htop:htop
-PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Administration
TITLE:=Interactive processes viewer
DEPENDS:=+libncurses
- URL:=http://htop.sourceforge.net/
+ URL:=https://hisham.hm/htop/
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
endef
PKG_NAME:=ipmitool
PKG_VERSION:=1.8.18
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
--- /dev/null
+From b57487e360916ab3eaa50aa6d021c73b6337a4a0 Mon Sep 17 00:00:00 2001
+From: Dennis Schridde <dennis.schridde@uni-heidelberg.de>
+Date: Wed, 30 Nov 2016 17:33:00 +0100
+Subject: [PATCH 1/4] ID:461 - OpenSSL 1.1 compatibility - "error: storage size
+ of 'ctx' isn't known"
+
+In OpenSSL 1.1 EVP_CIPHER_CTX became opaque, cf. `man 3ssl EVP_EncryptInit`
+
+Fixes: ID:461
+---
+ src/plugins/lanplus/lanplus_crypt_impl.c | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c
+index d5fac37..3c0df23 100644
+--- a/src/plugins/lanplus/lanplus_crypt_impl.c
++++ b/src/plugins/lanplus/lanplus_crypt_impl.c
+@@ -164,10 +164,10 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+ uint8_t * output,
+ uint32_t * bytes_written)
+ {
+- EVP_CIPHER_CTX ctx;
+- EVP_CIPHER_CTX_init(&ctx);
+- EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv);
+- EVP_CIPHER_CTX_set_padding(&ctx, 0);
++ EVP_CIPHER_CTX* ctx;
++ EVP_CIPHER_CTX_init(ctx);
++ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
++ EVP_CIPHER_CTX_set_padding(ctx, 0);
+
+
+ *bytes_written = 0;
+@@ -191,7 +191,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+ assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0);
+
+
+- if(!EVP_EncryptUpdate(&ctx, output, (int *)bytes_written, input, input_length))
++ if(!EVP_EncryptUpdate(ctx, output, (int *)bytes_written, input, input_length))
+ {
+ /* Error */
+ *bytes_written = 0;
+@@ -201,7 +201,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+ {
+ uint32_t tmplen;
+
+- if(!EVP_EncryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen))
++ if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
+ {
+ *bytes_written = 0;
+ return; /* Error */
+@@ -210,7 +210,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+ {
+ /* Success */
+ *bytes_written += tmplen;
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_cleanup(ctx);
+ }
+ }
+ }
+@@ -239,10 +239,10 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+ uint8_t * output,
+ uint32_t * bytes_written)
+ {
+- EVP_CIPHER_CTX ctx;
+- EVP_CIPHER_CTX_init(&ctx);
+- EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv);
+- EVP_CIPHER_CTX_set_padding(&ctx, 0);
++ EVP_CIPHER_CTX* ctx;
++ EVP_CIPHER_CTX_init(ctx);
++ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
++ EVP_CIPHER_CTX_set_padding(ctx, 0);
+
+
+ if (verbose >= 5)
+@@ -266,7 +266,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+ assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0);
+
+
+- if (!EVP_DecryptUpdate(&ctx, output, (int *)bytes_written, input, input_length))
++ if (!EVP_DecryptUpdate(ctx, output, (int *)bytes_written, input, input_length))
+ {
+ /* Error */
+ lprintf(LOG_DEBUG, "ERROR: decrypt update failed");
+@@ -277,7 +277,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+ {
+ uint32_t tmplen;
+
+- if (!EVP_DecryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen))
++ if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
+ {
+ char buffer[1000];
+ ERR_error_string(ERR_get_error(), buffer);
+@@ -290,7 +290,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+ {
+ /* Success */
+ *bytes_written += tmplen;
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_cleanup(ctx);
+ }
+ }
+
+--
+2.16.1
+
--- /dev/null
+From 77fe5635037ebaf411cae46cf5045ca819b5c145 Mon Sep 17 00:00:00 2001
+From: Zdenek Styblik <stybla@turnovfree.net>
+Date: Sun, 15 Jan 2017 15:11:25 +0100
+Subject: [PATCH 2/4] ID:461 - Make compiler happier about changes related to
+ OpenSSL 1.1
+
+Complaint was that ctx isn't initialized.
+---
+ src/plugins/lanplus/lanplus_crypt_impl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c
+index 3c0df23..d12d0e3 100644
+--- a/src/plugins/lanplus/lanplus_crypt_impl.c
++++ b/src/plugins/lanplus/lanplus_crypt_impl.c
+@@ -164,7 +164,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+ uint8_t * output,
+ uint32_t * bytes_written)
+ {
+- EVP_CIPHER_CTX* ctx;
++ EVP_CIPHER_CTX *ctx = NULL;
+ EVP_CIPHER_CTX_init(ctx);
+ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
+@@ -239,7 +239,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+ uint8_t * output,
+ uint32_t * bytes_written)
+ {
+- EVP_CIPHER_CTX* ctx;
++ EVP_CIPHER_CTX *ctx = NULL;
+ EVP_CIPHER_CTX_init(ctx);
+ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
+--
+2.16.1
+
--- /dev/null
+From f004b4b7197fc83e7d47ec8cbcaefffa9a922717 Mon Sep 17 00:00:00 2001
+From: Zdenek Styblik <stybla@turnovfree.net>
+Date: Sun, 12 Mar 2017 14:00:35 +0100
+Subject: [PATCH 3/4] ID:480 - ipmitool coredumps in EVP_CIPHER_CTX_init
+
+IPMI tool coredumps due to changes introduced in ID:461. This shouldn't be
+surprise as a NULL pointer is passed to init. Commit addresses this issue by
+calling EVP_CIPHER_CTX_new() instead of EVP_CIPHER_CTX_init(), which is
+deprecated, and by checking return value of call to former function.
+---
+ src/plugins/lanplus/lanplus_crypt_impl.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c
+index d12d0e3..0e330c1 100644
+--- a/src/plugins/lanplus/lanplus_crypt_impl.c
++++ b/src/plugins/lanplus/lanplus_crypt_impl.c
+@@ -165,10 +165,13 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+ uint32_t * bytes_written)
+ {
+ EVP_CIPHER_CTX *ctx = NULL;
+- EVP_CIPHER_CTX_init(ctx);
++ ctx = EVP_CIPHER_CTX_new();
++ if (ctx == NULL) {
++ *bytes_written = 0;
++ return;
++ }
+ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
+-
+
+ *bytes_written = 0;
+
+@@ -240,11 +243,14 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+ uint32_t * bytes_written)
+ {
+ EVP_CIPHER_CTX *ctx = NULL;
+- EVP_CIPHER_CTX_init(ctx);
++ ctx = EVP_CIPHER_CTX_new();
++ if (ctx == NULL) {
++ *bytes_written = 0;
++ return;
++ }
+ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
+
+-
+ if (verbose >= 5)
+ {
+ printbuf(iv, 16, "decrypting with this IV");
+--
+2.16.1
+
--- /dev/null
+From 1664902525a1c3771b4d8b3ccab7ea1ba6b2bdd1 Mon Sep 17 00:00:00 2001
+From: Holger Liebig <holger.liebig@ts.fujitsu.com>
+Date: Tue, 4 Apr 2017 20:43:05 +0200
+Subject: [PATCH 4/4] ID:480 - Call EVP_CIPHER_CTX_free() instead of
+ EVP_CIPHER_CTX_cleanup()
+
+Call EVP_CIPHER_CTX_free() instead of EVP_CIPHER_CTX_cleanup() to fix memory
+leak.
+---
+ src/plugins/lanplus/lanplus_crypt_impl.c | 44 +++++++++++++++++---------------
+ 1 file changed, 23 insertions(+), 21 deletions(-)
+
+diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c
+index 0e330c1..9652a5e 100644
+--- a/src/plugins/lanplus/lanplus_crypt_impl.c
++++ b/src/plugins/lanplus/lanplus_crypt_impl.c
+@@ -165,13 +165,6 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+ uint32_t * bytes_written)
+ {
+ EVP_CIPHER_CTX *ctx = NULL;
+- ctx = EVP_CIPHER_CTX_new();
+- if (ctx == NULL) {
+- *bytes_written = 0;
+- return;
+- }
+- EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
+- EVP_CIPHER_CTX_set_padding(ctx, 0);
+
+ *bytes_written = 0;
+
+@@ -185,6 +178,14 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+ printbuf(input, input_length, "encrypting this data");
+ }
+
++ ctx = EVP_CIPHER_CTX_new();
++ if (ctx == NULL) {
++ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
++ return;
++ }
++ EVP_CIPHER_CTX_init(ctx);
++ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
++ EVP_CIPHER_CTX_set_padding(ctx, 0);
+
+ /*
+ * The default implementation adds a whole block of padding if the input
+@@ -198,7 +199,6 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+ {
+ /* Error */
+ *bytes_written = 0;
+- return;
+ }
+ else
+ {
+@@ -206,16 +206,17 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+
+ if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
+ {
++ /* Error */
+ *bytes_written = 0;
+- return; /* Error */
+ }
+ else
+ {
+ /* Success */
+ *bytes_written += tmplen;
+- EVP_CIPHER_CTX_cleanup(ctx);
+ }
+ }
++ /* performs cleanup and free */
++ EVP_CIPHER_CTX_free(ctx);
+ }
+
+
+@@ -243,13 +244,6 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+ uint32_t * bytes_written)
+ {
+ EVP_CIPHER_CTX *ctx = NULL;
+- ctx = EVP_CIPHER_CTX_new();
+- if (ctx == NULL) {
+- *bytes_written = 0;
+- return;
+- }
+- EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
+- EVP_CIPHER_CTX_set_padding(ctx, 0);
+
+ if (verbose >= 5)
+ {
+@@ -258,12 +252,20 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+ printbuf(input, input_length, "decrypting this data");
+ }
+
+-
+ *bytes_written = 0;
+
+ if (input_length == 0)
+ return;
+
++ ctx = EVP_CIPHER_CTX_new();
++ if (ctx == NULL) {
++ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
++ return;
++ }
++ EVP_CIPHER_CTX_init(ctx);
++ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
++ EVP_CIPHER_CTX_set_padding(ctx, 0);
++
+ /*
+ * The default implementation adds a whole block of padding if the input
+ * data is perfectly aligned. We would like to keep that from happening.
+@@ -277,7 +279,6 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+ /* Error */
+ lprintf(LOG_DEBUG, "ERROR: decrypt update failed");
+ *bytes_written = 0;
+- return;
+ }
+ else
+ {
+@@ -285,20 +286,21 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+
+ if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
+ {
++ /* Error */
+ char buffer[1000];
+ ERR_error_string(ERR_get_error(), buffer);
+ lprintf(LOG_DEBUG, "the ERR error %s", buffer);
+ lprintf(LOG_DEBUG, "ERROR: decrypt final failed");
+ *bytes_written = 0;
+- return; /* Error */
+ }
+ else
+ {
+ /* Success */
+ *bytes_written += tmplen;
+- EVP_CIPHER_CTX_cleanup(ctx);
+ }
+ }
++ /* performs cleanup and free */
++ EVP_CIPHER_CTX_free(ctx);
+
+ if (verbose >= 5)
+ {
+--
+2.16.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=monit
-PKG_VERSION:=5.24.0
+PKG_VERSION:=5.25.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=754d1f0e165e5a26d4639a6a83f44ccf839e381f2622e0946d5302fa1f2d2414
PKG_SOURCE_URL:=https://mmonit.com/monit/dist
+PKG_HASH:=aa0ce6361d1155e43e30a86dcff00b2003d434f221c360981ced830275abc64a
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:tildeslash:monit
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
--- a/configure
+++ b/configure
-@@ -13852,14 +13852,7 @@ fi
+@@ -14390,14 +14390,7 @@ fi
# Find the right directory to put the root-mode PID file in
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pid file location" >&5
$as_echo_n "checking pid file location... " >&6; }
PKG_NAME:=muninlite
PKG_VERSION:=1.0.4
-PKG_RELEASE:=8
+PKG_RELEASE:=9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
--- /dev/null
+--- a/plugins/irqstats 2007-11-30 11:39:08.000000000 +0100
++++ b/plugins/irqstats 2018-08-29 08:20:50.809468406 +0200
+@@ -1,6 +1,6 @@
+ config_irqstats() {
+ echo "graph_title Individual interrupts
+-graph_args --base 1000 -l 0;
++graph_args --base 1000 -l 0
+ graph_vlabel interrupts / \${graph_period}
+ graph_category system"
+ CPUS=$(grep 'CPU[0-9]' /proc/interrupts | wc -w)
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=netatop
+PKG_RELEASE:=1
+PKG_VERSION:=2.0
+PKG_LICENSE:=GPL-2.0
+PKG_SOURCE_URL:=https://www.atoptool.nl/download/
+PKG_HASH:=c66d7ca094d667428924f2faff2afb816b17565e8c3628e43bfa0e1a2e22c20e
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+define KernelPackage/netatop
+ URL:=https://www.atoptool.nl/
+ CATEGORY:=Kernel modules
+ SUBMENU:=Netfilter Extensions
+ TITLE:=netatop netfilter module
+ FILES:= \
+ $(PKG_BUILD_DIR)/module/netatop.$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoProbe,netatop)
+endef
+
+define KernelPackage/netatop/description
+ The optional kernel module netatop can be loaded to gather statistics about
+ the TCP and UDP packets that have been transmitted/received per process and
+ per thread. As soon as atop discovers that this module is active, it shows
+ the columns SNET and RNET in the generic screen for the number of transmitted
+ and received packets per process. When the 'n' key is pressed, it shows
+ detailed counters about the number packets transmitted/received via TCP and
+ UDP, the average sizes of these packets, and the total bandwidth consumed
+ for input and output per process/thread.
+endef
+
+define Package/netatop
+ SECTION:=admin
+ CATEGORY:=Administration
+ TITLE:=network counter for atop
+ DEPENDS:=+zlib +kmod-netatop
+ URL:=https://www.atoptool.nl/
+endef
+
+define Package/netatop/description
+ The daemon netatopd is packaged with the netatop kernel module. This
+ daemon takes care that information is gathered about processes that are
+ finished. For every finished process that has transferred network packets,
+ a binary record is written to a dedicated logfile. The added records in the
+ logfile are read by atop with every sample to show information about the
+ network activity of finished processes as well.
+endef
+
+NETATOP_KMOD_MAKEOPTS= \
+ ARCH="$(LINUX_KARCH)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ KERNDIR="$(LINUX_DIR)"
+NETATOP_DAEMON_MAKEOPTS= \
+ CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)"
+
+define Build/Compile/netatop
+ $(MAKE) -C $(PKG_BUILD_DIR)/module \
+ $(NETATOP_KMOD_MAKEOPTS) \
+ netatop.$(LINUX_KMOD_SUFFIX)
+ $(MAKE) -C $(PKG_BUILD_DIR)/daemon \
+ $(NETATOP_DAEMON_MAKEOPTS) \
+ all
+endef
+
+define Build/Compile
+ $(call Build/Compile/netatop)
+endef
+
+define Package/netatop/install
+ $(INSTALL_DIR) $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemon/netatopd $(1)/usr/sbin/
+endef
+
+$(eval $(call KernelPackage,netatop))
+$(eval $(call BuildPackage,netatop))
--- /dev/null
+diff --git a/daemon/Makefile b/daemon/Makefile
+index e028e95..1233855 100644
+--- a/daemon/Makefile
++++ b/daemon/Makefile
+@@ -6,7 +6,7 @@ THISDIR = $(shell pwd)
+ all: netatopd
+
+ netatopd: netatopd.o Makefile
+- $(CC) netatopd.o -o netatopd -lz
++ $(CC) $(LDFLAGS) netatopd.o -o netatopd -lz
+
+ clean:
+ rm -f *.o netatopd
PKG_NAME:=netdata
PKG_VERSION:=1.10.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
mkdir -p $(1)/etc/netdata
$(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc
$(CP) ./files/netdata.conf $(1)/etc/netdata
+ mkdir -p $(1)/etc/netdata/custom-plugins.d
+
mkdir -p $(1)/usr/share/netdata
$(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share
rm -rf $(1)/usr/share/netdata/web/images
rm $(1)/usr/share/netdata/web/fonts/*.svg
rm $(1)/usr/share/netdata/web/fonts/*.ttf
rm $(1)/usr/share/netdata/web/fonts/*.woff
+
mkdir -p $(1)/usr/lib/netdata
$(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
rm $(1)/usr/lib/netdata/python.d/python-modules-installer.sh
chmod 4755 $(1)/usr/lib/netdata/plugins.d/apps.plugin
+
mkdir -p $(1)/etc/init.d
$(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata
+
mkdir -p $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=sudo
-PKG_VERSION:=1.8.21p2
+PKG_VERSION:=1.8.24
PKG_RELEASE:=1
-PKG_LICENSE:=ISC
-PKG_LICENSE_FILES:=doc/LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.sudo.ws/dist
-PKG_HASH:=74c5746cd33a814e2431c39faf0d76f7f8a697379bd073862e3b156cf0d76368
+PKG_SOURCE_URL:=https://www.sudo.ws/dist
+PKG_HASH:=b488557a198ecef30b7ad4011b59a66232dec2364ad956e11d8e17906c225be8
+
+PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=doc/LICENSE
+PKG_CPE_ID:=cpe:/a:todd_miller:sudo
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=sudo/host
SECTION:=admin
CATEGORY:=Administration
TITLE:=Delegate authority to run commands
- URL:=http://www.sudo.ws/
+ URL:=https://www.sudo.ws/
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
endef
-diff -rupN sudo-1.8.11p2.orig/lib/util/Makefile.in sudo-1.8.11p2/lib/util/Makefile.in
---- sudo-1.8.11p2.orig/lib/util/Makefile.in 2014-10-07 22:26:20.000000000 +0200
-+++ sudo-1.8.11p2/lib/util/Makefile.in 2014-12-09 21:44:35.610041162 +0100
-@@ -142,10 +142,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@
+--- a/lib/util/Makefile.in
++++ b/lib/util/Makefile.in
+@@ -161,10 +161,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@
esac
siglist.c: mksiglist
+ mksigname > $@
mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/sudo_compat.h $(top_builddir)/config.h
- $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(srcdir)/mksiglist.c -o $@
-diff -rupN sudo-1.8.11p2.orig/Makefile.in sudo-1.8.11p2/Makefile.in
---- sudo-1.8.11p2.orig/Makefile.in 2014-10-07 22:26:20.000000000 +0200
-+++ sudo-1.8.11p2/Makefile.in 2014-12-09 22:00:27.256934143 +0100
-@@ -62,7 +62,7 @@ SHELL = @SHELL@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -63,7 +63,7 @@ SHELL = @SHELL@
SED = @SED@
INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
+++ /dev/null
-diff -rupN sudo-1.8.14p3.orig/include/sudo_util.h sudo-1.8.14p3/include/sudo_util.h
---- sudo-1.8.14p3.orig/include/sudo_util.h 2015-07-22 14:22:49.000000000 +0200
-+++ sudo-1.8.14p3/include/sudo_util.h 2015-08-30 18:41:24.509814946 +0200
-@@ -23,6 +23,8 @@
- # include "compat/stdbool.h"
- #endif /* HAVE_STDBOOL_H */
-
-+#include <sys/types.h>
-+
- /*
- * Macros for operating on struct timeval.
- */
include $(TOPDIR)/rules.mk
PKG_NAME:=syslog-ng
-PKG_VERSION:=3.9.1
-PKG_RELEASE:=3
+PKG_VERSION:=3.17.2
+PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_HASH:=5678856a550ae790618fabde9d1447f932ce7a9080d55dca8fc5df1202c70a17
+PKG_HASH:=73601f7ca13c6b534318d5b0648ec1833aa9ca0516d6c3f90085b090d548c50b
PKG_INSTALL:=1
define Package/syslog-ng
SECTION:=admin
CATEGORY:=Administration
- DEPENDS:=+libpcre +glib2 +libeventlog +libopenssl +libuuid +libcurl
+ DEPENDS:=+libpcre +glib2 +libopenssl +libuuid +libcurl
TITLE:=A powerful syslog daemon
URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/
endef
-@version:3.9
+@version: 3.17
options {
chain_hostnames(no);
--- /dev/null
+diff --git a/configure.ac b/configure.ac
+index 94f950c76..e3bda0599 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -783,6 +783,7 @@ AC_CHECK_FUNCS(strdup \
+ strcasestr \
+ memrchr \
+ localtime_r \
++ getprotobynumber_r \
+ gmtime_r \
+ strnlen \
+ strtok_r)
+diff --git a/lib/compat/CMakeLists.txt b/lib/compat/CMakeLists.txt
+index 4fa05d7e0..95fcb0e0d 100644
+--- a/lib/compat/CMakeLists.txt
++++ b/lib/compat/CMakeLists.txt
+@@ -10,7 +10,8 @@ set(COMPAT_HEADERS
+ compat/openssl_support.h
+ compat/pcre.h
+ compat/getent.h
+- compat/getent-bb.h
++ compat/getent-sun.h
++ compat/getent-generic.h
+ PARENT_SCOPE)
+
+ set(COMPAT_SOURCES
+@@ -24,7 +25,8 @@ set(COMPAT_SOURCES
+ compat/strnlen.c
+ compat/time.c
+ compat/openssl_support.c
+- compat/getent.c
++ compat/getent-sun.c
++ compat/getent-generic.c
+ PARENT_SCOPE)
+
+ add_test_subdirectory(tests)
+diff --git a/lib/compat/Makefile.am b/lib/compat/Makefile.am
+index e5c1f4e56..8d5010558 100644
+--- a/lib/compat/Makefile.am
++++ b/lib/compat/Makefile.am
+@@ -13,9 +13,10 @@ compatinclude_HEADERS = \
+ lib/compat/string.h \
+ lib/compat/time.h \
+ lib/compat/openssl_support.h \
+- lib/compat/pcre.h \
+- lib/compat/getent.h \
+- lib/compat/getent-bb.h
++ lib/compat/pcre.h \
++ lib/compat/getent.h \
++ lib/compat/getent-sun.h \
++ lib/compat/getent-generic.h
+
+ compat_sources = \
+ lib/compat/getutent.c \
+@@ -28,6 +29,7 @@ compat_sources = \
+ lib/compat/strnlen.c \
+ lib/compat/time.c \
+ lib/compat/openssl_support.c \
+- lib/compat/getent.c
++ lib/compat/getent-sun.c \
++ lib/compat/getent-generic.c
+
+ include lib/compat/tests/Makefile.am
+diff --git a/lib/compat/getent-generic.c b/lib/compat/getent-generic.c
+new file mode 100644
+index 000000000..f75d1cc0a
+--- /dev/null
++++ b/lib/compat/getent-generic.c
+@@ -0,0 +1,150 @@
++/*
++ * Copyright (c) 2017 Balabit
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ * As an additional exemption you are allowed to compile & link against the
++ * OpenSSL libraries as published by the OpenSSL project. See the file
++ * COPYING for details.
++ *
++ */
++
++#include "compat/getent-generic.h"
++
++#ifndef SYSLOG_NG_HAVE_GETPROTOBYNUMBER_R
++
++#include <glib.h>
++#include <errno.h>
++
++G_LOCK_DEFINE_STATIC(getproto);
++
++/* this code does not support proto aliases, as we wouldn't be using
++ * them anyway. Should we ever want to support it, we would need to
++ * suballocate @buf and store all of the aliases in the same character
++ * array.
++ */
++static void
++_extract_protoent_fields(struct protoent *dst, struct protoent *src, char *buf, size_t buflen)
++{
++ g_strlcpy(buf, src->p_name, buflen);
++ dst->p_name = buf;
++ dst->p_aliases = NULL;
++ dst->p_proto = src->p_proto;
++}
++
++int
++_compat_generic__getprotobynumber_r(int proto,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result)
++{
++ struct protoent *pe;
++
++ G_LOCK(getproto);
++ pe = getprotobynumber(proto);
++
++ if (pe)
++ {
++ _extract_protoent_fields(result_buf, pe, buf, buflen);
++ *result = result_buf;
++ errno = 0;
++ }
++
++ G_UNLOCK(getproto);
++ return errno;
++}
++
++int
++_compat_generic__getprotobyname_r(const char *name,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result)
++{
++ struct protoent *pe;
++
++ G_LOCK(getproto);
++ pe = getprotobyname(name);
++
++ if (pe)
++ {
++ _extract_protoent_fields(result_buf, pe, buf, buflen);
++ *result = result_buf;
++ errno = 0;
++ }
++
++ G_UNLOCK(getproto);
++ return errno;
++}
++
++G_LOCK_DEFINE_STATIC(getserv);
++
++/* this code does not support service aliases or using the s_proto field, as
++ * we wouldn't be using them anyway. Should we ever want to support it, we
++ * would need to suballocate @buf and store all of the aliases in the same
++ * character array.
++ */
++static void
++_extract_servent_fields(struct servent *dst, struct servent *src, char *buf, size_t buflen)
++{
++ g_strlcpy(buf, src->s_name, buflen);
++ dst->s_name = buf;
++ dst->s_aliases = NULL;
++ dst->s_port = src->s_port;
++ /* we don't support s_proto */
++ dst->s_proto = NULL;
++}
++
++
++int
++_compat_generic__getservbyport_r(int port, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result)
++{
++ struct servent *se;
++
++ G_LOCK(getserv);
++ se = getservbyport(port, proto);
++
++ if (se)
++ {
++ _extract_servent_fields(result_buf, se, buf, buflen);
++ *result = result_buf;
++ errno = 0;
++ }
++
++ G_UNLOCK(getserv);
++ return errno;
++}
++
++int
++_compat_generic__getservbyname_r(const char *name, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result)
++{
++ struct servent *se;
++
++ G_LOCK(getserv);
++ se = getservbyname(name, proto);
++
++ if (se)
++ {
++ _extract_servent_fields(result_buf, se, buf, buflen);
++ *result = result_buf;
++ errno = 0;
++ }
++
++ G_UNLOCK(getserv);
++ return errno;
++}
++
++#endif
+diff --git a/lib/compat/getent-generic.h b/lib/compat/getent-generic.h
+new file mode 100644
+index 000000000..cc95a2646
+--- /dev/null
++++ b/lib/compat/getent-generic.h
+@@ -0,0 +1,54 @@
++/*
++ * Copyright (c) 2017 Balabit
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ * As an additional exemption you are allowed to compile & link against the
++ * OpenSSL libraries as published by the OpenSSL project. See the file
++ * COPYING for details.
++ *
++ */
++
++#ifndef COMPAT_GETENT_GENERIC_H_INCLUDED
++#define COMPAT_GETENT_GENERIC_H_INCLUDED
++
++#include "compat/compat.h"
++
++#ifndef SYSLOG_NG_HAVE_GETPROTOBYNUMBER_R
++
++#include <sys/types.h>
++#include <grp.h>
++#include <pwd.h>
++#include <netdb.h>
++
++int _compat_generic__getprotobynumber_r(int proto,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result);
++
++int _compat_generic__getprotobyname_r(const char *name,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result);
++
++int _compat_generic__getservbyport_r(int port, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result);
++
++int _compat_generic__getservbyname_r(const char *name, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result);
++
++#endif
++
++#endif
+diff --git a/lib/compat/getent.c b/lib/compat/getent-sun.c
+similarity index 63%
+rename from lib/compat/getent.c
+rename to lib/compat/getent-sun.c
+index bb9b5b431..dce676f2f 100644
+--- a/lib/compat/getent.c
++++ b/lib/compat/getent-sun.c
+@@ -21,40 +21,45 @@
+ *
+ */
+
+-#if defined(sun) || defined(__sun)
++#include "compat/getent-sun.h"
+
+-#include "compat/getent-bb.h"
++#if defined(sun) || defined(__sun)
+ #include <errno.h>
+
+-int bb__getprotobynumber_r(int proto,
+- struct protoent *result_buf, char *buf,
+- size_t buflen, struct protoent **result)
++int
++_compat_sun__getprotobynumber_r(int proto,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result)
+ {
+ *result = getprotobynumber_r(proto, result_buf, buf, buflen);
+ return (*result ? NULL : errno);
+ }
+
+-int bb__getprotobyname_r(const char *name,
+- struct protoent *result_buf, char *buf,
+- size_t buflen, struct protoent **result)
++int
++_compat_sun__getprotobyname_r(const char *name,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result)
+ {
+ *result = getprotobyname_r(name, result_buf, buf, buflen);
+ return (*result ? NULL : errno);
+ }
+
+-int bb__getservbyport_r(int port, const char *proto,
+- struct servent *result_buf, char *buf,
+- size_t buflen, struct servent **result)
++int
++_compat_sun__getservbyport_r(int port, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result)
+ {
+ *result = getservbyport_r(port, proto, result_buf, buf, buflen);
+ return (*result ? NULL : errno);
+ }
+
+-int bb__getservbyname_r(const char *name, const char *proto,
+- struct servent *result_buf, char *buf,
+- size_t buflen, struct servent **result)
++int
++_compat_sun__getservbyname_r(const char *name, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result)
+ {
+ *result = getservbyname_r(name, proto, result_buf, buf, buflen);
+ return (*result ? NULL : errno);
+ }
++
+ #endif
+diff --git a/lib/compat/getent-bb.h b/lib/compat/getent-sun.h
+similarity index 53%
+rename from lib/compat/getent-bb.h
+rename to lib/compat/getent-sun.h
+index 15aa2f5e5..fc1eccd2c 100644
+--- a/lib/compat/getent-bb.h
++++ b/lib/compat/getent-sun.h
+@@ -21,8 +21,10 @@
+ *
+ */
+
+-#ifndef GETENT_BB_H_INCLUDED
+-#define GETENT_BB_H_INCLUDED
++#ifndef COMPAT_GETENT_SUN_H_INCLUDED
++#define COMPAT_GETENT_SUN_H_INCLUDED
++
++#include "compat/compat.h"
+
+ #if defined(sun) || defined(__sun)
+
+@@ -31,21 +33,21 @@
+ #include <pwd.h>
+ #include <netdb.h>
+
+-int bb__getprotobynumber_r(int proto,
+- struct protoent *result_buf, char *buf,
+- size_t buflen, struct protoent **result);
++int _compat_sun__getprotobynumber_r(int proto,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result);
+
+-int bb__getprotobyname_r(const char *name,
+- struct protoent *result_buf, char *buf,
+- size_t buflen, struct protoent **result);
++int _compat_sun__getprotobyname_r(const char *name,
++ struct protoent *result_buf, char *buf,
++ size_t buflen, struct protoent **result);
+
+-int bb__getservbyport_r(int port, const char *proto,
+- struct servent *result_buf, char *buf,
+- size_t buflen, struct servent **result);
++int _compat_sun__getservbyport_r(int port, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result);
+
+-int bb__getservbyname_r(const char *name, const char *proto,
+- struct servent *result_buf, char *buf,
+- size_t buflen, struct servent **result);
++int _compat_sun__getservbyname_r(const char *name, const char *proto,
++ struct servent *result_buf, char *buf,
++ size_t buflen, struct servent **result);
+
+ #endif
+
+diff --git a/lib/compat/getent.h b/lib/compat/getent.h
+index 09a9f73d6..01c3deb6d 100644
+--- a/lib/compat/getent.h
++++ b/lib/compat/getent.h
+@@ -21,22 +21,28 @@
+ *
+ */
+
+-#ifndef GETENT_COMPAT_H_INCLUDED
+-#define GETENT_COMPAT_H_INCLUDED
++#ifndef COMPAT_GETENT_H_INCLUDED
++#define COMPAT_GETENT_H_INCLUDED
+
+-#include <sys/types.h>
+-#include <grp.h>
+-#include <pwd.h>
+-#include <netdb.h>
++#include "compat/compat.h"
+
+-#if defined(sun) || defined(__sun)
++#ifndef SYSLOG_NG_HAVE_GETPROTOBYNUMBER_R
+
+-#define getprotobynumber_r bb__getprotobynumber_r
+-#define getprotobyname_r bb__getprotobyname_r
+-#define getservbyport_r bb__getservbyport_r
+-#define getservbyname_r bb__getservbyname_r
++#define getprotobynumber_r _compat_generic__getprotobynumber_r
++#define getprotobyname_r _compat_generic__getprotobyname_r
++#define getservbyport_r _compat_generic__getservbyport_r
++#define getservbyname_r _compat_generic__getservbyname_r
+
+-#include "getent-bb.h"
++#include "getent-generic.h"
+
+-#endif // Solaris
++#elif defined(sun) || defined(__sun)
++
++#define getprotobynumber_r _compat_sun__getprotobynumber_r
++#define getprotobyname_r _compat_sun__getprotobyname_r
++#define getservbyport_r _compat_sun__getservbyport_r
++#define getservbyname_r _compat_sun__getservbyname_r
++
++#include "getent-sun.h"
++
++#endif
+ #endif
+++ /dev/null
---- a/lib/crypto.c 2016-12-21 07:57:44.000000000 -0700
-+++ b/lib/crypto.c 2017-03-24 13:19:34.188259018 -0600
-@@ -51,11 +51,20 @@
- }
- }
-
-+#if OPENSSL_VERSION_NUMBER < 0x10000000
- static unsigned long
- ssl_thread_id(void)
- {
- return (unsigned long) get_thread_id();
- }
-+
-+#else
-+static void
-+ssl_thread_id2(CRYPTO_THREADID *id)
-+{
-+ CRYPTO_THREADID_set_numeric(id, get_thread_id());
-+}
-+#endif
-
- static void
- crypto_init_threading(void)
-@@ -68,7 +76,11 @@
- {
- g_static_mutex_init(&ssl_locks[i]);
- }
-+#if OPENSSL_VERSION_NUMBER < 0x10000000
- CRYPTO_set_id_callback(ssl_thread_id);
-+#else
-+ CRYPTO_THREADID_set_callback(ssl_thread_id2);
-+#endif
- CRYPTO_set_locking_callback(ssl_locking_callback);
- }
-
include $(TOPDIR)/rules.mk
PKG_NAME:=zabbix
-PKG_VERSION:=3.2.7
+PKG_VERSION:=3.4.14
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=3ea0c299bd69bc728177128740f0476bc1a2c1de438330df5bbd8f5fc6090712
+PKG_HASH:=7443873cc970672d3c884230d3aeb082f2d8afcc2b757506c2d684ffdd12d77e
PKG_SOURCE_URL:=@SF/zabbix
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:zabbix:zabbix
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_ZABBIX_GNUTLS \
+ CONFIG_ZABBIX_OPENSSL
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
+define Package/zabbix-agentd/config
+comment "SSL support"
+
+choice
+ prompt "Selected SSL library"
+ default ZABBIX_NOSSL
+
+ config ZABBIX_OPENSSL
+ bool "OpenSSL"
+
+ config ZABBIX_GNUTLS
+ bool "GnuTLS"
+
+ config ZABBIX_NOSSL
+ bool "No SSL support"
+
+endchoice
+endef
+
define Package/zabbix/Default
SECTION:=admin
CATEGORY:=Administration
TITLE:=Zabbix
- URL:=http://www.zabbix.com/
+ URL:=https://www.zabbix.com/
SUBMENU:=zabbix
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
USERID:=zabbix=53:zabbix=53
- DEPENDS += $(ICONV_DEPENDS)
+ DEPENDS += $(ICONV_DEPENDS) +libpcre +ZABBIX_GNUTLS:libgnutls +ZABBIX_OPENSSL:libopenssl
endef
define Package/zabbix-agentd
define Package/zabbix-server
$(call Package/zabbix/Default)
TITLE+= server
- DEPENDS += +libsqlite3
+ DEPENDS += +pgsql-cli +libevent2
endef
define Package/zabbix-proxy
$(call Package/zabbix/Default)
TITLE+= proxy
- DEPENDS += +libsqlite3
+ DEPENDS += +pgsql-cli
endef
define Package/zabbix-extra-mac80211/description
An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters.
It contains an suid helper to allow zabbix-agentd to still run as zabbix user and not as root.
-See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates.
+See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates.
endef
define Package/zabbix-extra-network/description
An extra package for zabbix-agentd that adds a discovery rule for openwrt network interfaces.
The idea here is to discover only interfaces listed in /etc/config/network (discover br-lan and not eth0.1 and wlan0)
-See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates.
+See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates.
endef
define Package/zabbix-extra-wifi/description
An extra package for zabbix-agentd that adds a discovery rule for wifi interfaces and many userparameters.
As it uses libiwinfo, it works with all wifi devices supported by openwrt.
-See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates.
+See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates.
endef
CONFIGURE_ARGS+= \
--enable-proxy \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-java \
- --with-sqlite3="$(STAGING_DIR)/usr"
+ --with-postgresql \
+ --with-libevent=$(STAGING_DIR)/usr/include/libevent \
+ --with-libpcre=$(STAGING_DIR)/usr/include \
+ $(if $(CONFIG_ZABBIX_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr") \
+ $(if $(CONFIG_ZABBIX_OPENSSL),--with-openssl="$(STAGING_DIR)/usr")
MAKE_FLAGS += ARCH="linux"
+++ /dev/null
---- a/configure.ac
-+++ b/configure.ac
-@@ -161,6 +161,10 @@ if test "x$found_resolv" != "xyes"; then
- AC_MSG_ERROR([Unable to do DNS lookups (libresolv check failed)])
- fi
- LIBS="${LIBS} ${RESOLV_LIBS}"
-+AC_SEARCH_LIBS([res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])])
-+AC_SEARCH_LIBS([__res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])])
-+AC_SEARCH_LIBS([res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])])
-+AC_SEARCH_LIBS([__res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])])
-
- dnl *****************************************************************
- dnl * *
---- a/src/libs/zbxsysinfo/common/net.c
-+++ b/src/libs/zbxsysinfo/common/net.c
-@@ -471,6 +471,7 @@ static int dns_query(AGENT_REQUEST *requ
- return SYSINFO_RET_FAIL;
- }
-
-+#if defined(HAVE_RES_MKQUERY) && defined(HAVE_RES_SEND)
- if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf))))
- {
- SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot create DNS query: %s", zbx_strerror(errno)));
-@@ -505,6 +506,11 @@ static int dns_query(AGENT_REQUEST *requ
- _res.retry = retry;
-
- res = res_send(buf, res, answer.buffer, sizeof(answer.buffer));
-+#else /* defined(HAVE_RES_QUERY) && defined(HAVE_RES_SEND) */
-+ /* retrand and retry are ignored */
-+ if (-1 == (res = res_query(zone, C_IN, type, answer.buffer, sizeof(answer.buffer))))
-+ return SYSINFO_RET_FAIL;
-+#endif
-
- _res.options = saved_options;
- _res.retrans = saved_retrans;
### Option: LogFileSize
# Maximum size of log file in MB.
# 0 - disable automatic log rotation.
-@@ -114,6 +111,7 @@ Server=127.0.0.1
+@@ -116,6 +113,7 @@ Server=127.0.0.1
# Range: 0-100
# Default:
# StartAgents=3
##### Active checks related
-@@ -129,8 +127,6 @@ Server=127.0.0.1
+@@ -131,8 +129,6 @@ Server=127.0.0.1
# Default:
# ServerActive=
### Option: Hostname
# Unique, case sensitive hostname.
# Required for active checks and must match hostname as configured on the server.
-@@ -140,8 +136,6 @@ ServerActive=127.0.0.1
+@@ -142,8 +138,6 @@ ServerActive=127.0.0.1
# Default:
# Hostname=
### Option: HostnameItem
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
# Does not support UserParameters or aliases.
-@@ -259,8 +253,8 @@ Hostname=Zabbix server
+@@ -261,8 +255,8 @@ Hostname=Zabbix server
# Include=
# Include=/usr/local/etc/zabbix_agentd.userparams.conf
sys/socket.h sys/loadavg.h arpa/inet.h \
sys/vmmeter.h strings.h vm/vm_param.h \
sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \
-@@ -63,6 +63,11 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string
- Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
- execinfo.h libperfstat.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \
- dlfcn.h sys/utsname.h)
-+AC_CHECK_HEADERS(sys/sysinfo.h, [], [], [
-+#ifdef HAVE_LINUX_KERNEL_H
-+# include <linux/kernel.h>
-+#endif
-+])
- AC_CHECK_HEADERS(resolv.h, [], [], [
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
-Index: zabbix-3.2.7/src/libs/zbxcommon/str.c
-===================================================================
---- zabbix-3.2.7.orig/src/libs/zbxcommon/str.c
-+++ zabbix-3.2.7/src/libs/zbxcommon/str.c
-@@ -51,7 +51,7 @@ static const char help_message_footer[]
+--- a/src/libs/zbxcommon/str.c
++++ b/src/libs/zbxcommon/str.c
+@@ -52,7 +52,7 @@ static const char help_message_footer[]
void version(void)
{
printf("%s (Zabbix) %s\n", title_message, ZABBIX_VERSION);
endef
CONFIGURE_VARS += \
+ gl_cv_func_getopt_gnu=yes \
ac_cv_func_mempcpy=n
TARGET_CFLAGS += --std=gnu99
PKG_NAME:=gcc
PKG_VERSION:=5.4.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION)
PKG_HASH:=608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
TARGET_LANGUAGES:="c,c++"
BUGURL=https://dev.openwrt.org/
PKGVERSION=OpenWrt GCC $(PKG_VERSION)
+TARGET_CPPFLAGS += -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS
# not using sstrip here as this fucks up the .so's somehow
STRIP:=$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip
cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpc/
endef
+TARGET_CXX += -std=gnu++03
+CONFIGURE_ARGS += CXX_FOR_TARGET="$(TARGET_CXX)" CXXFLAGS_FOR_TARGET="-g -O2 -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS"
define Build/Configure
(cd $(PKG_BUILD_DIR); rm -f config.cache; \
PKG_NAME:=patch
PKG_VERSION:=2.7.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/patch
PKG_HASH:=ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd
+
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:patch
+
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=devel
CATEGORY:=Development
TITLE:=patch
- URL:=http://www.gnu.org/
+ URL:=https://savannah.gnu.org/projects/patch/
MAINTAINER:=Russell Senior <russell@personaltelco.net>
endef
--- /dev/null
+From ee2904728eb4364a36d62d66f723d0b68749e5df Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 12:14:49 +0200
+Subject: [PATCH] Fix arbitrary command execution in ed-style patches
+ (CVE-2018-1000156)
+
+* src/pch.c (do_ed_script): Write ed script to a temporary file instead
+of piping it to ed: this will cause ed to abort on invalid commands
+instead of rejecting them and carrying on.
+* tests/ed-style: New test case.
+* tests/Makefile.am (TESTS): Add test case.
+---
+ src/pch.c | 89 +++++++++++++++++++++++++++++++++++------------
+ tests/Makefile.am | 1 +
+ tests/ed-style | 41 ++++++++++++++++++++++
+ 3 files changed, 108 insertions(+), 23 deletions(-)
+ create mode 100644 tests/ed-style
+
+diff --git a/src/pch.c b/src/pch.c
+index ff9ed2c..8150493 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -33,6 +33,7 @@
+ # include <io.h>
+ #endif
+ #include <safe.h>
++#include <sys/wait.h>
+
+ #define INITHUNKMAX 125 /* initial dynamic allocation size */
+
+@@ -2388,22 +2389,28 @@ do_ed_script (char const *inname, char const *outname,
+ static char const editor_program[] = EDITOR_PROGRAM;
+
+ file_offset beginning_of_this_line;
+- FILE *pipefp = 0;
+ size_t chars_read;
++ FILE *tmpfp = 0;
++ char const *tmpname;
++ int tmpfd;
++ pid_t pid;
++
++ if (! dry_run && ! skip_rest_of_patch)
++ {
++ /* Write ed script to a temporary file. This causes ed to abort on
++ invalid commands such as when line numbers or ranges exceed the
++ number of available lines. When ed reads from a pipe, it rejects
++ invalid commands and treats the next line as a new command, which
++ can lead to arbitrary command execution. */
++
++ tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0);
++ if (tmpfd == -1)
++ pfatal ("Can't create temporary file %s", quotearg (tmpname));
++ tmpfp = fdopen (tmpfd, "w+b");
++ if (! tmpfp)
++ pfatal ("Can't open stream for file %s", quotearg (tmpname));
++ }
+
+- if (! dry_run && ! skip_rest_of_patch) {
+- int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+- assert (! inerrno);
+- *outname_needs_removal = true;
+- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
+- sprintf (buf, "%s %s%s", editor_program,
+- verbosity == VERBOSE ? "" : "- ",
+- outname);
+- fflush (stdout);
+- pipefp = popen(buf, binary_transput ? "wb" : "w");
+- if (!pipefp)
+- pfatal ("Can't open pipe to %s", quotearg (buf));
+- }
+ for (;;) {
+ char ed_command_letter;
+ beginning_of_this_line = file_tell (pfp);
+@@ -2414,14 +2421,14 @@ do_ed_script (char const *inname, char const *outname,
+ }
+ ed_command_letter = get_ed_command_letter (buf);
+ if (ed_command_letter) {
+- if (pipefp)
+- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++ if (tmpfp)
++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ write_fatal ();
+ if (ed_command_letter != 'd' && ed_command_letter != 's') {
+ p_pass_comments_through = true;
+ while ((chars_read = get_line ()) != 0) {
+- if (pipefp)
+- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++ if (tmpfp)
++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ write_fatal ();
+ if (chars_read == 2 && strEQ (buf, ".\n"))
+ break;
+@@ -2434,13 +2441,49 @@ do_ed_script (char const *inname, char const *outname,
+ break;
+ }
+ }
+- if (!pipefp)
++ if (!tmpfp)
+ return;
+- if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0
+- || fflush (pipefp) != 0)
++ if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0
++ || fflush (tmpfp) != 0)
+ write_fatal ();
+- if (pclose (pipefp) != 0)
+- fatal ("%s FAILED", editor_program);
++
++ if (lseek (tmpfd, 0, SEEK_SET) == -1)
++ pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname));
++
++ if (! dry_run && ! skip_rest_of_patch) {
++ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
++ *outname_needs_removal = true;
++ if (inerrno != ENOENT)
++ {
++ *outname_needs_removal = true;
++ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ }
++ sprintf (buf, "%s %s%s", editor_program,
++ verbosity == VERBOSE ? "" : "- ",
++ outname);
++ fflush (stdout);
++
++ pid = fork();
++ if (pid == -1)
++ pfatal ("Can't fork");
++ else if (pid == 0)
++ {
++ dup2 (tmpfd, 0);
++ execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
++ _exit (2);
++ }
++ else
++ {
++ int wstatus;
++ if (waitpid (pid, &wstatus, 0) == -1
++ || ! WIFEXITED (wstatus)
++ || WEXITSTATUS (wstatus) != 0)
++ fatal ("%s FAILED", editor_program);
++ }
++ }
++
++ fclose (tmpfp);
++ safe_unlink (tmpname);
+
+ if (ofp)
+ {
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 6b6df63..16f8693 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -32,6 +32,7 @@ TESTS = \
+ crlf-handling \
+ dash-o-append \
+ deep-directories \
++ ed-style \
+ empty-files \
+ false-match \
+ fifo \
+diff --git a/tests/ed-style b/tests/ed-style
+new file mode 100644
+index 0000000..d8c0689
+--- /dev/null
++++ b/tests/ed-style
+@@ -0,0 +1,41 @@
++# Copyright (C) 2018 Free Software Foundation, Inc.
++#
++# Copying and distribution of this file, with or without modification,
++# in any medium, are permitted without royalty provided the copyright
++# notice and this notice are preserved.
++
++. $srcdir/test-lib.sh
++
++require cat
++use_local_patch
++use_tmpdir
++
++# ==============================================================
++
++cat > ed1.diff <<EOF
++0a
++foo
++.
++EOF
++
++check 'patch -e foo -i ed1.diff' <<EOF
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
++
++cat > ed2.diff <<EOF
++1337a
++r !echo bar
++,p
++EOF
++
++check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF
++?
++Status: 2
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
+--
+2.19.1
+
--- /dev/null
+From daa51e492049d9fe3ac049165ec19641bf19cd7f Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 17 Aug 2018 13:35:40 +0200
+Subject: [PATCH] Fix swapping fake lines in pch_swap
+
+* src/pch.c (pch_swap): Fix swapping p_bfake and p_efake when there is a
+blank line in the middle of a context-diff hunk: that empty line stays
+in the middle of the hunk and isn't swapped.
+
+Fixes: https://savannah.gnu.org/bugs/index.php?53133
+---
+ src/pch.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index 8150493..6994ab2 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -2114,7 +2114,7 @@ pch_swap (void)
+ }
+ if (p_efake >= 0) { /* fix non-freeable ptr range */
+ if (p_efake <= i)
+- n = p_end - i + 1;
++ n = p_end - p_ptrn_lines;
+ else
+ n = -i;
+ p_efake += n;
+--
+2.19.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=pkg-config
-PKG_VERSION:=0.29.1
+PKG_VERSION:=0.29.2
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://pkgconfig.freedesktop.org/releases/
+PKG_SOURCE_URL:=https://pkg-config.freedesktop.org/releases/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=beb43c9e064555469bd4390dcfd8030b1536e0aa103f08d7abf7ae8cac0cb001
+PKG_HASH:=6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591
PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
PKG_LICENSE:=GPL-2+
+PKG_ASLR_PIE:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=devel
CATEGORY:=Development
TITLE:=pkg-config
- URL:=http://www.freedesktop.org/wiki/Software/pkg-config/
+ URL:=https://www.freedesktop.org/wiki/Software/pkg-config/
DEPENDS:=+glib2 $(INTL_DEPENDS)
endef
PKG_SOURCE_URL:=https://github.com/dorimanx/exfat-nofuse.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2017-06-20
-PKG_SOURCE_VERSION:=de4c760bc9a05ead83bc3ec6eec6cf1fb106f523
-PKG_MIRROR_HASH:=2aa53a83daf4be46e437842ee67d2e0ea327642cb6b8856a79153b52ec726a57
+PKG_SOURCE_DATE:=2018-04-17
+PKG_SOURCE_VERSION:=01c30ad52625a7261e1b0d874553b6ca7af25966
+PKG_MIRROR_HASH:=47e3b6b8384e4beaa07dc762f4e0cce9a067750cbb4b2fb4ba18d2348038c270
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
PKG_LICENSE:=GPL-2.0
--- /dev/null
+#
+# Copyright (C) 2017 Banglang Huang
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=pf-ring
+PKG_VERSION:=7.2.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
+
+PKG_LICENSE:=GPL-2.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=5d349ac37a6ece5966bf606a6f131d628b98d88654c2f502d3c4b8bbf6ef9796
+
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/PF_RING-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_PATH:=kernel
+MAKE_PATH:=kernel
+
+define KernelPackage/pf-ring
+ SUBMENU:=Network Support
+ TITLE:=PF_RING Kernel driver
+ FILES:=$(PKG_BUILD_DIR)/kernel/pf_ring.ko
+ AUTOLOAD:=$(call AutoLoad,90,pf_ring,1)
+endef
+
+define KernelPackage/pf-ring/description
+ Kernel module for libpf-ring package
+endef
+
+EXTRA_CFLAGS += \
+ -I$(PKG_BUILD_DIR)/kernel
+
+MAKE_OPTS := \
+ ARCH="$(LINUX_KARCH)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ SUBDIRS="$(PKG_BUILD_DIR)/kernel" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ EXTRA_CFLAGS="$(EXTRA_CFLAGS)"
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/linux
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/linux/*.h $(1)/usr/include/linux
+endef
+
+define Build/Compile
+ +$(MAKE) -C "$(LINUX_DIR)" \
+ $(MAKE_OPTS) \
+ modules
+endef
+
+$(eval $(call KernelPackage,pf-ring))
include $(TOPDIR)/rules.mk
PKG_NAME:=erlang
-PKG_VERSION:=17.5
-PKG_RELEASE:=3
+PKG_VERSION:=19.3
+PKG_RELEASE:=6
PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:= http://www.erlang.org/download/ \
- http://erlang.mirror.su.se/
-PKG_HASH:=3c28820c981b30c50df8ac2a4a238e5813454fa3ed2ad530bc7948a282846474
+PKG_SOURCE_URL:= http://www.erlang.org/download/
+PKG_HASH:=fe4a00651db39b8542b04530a48d24b2f2e7e0b77cbe93d728c9f05325bdfe83
PKG_LICENSE:=ErlPL-1.1
PKG_LICENSE_FILES:=EPLICENCE
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org> \
+ Arnaud Sautaux <arnaud.sautaux@infoteam.ch>
PKG_BUILD_DEPENDS:=erlang/host openssl
PKG_USE_MIPS16:=0
define Package/erlang
$(call Package/erlang/Default)
DEPENDS+= +libncurses +librt +zlib
- PROVIDES:= erlang-erts=6.4 erlang-kernel=3.2 erlang-sasl=2.4.1 erlang-stdlib=2.4
+ PROVIDES:= erlang-erts=8.3 erlang-kernel=5.2 erlang-sasl=3.0.3 erlang-stdlib=3.3
endef
define Package/erlang/description
define Package/erlang-asn1
$(call Package/erlang/Default)
TITLE:=Abstract Syntax Notation One (ASN.1) support
- VERSION:=3.0.4
+ VERSION:=4.0.4
DEPENDS+= +erlang +erlang-syntax-tools
endef
define Package/erlang-compiler
$(call Package/erlang/Default)
TITLE:=Byte code compiler
- VERSION:=5.0.4
+ VERSION:=7.0.4
DEPENDS+= +erlang +erlang-hipe
endef
define Package/erlang-crypto
$(call Package/erlang/Default)
TITLE:=Cryptography support
- VERSION:=3.5
+ VERSION:=3.7.3
DEPENDS+= +erlang +libopenssl
endef
define Package/erlang-hipe
$(call Package/erlang/Default)
TITLE:=High Performance Erlang
- VERSION:=3.11.3
+ VERSION:=3.15.4
DEPENDS+= +erlang
endef
define Package/erlang-inets
$(call Package/erlang/Default)
TITLE:=Internet clients and servers
- VERSION:=5.10.6
+ VERSION:=6.3.6
DEPENDS+= +erlang
endef
define Package/erlang-mnesia
$(call Package/erlang/Default)
TITLE:=Distributed database
- VERSION:=4.12.5
+ VERSION:=4.14.3
DEPENDS+= +erlang
endef
define Package/erlang-runtime-tools
$(call Package/erlang/Default)
TITLE:=Low-profile debugging/tracing tools
- VERSION:=1.8.16
+ VERSION:=1.11.1
DEPENDS+= +erlang
endef
define Package/erlang-snmp
$(call Package/erlang/Default)
TITLE:=Simple Network Management Protocol (SNMP) support
- VERSION:=5.1.1
+ VERSION:=5.2.5
DEPENDS+= +erlang +erlang-asn1
endef
endef
+define Package/erlang-public-key
+$(call Package/erlang/Default)
+ TITLE:=Public Key support
+ VERSION:=1.4
+ DEPENDS+= +erlang +erlang-crypto +erlang-asn1
+endef
+
+define Package/erlang-public-key/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides functions to handle public-key infrastructure.
+endef
+
+
define Package/erlang-ssh
$(call Package/erlang/Default)
TITLE:=Secure Shell (SSH) support
- VERSION:=3.2
+ VERSION:=4.4.1
DEPENDS+= +erlang +erlang-crypto
endef
define Package/erlang-ssl
$(call Package/erlang/Default)
TITLE:=Secure Sockets Layer (SSL) support
- VERSION:=6.0
+ VERSION:=8.1.1
DEPENDS+= +erlang +erlang-crypto
endef
define Package/erlang-syntax-tools
$(call Package/erlang/Default)
TITLE:=Abstract Erlang syntax trees handling support
- VERSION:=1.6.18
+ VERSION:=2.1.1
DEPENDS+= +erlang
endef
endef
+define Package/erlang-tools
+$(call Package/erlang/Default)
+ TITLE:=Erlang tools support
+ VERSION:=2.9.1
+ DEPENDS+= +erlang
+endef
+
+define Package/erlang-tools/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides support for misc tools.
+endef
+
+
+define Package/erlang-reltool
+$(call Package/erlang/Default)
+ TITLE:=Erlang reltool support
+ VERSION:=0.7.3
+ DEPENDS+= +erlang
+endef
+
+define Package/erlang-reltool/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides support for release management.
+endef
+
+
+define Package/erlang-erl-interface
+$(call Package/erlang/Default)
+ TITLE:=Erlang erl_interface support
+ VERSION:=3.9.3
+ DEPENDS+= +erlang
+endef
+
+define Package/erlang-erl-interface/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides support for erlang interoperability with other languages.
+endef
+
+define Package/erlang-os_mon
+$(call Package/erlang/Default)
+ TITLE:=Erlang OS Monitoring Application
+ VERSION:=2.4.2
+ DEPENDS+= +erlang
+endef
+
+define Package/erlang-os_mon/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides the following services:
+ cpu_sup CPU load and utilization supervision
+ disksup Disk supervision
+ memsup Memory supervision
+endef
+
+define Package/erlang-xmerl
+$(call Package/erlang/Default)
+ TITLE:=Erlang XML export
+ VERSION:=1.3.13
+ DEPENDS+= +erlang
+endef
+
+define Package/erlang-xmerl/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides functions for exporting XML data to an external format
+endef
+
# Host
HOST_CONFIGURE_ARGS += \
$(eval $(call BuildModule,mnesia,mnesia))
$(eval $(call BuildModule,runtime-tools,runtime_tools))
$(eval $(call BuildModule,snmp,snmp))
+$(eval $(call BuildModule,public-key,public_key))
$(eval $(call BuildModule,ssh,ssh))
$(eval $(call BuildModule,ssl,ssl))
$(eval $(call BuildModule,syntax-tools,syntax_tools))
+$(eval $(call BuildModule,tools,tools))
+$(eval $(call BuildModule,reltool,reltool))
+$(eval $(call BuildModule,erl-interface,erl_interface))
+$(eval $(call BuildModule,os_mon,os_mon))
+$(eval $(call BuildModule,xmerl,xmerl))
+
+++ /dev/null
---- a/erts/emulator/Makefile.in
-+++ b/erts/emulator/Makefile.in
-@@ -682,7 +682,7 @@ $(OBJDIR)/beam_emu.o: beam/beam_emu.c
- endif
-
- $(OBJDIR)/%.o: beam/%.c
-- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
-+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
-
- $(OBJDIR)/%.o: $(TARGET)/%.c
- $(V_CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@
+++ /dev/null
---- a/lib/erl_interface/src/connect/ei_resolve.c
-+++ b/lib/erl_interface/src/connect/ei_resolve.c
-@@ -642,7 +642,7 @@ struct hostent *ei_gethostbyname_r(const
- #ifndef HAVE_GETHOSTBYNAME_R
- return my_gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
- #else
--#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__))
-+#if (defined(_GNU_SOURCE) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__))
- struct hostent *result;
-
- gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop);
+++ /dev/null
---- a/lib/tools/Makefile
-+++ b/lib/tools/Makefile
-@@ -23,7 +23,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
- # Macros
- # ----------------------------------------------------
-
--SUB_DIRECTORIES = c_src src doc/src examples priv emacs
-+SUB_DIRECTORIES = c_src src doc/src examples priv
-
- include vsn.mk
- VSN = $(TOOLS_VSN)
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+ifeq ($(origin GO_INCLUDE_DIR),undefined)
+ GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
+endif
+
+include $(GO_INCLUDE_DIR)/golang-values.mk
+
+
+# $(1) valid GOOS_GOARCH combinations
+# $(2) go version id
+define GoCompiler/Default/CheckHost
+ $(if $(filter $(GO_HOST_OS_ARCH),$(1)),,$(error go-$(2) cannot be installed on $(GO_HOST_OS)/$(GO_HOST_ARCH)))
+endef
+
+# $(1) source go root
+# $(2) destination prefix
+# $(3) go version id
+# $(4) additional environment variables (optional)
+define GoCompiler/Default/Make
+ ( \
+ cd $(1)/src ; \
+ $(if $(2),GOROOT_FINAL=$(2)/lib/go-$(3)) \
+ $(4) \
+ $(BASH) make.bash --no-banner ; \
+ )
+endef
+
+# $(1) destination prefix
+# $(2) go version id
+define GoCompiler/Default/Install/make-dirs
+ $(INSTALL_DIR) $(1)/lib/go-$(2)
+ $(INSTALL_DIR) $(1)/share/go-$(2)
+endef
+
+# $(1) source go root
+# $(2) destination prefix
+# $(3) go version id
+# $(4) file/directory name
+define GoCompiler/Default/Install/install-share-data
+ $(CP) $(1)/$(4) $(2)/share/go-$(3)/
+ $(LN) ../../share/go-$(3)/$(4) $(2)/lib/go-$(3)/
+endef
+
+# $(1) source go root
+# $(2) destination prefix
+# $(3) go version id
+# $(4) GOOS_GOARCH
+define GoCompiler/Default/Install/Bin
+ $(call GoCompiler/Default/Install/make-dirs,$(2),$(3))
+
+ $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),api)
+
+ $(INSTALL_DATA) -p $(1)/VERSION $(2)/lib/go-$(3)/
+
+ for file in AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE PATENTS README README.md; do \
+ if [ -f $(1)/$$$$file ]; then \
+ $(INSTALL_DATA) -p $(1)/$$$$file $(2)/share/go-$(3)/ ; \
+ fi ; \
+ done
+
+ $(INSTALL_DIR) $(2)/lib/go-$(3)/bin
+
+ ifeq ($(4),$(GO_HOST_OS_ARCH))
+ $(INSTALL_BIN) -p $(1)/bin/* $(2)/lib/go-$(3)/bin/
+ else
+ $(INSTALL_BIN) -p $(1)/bin/$(4)/* $(2)/lib/go-$(3)/bin/
+ endif
+
+ $(INSTALL_DIR) $(2)/lib/go-$(3)/pkg
+ $(CP) $(1)/pkg/$(4) $(2)/lib/go-$(3)/pkg/
+
+ $(INSTALL_DIR) $(2)/lib/go-$(3)/pkg/tool/$(4)
+ $(INSTALL_BIN) -p $(1)/pkg/tool/$(4)/* $(2)/lib/go-$(3)/pkg/tool/$(4)/
+endef
+
+# $(1) destination prefix
+# $(2) go version id
+define GoCompiler/Default/Install/BinLinks
+ $(INSTALL_DIR) $(1)/bin
+ $(LN) ../lib/go-$(2)/bin/go $(1)/bin/go
+ $(LN) ../lib/go-$(2)/bin/gofmt $(1)/bin/gofmt
+endef
+
+# $(1) source go root
+# $(2) destination prefix
+# $(3) go version id
+define GoCompiler/Default/Install/Doc
+ $(call GoCompiler/Default/Install/make-dirs,$(2),$(3))
+
+ $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),doc)
+ $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),favicon.ico)
+ $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),robots.txt)
+endef
+
+# $(1) source go root
+# $(2) destination prefix
+# $(3) go version id
+define GoCompiler/Default/Install/Src
+ $(call GoCompiler/Default/Install/make-dirs,$(2),$(3))
+
+ $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),lib)
+ $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),misc)
+ $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),src)
+ $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),test)
+
+ $(FIND) \
+ $(2)/share/go-$(3)/src/ \
+ \! -type d -a \( -name '*.bat' -o -name '*.rc' \) \
+ -delete
+
+ if [ -d $(1)/pkg/include ]; then \
+ $(INSTALL_DIR) $(2)/lib/go-$(3)/pkg ; \
+ $(INSTALL_DIR) $(2)/share/go-$(3)/pkg ; \
+ $(CP) $(1)/pkg/include $(2)/share/go-$(3)/pkg/ ; \
+ $(LN) ../../../share/go-$(3)/pkg/include $(2)/lib/go-$(3)/pkg/ ; \
+ fi
+endef
+
+# $(1) destination prefix
+# $(2) go version id
+define GoCompiler/Default/Uninstall
+ rm -rf $(1)/lib/go-$(2)
+ rm -rf $(1)/share/go-$(2)
+endef
+
+# $(1) destination prefix
+define GoCompiler/Default/Uninstall/BinLinks
+ rm -f $(1)/bin/go
+ rm -f $(1)/bin/gofmt
+endef
+
+
+# $(1) profile name
+# $(2) source go root
+# $(3) destination prefix
+# $(4) go version id
+# $(5) GOOS_GOARCH
+define GoCompiler/AddProfile
+
+ # $$(1) valid GOOS_GOARCH combinations
+ define GoCompiler/$(1)/CheckHost
+ $$(call GoCompiler/Default/CheckHost,$$(1),$(4))
+ endef
+
+ # $$(1) additional environment variables (optional)
+ define GoCompiler/$(1)/Make
+ $$(call GoCompiler/Default/Make,$(2),$(3),$(4),$$(1))
+ endef
+
+ # $$(1) override install prefix (optional)
+ define GoCompiler/$(1)/Install/Bin
+ $$(call GoCompiler/Default/Install/Bin,$(2),$$(or $$(1),$(3)),$(4),$(5))
+ endef
+
+ # $$(1) override install prefix (optional)
+ define GoCompiler/$(1)/Install/BinLinks
+ $$(call GoCompiler/Default/Install/BinLinks,$$(or $$(1),$(3)),$(4))
+ endef
+
+ # $$(1) override install prefix (optional)
+ define GoCompiler/$(1)/Install/Doc
+ $$(call GoCompiler/Default/Install/Doc,$(2),$$(or $$(1),$(3)),$(4))
+ endef
+
+ # $$(1) override install prefix (optional)
+ define GoCompiler/$(1)/Install/Src
+ $$(call GoCompiler/Default/Install/Src,$(2),$$(or $$(1),$(3)),$(4))
+ endef
+
+ # $$(1) override install prefix (optional)
+ define GoCompiler/$(1)/Uninstall
+ $$(call GoCompiler/Default/Uninstall,$$(or $$(1),$(3)),$(4))
+ endef
+
+ # $$(1) override install prefix (optional)
+ define GoCompiler/$(1)/Uninstall/BinLinks
+ $$(call GoCompiler/Default/Uninstall/BinLinks,$$(or $$(1),$(3)))
+ endef
+
+endef
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+ifeq ($(origin GO_INCLUDE_DIR),undefined)
+ GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
+endif
+
+include $(GO_INCLUDE_DIR)/golang-values.mk
+
+
+# Variables (all optional, except GO_PKG) to be set in package
+# Makefiles:
+#
+# GO_PKG (required) - name of Go package
+#
+# Go name of the package.
+#
+# e.g. GO_PKG:=golang.org/x/text
+#
+#
+# GO_PKG_INSTALL_EXTRA - list of regular expressions, default empty
+#
+# Additional files/directories to install. By default, only these
+# files are installed:
+#
+# * Files with one of these extensions:
+# .go, .c, .cc, .h, .hh, .proto, .s
+#
+# * Files in any 'testdata' directory
+#
+# e.g. GO_PKG_INSTALL_EXTRA:=example.toml marshal_test.toml
+#
+#
+# GO_PKG_INSTALL_ALL - boolean (0 or 1), default false
+#
+# If true, install all files regardless of extension or directory.
+#
+# e.g. GO_PKG_INSTALL_ALL:=1
+#
+#
+# GO_PKG_SOURCE_ONLY - boolean (0 or 1), default false
+#
+# If true, 'go install' will not be called. If the package does not
+# (or should not) build any binaries, then specifying this option will
+# save build time.
+#
+# e.g. GO_PKG_SOURCE_ONLY:=1
+#
+#
+# GO_PKG_BUILD_PKG - list of build targets, default GO_PKG/...
+#
+# Build targets for compiling this Go package, i.e. arguments passed
+# to 'go install'
+#
+# e.g. GO_PKG_BUILD_PKG:=github.com/debian/ratt/cmd/...
+#
+#
+# GO_PKG_EXCLUDES - list of regular expressions, default empty
+#
+# Patterns to exclude from the build targets expanded from
+# GO_PKG_BUILD_PKG.
+#
+# e.g. GO_PKG_EXCLUDES:=examples/
+#
+#
+# GO_PKG_GO_GENERATE - boolean (0 or 1), default false
+#
+# If true, 'go generate' will be called on all build targets (as
+# determined by GO_PKG_BUILD_PKG and GO_PKG_EXCLUDES). This is usually
+# not necessary.
+#
+# e.g. GO_PKG_GO_GENERATE:=1
+
+# Credit for this package build process (GoPackage/Build/Configure and
+# GoPackage/Build/Compile) belong to Debian's dh-golang completely.
+# https://anonscm.debian.org/cgit/pkg-go/packages/dh-golang.git
+
+
+# for building packages, not user code
+GO_PKG_PATH:=/usr/share/gocode
+
+GO_PKG_BUILD_PKG?=$(GO_PKG)/...
+
+GO_PKG_WORK_DIR_NAME:=.go_work
+GO_PKG_WORK_DIR:=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME)
+
+GO_PKG_BUILD_DIR:=$(GO_PKG_WORK_DIR)/build
+GO_PKG_CACHE_DIR:=$(GO_PKG_WORK_DIR)/cache
+GO_PKG_TMP_DIR:=$(GO_PKG_WORK_DIR)/tmp
+
+GO_PKG_BUILD_BIN_DIR:=$(GO_PKG_BUILD_DIR)/bin$(if \
+ $(GO_HOST_TARGET_DIFFERENT),/$(GO_OS)_$(GO_ARCH))
+
+GO_PKG_BUILD_DEPENDS_SRC:=$(STAGING_DIR)$(GO_PKG_PATH)/src
+
+# sstrip causes corrupted section header size
+ifneq ($(CONFIG_USE_SSTRIP),)
+ ifneq ($(CONFIG_DEBUG),)
+ GO_PKG_STRIP_ARGS:=--strip-unneeded --remove-section=.comment --remove-section=.note
+ else
+ GO_PKG_STRIP_ARGS:=--strip-all
+ endif
+ STRIP:=$(TARGET_CROSS)strip $(GO_PKG_STRIP_ARGS)
+ RSTRIP= \
+ export CROSS="$(TARGET_CROSS)" \
+ $(if $(PKG_BUILD_ID),KEEP_BUILD_ID=1) \
+ $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \
+ $(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \
+ NM="$(TARGET_CROSS)nm" \
+ STRIP="$(STRIP)" \
+ STRIP_KMOD="$(SCRIPT_DIR)/strip-kmod.sh" \
+ PATCHELF="$(STAGING_DIR_HOST)/bin/patchelf" \
+ $(SCRIPT_DIR)/rstrip.sh
+endif
+
+define GoPackage/GoSubMenu
+ SUBMENU:=Go
+ SECTION:=lang
+ CATEGORY:=Languages
+endef
+
+define GoPackage/Environment
+ GOOS=$(GO_OS) \
+ GOARCH=$(GO_ARCH) \
+ GO386=$(GO_386) \
+ GOARM=$(GO_ARM) \
+ GOMIPS=$(GO_MIPS) \
+ CGO_ENABLED=1 \
+ CGO_CFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CFLAGS))" \
+ CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \
+ CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))"
+endef
+
+# false if directory does not exist
+GoPackage/is_dir_not_empty=$$$$($(FIND) $(1) -maxdepth 0 -type d \! -empty 2>/dev/null)
+
+GoPackage/has_binaries=$(call GoPackage/is_dir_not_empty,$(GO_PKG_BUILD_BIN_DIR))
+
+define GoPackage/Build/Configure
+ ( \
+ cd $(PKG_BUILD_DIR) ; \
+ mkdir -p $(GO_PKG_BUILD_DIR)/bin $(GO_PKG_BUILD_DIR)/src \
+ $(GO_PKG_CACHE_DIR) $(GO_PKG_TMP_DIR) ; \
+ \
+ files=$$$$($(FIND) ./ \
+ -type d -a \( -path './.git' -o -path './$(GO_PKG_WORK_DIR_NAME)' \) -prune -o \
+ \! -type d -print | \
+ sed 's|^\./||') ; \
+ \
+ if [ "$(GO_PKG_INSTALL_ALL)" != 1 ]; then \
+ code=$$$$(echo "$$$$files" | grep '\.\(c\|cc\|go\|h\|hh\|proto\|s\)$$$$') ; \
+ testdata=$$$$(echo "$$$$files" | grep '\(^\|/\)testdata/') ; \
+ \
+ for pattern in $(GO_PKG_INSTALL_EXTRA); do \
+ extra=$$$$(echo "$$$$extra"; echo "$$$$files" | grep "$$$$pattern") ; \
+ done ; \
+ \
+ files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$extra") ; \
+ files=$$$$(echo "$$$$files" | grep -v '^[[:space:]]*$$$$' | sort -u) ; \
+ fi ; \
+ \
+ echo "Copying files from $(PKG_BUILD_DIR) into $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)" ; \
+ for file in $$$$files; do \
+ echo $$$$file ; \
+ dest=$(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/$$$$file ; \
+ mkdir -p $$$$(dirname $$$$dest) ; \
+ $(CP) $$$$file $$$$dest ; \
+ done ; \
+ \
+ link_contents() { \
+ local src=$$$$1 ; \
+ local dest=$$$$2 ; \
+ local dirs dir base ; \
+ \
+ if [ -n "$$$$($(FIND) $$$$src -mindepth 1 -maxdepth 1 -name '*.go' \! -type d)" ]; then \
+ echo "$$$$src is already a Go library" ; \
+ return 1 ; \
+ fi ; \
+ \
+ dirs=$$$$($(FIND) $$$$src -mindepth 1 -maxdepth 1 -type d) ; \
+ for dir in $$$$dirs; do \
+ base=$$$$(basename $$$$dir) ; \
+ if [ -d $$$$dest/$$$$base ]; then \
+ case $$$$dir in \
+ *$(GO_PKG_PATH)/src/$(GO_PKG)) \
+ echo "$(GO_PKG) is already installed. Please check for circular dependencies." ;; \
+ *) \
+ link_contents $$$$src/$$$$base $$$$dest/$$$$base ;; \
+ esac ; \
+ else \
+ echo "...$$$${src#$(GO_PKG_BUILD_DEPENDS_SRC)}/$$$$base" ; \
+ $(LN) $$$$src/$$$$base $$$$dest/$$$$base ; \
+ fi ; \
+ done ; \
+ } ; \
+ \
+ if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \
+ if [ -d $(GO_PKG_BUILD_DEPENDS_SRC) ]; then \
+ echo "Symlinking directories from $(GO_PKG_BUILD_DEPENDS_SRC) into $(GO_PKG_BUILD_DIR)/src" ; \
+ link_contents $(GO_PKG_BUILD_DEPENDS_SRC) $(GO_PKG_BUILD_DIR)/src ; \
+ else \
+ echo "$(GO_PKG_BUILD_DEPENDS_SRC) does not exist, skipping symlinks" ; \
+ fi ; \
+ else \
+ echo "Not building binaries, skipping symlinks" ; \
+ fi ; \
+ )
+endef
+
+# $(1) additional arguments for go command line (optional)
+define GoPackage/Build/Compile
+ ( \
+ cd $(GO_PKG_BUILD_DIR) ; \
+ export GOPATH=$(GO_PKG_BUILD_DIR) \
+ GOCACHE=$(GO_PKG_CACHE_DIR) \
+ GOTMPDIR=$(GO_PKG_TMP_DIR) \
+ GOROOT_FINAL=$(GO_TARGET_ROOT) \
+ CC=$(TARGET_CC) \
+ CXX=$(TARGET_CXX) \
+ $(call GoPackage/Environment) ; \
+ \
+ targets=$$$$(go list $(GO_PKG_BUILD_PKG)) ; \
+ for pattern in $(GO_PKG_EXCLUDES); do \
+ targets=$$$$(echo "$$$$targets" | grep -v "$$$$pattern") ; \
+ done ; \
+ \
+ if [ "$(GO_PKG_GO_GENERATE)" = 1 ]; then \
+ go generate -v $(1) $$$$targets ; \
+ fi ; \
+ \
+ if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \
+ case $(GO_ARCH) in \
+ arm) installsuffix="-installsuffix v$(GO_ARM)" ;; \
+ mips|mipsle) installsuffix="-installsuffix $(GO_MIPS)" ;; \
+ esac ; \
+ trimpath="all=-trimpath=$(GO_PKG_BUILD_DIR)" ; \
+ ldflags="all=-linkmode external -extldflags '$(TARGET_LDFLAGS)'" ; \
+ go install \
+ $$$$installsuffix \
+ -gcflags "$$$$trimpath" \
+ -asmflags "$$$$trimpath" \
+ -ldflags "$$$$ldflags" \
+ -v \
+ $(1) \
+ $$$$targets ; \
+ retval=$$$$? ; \
+ \
+ if [ "$$$$retval" -eq 0 ] && [ -z "$(call GoPackage/has_binaries)" ]; then \
+ echo "No binaries were generated, consider adding GO_PKG_SOURCE_ONLY:=1 to Makefile" ; \
+ fi ; \
+ fi ; \
+ exit $$$$retval ; \
+ )
+endef
+
+define GoPackage/Build/InstallDev
+ $(call GoPackage/Package/Install/Src,$(1))
+endef
+
+define GoPackage/Package/Install/Bin
+ if [ -n "$(call GoPackage/has_binaries)" ]; then \
+ $(INSTALL_DIR) $(1)/usr/bin ; \
+ $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/* $(1)/usr/bin/ ; \
+ fi
+endef
+
+define GoPackage/Package/Install/Src
+ dir=$$$$(dirname $(GO_PKG)) ; \
+ $(INSTALL_DIR) $(1)$(GO_PKG_PATH)/src/$$$$dir ; \
+ $(CP) $(GO_PKG_BUILD_DIR)/src/$(GO_PKG) $(1)$(GO_PKG_PATH)/src/$$$$dir/
+endef
+
+define GoPackage/Package/Install
+ $(call GoPackage/Package/Install/Bin,$(1))
+ $(call GoPackage/Package/Install/Src,$(1))
+endef
+
+
+ifneq ($(GO_PKG),)
+ Build/Configure=$(call GoPackage/Build/Configure)
+ Build/Compile=$(call GoPackage/Build/Compile)
+ Build/InstallDev=$(call GoPackage/Build/InstallDev,$(1))
+endif
+
+define GoPackage
+ ifndef Package/$(1)/install
+ Package/$(1)/install=$$(call GoPackage/Package/Install,$$(1))
+ endif
+endef
+
+define GoBinPackage
+ ifndef Package/$(1)/install
+ Package/$(1)/install=$$(call GoPackage/Package/Install/Bin,$$(1))
+ endif
+endef
+
+define GoSrcPackage
+ ifndef Package/$(1)/install
+ Package/$(1)/install=$$(call GoPackage/Package/Install/Src,$$(1))
+ endif
+endef
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+ifeq ($(origin GO_INCLUDE_DIR),undefined)
+ GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
+endif
+
+include $(GO_INCLUDE_DIR)/golang-version.mk
+
+
+unexport \
+ GOARCH GOBIN GOCACHE GODEBUG GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
+ CGO_ENABLED \
+ CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \
+ CGO_CPPFLAGS CGO_CPPFLAGS_ALLOW CGO_CPPFLAGS_DISALLOW \
+ CGO_CXXFLAGS CGO_CXXFLAGS_ALLOW CGO_CXXFLAGS_DISALLOW \
+ CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \
+ CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \
+ GOARM GO386 GOMIPS \
+ GOROOT_FINAL GO_EXTLINK_ENABLED GIT_ALLOW_PROTOCOL \
+ CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \
+ BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC
+ # there are more magic environment variables to track down, but ain't nobody got time for that
+
+go_arch=$(subst \
+ aarch64,arm64,$(subst \
+ i386,386,$(subst \
+ mipsel,mipsle,$(subst \
+ mips64el,mips64le,$(subst \
+ powerpc64,ppc64,$(subst \
+ x86_64,amd64,$(1)))))))
+
+GO_OS:=linux
+GO_ARCH:=$(call go_arch,$(ARCH))
+GO_OS_ARCH:=$(GO_OS)_$(GO_ARCH)
+
+GO_HOST_OS:=$(call tolower,$(HOST_OS))
+GO_HOST_ARCH:=$(call go_arch,$(subst \
+ armv6l,arm,$(subst \
+ armv7l,arm,$(subst \
+ i486,i386,$(subst \
+ i586,i386,$(subst \
+ i686,i386,$(HOST_ARCH)))))))
+GO_HOST_OS_ARCH:=$(GO_HOST_OS)_$(GO_HOST_ARCH)
+
+GO_HOST_TARGET_SAME:=$(if $(and $(findstring $(GO_OS_ARCH),$(GO_HOST_OS_ARCH)),$(findstring $(GO_HOST_OS_ARCH),$(GO_OS_ARCH))),1)
+GO_HOST_TARGET_DIFFERENT:=$(if $(GO_HOST_TARGET_SAME),,1)
+
+# ensure binaries can run on older CPUs
+GO_386:=387
+
+GO_ARM:=$(if $(CONFIG_arm_v7),7,$(if $(CONFIG_arm_v6),6,$(if $(findstring $(GO_ARCH),arm),5,)))
+
+GO_MIPS:=$(if $(filter $(GO_ARCH),mips mipsle),$(if $(CONFIG_HAS_FPU),hardfloat,softfloat),)
+
+# -fno-plt: causes "unexpected GOT reloc for non-dynamic symbol" errors
+# -mips32r2: conflicts with -march=mips32 set by go
+GO_CFLAGS_TO_REMOVE:=$(if \
+$(filter $(GO_ARCH),386),-fno-plt,$(if \
+$(filter $(GO_ARCH),mips mipsle),-mips32r2,))
+
+# mips64 / mips64el doesn't have softfloat support yet
+# https://github.com/golang/go/issues/14635
+GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mipsel||powerpc64||x86_64)
+
+GO_TARGET_PREFIX:=/usr
+GO_TARGET_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR)
+GO_TARGET_ROOT:=$(GO_TARGET_PREFIX)/lib/go-$(GO_TARGET_VERSION_ID)
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+ifeq ($(origin GO_INCLUDE_DIR),undefined)
+ GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
+endif
+
+
+GO_VERSION_MAJOR_MINOR:=1.10
+GO_VERSION_PATCH:=3
--- /dev/null
+#
+# Copyright (C) 2018 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include ../golang-version.mk
+
+PKG_NAME:=golang
+PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH))
+PKG_RELEASE:=2
+
+GO_SOURCE_URLS:=https://dl.google.com/go/ \
+ https://mirrors.ustc.edu.cn/golang/ \
+ https://mirrors.nju.edu.cn/golang/
+
+PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
+PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
+PKG_HASH:=567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_DIR:=$(BUILD_DIR)/go-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+PKG_GO_WORK_DIR:=$(PKG_BUILD_DIR)/.go_work
+PKG_GO_HOST_CACHE_DIR:=$(PKG_GO_WORK_DIR)/host_cache
+PKG_GO_TARGET_CACHE_DIR:=$(PKG_GO_WORK_DIR)/target_cache
+PKG_GO_TMP_DIR:=$(PKG_GO_WORK_DIR)/tmp
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/go-$(PKG_VERSION)
+HOST_BUILD_PARALLEL:=1
+
+HOST_GO_PREFIX:=$(STAGING_DIR_HOSTPKG)
+HOST_GO_VERSION_ID:=cross
+HOST_GO_ROOT:=$(HOST_GO_PREFIX)/lib/go-$(HOST_GO_VERSION_ID)
+
+HOST_GO_VALID_OS_ARCH:= \
+ android_arm \
+ darwin_386 darwin_amd64 darwin_arm darwin_arm64 \
+ dragonfly_amd64 \
+ freebsd_386 freebsd_amd64 freebsd_arm \
+ linux_386 linux_amd64 linux_arm linux_arm64 \
+ netbsd_386 netbsd_amd64 netbsd_arm \
+ openbsd_386 openbsd_amd64 openbsd_arm \
+ plan9_386 plan9_amd64 \
+ solaris_amd64 \
+ windows_386 windows_amd64 \
+ \
+ linux_ppc64 linux_ppc64le linux_mips linux_mipsle linux_mips64 linux_mips64le
+
+BOOTSTRAP_SOURCE:=go1.4-bootstrap-20171003.tar.gz
+BOOTSTRAP_SOURCE_URL:=$(GO_SOURCE_URLS)
+BOOTSTRAP_HASH:=f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52
+
+BOOTSTRAP_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap
+
+BOOTSTRAP_GO_VALID_OS_ARCH:= \
+ darwin_386 darwin_amd64 \
+ dragonfly_386 dragonfly_amd64 \
+ freebsd_386 freebsd_amd64 freebsd_arm \
+ linux_386 linux_amd64 linux_arm \
+ netbsd_386 netbsd_amd64 netbsd_arm \
+ openbsd_386 openbsd_amd64 \
+ plan9_386 plan9_amd64 \
+ solaris_amd64 \
+ windows_386 windows_amd64
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+include ../golang-compiler.mk
+include ../golang-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+HOST_UNPACK:=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+BOOTSTRAP_UNPACK:=$(HOST_TAR) -C $(BOOTSTRAP_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(BOOTSTRAP_SOURCE)
+
+# don't strip ELF executables in test data (and go itself)
+RSTRIP:=:
+STRIP:=:
+
+define Package/golang/Default
+$(call GoPackage/GoSubMenu)
+ TITLE:=Go programming language
+ URL:=https://golang.org/
+ DEPENDS:=$(GO_ARCH_DEPENDS)
+endef
+
+define Package/golang/Default/description
+The Go programming language is an open source project to make
+programmers more productive.
+
+Go is expressive, concise, clean, and efficient. Its concurrency
+mechanisms make it easy to write programs that get the most out of
+multicore and networked machines, while its novel type system enables
+flexible and modular program construction. Go compiles quickly to
+machine code yet has the convenience of garbage collection and the power
+of run-time reflection. It's a fast, statically typed, compiled language
+that feels like a dynamically typed, interpreted language.
+endef
+
+# go tool requires source present:
+# https://github.com/golang/go/issues/4635
+define Package/golang
+$(call Package/golang/Default)
+ TITLE+= (compiler)
+ DEPENDS+= +golang-src
+endef
+
+define Package/golang/description
+$(call Package/golang/Default/description)
+
+This package provides an assembler, compiler, linker, and compiled
+libraries for the Go programming language.
+endef
+
+define Package/golang-doc
+$(call Package/golang/Default)
+ TITLE+= (documentation)
+endef
+
+define Package/golang-doc/description
+$(call Package/golang/Default/description)
+
+This package provides the documentation for the Go programming language.
+endef
+
+define Package/golang-src
+$(call Package/golang/Default)
+ TITLE+= (source files)
+endef
+
+define Package/golang-src/description
+$(call Package/golang/Default/description)
+
+This package provides the Go programming language source files needed
+for cross-compilation.
+endef
+
+define Download/golang-bootstrap
+ FILE:=$(BOOTSTRAP_SOURCE)
+ URL:=$(BOOTSTRAP_SOURCE_URL)
+ HASH:=$(BOOTSTRAP_HASH)
+endef
+$(eval $(call Download,golang-bootstrap))
+
+$(eval $(call GoCompiler/AddProfile,Bootstrap,$(BOOTSTRAP_BUILD_DIR),,bootstrap,$(GO_HOST_OS_ARCH)))
+$(eval $(call GoCompiler/AddProfile,Host,$(HOST_BUILD_DIR),$(HOST_GO_PREFIX),$(HOST_GO_VERSION_ID),$(GO_HOST_OS_ARCH)))
+$(eval $(call GoCompiler/AddProfile,Package,$(PKG_BUILD_DIR),$(GO_TARGET_PREFIX),$(GO_TARGET_VERSION_ID),$(GO_OS_ARCH)))
+
+define Host/Prepare
+ $(call Host/Prepare/Default)
+ mkdir -p $(BOOTSTRAP_BUILD_DIR)
+ $(BOOTSTRAP_UNPACK)
+endef
+
+define Host/Compile
+ $(call GoCompiler/Bootstrap/CheckHost,$(BOOTSTRAP_GO_VALID_OS_ARCH))
+ $(call GoCompiler/Host/CheckHost,$(HOST_GO_VALID_OS_ARCH))
+
+ $(call GoCompiler/Bootstrap/Make, \
+ CC=$(HOSTCC_NOCACHE) \
+ CXX=$(HOSTCXX_NOCACHE) \
+ )
+
+ $(call GoCompiler/Host/Make, \
+ GOROOT_BOOTSTRAP=$(BOOTSTRAP_BUILD_DIR) \
+ CC=$(HOSTCC_NOCACHE) \
+ CXX=$(HOSTCXX_NOCACHE) \
+ )
+endef
+
+# if host and target os/arch are the same,
+# when go compiles a program, it will use the host std lib
+# so remove it now and force go to rebuild std for target later
+define Host/Install
+ $(call GoCompiler/Host/Install/Bin,)
+ $(call GoCompiler/Host/Install/Src,)
+
+ $(call GoCompiler/Host/Install/BinLinks,)
+
+ rm -rf $(HOST_GO_ROOT)/pkg/$(GO_HOST_OS_ARCH)
+
+ $(INSTALL_DIR) $(HOST_GO_ROOT)/openwrt
+ $(INSTALL_BIN) ./files/go-gcc-helper $(HOST_GO_ROOT)/openwrt/
+ $(LN) go-gcc-helper $(HOST_GO_ROOT)/openwrt/gcc
+ $(LN) go-gcc-helper $(HOST_GO_ROOT)/openwrt/g++
+endef
+
+define Host/Uninstall
+ rm -rf $(HOST_GO_ROOT)/openwrt
+
+ $(call GoCompiler/Host/Uninstall/BinLinks,)
+
+ $(call GoCompiler/Host/Uninstall,)
+endef
+
+define Build/Compile
+ mkdir -p \
+ $(PKG_GO_HOST_CACHE_DIR) \
+ $(PKG_GO_TARGET_CACHE_DIR) \
+ $(PKG_GO_TMP_DIR)
+
+ @echo "Building target Go first stage"
+
+ $(call GoCompiler/Package/Make, \
+ GOROOT_BOOTSTRAP=$(HOST_GO_ROOT) \
+ GOCACHE=$(PKG_GO_HOST_CACHE_DIR) \
+ GOTMPDIR=$(PKG_GO_TMP_DIR) \
+ GO_GCC_HELPER_CC="$(HOSTCC)" \
+ GO_GCC_HELPER_CXX="$(HOSTCXX)" \
+ GO_GCC_HELPER_PATH=$$$$PATH \
+ CC=gcc \
+ CXX=g++ \
+ PKG_CONFIG=pkg-config \
+ PATH=$(HOST_GO_ROOT)/openwrt:$$$$PATH \
+ )
+
+ @echo "Building target Go second stage"
+
+ ( \
+ cd $(PKG_BUILD_DIR)/bin ; \
+ $(CP) go go-host ; \
+ GOROOT_FINAL=$(GO_TARGET_ROOT) \
+ GOCACHE=$(PKG_GO_TARGET_CACHE_DIR) \
+ GOTMPDIR=$(PKG_GO_TMP_DIR) \
+ GO_GCC_HELPER_CC="$(TARGET_CC)" \
+ GO_GCC_HELPER_CXX="$(TARGET_CXX)" \
+ GO_GCC_HELPER_PATH=$$$$PATH \
+ CC=gcc \
+ CXX=g++ \
+ PKG_CONFIG=pkg-config \
+ PATH=$(HOST_GO_ROOT)/openwrt:$$$$PATH \
+ $(call GoPackage/Environment) \
+ ./go-host install -a -v std cmd ; \
+ retval=$$$$? ; \
+ rm -f go-host ; \
+ exit $$$$retval ; \
+ )
+endef
+
+define Package/golang/install
+ $(call GoCompiler/Package/Install/Bin,$(1)$(GO_TARGET_PREFIX))
+ $(call GoCompiler/Package/Install/BinLinks,$(1)$(GO_TARGET_PREFIX))
+endef
+
+define Package/golang-doc/install
+ $(call GoCompiler/Package/Install/Doc,$(1)$(GO_TARGET_PREFIX))
+endef
+
+define Package/golang-src/install
+ $(call GoCompiler/Package/Install/Src,$(1)$(GO_TARGET_PREFIX))
+endef
+
+# src/debug contains ELF executables as test data
+# and they reference these libraries
+# we need to call this in Package/$(1)/extra_provides
+# to pass CheckDependencies in include/package-ipkg.mk
+define Package/golang-src/extra_provides
+ echo 'libc.so.6'
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,golang))
+$(eval $(call BuildPackage,golang-doc))
+$(eval $(call BuildPackage,golang-src))
--- /dev/null
+#!/bin/sh
+
+me=go-gcc-helper
+name=$(basename $0)
+
+case $name in
+gcc)
+ cmd=$GO_GCC_HELPER_CC
+ ;;
+g++)
+ cmd=$GO_GCC_HELPER_CXX
+ ;;
+*)
+ echo "$me: unknown command \"$name\""
+ exit 1
+ ;;
+esac
+
+export PATH="$GO_GCC_HELPER_PATH"
+
+echo "$me: running $cmd $@"
+
+$cmd "$@"
PKG_NAME:=jamvm
PKG_VERSION:=2.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
CATEGORY:=Languages
TITLE:=A compact Java Virtual Machine
URL:=http://sourceforge.net/projects/jamvm
- DEPENDS:=+zlib +libpthread +librt +classpath @!avr32
+ DEPENDS:=+zlib +libpthread +librt +classpath \
+ @(i386||i686||x86_64||arm||armeb||mips||mipsel||powerpc||powerpc64) +CONFIG_powerpc64:libffi
endef
define Package/jamvm/description
--- /dev/null
+From 7152ded5219453c9ff1cd062cecbeaf4d77e4cab Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Thu, 26 May 2016 15:05:48 +0200
+Subject: [PATCH] Use <fenv.h> instead of <fpu_control.h>
+
+musl libc (http://musl-libc.org lack the non-standard <fpu_control.h>
+header, which is used in src/os/linux/{i386,x86_64}/init.c files to
+setup the floating point precision. This patch makes it use the
+standard C <fenv.h> header instead.
+
+Original patch at Felix Janda at
+https://sourceforge.net/p/jamvm/patches/6/.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ src/os/linux/i386/init.c | 12 ++++++------
+ src/os/linux/x86_64/init.c | 16 ++++++----------
+ 2 files changed, 12 insertions(+), 16 deletions(-)
+
+diff --git a/src/os/linux/i386/init.c b/src/os/linux/i386/init.c
+index d9c6648..94a733e 100644
+--- a/src/os/linux/i386/init.c
++++ b/src/os/linux/i386/init.c
+@@ -19,18 +19,18 @@
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+-#include <fpu_control.h>
++#include <fenv.h>
+
+ /* Change floating point precision to double (64-bit) from
+ * the extended (80-bit) Linux default. */
+
+ void setDoublePrecision() {
+- fpu_control_t cw;
++ fenv_t fenv;
+
+- _FPU_GETCW(cw);
+- cw &= ~_FPU_EXTENDED;
+- cw |= _FPU_DOUBLE;
+- _FPU_SETCW(cw);
++ fegetenv(&fenv);
++ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */
++ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */
++ fesetenv(&fenv);
+ }
+
+ void initialisePlatform() {
+diff --git a/src/os/linux/x86_64/init.c b/src/os/linux/x86_64/init.c
+index 9d55229..a76a923 100644
+--- a/src/os/linux/x86_64/init.c
++++ b/src/os/linux/x86_64/init.c
+@@ -19,9 +19,7 @@
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+-#ifdef __linux__
+-#include <fpu_control.h>
+-#endif
++#include <fenv.h>
+
+ /* Change the x87 FPU precision to double (64-bit) from the extended
+ (80-bit) Linux default. Note, unlike on i386, my testcases pass
+@@ -30,14 +28,12 @@
+ */
+
+ void setDoublePrecision() {
+-#ifdef __linux__
+- fpu_control_t cw;
++ fenv_t fenv;
+
+- _FPU_GETCW(cw);
+- cw &= ~_FPU_EXTENDED;
+- cw |= _FPU_DOUBLE;
+- _FPU_SETCW(cw);
+-#endif
++ fegetenv(&fenv);
++ fenv.__control_word &= ~0x300; /*_FPU_EXTENDED */
++ fenv.__control_word |= 0x200; /*_FPU_DOUBLE */
++ fesetenv(&fenv);
+ }
+
+ void initialisePlatform() {
+--
+2.7.4
+
include $(TOPDIR)/rules.mk
PKG_NAME:=lua-openssl
-PKG_VERSION:=0.6.0
+PKG_VERSION:=0.7.1
PKG_RELEASE:=1
PKG_MAINTAINER:=Amnon Paz <pazamnon@gmail.com>
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=33de8fa469f66bbf6df09c4ba4e3386c0613cc061f5adff0928d532af6905773
+PKG_MIRROR_HASH:=225e3fe09226ff72968a7f36a33e207d27332107456a754abbaa59f99a3038f3
PKG_SOURCE_URL:=https://github.com/zhaozg/lua-openssl.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=1b950e6ff8617205cda1a1b612637ef21b9daf96
+PKG_SOURCE_VERSION:=b104bbe914d279276560f188854036075b99f724
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-diff --git a/Makefile b/Makefile
-index 6cb1176..6605879 100644
--- a/Makefile
+++ b/Makefile
-@@ -1,85 +1,45 @@
--T=openssl\r
--\r
+@@ -1,58 +1,36 @@
+ T=openssl\r
++.PHONY: install clean\r
+ \r
-PREFIX ?=/usr/local\r
-LIB_OPTION ?= -shared \r
--\r
++PKGC ?= pkg-config\r
+ \r
-#Lua auto detect\r
-LUA_VERSION ?= $(shell pkg-config luajit --print-provides)\r
-ifeq ($(LUA_VERSION),) ############ Not use luajit\r
-LUA_LIBS ?= $(shell pkg-config luajit --libs)\r
-LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV)\r
-endif\r
--\r
++LIB_OPTION = -shared \r
+ \r
-#OS auto detect\r
-SYS := $(shell gcc -dumpmachine)\r
--\r
++# lua's package config can be under various names\r
++LUAPKGC := $(shell for pc in lua lua5.1 lua5.2 lua5.3; do \\r
++ $(PKGC) --exists $$pc && echo $$pc && break; \\r
++ done)\r
+ \r
-ifneq (, $(findstring linux, $(SYS)))\r
-# Do linux things\r
-LDFLAGS = -fPIC -lrt -ldl\r
-ifneq (, $(findstring apple, $(SYS)))\r
-# Do darwin things\r
-LDFLAGS = -fPIC -lrt -ldl\r
--OPENSSL_LIBS ?= $(shell pkg-config openssl --libs) \r
--OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags)\r
++BUILD_DIR = $(shell pwd)\r
++\r
++# LUA include/libraries build flags\r
++#LUAV ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")\r
++LUA_LIBDIR := $(shell $(PKGC) --variable=libdir $(LUAPKGC))\r
++LUA_CFLAGS := $(shell $(PKGC) --cflags $(LUAPKGC))\r
++LUA_LIBS := $(shell $(PKGC) --libs-only-L $(LUAPKGC))\r
++#LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV)\r
++\r
++# openssl include/libraries build flags\r
++LDFLAGS += -lrt -ldl $(OPENSSL_LIBS) $(LUA_LIBS)\r
+ OPENSSL_LIBS ?= $(shell pkg-config openssl --libs) \r
+ OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags)\r
-CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)\r
-endif\r
-ifneq (, $(findstring mingw, $(SYS)))\r
-CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)\r
-endif\r
-#custome config\r
--ifeq (.config, $(wildcard .config))\r
--include .config\r
--endif\r
--\r
++# openssl include/libraries build flags\r
++LOCAL_INCLUDE = -I$(BUILD_DIR)/deps\r
++CFLAGS += -fPIC -DPTHREADS $(LOCAL_INCLUDE) $(OPENSSL_CFLAGS) $(LUA_CFLAGS) \r
+ ifeq (.config, $(wildcard .config))\r
+ include .config\r
+ endif\r
+ \r
-LIBNAME= $T.so.$V\r
--\r
--#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X\r
--\r
--# Compilation directives\r
--WARN_MOST = -Wall -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic\r
--WARN = -Wall -Wno-unused-value\r
--WARN_MIN = \r
--CFLAGS += $(WARN_MIN) -DPTHREADS \r
--CC= gcc -g $(CFLAGS) -Ideps\r
--\r
--\r
--OBJS=src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o \\r
--src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o \\r
--src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o \r
--\r
++LIBNAME= $T.so\r
+ \r
+ #LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X\r
+ \r
+@@ -68,11 +46,12 @@ OBJS=src/asn1.o src/auxiliar.o src/bio.o
+ src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o \\r
+ src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o \r
+ \r
-.c.o:\r
- $(CC) -c -o $@ $?\r
--\r
--all: $T.so\r
-- echo $(SYS)\r
--\r
--$T.so: $(OBJS)\r
-- MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o $T.so $(OBJS) $(OPENSSL_LIBS) $(LUA_LIBS) $(LDFLAGS)\r
--\r
--install: all\r
-- mkdir -p $(LUA_LIBDIR)\r
-- cp $T.so $(LUA_LIBDIR)\r
--\r
--clean:\r
-- rm -f $T.so $(OBJS) \r
-+.PHONY: install clean
-+
-+PKGC ?= pkg-config
-+
-+LIBNAME = openssl.so
-+LIB_OPTION = -shared
-+
-+# lua's package config can be under various names
-+LUAPKGC := $(shell for pc in lua lua5.1 lua5.2 lua5.3; do \
-+ $(PKGC) --exists $$pc && echo $$pc && break; \
-+ done)
-+
-+BUILD_DIR = $(shell pwd)
-+
-+# LUA include/libraries build flags
-+LUA_LIBDIR := $(shell $(PKGC) --variable=libdir $(LUAPKGC))
-+LUA_CFLAGS := $(shell $(PKGC) --cflags $(LUAPKGC))
-+LUA_LIBS := $(shell $(PKGC) --libs-only-L $(LUAPKGC))
-+
-+# openssl include/libraries build flags
-+OPENSSL_LIBS = $(shell $(PKGC) openssl --libs)
-+OPENSSL_CFLAGS = $(shell $(PKGC) openssl --cflags)
-+
-+# openssl include/libraries build flags
-+LOCAL_INCLUDE = -I$(BUILD_DIR)/deps
-+
-+CFLAGS += -fPIC -DPTHREADS -g $(LOCAL_INCLUDE) $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
-+LDFLAGS += -lrt -ldl $(OPENSSL_LIBS) $(LUA_LIBS)
-+
-+OBJS = src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o
-+
-+all: clean $(LIBNAME)
-+
-+$(LIBNAME): $(OBJS)
-+ $(CC) $(LDFLAGS) $(LIB_OPTION) $(OBJS) -o $@
-+
-+%.o: %.c
-+ $(CC) $(CFLAGS) -c $< -o $@
-+
-+install: all
-+ mkdir -p $(LUA_LIBDIR)
-+ cp $(LIBNAME) $(LUA_LIBDIR)
-+
-+clean:
-+ rm -f $(LIBNAME) $(OBJS)
++%.o: %.c\r
++ $(CC) $(CFLAGS) -c $< -o $@\r
+ \r
+ all: $T.so\r
+ echo $(SYS)\r
++ $(CC) $(LDFLAGS) $(LIB_OPTION) $(OBJS) -o $@\r
+ \r
+ $T.so: $(OBJS)\r
+ MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o $T.so $(OBJS) $(OPENSSL_LIBS) $(LUA_LIBS) $(LDFLAGS)\r
+++ /dev/null
---- lua-openssl-0.6.0.old/src/ssl.c 2016-09-19 08:30:43.735075695 +0200
-+++ lua-openssl-0.6.0/src/ssl.c 2016-09-19 09:02:45.733813437 +0200
-@@ -24,12 +24,17 @@
- SSL_METHOD* method = NULL;
- const char* ciphers;
- SSL_CTX* ctx;
-- if (strcmp(meth, "SSLv3") == 0)
-+ if (0);
-+
-+#ifndef OPENSSL_NO_SSL3
-+ else if (strcmp(meth, "SSLv3") == 0)
- method = SSLv3_method(); /* SSLv3 */
- else if (strcmp(meth, "SSLv3_server") == 0)
- method = SSLv3_server_method(); /* SSLv3 */
- else if (strcmp(meth, "SSLv3_client") == 0)
- method = SSLv3_client_method(); /* SSLv3 */
-+#endif
-+
- else if (strcmp(meth, "SSLv23") == 0)
- method = SSLv23_method(); /* SSLv3 but can rollback to v2 */
- else if (strcmp(meth, "SSLv23_server") == 0)
-@@ -79,15 +84,15 @@
- #endif
- else
- luaL_error(L, "#1:%s not supported\n"
-- "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
-- "default is SSLv3",
-+ "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
-+ "default is TLSv1",
- meth);
- ciphers = luaL_optstring(L, 2, SSL_DEFAULT_CIPHER_LIST);
- ctx = SSL_CTX_new(method);
- if (!ctx)
- luaL_error(L, "#1:%s not supported\n"
-- "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
-- "default is SSLv3",
-+ "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
-+ "default is TLSv1",
- meth);
- openssl_newvalue(L, ctx);
- SSL_CTX_set_cipher_list(ctx, ciphers);
--- /dev/null
+--- a/src/csr.c
++++ b/src/csr.c
+@@ -38,7 +38,7 @@ static LUA_FUNCTION(openssl_csr_read)
+ return openssl_pushresult(L, 0);
+ }
+ \r
+-\r
++#if OPENSSL_VERSION_NUMBER < 0x10100000L\r
+ static X509 *X509_REQ_to_X509_ex(X509_REQ *r, int days, EVP_PKEY *pkey, const EVP_MD* md)\r
+ {\r
+ X509 *ret = NULL;\r
+@@ -91,14 +91,19 @@ static X509 *X509_REQ_to_X509_ex(X509_RE
+ }\r
+ return (ret);\r
+ }\r
++#endif\r
+
+ static LUA_FUNCTION(openssl_csr_to_x509)
+ {
+ X509_REQ * csr = CHECK_OBJECT(1, X509_REQ, "openssl.x509_req");
+ EVP_PKEY * pkey = CHECK_OBJECT(2, EVP_PKEY, "openssl.evp_pkey");
+ int days = luaL_optint(L, 3, 365);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ const EVP_MD* md = get_digest(L, 4, "sha256");
+ X509* cert = X509_REQ_to_X509_ex(csr, days, pkey, md);
++#else
++ X509* cert = X509_REQ_to_X509(csr, days, pkey);
++#endif
+ if (cert)
+ {
+ PUSH_OBJECT(cert, "openssl.x509");
+++ /dev/null
---- lua-openssl-0.6.0.old/src/ssl.c 2016-09-19 08:30:43.735075695 +0200
-+++ lua-openssl-0.6.0/src/ssl.c 2016-09-19 08:48:37.393737125 +0200
-@@ -1245,7 +1250,7 @@
- lua_pushinteger(L, st);
- return 2;
- }
--#ifndef LIBRESSL_VERSION_NUMBER
-+#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER)
- static int openssl_ssl_current_compression(lua_State *L)
- {
- SSL* s = CHECK_OBJECT(1, SSL, "openssl.ssl");
-@@ -1803,7 +1808,7 @@
- {"getfd", openssl_ssl_getfd},
-
- {"current_cipher", openssl_ssl_current_cipher},
--#ifndef LIBRESSL_VERSION_NUMBER
-+#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER)
- {"current_compression", openssl_ssl_current_compression},
- #endif
- {"getpeerverification", openssl_ssl_getpeerverification},
include $(TOPDIR)/rules.mk
PKG_NAME:=luafilesystem
-PKG_VERSION:=1.6.2
+PKG_VERSION:=1.7.0.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=b366bce608e6f18f1b3cb32c6eb6a78d78d17c3598a0d54c493601f9aadefdd8
+PKG_MIRROR_HASH:=23b4883aeb4fb90b2d0f338659f33a631f9df7a7e67c54115775a77d4ac3cc59
PKG_SOURCE_URL:=https://github.com/keplerproject/luafilesystem.git
-PKG_SOURCE_VERSION:=2fd989cd6c777583be1c93616018c55b2cbb1bcf
+PKG_SOURCE_VERSION:=de87218e9798c4dd1a40d65403d99e9e82e1cfa0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+++ /dev/null
-#
-# Copyright (C) 2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=luai2c
-PKG_VERSION:=1.1.2
-PKG_RELEASE:=4
-PKG_MAINTAINER:=Frank Edelhaeuser <mrpace2@gmail.com>
-PKG_LICENSE:=MIT
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=1c25062e95064cda4866243ff6797ef597dd57260da559ca68129aa7a72a9cda
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/mrpace2/lua-i2c.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/luai2c
- SUBMENU:=Lua
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=Lua I2C binding
- URL:=https://github.com/mrpace2/lua-i2c/
- DEPENDS:=+liblua +kmod-i2c-core
- MAINTAINER:=Frank Edelhaeuser <mrpace2@gmail.com>
-endef
-
-define Package/luai2c/description
- This is the Lua binding for I2C. It provides access to I2C slaves supported by the kernel.
-endef
-
-define Package/luai2c/install
- $(INSTALL_DIR) $(1)/usr/lib/lua
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/i2c.so $(1)/usr/lib/lua
- $(INSTALL_DIR) $(1)/usr/lib/lua/i2c
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/* $(1)/usr/lib/lua/i2c
-endef
-
-$(eval $(call BuildPackage,luai2c))
PKG_NAME:=luajit
PKG_VERSION:=2017-01-17-71ff7ef
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Morteza Milani <milani@pichak.co>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYRIGHT
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/luajit-2.1
- $(CP) $(PKG_INSTALL_DIR)/usr/include/luajit-2.1/*.h $(1)/usr/include/luajit-2.1
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/luajit-2.1/*.{h,hpp} $(1)/usr/include/luajit-2.1
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
define Package/luajit/install
$(INSTALL_DIR) $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/luajit-2.1.0-beta2 $(1)/usr/bin/$(PKG_NAME)
endef
PKG_NAME:=luasec
PKG_VERSION:=0.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/brunoos/luasec/archive/
--- /dev/null
+--- a/src/context.c
++++ b/src/context.c
+@@ -24,7 +24,7 @@
+ #include "context.h"
+ #include "options.h"
+
+-#ifndef OPENSSL_NO_ECDH
++#ifndef OPENSSL_NO_EC
+ #include <openssl/ec.h>
+ #include "ec.h"
+ #endif
+@@ -35,10 +35,6 @@ typedef const SSL_METHOD LSEC_SSL_METHOD
+ typedef SSL_METHOD LSEC_SSL_METHOD;
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+-#define SSLv23_method() TLS_method()
+-#endif
+-
+ /*-- Compat - Lua 5.1 --------------------------------------------------------*/
+
+ #if (LUA_VERSION_NUM == 501)
+@@ -304,7 +300,7 @@ static int verify_cb(int preverify_ok, X
+ return (verify & LSEC_VERIFY_CONTINUE ? 1 : preverify_ok);
+ }
+
+-#ifndef OPENSSL_NO_ECDH
++#ifndef OPENSSL_NO_EC
+ static EC_KEY *find_ec_key(const char *str)
+ {
+ p_ec ptr;
+@@ -565,7 +561,7 @@ static int set_dhparam(lua_State *L)
+ /**
+ * Set elliptic curve.
+ */
+-#ifdef OPENSSL_NO_ECDH
++#ifdef OPENSSL_NO_EC
+ static int set_curve(lua_State *L)
+ {
+ lua_pushboolean(L, 0);
+--- a/src/ssl.c
++++ b/src/ssl.c
+@@ -31,6 +31,13 @@
+ #include "context.h"
+ #include "ssl.h"
+
++
++#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER<0x10100000L
++#define SSL_is_server(s) (s->server)
++#define X509_up_ref(c) CRYPTO_add(&c->references, 1, CRYPTO_LOCK_X509)
++#endif
++
++
+ /**
+ * Underline socket error.
+ */
+@@ -406,7 +413,9 @@ static int meth_want(lua_State *L)
+ */
+ static int meth_compression(lua_State *L)
+ {
+-#if !defined(OPENSSL_NO_COMP)
++#ifdef OPENSSL_NO_COMP
++ const void *comp;
++#else
+ const COMP_METHOD *comp;
+ #endif
+ p_ssl ssl = (p_ssl)luaL_checkudata(L, 1, "SSL:Connection");
+@@ -415,15 +424,11 @@ static int meth_compression(lua_State *L
+ lua_pushstring(L, "closed");
+ return 2;
+ }
+-#if !defined(OPENSSL_NO_COMP)
+ comp = SSL_get_current_compression(ssl->ssl);
+ if (comp)
+ lua_pushstring(L, SSL_COMP_get_name(comp));
+ else
+ lua_pushnil(L);
+-#else
+- lua_pushnil(L);
+-#endif
+ return 1;
+ }
+
+@@ -461,7 +466,7 @@ static int meth_getpeercertificate(lua_S
+ /* In a server-context, the stack doesn't contain the peer cert,
+ * so adjust accordingly.
+ */
+- if (ssl->ssl->server)
++ if (SSL_is_server(ssl->ssl))
+ --n;
+ certs = SSL_get_peer_cert_chain(ssl->ssl);
+ if (n >= sk_X509_num(certs)) {
+@@ -471,7 +476,7 @@ static int meth_getpeercertificate(lua_S
+ cert = sk_X509_value(certs, n);
+ /* Increment the reference counting of the object. */
+ /* See SSL_get_peer_certificate() source code. */
+- CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509);
++ X509_up_ref(cert);
+ lsec_pushx509(L, cert);
+ return 1;
+ }
+@@ -493,7 +498,7 @@ static int meth_getpeerchain(lua_State *
+ return 2;
+ }
+ lua_newtable(L);
+- if (ssl->ssl->server) {
++ if (SSL_is_server(ssl->ssl)) {
+ lsec_pushx509(L, SSL_get_peer_certificate(ssl->ssl));
+ lua_rawseti(L, -2, idx++);
+ }
+@@ -503,7 +508,7 @@ static int meth_getpeerchain(lua_State *
+ cert = sk_X509_value(certs, i);
+ /* Increment the reference counting of the object. */
+ /* See SSL_get_peer_certificate() source code. */
+- CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509);
++ X509_up_ref(cert);
+ lsec_pushx509(L, cert);
+ lua_rawseti(L, -2, idx++);
+ }
+--- a/src/x509.c
++++ b/src/x509.c
+@@ -32,6 +32,17 @@
+
+ #include "x509.h"
+
++
++/*
++ * ASN1_STRING_data is deprecated in OpenSSL 1.1.0
++ */
++#if OPENSSL_VERSION_NUMBER>=0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER)
++#define LSEC_ASN1_STRING_data(x) ASN1_STRING_get0_data(x)
++#else
++#define LSEC_ASN1_STRING_data(x) ASN1_STRING_data(x)
++#endif
++
++
+ static const char* hex_tab = "0123456789abcdef";
+
+ /**
+@@ -146,7 +157,7 @@ static void push_asn1_string(lua_State*
+ }
+ switch (encode) {
+ case LSEC_AI5_STRING:
+- lua_pushlstring(L, (char*)ASN1_STRING_data(string),
++ lua_pushlstring(L, (char*)LSEC_ASN1_STRING_data(string),
+ ASN1_STRING_length(string));
+ break;
+ case LSEC_UTF8_STRING:
+@@ -182,7 +193,7 @@ static void push_asn1_ip(lua_State *L, A
+ {
+ int af;
+ char dst[INET6_ADDRSTRLEN];
+- unsigned char *ip = ASN1_STRING_data(string);
++ unsigned char *ip = (unsigned char*)LSEC_ASN1_STRING_data(string);
+ switch(ASN1_STRING_length(string)) {
+ case 4:
+ af = AF_INET;
+@@ -293,11 +304,11 @@ int meth_extensions(lua_State* L)
+ break;
+
+ /* Push ret[oid] */
+- push_asn1_objname(L, extension->object, 1);
++ push_asn1_objname(L, X509_EXTENSION_get_object(extension), 1);
+ push_subtable(L, -2);
+
+ /* Set ret[oid].name = name */
+- push_asn1_objname(L, extension->object, 0);
++ push_asn1_objname(L, X509_EXTENSION_get_object(extension), 0);
+ lua_setfield(L, -2, "name");
+
+ n_general_names = sk_GENERAL_NAME_num(values);
+@@ -404,7 +415,7 @@ static int meth_pubkey(lua_State* L)
+ bytes = BIO_get_mem_data(bio, &data);
+ if (bytes > 0) {
+ lua_pushlstring(L, data, bytes);
+- switch(EVP_PKEY_type(pkey->type)) {
++ switch(EVP_PKEY_base_id(pkey)) {
+ case EVP_PKEY_RSA:
+ lua_pushstring(L, "RSA");
+ break;
PKG_NAME:=luasql
PKG_VERSION:=2.3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_MIRROR_HASH:=b6251065656bf3e066d90d492dd06eec2c2cc76ab4b94187ce3ed9620d41f741
--- /dev/null
+commit 6df3f672313f8dbca219199c8ec8d20c0247347f
+Author: Tomás Guisasola <tomasguisasola@gmail.com>
+Date: Mon Jul 31 09:41:49 2017 -0300
+
+ Add support for building with MariaDB (thanks to Florian Weimer).
+
+--- a/src/ls_mysql.c
++++ b/src/ls_mysql.c
+@@ -602,7 +602,11 @@ LUASQL_API int luaopen_luasql_mysql (lua
+ luaL_setfuncs(L, driver, 0);
+ luasql_set_info (L);
+ lua_pushliteral (L, "_MYSQLVERSION");
++#ifdef MARIADB_CLIENT_VERSION_STR
++ lua_pushliteral (L, MARIADB_CLIENT_VERSION_STR);
++#else
+ lua_pushliteral (L, MYSQL_SERVER_VERSION);
++#endif
+ lua_settable (L, -3);
+ return 1;
+ }
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/luvit/luv.git
+PKG_MIRROR_HASH:=28a4e5f115dacd3b293522bea211576d6bf0519c79971a3dee56632d04a13cb3
PKG_SOURCE_VERSION:=1.9.1-1
PKG_SOURCE_DATE:=2016-12-16
include $(TOPDIR)/rules.mk
PKG_NAME:=lzmq
-PKG_VERSION:=0.4.3
+PKG_VERSION:=0.4.4
PKG_RELEASE:=1
PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/zeromq/lzmq/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=51ec00117b0570db82b1eba7b62e95d7e98c880a028584b195a98b433dd8edd1
+PKG_HASH:=cf70200045b8bcb0e929c338ad421b6a291cf1038053532888dc201af3224d8b
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
--- /dev/null
+#
+# Copyright (C) 2018 Sartura Ltd.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NPM_NAME:=mozilla-iot-gateway
+PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_VERSION:=0.3.1
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/mozilla-iot/gateway.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_MIRROR_HASH:=ba05bc3e93c36768244df922434e7132c2dae85a1ff9e3213beea087a4844d11
+
+PKG_BUILD_DEPENDS:=node/host openzwave
+
+PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
+PKG_LICENSE:=MPL-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/node-mozilla-iot-gateway
+ SUBMENU:=Node.js
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Things Gateway by Mozilla
+ URL:=https://iot.mozilla.org/gateway/
+ DEPENDS:=+node +node-npm +libopenzwave +python +openssl-util
+endef
+
+define Package/node-mozilla-iot-gateway/description
+ Build Your Own Web of Things Gateway. The "Web of Things" (WoT) is the
+ idea of taking the lessons learned from the World Wide Web and applying
+ them to IoT. It's about creating a decentralized Internet of Things by
+ giving Things URLs on the web to make them linkable and discoverable,
+ and defining a standard data model and APIs to make them interoperable.
+endef
+
+CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+
+define Build/Compile
+ $(MAKE_VARS) \
+ $(MAKE_FLAGS) \
+ npm_config_arch=$(CONFIG_ARCH) \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp \
+ PREFIX="$(PKG_INSTALL_DIR)/usr/" \
+ $(STAGING_DIR_HOSTPKG)/bin/npm install --build-from-source --target_arch=$(CPU) -g $(DL_DIR)/$(PKG_SOURCE)
+endef
+
+define Package/node-mozilla-iot-gateway/install
+ $(INSTALL_DIR) $(1)/opt/mozilla-iot/gateway
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/things-gateway/* $(1)/opt/mozilla-iot/gateway
+ $(STAGING_DIR_HOSTPKG)/bin/npm --prefix=$(1)/opt/mozilla-iot/gateway install $(1)/opt/mozilla-iot/gateway
+ $(LN) ../constants.js $(1)/opt/mozilla-iot/gateway/src/addons/addon-constants.js
+ $(LN) /tmp/mozilla-iot/gateway/run-app.log $(1)/opt/mozilla-iot/gateway/run-app.log
+
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/mozilla-iot-gateway.init $(1)/etc/init.d/mozilla-iot-gateway
+endef
+
+$(eval $(call BuildPackage,node-mozilla-iot-gateway))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+
+_npm=/usr/bin/npm
+
+start()
+{
+ mkdir -p /tmp/mozilla-iot/gateway/
+ cd /opt/mozilla-iot/gateway/
+ $_npm start &> /tmp/mozilla-iot/gateway/run-app.log &
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=node
-PKG_VERSION:=v8.10.0
+PKG_VERSION:=v8.11.3
PKG_RELEASE:=1
PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION}
-PKG_HASH:=b72d4e71618d6bcbd039b487b51fa7543631a4ac3331d7caf69bdf55b5b2901a
+PKG_HASH:=577c751fdca91c46c60ffd8352e5b465881373bfdde212c17c3a3c1bd2616ee0
HOST_BUILD_DEPENDS:=python/host
PKG_BUILD_DEPENDS:=python/host
MAKE_VARS+= \
DESTCPU=$(NODEJS_CPU)
+CONFIGURE_VARS:= \
+ CC="$(TARGET_CC) $(TARGET_OPTIMIZATION)" \
+ CXX="$(TARGET_CXX) $(TARGET_OPTIMIZATION)" \
+ CC_host="$(HOSTCC)" \
+ CXX_host="$(HOSTCXX)"
+
CONFIGURE_ARGS:= \
--dest-cpu=$(NODEJS_CPU) \
--dest-os=linux \
--without-snapshot \
--shared-zlib \
--shared-openssl \
+ --with-intl=$(if $(CONFIG_NODEJS_ICU),system-icu,none) \
+ $(if $(findstring mips,$(NODEJS_CPU)), \
+ $(if $(CONFIG_SOFT_FLOAT),--with-mips-float-abi=soft)) \
+ $(if $(findstring +neon,$(CONFIG_CPU_TYPE)),--with-arm-fpu=neon) \
+ $(if $(findstring +vfp",$(CONFIG_CPU_TYPE)),--with-arm-fpu=vfp) \
+ $(if $(findstring +vfpv3",$(CONFIG_CPU_TYPE)),--with-arm-fpu=vfpv3-d16) \
+ $(if $(findstring +vfpv4",$(CONFIG_CPU_TYPE)),--with-arm-fpu=vfpv3) \
--prefix=/usr
-ifneq ($(findstring arm,$(NODEJS_CPU)),)
-ifeq ($(CONFIG_SOFT_FLOAT),y)
-CONFIGURE_ARGS+= --with-arm-float-abi=softfp
-else
-
-CONFIGURE_ARGS+= --with-arm-float-abi=hard
-
-ifneq ($(findstring vfp,$(CONFIG_CPU_TYPE)),)
-ARM_FPU=vfp
-endif
-
-ifneq ($(findstring vfpv3,$(CONFIG_CPU_TYPE)),)
-ARM_FPU=vfpv3
-endif
-
-ifneq ($(findstring vfpv3-d16,$(CONFIG_CPU_TYPE)),)
-ARM_FPU=vfpv3-d16
-endif
-
-ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),)
-ARM_FPU=neon
-endif
-
-CONFIGURE_ARGS+= --with-arm-fpu=$(ARM_FPU)
-endif
-endif
-
-ifneq ($(findstring mips,$(NODEJS_CPU)),)
-ifeq ($(CONFIG_SOFT_FLOAT),y)
-CONFIGURE_ARGS+= \
- --with-mips-float-abi=soft
-endif
-endif
-
-ifeq ($(CONFIG_NODEJS_ICU),y)
-CONFIGURE_ARGS+= \
- --with-intl=system-icu
-else
-CONFIGURE_ARGS+= \
- --with-intl=none
-endif
-
HOST_CONFIGURE_VARS:=
HOST_CONFIGURE_ARGS:= \
--dest-os=linux \
--without-snapshot \
- --shared-zlib \
--prefix=$(STAGING_DIR_HOSTPKG)
HOST_CONFIGURE_CMD:=python ./configure
+++ /dev/null
-diff --git a/src/node_crypto.cc b/src/node_crypto.cc
-index 972b1e4..7c0f65a 100644
---- a/src/node_crypto.cc
-+++ b/src/node_crypto.cc
-@@ -5623,7 +5623,7 @@ void PBKDF2(const FunctionCallbackInfo<Value>& args) {
- }
-
- raw_keylen = args[3]->NumberValue();
-- if (raw_keylen < 0.0 || std::isnan(raw_keylen) || std::isinf(raw_keylen) ||
-+ if (raw_keylen < 0.0 || isnan(raw_keylen) || isinf(raw_keylen) ||
- raw_keylen > INT_MAX) {
- type_error = "Bad key length";
- goto err;
--- /dev/null
+From 34825d50db18631a92902af3f51ddd27aa074c90 Mon Sep 17 00:00:00 2001
+From: Jeroen Roovers <jer-gentoo@users.noreply.github.com>
+Date: Fri, 13 Apr 2018 05:54:42 +0200
+Subject: [PATCH 2/2] Include cmath ...
+
+... instead of using the C implementations of isnan and isinf
+---
+ src/node_crypto.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/node_crypto.cc b/src/node_crypto.cc
+index 7c0f65a5735..0aa4adbd467 100644
+--- a/src/node_crypto.cc
++++ b/src/node_crypto.cc
+@@ -36,9 +36,9 @@
+ #include "v8.h"
+
+ #include <algorithm>
++#include <cmath>
+ #include <errno.h>
+ #include <limits.h> // INT_MAX
+-#include <math.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <vector>
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-cgi
-PKG_VERSION:=4.38
+PKG_VERSION:=4.40
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
-PKG_HASH:=8c58f4a529bb92a914b22b7e64c5e31185c9854a4070a6dfad44fe5cc248e7d4
+PKG_HASH:=10efff3061b3c31a33b3cc59f955aef9c88d57d12dbac46389758cef92f24f56
PKG_LICENSE:=GPL Artistic-2.0
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-text-csv_xs
-PKG_VERSION:=1.34
+PKG_VERSION:=1.37
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/H/HM/HMBRAND/
+PKG_SOURCE_URL:=https://www.cpan.org/authors/id/H/HM/HMBRAND/
PKG_SOURCE:=Text-CSV_XS-$(PKG_VERSION).tgz
-PKG_HASH:=ea3aa6fe50e8ef9c07f4304ace98fca413c9c6cf60d84efc32c314b902e8a134
+PKG_HASH:=20e16da9c38b0938f308c01d954f49d2c6922bac0d2d979bf2ad483fe7476ba2
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
#
-# Copyright (C) 2006-2016 OpenWrt.org
+# Copyright (C) 2006-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
+include perlver.mk
+
PKG_NAME:=perl
-PKG_VERSION:=5.26.1
-PKG_RELEASE:=3
+PKG_VERSION:=$(PERL_VERSION)
+PKG_RELEASE:=2
PKG_SOURCE_URL:=\
https://cpan.metacpan.org/src/5.0 \
https://mirrors.sonic.net/cpan/src/5.0 \
https://www.cpan.org/src/5.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=fe8208133e73e47afc3251c08d2c21c5a60160165a8ab8b669c43a420e4ec680
+PKG_HASH:=059b3cb69970d8c8c5964caced0335b4af34ac990c8e61f7e3f90cd1c2d11e49
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_LICENSE_FILES:=Copying Artistic README
d_PRIx64='define'
d_SCNfldbl='define'
d__fwalk='undef'
+d_accept4='define'
d_access='define'
d_accessx='undef'
d_acosh='define'
d_bsd='undef'
d_bsdgetpgrp='undef'
d_bsdsetpgrp='undef'
+d_builtin_add_overflow='define'
d_builtin_choose_expr='define'
d_builtin_expect='undef'
+d_builtin_mul_overflow='define'
+d_builtin_sub_overflow='define'
d_bzero='define'
d_c99_variadic_macros='define'
d_castneg='define'
d_double_style_vax='undef'
d_drand48proto='define'
d_dup2='define'
+d_dup3='define'
d_duplocale='define'
d_eaccess='undef'
d_endgrent='define'
d_faststdio='undef'
d_fchdir='define'
d_fchmod='define'
+d_fchmodat='define'
d_fchown='define'
d_fcntl='define'
d_fcntl_can_lock='define'
d_libm_lib_version='define'
d_libname_unique='undef'
d_link='define'
+d_linkat='define'
d_llrint='define'
d_llrintl='define'
d_llround='define'
d_llroundl='define'
+d_localeconv_l='undef'
d_localtime64='undef'
d_locconv='define'
d_lockf='define'
d_malloc_good_size='undef'
d_malloc_size='undef'
d_mblen='define'
+d_mbrlen='define'
+d_mbrtowc='define'
d_mbstowcs='define'
d_mbtowc='define'
d_memchr='define'
d_memcpy='define'
d_memmem='define'
d_memmove='define'
+d_memrchr='undef'
d_memset='define'
d_mkdir='define'
d_mkdtemp='define'
d_mkfifo='define'
+d_mkostemp='define'
d_mkstemp='define'
d_mkstemps='undef'
d_mktime='define'
d_oldpthreads='undef'
d_oldsock='undef'
d_open3='define'
+d_openat='define'
d_pathconf='define'
d_pause='define'
d_perl_otherlibdirs='undef'
d_phostname='undef'
d_pipe='define'
+d_pipe2='define'
d_poll='define'
d_portable='define'
d_prctl='define'
d_regcomp='define'
d_remainder='define'
d_remquo='define'
+d_renameat='define'
d_rename='define'
d_rewinddir='define'
d_rint='define'
d_strftime='define'
d_strlcat='define'
d_strlcpy='define'
+d_strnlen='define'
d_strtod='define'
+d_strtod_l='define'
d_strtol='define'
d_strtold='define'
+d_strtold_l='define'
d_strtoll='define'
d_strtoq='define'
d_strtoul='define'
d_telldir='define'
d_telldirproto='define'
d_tgamma='define'
+d_thread_safe_nl_langinfo_l='define'
d_time='define'
d_timegm='define'
d_times='define'
d_umask='define'
d_uname='define'
d_union_semun='undef'
+d_unlinkat='define'
d_unordered='undef'
d_unsetenv='define'
d_uselocale='define'
i_varargs='undef'
i_varhdr='stdarg.h'
i_vfork='undef'
+i_wchar='define'
i_xlocale='undef'
ignore_versioned_solibs='y'
inc_version_list=' '
# Tool flags
cppflags="$owrt:cflags"
-ccflags="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $owrt:cflags"
+ccflags="-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $owrt:cflags"
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccdlflags="-fPIC -rdynamic -Wl,-rpath,$owrt:perllibpath/CORE"
cccdlflags='-fPIC'
# Set the version here
PERL_REVISION=5
-PERL_VERSION=26
-PERL_SUBVERSION=1
+PERL_VERSION=28
+PERL_SUBVERSION=0
# (api_revison, api_version, api_subversion) = (revision, version, 0) usually
PERL_API_REVISION=5
-PERL_API_VERSION=26
+PERL_API_VERSION=28
PERL_API_SUBVERSION=0
known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash'
---- a/pp.c
-+++ b/pp.c
-@@ -43,7 +43,7 @@ extern Pid_t getpid (void);
- * Some BSDs and Cygwin default to POSIX math instead of IEEE.
- * This switches them over to IEEE.
- */
--#if defined(LIBM_LIB_VERSION)
-+#if defined(LIBM_LIB_VERSION) && (defined(__GLIBC__) || defined(__UCLIBC__))
- _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
+--- a/perl.c
++++ b/perl.c
+@@ -286,7 +286,7 @@ perl_construct(pTHXx)
+ PL_localpatches = local_patches; /* For possible -v */
#endif
+-#if defined(LIBM_LIB_VERSION)
++#if defined(LIBM_LIB_VERSION) && (defined(__GLIBC__) || defined(__UCLIBC__))
+ /*
+ * Some BSDs and Cygwin default to POSIX math instead of IEEE.
+ * This switches them over to IEEE.
--- /dev/null
+From 682a4acb98783a7f9b5c286b308f12863599fec3 Mon Sep 17 00:00:00 2001
+From: Tony Cook <tony@develop-help.com>
+Date: Mon, 30 Jul 2018 21:00:52 +1000
+Subject: (perl #133411) don't try to load Storable with -Dusecrosscompile
+
+---
+ dist/Storable/Makefile.PL | 9 ++++++++-
+ dist/Storable/stacksize | 10 +++++++---
+ 2 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/dist/Storable/Makefile.PL b/dist/Storable/Makefile.PL
+index a5d9e66891..db420ab30b 100644
+--- a/dist/Storable/Makefile.PL
++++ b/dist/Storable/Makefile.PL
+@@ -90,12 +90,19 @@ sub depend {
+ # blib.pm needs arch/lib
+ $extra_deps = ' Storable.pm';
+ }
++ my $whichperl;
++ if ($Config::Config{usecrosscompile}) {
++ $whichperl = '$(PERLRUN)';
++ }
++ else {
++ $whichperl = '$(FULLPERLRUNINST)';
++ }
+ my $linktype = uc($_[0]->{LINKTYPE});
+ my $limit_pm = File::Spec->catfile('lib', 'Storable', 'Limit.pm');
+ "
+ $limit_pm : stacksize \$(INST_$linktype)$extra_deps
+ \$(MKPATH) \$(INST_LIB)
+- \$(FULLPERLRUNINST) stacksize $options
++ $whichperl stacksize $options
+
+ release : dist
+ git tag \$(VERSION)
+diff --git a/dist/Storable/stacksize b/dist/Storable/stacksize
+index 7abd3a84cc..14e0739734 100644
+--- a/dist/Storable/stacksize
++++ b/dist/Storable/stacksize
+@@ -7,6 +7,9 @@ use Cwd;
+ use File::Spec;
+ use strict;
+
++-d "lib" or mkdir "lib";
++-d "lib/Storable" or mkdir "lib/Storable";
++
+ my $fn = "lib/Storable/Limit.pm";
+ my $ptrsize = $Config{ptrsize};
+ my ($bad1, $bad2) = (65001, 25000);
+@@ -29,6 +32,10 @@ sub is_miniperl {
+ }
+
+ if (is_miniperl()) {
++ if ($Config{usecrosscompile}) {
++ write_limits(500, 265);
++ exit;
++ }
+ die "Should not run during miniperl\n";
+ }
+ my $prefix = "";
+@@ -68,9 +75,6 @@ if ($ENV{PERL_CORE}) {
+ }
+ }
+
+--d "lib" or mkdir "lib";
+--d "lib/Storable" or mkdir "lib/Storable";
+-
+ if ($^O eq "MSWin32") {
+ require Win32;
+ my ($str, $major, $minor) = Win32::GetOSVersion();
+--
+2.11.0
+
===================================================================
--- perl-5.26.1.orig/perl.c
+++ perl-5.26.1/perl.c
-@@ -1870,16 +1870,6 @@ S_Internals_V(pTHX_ CV *cv)
+@@ -1878,16 +1878,6 @@ S_Internals_V(pTHX_ CV *cv)
PUSHs(Perl_newSVpvn_flags(aTHX_ non_bincompat_options,
sizeof(non_bincompat_options) - 1, SVs_TEMP));
--- a/Makefile.SH 2017-10-17 11:59:52.938763142 -0600
+++ b/Makefile.SH 2017-10-17 12:13:46.202555604 -0600
-@@ -270,6 +270,7 @@ LNS = $lns
+@@ -275,6 +275,7 @@ LNS = $lns
# NOTE: some systems don't grok "cp -f". XXX Configure test needed?
CPS = $cp
RMS = rm -f
ranlib = $ranlib
# The following are mentioned only to make metaconfig include the
-@@ -731,7 +731,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
+@@ -736,7 +737,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
./generate_uudmap$(HOST_EXE_EXT) $(generated_headers)
generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
$(LNS) $(HOST_GENERATE) generate_uudmap$(HOST_EXE_EXT)
!NO!SUBS!
-@@ -871,26 +872,26 @@ mydtrace.h: $(DTRACE_H)
+@@ -876,26 +877,26 @@ mydtrace.h: $(DTRACE_H)
define)
$spitshell >>$Makefile <<'!NO!SUBS!'
$(DTRACE_MINI_O): perldtrace.d $(miniperl_objs_nodt)
!NO!SUBS!
;;
-@@ -901,13 +902,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
+@@ -906,13 +907,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
case "$useshrplib" in
true)
$spitshell >>$Makefile <<'!NO!SUBS!'
mv $@ libperl$(OBJ_EXT)
$(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
!NO!SUBS!
-@@ -916,7 +917,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
+@@ -921,7 +922,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
;;
*)
$spitshell >>$Makefile <<'!NO!SUBS!'
$(AR) rc $(LIBPERL) $(perllib_objs) $(DYNALOADER)
@$(ranlib) $(LIBPERL)
!NO!SUBS!
-@@ -949,7 +950,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
+@@ -954,7 +955,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
amigaos*)
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
# $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-@@ -987,7 +988,7 @@ NAMESPACEFLAGS = -force_flat_namespace
+@@ -992,7 +993,7 @@ NAMESPACEFLAGS = -force_flat_namespace
esac
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-@@ -998,8 +999,8 @@ lib/buildcustomize.pl: $& $(miniperl_obj
+@@ -1003,8 +1004,8 @@ lib/buildcustomize.pl: $& $(miniperl_obj
if test "X$hostperl" != X; then
$spitshell >>$Makefile <<!GROK!THIS!
lib/buildcustomize.pl: \$& \$(miniperl_dep) write_buildcustomize.pl
\$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
\$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
\$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
-@@ -1007,7 +1008,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d
+@@ -1012,7 +1013,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d
else
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
-@@ -1020,7 +1021,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep
+@@ -1025,7 +1026,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep
$spitshell >>$Makefile <<'!NO!SUBS!'
$(PERL_EXE): $& $(perlmain_dep) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl
!NO!SUBS!
case $osname in
-@@ -1114,8 +1115,8 @@ pod/perl5261delta.pod: pod/perldelta.pod
- $(LNS) perldelta.pod pod/perl5261delta.pod
+@@ -1119,8 +1120,8 @@ pod/perl5280delta.pod: pod/perldelta.pod
+ $(LNS) perldelta.pod pod/perl5280delta.pod
extra.pods: $(MINIPERL_EXE)
- -@test ! -f extra.pods || rm -f `cat extra.pods`
-@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
nx=`echo $$x | sed -e "s/README\.//"`; \
$(LNS) ../$$x "pod/perl"$$nx".pod" ; \
-@@ -1332,11 +1333,11 @@ realclean: _realcleaner _mopup
+@@ -1340,11 +1341,11 @@ realclean: _realcleaner _mopup
@echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh"
_clobber:
clobber: _realcleaner _mopup _clobber
-@@ -1344,23 +1345,23 @@ distclean: clobber
+@@ -1352,23 +1353,23 @@ distclean: clobber
# Like distclean but also removes emacs backups and *.orig.
veryclean: _verycleaner _mopup _clobber
-cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN)
-cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN)
-@if test -f $(MINIPERL_EXE) ; then \
-@@ -1370,31 +1371,31 @@ _cleaner1:
+@@ -1378,31 +1379,31 @@ _cleaner1:
else \
sh $(CLEAN).sh ; \
fi
-rmdir lib/version lib/threads lib/inc/ExtUtils lib/inc lib/encoding
-rmdir lib/autodie/exception lib/autodie/Scope lib/autodie lib/XS
-rmdir lib/Win32API lib/VMS lib/Unicode/Collate/Locale
-@@ -1443,11 +1444,11 @@ _realcleaner:
+@@ -1452,11 +1453,11 @@ _realcleaner:
_verycleaner:
@$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean
@$(LDLIBPTH) $(MAKE) _cleaner2
lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c)
cscopeflags = -Rb # Recursive, build-only.
-@@ -1505,7 +1506,7 @@ case "$targethost" in
+@@ -1514,7 +1515,7 @@ case "$targethost" in
'') $spitshell >>$Makefile <<'!NO!SUBS!'
test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \
- $(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods)
+ $(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods) common_build
- cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
+ cd t && ($(RMS) $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
!NO!SUBS!
;;
-@@ -1555,7 +1556,7 @@ test_prep test-prep: test_prep_pre \$(MI
+@@ -1564,7 +1565,7 @@ test_prep test-prep: test_prep_pre \$(MI
$to config.sh
# --- For lib/diagnostics.t with -Duseshrplib
$to \$(PERL_EXE)
$to t/\$(PERL_EXE)
!GROK!THIS!
-@@ -1565,7 +1566,7 @@ esac
+@@ -1574,7 +1575,7 @@ esac
$spitshell >>$Makefile <<'!NO!SUBS!'
test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
$(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
!NO!SUBS!
case "$targethost" in
-@@ -1620,7 +1621,7 @@ minitest_prep:
+@@ -1629,7 +1630,7 @@ minitest_prep:
@echo "You may see some irrelevant test failures if you have been unable"
@echo "to build lib/Config.pm, or the Unicode data files."
@echo " "
--- a/Makefile.SH 2017-10-15 18:57:08.436234652 -0600
+++ b/Makefile.SH 2017-10-15 19:02:47.587658819 -0600
-@@ -327,7 +327,7 @@ PATH_SEP = $p_
+@@ -328,7 +328,7 @@ PATH_SEP = $p_
# Macros to invoke a copy of miniperl during the build. Targets which
# are built using these macros should depend on \$(MINIPERL_EXE)
MINIPERL_EXE = miniperl\$(EXE_EXT)
# Macros to invoke sort the MANIFEST during build
MANIFEST_SRT = MANIFEST.srt
-@@ -990,7 +990,7 @@ NAMESPACEFLAGS = -force_flat_namespace
+@@ -991,7 +991,7 @@ NAMESPACEFLAGS = -force_flat_namespace
@$(RMS) miniperl.xok
$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
;;
-@@ -1001,16 +1001,16 @@ lib/buildcustomize.pl: $& $(miniperl_obj
+@@ -1002,16 +1002,16 @@ lib/buildcustomize.pl: $& $(miniperl_obj
@\$(RMS) miniperl.xok
@\$(RMS) \$(MINIPERL_EXE)
\$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
fi
---- a/cpan/Devel-PPPort/PPPort_pm.PL 2017-07-18 16:59:59.000000000 -0600
-+++ b/cpan/Devel-PPPort/PPPort_pm.PL 2017-10-15 19:19:27.341543182 -0600
-@@ -15,6 +15,7 @@
-
- use strict;
- $^W = 1;
-+push(@INC, '.');
- require "parts/ppptools.pl";
-
- my $INCLUDE = 'parts/inc';
---- a/cpan/Devel-PPPort/ppport_h.PL 2017-07-18 16:59:59.000000000 -0600
-+++ b/cpan/Devel-PPPort/ppport_h.PL 2017-10-15 19:27:16.594178623 -0600
-@@ -14,6 +14,7 @@
- ################################################################################
-
- package Devel::PPPort;
-+push(@INC, '.');
- require "PPPort.pm";
- rename 'ppport.h', 'ppport.old' if -f 'ppport.h';
- unlink "ppport.old" if WriteFile("ppport.h") && -f 'ppport.h';
---- a/cpan/Devel-PPPort/PPPort_xs.PL 2017-07-18 16:59:59.000000000 -0600
-+++ b/cpan/Devel-PPPort/PPPort_xs.PL 2017-10-15 19:38:09.296679968 -0600
-@@ -15,6 +15,7 @@
-
- use strict;
- $^W = 1;
-+push(@INC, '.');
- require "parts/ppptools.pl";
-
- my %SECTION = (
---- a/cpan/Unicode-Collate/Makefile.PL 2017-07-18 16:49:51.000000000 -0600
-+++ b/cpan/Unicode-Collate/Makefile.PL 2017-10-15 20:19:31.890439791 -0600
-@@ -6,7 +6,7 @@ my $clean = {};
- if (-f "Collate.xs") {
- print "Making header files for XS...\n";
-
-- do 'mkheader' or die $@ || "mkheader: $!";
-+ do './mkheader' or die $@ || "mkheader: $!";
-
- $clean = { FILES => 'ucatbl.h' };
- }
--- /dev/null
+commit d36adde059ed1c4f7af210b4f9fc3a7bd2d7d343
+Author: Karl Williamson <khw@cpan.org>
+Date: Wed May 23 15:32:47 2018 -0600
+
+ Fix to compile under -DNO_LOCALE
+
+ Several problems with this compile option were not caught before 5.28
+ was frozen.
+
+diff --git a/embed.fnc b/embed.fnc
+index 0f06e38..36f9f97 100644
+--- a/embed.fnc
++++ b/embed.fnc
+@@ -2765,9 +2765,11 @@ s |bool |isa_lookup |NN HV *stash|NN const char * const name \
+ #endif
+
+ #if defined(PERL_IN_LOCALE_C)
++# ifdef USE_LOCALE
+ sn |const char*|category_name |const int category
+ s |const char*|switch_category_locale_to_template|const int switch_category|const int template_category|NULLOK const char * template_locale
+ s |void |restore_switched_locale|const int category|NULLOK const char * const original_locale
++# endif
+ # ifdef HAS_NL_LANGINFO
+ sn |const char*|my_nl_langinfo|const nl_item item|bool toggle
+ # else
+diff --git a/embed.h b/embed.h
+index cf3ad9e..fb66c26 100644
+--- a/embed.h
++++ b/embed.h
+@@ -1724,16 +1724,16 @@
+ #define unshare_hek_or_pvn(a,b,c,d) S_unshare_hek_or_pvn(aTHX_ a,b,c,d)
+ # endif
+ # if defined(PERL_IN_LOCALE_C)
+-#define category_name S_category_name
+-#define restore_switched_locale(a,b) S_restore_switched_locale(aTHX_ a,b)
+ #define save_to_buffer S_save_to_buffer
+-#define switch_category_locale_to_template(a,b,c) S_switch_category_locale_to_template(aTHX_ a,b,c)
+ # if defined(USE_LOCALE)
++#define category_name S_category_name
+ #define new_collate(a) S_new_collate(aTHX_ a)
+ #define new_ctype(a) S_new_ctype(aTHX_ a)
+ #define new_numeric(a) S_new_numeric(aTHX_ a)
++#define restore_switched_locale(a,b) S_restore_switched_locale(aTHX_ a,b)
+ #define set_numeric_radix(a) S_set_numeric_radix(aTHX_ a)
+ #define stdize_locale(a) S_stdize_locale(aTHX_ a)
++#define switch_category_locale_to_template(a,b,c) S_switch_category_locale_to_template(aTHX_ a,b,c)
+ # if defined(USE_POSIX_2008_LOCALE)
+ #define emulate_setlocale S_emulate_setlocale
+ # endif
+diff --git a/locale.c b/locale.c
+index 7653340..f8f77fb 100644
+--- a/locale.c
++++ b/locale.c
+@@ -1264,6 +1264,7 @@ S_locking_setlocale(pTHX_
+ }
+
+ #endif
++#ifdef USE_LOCALE
+
+ STATIC void
+ S_set_numeric_radix(pTHX_ const bool use_locale)
+@@ -1299,6 +1300,10 @@ S_set_numeric_radix(pTHX_ const bool use_locale)
+ }
+
+ # endif
++#else
++
++ PERL_UNUSED_ARG(use_locale);
++
+ #endif /* USE_LOCALE_NUMERIC and can find the radix char */
+
+ }
+@@ -1481,7 +1486,6 @@ S_new_ctype(pTHX_ const char *newctype)
+
+ #ifndef USE_LOCALE_CTYPE
+
+- PERL_ARGS_ASSERT_NEW_CTYPE;
+ PERL_UNUSED_ARG(newctype);
+ PERL_UNUSED_CONTEXT;
+
+@@ -1994,6 +1998,8 @@ S_new_collate(pTHX_ const char *newcoll)
+
+ }
+
++#endif
++
+ #ifdef WIN32
+
+ STATIC char *
+@@ -2139,11 +2145,20 @@ Perl_setlocale(const int category, const char * locale)
+ {
+ /* This wraps POSIX::setlocale() */
+
++#ifdef NO_LOCALE
++
++ PERL_UNUSED_ARG(category);
++ PERL_UNUSED_ARG(locale);
++
++ return "C";
++
++#else
++
+ const char * retval;
+ const char * newlocale;
+ dSAVEDERRNO;
+- DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
+ dTHX;
++ DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
+
+ #ifdef USE_LOCALE_NUMERIC
+
+@@ -2262,6 +2277,8 @@ Perl_setlocale(const int category, const char * locale)
+
+ return retval;
+
++#endif
++
+ }
+
+ PERL_STATIC_INLINE const char *
+@@ -2414,13 +2431,16 @@ S_my_nl_langinfo(const int item, bool toggle)
+ dTHX;
+ const char * retval;
+
++#ifdef USE_LOCALE_NUMERIC
++
+ /* We only need to toggle into the underlying LC_NUMERIC locale for these
+ * two items, and only if not already there */
+ if (toggle && (( item != RADIXCHAR && item != THOUSEP)
+ || PL_numeric_underlying))
+- {
++
++#endif /* No toggling needed if not using LC_NUMERIC */
++
+ toggle = FALSE;
+- }
+
+ #if defined(HAS_NL_LANGINFO) /* nl_langinfo() is available. */
+ # if ! defined(HAS_THREAD_SAFE_NL_LANGINFO_L) \
+@@ -2468,6 +2488,8 @@ S_my_nl_langinfo(const int item, bool toggle)
+ do_free = TRUE;
+ }
+
++# ifdef USE_LOCALE_NUMERIC
++
+ if (toggle) {
+ if (PL_underlying_numeric_obj) {
+ cur = PL_underlying_numeric_obj;
+@@ -2478,6 +2500,8 @@ S_my_nl_langinfo(const int item, bool toggle)
+ }
+ }
+
++# endif
++
+ /* We have to save it to a buffer, because the freelocale() just below
+ * can invalidate the internal one */
+ retval = save_to_buffer(nl_langinfo_l(item, cur),
+@@ -5169,9 +5193,7 @@ Perl_my_strerror(pTHX_ const int errnum)
+ LOCALE_UNLOCK;
+
+ # endif /* End of doesn't have strerror_l */
+-#endif /* End of does have locale messages */
+-
+-#ifdef DEBUGGING
++# ifdef DEBUGGING
+
+ if (DEBUG_Lv_TEST) {
+ PerlIO_printf(Perl_debug_log, "Strerror returned; saving a copy: '");
+@@ -5179,7 +5201,8 @@ Perl_my_strerror(pTHX_ const int errnum)
+ PerlIO_printf(Perl_debug_log, "'\n");
+ }
+
+-#endif
++# endif
++#endif /* End of does have locale messages */
+
+ SAVEFREEPV(errstr);
+ return errstr;
+@@ -5301,10 +5324,17 @@ L<C<Perl_switch_to_global_locale>|perlapi/switch_to_global_locale>.
+ bool
+ Perl_sync_locale()
+ {
++
++#ifndef USE_LOCALE
++
++ return TRUE;
++
++#else
++
+ const char * newlocale;
+ dTHX;
+
+-#ifdef USE_POSIX_2008_LOCALE
++# ifdef USE_POSIX_2008_LOCALE
+
+ bool was_in_global_locale = FALSE;
+ locale_t cur_obj = uselocale((locale_t) 0);
+@@ -5316,11 +5346,11 @@ Perl_sync_locale()
+ * will affect the */
+ if (cur_obj == LC_GLOBAL_LOCALE) {
+
+-# ifdef HAS_QUERY_LOCALE
++# ifdef HAS_QUERY_LOCALE
+
+ do_setlocale_c(LC_ALL, setlocale(LC_ALL, NULL));
+
+-# else
++# else
+
+ unsigned int i;
+
+@@ -5330,17 +5360,17 @@ Perl_sync_locale()
+ do_setlocale_r(categories[i], setlocale(categories[i], NULL));
+ }
+
+-# endif
++# endif
+
+ was_in_global_locale = TRUE;
+ }
+
+-#else
++# else
+
+ bool was_in_global_locale = TRUE;
+
+-#endif
+-#ifdef USE_LOCALE_CTYPE
++# endif
++# ifdef USE_LOCALE_CTYPE
+
+ newlocale = savepv(do_setlocale_c(LC_CTYPE, NULL));
+ DEBUG_Lv(PerlIO_printf(Perl_debug_log,
+@@ -5349,8 +5379,8 @@ Perl_sync_locale()
+ new_ctype(newlocale);
+ Safefree(newlocale);
+
+-#endif /* USE_LOCALE_CTYPE */
+-#ifdef USE_LOCALE_COLLATE
++# endif /* USE_LOCALE_CTYPE */
++# ifdef USE_LOCALE_COLLATE
+
+ newlocale = savepv(do_setlocale_c(LC_COLLATE, NULL));
+ DEBUG_Lv(PerlIO_printf(Perl_debug_log,
+@@ -5359,8 +5389,8 @@ Perl_sync_locale()
+ new_collate(newlocale);
+ Safefree(newlocale);
+
+-#endif
+-#ifdef USE_LOCALE_NUMERIC
++# endif
++# ifdef USE_LOCALE_NUMERIC
+
+ newlocale = savepv(do_setlocale_c(LC_NUMERIC, NULL));
+ DEBUG_Lv(PerlIO_printf(Perl_debug_log,
+@@ -5369,9 +5399,12 @@ Perl_sync_locale()
+ new_numeric(newlocale);
+ Safefree(newlocale);
+
+-#endif /* USE_LOCALE_NUMERIC */
++# endif /* USE_LOCALE_NUMERIC */
+
+ return was_in_global_locale;
++
++#endif
++
+ }
+
+ #if defined(DEBUGGING) && defined(USE_LOCALE)
+diff --git a/makedef.pl b/makedef.pl
+index dbd756d..661b71d 100644
+--- a/makedef.pl
++++ b/makedef.pl
+@@ -574,6 +574,9 @@ unless ($define{USE_LOCALE_COLLATE}) {
+ PL_collxfrm_mult
+ Perl_sv_collxfrm
+ Perl_sv_collxfrm_flags
++ PL_strxfrm_NUL_replacement
++ PL_strxfrm_is_behaved
++ PL_strxfrm_max_cp
+ );
+ }
+
+@@ -583,6 +586,9 @@ unless ($define{USE_LOCALE_NUMERIC}) {
+ PL_numeric_name
+ PL_numeric_radix_sv
+ PL_numeric_standard
++ PL_numeric_underlying
++ PL_numeric_underlying_is_standard
++ PL_underlying_numeric_obj
+ );
+ }
+
+diff --git a/perl.h b/perl.h
+index 3e1f6cd..d457776 100644
+--- a/perl.h
++++ b/perl.h
+@@ -5657,6 +5657,9 @@ typedef struct am_table_short AMTS;
+ # define IN_LC_COMPILETIME(category) 0
+ # define IN_LC_RUNTIME(category) 0
+ # define IN_LC(category) 0
++# define _CHECK_AND_WARN_PROBLEMATIC_LOCALE
++# define _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(s, send)
++# define _CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG(c)
+ #endif
+
+
+diff --git a/proto.h b/proto.h
+index 3e027ab..558c33a 100644
+--- a/proto.h
++++ b/proto.h
+@@ -4669,8 +4669,6 @@ PERL_CALLCONV SV* Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp);
+ assert(hv); assert(indexp)
+ #endif
+ #if defined(PERL_IN_LOCALE_C)
+-STATIC const char* S_category_name(const int category);
+-STATIC void S_restore_switched_locale(pTHX_ const int category, const char * const original_locale);
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+ PERL_STATIC_INLINE const char * S_save_to_buffer(const char * string, char **buf, Size_t *buf_size, const Size_t offset)
+ __attribute__warn_unused_result__;
+@@ -4678,17 +4676,19 @@ PERL_STATIC_INLINE const char * S_save_to_buffer(const char * string, char **buf
+ assert(buf_size)
+ #endif
+
+-STATIC const char* S_switch_category_locale_to_template(pTHX_ const int switch_category, const int template_category, const char * template_locale);
+ # if defined(USE_LOCALE)
++STATIC const char* S_category_name(const int category);
+ STATIC void S_new_collate(pTHX_ const char* newcoll);
+ STATIC void S_new_ctype(pTHX_ const char* newctype);
+ #define PERL_ARGS_ASSERT_NEW_CTYPE \
+ assert(newctype)
+ STATIC void S_new_numeric(pTHX_ const char* newnum);
++STATIC void S_restore_switched_locale(pTHX_ const int category, const char * const original_locale);
+ STATIC void S_set_numeric_radix(pTHX_ const bool use_locale);
+ STATIC char* S_stdize_locale(pTHX_ char* locs);
+ #define PERL_ARGS_ASSERT_STDIZE_LOCALE \
+ assert(locs)
++STATIC const char* S_switch_category_locale_to_template(pTHX_ const int switch_category, const int template_category, const char * template_locale);
+ # if defined(USE_POSIX_2008_LOCALE)
+ STATIC const char* S_emulate_setlocale(const int category, const char* locale, unsigned int index, const bool is_index_valid);
+ # endif
+diff --git a/sv.c b/sv.c
+index 07865bb..81223ca 100644
+--- a/sv.c
++++ b/sv.c
+@@ -13330,10 +13330,15 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
+
+ SvTAINT(sv);
+
++#ifdef USE_LOCALE_NUMERIC
++
+ if (lc_numeric_set) {
+ RESTORE_LC_NUMERIC(); /* Done outside loop, so don't have to
+ save/restore each iteration. */
+ }
++
++#endif
++
+ }
+
+ /* =========================================================================
+diff --git a/t/lib/warnings/regexec b/t/lib/warnings/regexec
+index 900dd6e..b9e53c9 100644
+--- a/t/lib/warnings/regexec
++++ b/t/lib/warnings/regexec
+@@ -215,6 +215,10 @@ Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at -
+ Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 17.
+ ########
+ # NAME (?[ ]) in non-UTF-8 locale
++require '../loc_tools.pl';
++unless (locales_enabled()) {
++ print("SKIPPED\n# locales not available\n"),exit;
++}
+ eval { require POSIX; POSIX->import("locale_h") };
+ if ($@) {
+ print("SKIPPED\n# no POSIX\n"),exit;
+@@ -229,14 +233,14 @@ setlocale(&POSIX::LC_CTYPE, "C");
+ ":" =~ /(?[ \: ])/;
+ no warnings 'locale';
+ EXPECT
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 9.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 9.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 10.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 10.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 11.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 11.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 12.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 12.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 13.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 13.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 14.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 14.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 15.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 15.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 16.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 16.
+ ########
+ # NAME (?[ ]) in UTF-8 locale
+ require '../loc_tools.pl';
# This makefile simplifies perl module builds.
#
-PERL_VERSION:=5.26
+ifeq ($(origin PERL_INCLUDE_DIR),undefined)
+ PERL_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
+endif
+
+include $(PERL_INCLUDE_DIR)/perlver.mk
+
+ifneq ($(PKG_NAME),perl)
+ PKG_VERSION:=$(PKG_VERSION)+perl$(PERL_VERSION2)
+endif
+
+PERL_VERSION:=$(PERL_VERSION2)
# Build environment
HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr
EXTRA_LIBS:=bsd
EXTRA_LIBDIRS:=$(STAGING_DIR)/lib
endif
-PERL_CMD:=$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION).0
+PERL_CMD:=$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION3)
MOD_CFLAGS_PERL:=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
ifdef CONFIG_PERL_THREADS
--- /dev/null
+PERL_VERSION:=5.28.0
+
+PERL_EXPLODE:=$(subst ., ,$(PERL_VERSION))
+
+PERL_MAJOR:=$(word 1,$(PERL_EXPLODE))
+PERL_MINOR:=$(word 2,$(PERL_EXPLODE))
+PERL_REL:=$(word 3,$(PERL_EXPLODE))
+
+PERL_VERSION3:=$(PERL_VERSION)
+PERL_VERSION2:=$(PERL_MAJOR).$(PERL_MINOR)
PECL_NAME:=pecl_http
PECL_LONGNAME:=Extended HTTP Support
-PKG_VERSION:=3.1.0
-PKG_RELEASE:=4
-PKG_HASH:=e3de67b156e7d5f6c2e5eb1e2b5f0acceb7004f1260d68c9f8b2c0f9629aabf0
+PKG_VERSION:=3.2.0
+PKG_RELEASE:=1
+PKG_HASH:=6fb7f038365fb1f3302f1b7e7d6b55d5c422bdea36057b1efe02bbe6ad3cc01b
PKG_NAME:=php7-pecl-http
PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
--with-http-libevent-dir="$(STAGING_DIR)/usr" \
--with-http-libidn-dir="$(STAGING_DIR)/usr"
-$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+icu +libcurl +librt +libevent2 +libidn +php7-mod-hash +php7-mod-iconv +php7-mod-session +php7-pecl-raphf +php7-pecl-propro,30))
+$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+icu +libcurl +librt +libevent2 +PACKAGE_libidn:libidn +libidn2 +php7-mod-hash +php7-mod-iconv +php7-mod-session +php7-pecl-raphf +php7-pecl-propro,30))
$(eval $(call BuildPackage,$(PKG_NAME)))
+++ /dev/null
---- a/src/php_http_etag.c 2016-12-12 10:04:21.000000000 +0100
-+++ b/src/php_http_etag.c 2016-12-23 21:10:59.523222367 +0100
-@@ -60,7 +60,7 @@
- unsigned char buf[4];
-
- *((uint *) e->ctx) = ~*((uint *) e->ctx);
--#if WORDS_BIGENDIAN
-+#ifdef WORDS_BIGENDIAN
- etag = php_http_etag_digest((unsigned char *) e->ctx, 4);
- #else
- buf[0] = ((unsigned char *) e->ctx)[3];
+++ /dev/null
-From ab5b4e3acd2b0379e5d8bc95a8d4f83ce5c91fb7 Mon Sep 17 00:00:00 2001
-From: Michael Heimpold <mhei@heimpold.de>
-Date: Sun, 4 Jun 2017 15:00:33 +0200
-Subject: [PATCH] Handle NULL strings gracefully during constant registration
-
-When libcurl is compiled not using e.g. libz or SSL, then a call to
-curl_version_info could return NULL in the corresponding fields of
-curl_version_info_data.
-
-Passing such NULL pointers down to REGISTER_NS_STRING_CONSTANT results
-in a segfault during php startup, so let's check for this special case
-and register a NULL constant in this case.
-
-Signed-off-by: Michael Heimpold <mhei@heimpold.de>
----
- src/php_http_client_curl.c | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c
-index f286324..f07bb8f 100644
---- a/src/php_http_client_curl.c
-+++ b/src/php_http_client_curl.c
-@@ -2429,6 +2429,14 @@ php_http_client_ops_t *php_http_client_curl_get_ops(void)
- return &php_http_client_curl_ops;
- }
-
-+#define REGISTER_NS_STRING_OR_NULL_CONSTANT(ns, name, str, flags) \
-+ do { \
-+ if ((str) != NULL) { \
-+ REGISTER_NS_STRING_CONSTANT(ns, name, str, flags); \
-+ } else { \
-+ REGISTER_NS_NULL_CONSTANT(ns, name, flags); \
-+ } \
-+ } while (0)
-
- PHP_MINIT_FUNCTION(http_client_curl)
- {
-@@ -2509,12 +2517,12 @@ PHP_MINIT_FUNCTION(http_client_curl)
- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl", "VERSIONS", curl_version(), CONST_CS|CONST_PERSISTENT);
- #if CURLVERSION_NOW >= 0
- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "CURL", (char *) info->version, CONST_CS|CONST_PERSISTENT);
-- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "SSL", (char *) info->ssl_version, CONST_CS|CONST_PERSISTENT);
-- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "LIBZ", (char *) info->libz_version, CONST_CS|CONST_PERSISTENT);
-+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "SSL", (char *) info->ssl_version, CONST_CS|CONST_PERSISTENT);
-+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "LIBZ", (char *) info->libz_version, CONST_CS|CONST_PERSISTENT);
- # if CURLVERSION_NOW >= 1
-- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "ARES", (char *) info->ares, CONST_CS|CONST_PERSISTENT);
-+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "ARES", (char *) info->ares, CONST_CS|CONST_PERSISTENT);
- # if CURLVERSION_NOW >= 2
-- REGISTER_NS_STRING_CONSTANT("http\\Client\\Curl\\Versions", "IDN", (char *) info->libidn, CONST_CS|CONST_PERSISTENT);
-+ REGISTER_NS_STRING_OR_NULL_CONSTANT("http\\Client\\Curl\\Versions", "IDN", (char *) info->libidn, CONST_CS|CONST_PERSISTENT);
- # endif
- # endif
- #endif
---
-2.7.4
-
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PECL_NAME:=krb5
+PECL_LONGNAME:=Bindings for the Kerberos library
+
+PKG_VERSION:=1.1.2
+PKG_RELEASE:=1
+PKG_HASH:=3301e047fc7dc3574da19b2a4b18e15feca5ad39db9335c3353a8e16b855c35b
+
+PKG_NAME:=php7-pecl-krb5
+PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=http://pecl.php.net/get/
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+
+PKG_LICENSE:=BSD
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=php7
+PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+include ../php7/pecl.mk
+
+CONFIGURE_ARGS+= --with-krb5=shared,"$(STAGING_DIR)/usr"
+
+$(eval $(call PECLPackage,krb5,$(PECL_LONGNAME),+krb5-libs,30))
+$(eval $(call BuildPackage,$(PKG_NAME)))
PECL_LONGNAME:=Libevent - event notification
PKG_NAME:=php7-pecl-$(PECL_NAME)
-PKG_VERSION=2016-08-30-$(PKG_SOURCE_VERSION)
+PKG_VERSION=2017-03-24-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/expressif/pecl-event-libevent.git
-PKG_SOURCE_VERSION:=9e72744ce6224beafc7b54ce2a3a990f1c552a5a
+PKG_SOURCE_VERSION:=5a726cee95ef9760fe81a60e595e87655f324594
PKG_SOURCE_SUBDIR:=$(PECL_NAME)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PECL_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=b81f02ef7f990f4ce3f859e22a85b7430188fc6f1395cd8fba82ef237ba62d8b
+PKG_MIRROR_HASH:=8d6ef4e5f496cfe6aa927d4a8c886041c1aec04220f1a3670c084faa2cc01fe1
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PECL_NAME:=mcrypt
+PECL_LONGNAME:=Bindings for the libmcrypt library
+
+PKG_VERSION:=1.0.1
+PKG_RELEASE:=1
+PKG_HASH:=a3b0e5493b5cd209ab780ee54733667293d369e6b7052b4a7dab9dd0def46ac6
+
+PKG_NAME:=php7-pecl-mcrypt
+PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=http://pecl.php.net/get/
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+
+PKG_LICENSE:=PHPv3.01
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=php7
+PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+include ../php7/pecl.mk
+
+CONFIGURE_ARGS+= --with-mcrypt=shared,"$(STAGING_DIR)/usr"
+
+$(eval $(call PECLPackage,mcrypt,$(PECL_LONGNAME),+libmcrypt +libltdl,30))
+$(eval $(call BuildPackage,$(PKG_NAME)))
PECL_NAME:=propro
PECL_LONGNAME:=Property proxy
-PKG_VERSION:=2.0.1
-PKG_RELEASE:=2
-PKG_HASH:=ce136875650e22d28804a41a62a5325fff85318e559626d63c5b8875fb2e4529
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=1
+PKG_HASH:=7bba0653d90cd8f61816e13ac6c0f7102b4a16dc4c4e966095a121eeb4ae8271
PKG_NAME:=php7-pecl-propro
PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=7.2.4
-PKG_RELEASE:=2
+PKG_VERSION:=7.2.10
+PKG_RELEASE:=1
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=7916b1bd148ddfd46d7f8f9a517d4b09cd8a8ad9248734e7c8dd91ef17057a88
+PKG_HASH:=01c2154a3a8e3c0818acbdbc1a956832c828a0380ce6d1d14fea495ea21804f0
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
PHP7_MODULES = \
+ bcmath \
calendar ctype curl \
fileinfo \
dom \
iconv imap intl \
json \
ldap \
- mbstring mysqli \
+ mbstring mysqli mysqlnd \
opcache openssl \
pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql phar \
session shmop simplexml snmp soap sockets sqlite3 sysvmsg sysvsem sysvshm \
config PHP7_SYSTEMTZDATA
bool "Use system timezone data instead of php's built-in database"
depends on PACKAGE_php7-cli || PACKAGE_php7-cgi
- select PACKAGE_zoneinfo-core
default y
help
Enabling this feature automatically selects the zoneinfo-core package
$(call Package/php7/Default)
DEPENDS:=+libpcre +zlib \
- +PHP7_LIBXML:libxml2
+ +PHP7_LIBXML:libxml2 \
+ +PHP7_SYSTEMTZDATA:zoneinfo-core
endef
define Package/php7/description
default y
endef
+define Package/php7-mod-intl/config
+ config PHP7_FULLICUDATA
+ bool "Add dependency to full ICU Data"
+ depends on PACKAGE_php7-mod-intl
+ default n
+endef
+
+define Package/php7-mod-intl/description
+ Note that this package depends in ICU library which is built without data
+ by default. This is to satisfy programs build and run dependencies but to
+ keep the installed footprint small on the target system(s).
+ However, the data is required to make the ICU library useful - and thus
+ directly affects PHPs ICU extension, too - so consider to also
+ select/install package 'icu-full-data'.
+endef
+
# not everything groks --disable-nls
DISABLE_NLS:=
--with-config-file-scan-dir=/etc/php7 \
--disable-short-tags \
\
+ --without-valgrind \
--with-pcre-regex="$(STAGING_DIR)/usr" \
--with-zlib="$(STAGING_DIR)/usr" \
--with-zlib-dir="$(STAGING_DIR)/usr"
+ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-bcmath),)
+ CONFIGURE_ARGS+= --enable-bcmath=shared
+else
+ CONFIGURE_ARGS+= --disable-bcmath
+endif
+
ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-calendar),)
CONFIGURE_ARGS+= --enable-calendar=shared
else
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mysqli),)
- CONFIGURE_ARGS+= --with-mysqli=shared,"$(STAGING_DIR)/usr/bin/mysql_config"
+ CONFIGURE_ARGS+= --with-mysqli=shared
else
CONFIGURE_ARGS+= --without-mysqli
endif
+ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mysqlnd),)
+ CONFIGURE_ARGS+= --enable-mysqlnd=shared
+else
+ CONFIGURE_ARGS+= --disable-mysqlnd
+endif
+
ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-opcache),)
CONFIGURE_ARGS+= --enable-opcache=shared
else
ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo),)
CONFIGURE_ARGS+= --enable-pdo=shared
ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-mysql),)
- CONFIGURE_ARGS+= --with-pdo-mysql=shared,"$(STAGING_DIR)/usr"
+ CONFIGURE_ARGS+= --with-pdo-mysql=shared
else
CONFIGURE_ARGS+= --without-pdo-mysql
endif
php_cv_cc_rpath="no" \
iconv_impl_name="gnu_libiconv" \
ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \
- ac_cv_u8t_decompose=yes \
- ac_cv_enable_valgrind_check=no \
+ ac_cv_u8t_decompose=yes
define Package/php7/conffiles
/etc/php.ini
$(eval $(call BuildPackage,php7-fpm))
#$(eval $(call BuildModule,NAME,TITLE[,PKG DEPENDS]))
+$(eval $(call BuildModule,bcmath,Bcmath))
$(eval $(call BuildModule,calendar,Calendar))
$(eval $(call BuildModule,ctype,Ctype))
$(eval $(call BuildModule,curl,cURL,+PACKAGE_php7-mod-curl:libcurl))
$(eval $(call BuildModule,hash,Hash))
$(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS)))
$(eval $(call BuildModule,imap,IMAP,+PACKAGE_php7-mod-imap:libopenssl +PACKAGE_libpam:libpam +PACKAGE_php7-mod-imap:uw-imap))
-$(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php7-mod-intl:icu))
+$(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php7-mod-intl:icu +PHP7_FULLICUDATA:icu-full-data))
$(eval $(call BuildModule,json,JSON))
$(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php7-mod-ldap:libopenldap +PACKAGE_php7-mod-ldap:libsasl2))
$(eval $(call BuildModule,mbstring,MBString))
-$(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php7-mod-mysqli:libmysqlclient))
+$(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php7-mod-mysqli:php7-mod-mysqlnd,30))
+$(eval $(call BuildModule,mysqlnd,MySQL Native Driver,+php7-mod-hash))
$(eval $(call BuildModule,opcache,OPcache,,,zend))
-$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php7-mod-openssl:libopenssl))
+$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php7-mod-openssl:libopenssl,15))
$(eval $(call BuildModule,pcntl,PCNTL))
$(eval $(call BuildModule,pdo,PHP Data Objects))
-$(eval $(call BuildModule,pdo-mysql,PDO driver for MySQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-mysql:libmysqlclient))
+$(eval $(call BuildModule,pdo-mysql,PDO driver for MySQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-mysql:php7-mod-mysqlnd))
$(eval $(call BuildModule,pdo-pgsql,PDO driver for PostgreSQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-pgsql:libpq))
$(eval $(call BuildModule,pdo-sqlite,PDO driver for SQLite 3.x,+php7-mod-pdo +PACKAGE_php7-mod-pdo-sqlite:libsqlite3 +PACKAGE_php7-mod-pdo-sqlite:librt))
$(eval $(call BuildModule,pgsql,PostgreSQL,+PACKAGE_php7-mod-pgsql:libpq))
+++ /dev/null
---- a/acinclude.m4 2017-11-28 10:22:53.000000000 +0100
-+++ b/acinclude.m4 2017-12-22 16:28:09.361331754 +0100
-@@ -3227,20 +3227,26 @@
-
- dnl PHP_CHECK_VALGRIND
- AC_DEFUN([PHP_CHECK_VALGRIND], [
-- AC_MSG_CHECKING([for valgrind])
-+ AC_CACHE_CHECK(whether to enable the check for valgrind support,ac_cv_enable_valgrind_check,[
-+ ac_cv_enable_valgrind_check=yes
-+ ])
-
-- SEARCH_PATH="/usr/local /usr"
-- SEARCH_FOR="/include/valgrind/valgrind.h"
-- for i in $SEARCH_PATH ; do
-- if test -r $i/$SEARCH_FOR; then
-- VALGRIND_DIR=$i
-- fi
-- done
-+ if test "$ac_cv_enable_valgrind_check" = "yes"; then
-+ AC_MSG_CHECKING([for valgrind])
-+
-+ SEARCH_PATH="/usr/local /usr"
-+ SEARCH_FOR="/include/valgrind/valgrind.h"
-+ for i in $SEARCH_PATH ; do
-+ if test -r $i/$SEARCH_FOR; then
-+ VALGRIND_DIR=$i
-+ fi
-+ done
-
-- if test -z "$VALGRIND_DIR"; then
-- AC_MSG_RESULT([not found])
-- else
-- AC_MSG_RESULT(found in $VALGRIND_DIR)
-- AC_DEFINE(HAVE_VALGRIND, 1, [ ])
-+ if test -z "$VALGRIND_DIR"; then
-+ AC_MSG_RESULT([not found])
-+ else
-+ AC_MSG_RESULT(found in $VALGRIND_DIR)
-+ AC_DEFINE(HAVE_VALGRIND, 1, [ ])
-+ fi
- fi
- ])
+++ /dev/null
-From 8d35a423838eb462cd39ee535c5d003073cc5f22 Mon Sep 17 00:00:00 2001
-From: Anatol Belski <ab@php.net>
-Date: Sat, 31 Mar 2018 18:51:03 +0200
-Subject: [PATCH] Utilize the recommended way to handle the icu namespace
-
----
- ext/intl/breakiterator/breakiterator_class.cpp | 1 +
- ext/intl/breakiterator/breakiterator_class.h | 2 ++
- ext/intl/breakiterator/breakiterator_methods.cpp | 2 ++
- ext/intl/breakiterator/codepointiterator_internal.cpp | 2 ++
- ext/intl/breakiterator/codepointiterator_internal.h | 3 +++
- ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp | 3 +++
- ext/intl/calendar/calendar_class.cpp | 3 +++
- ext/intl/calendar/calendar_class.h | 2 ++
- ext/intl/calendar/calendar_methods.cpp | 2 ++
- ext/intl/calendar/gregoriancalendar_methods.cpp | 7 +++++++
- ext/intl/common/common_date.cpp | 3 +++
- ext/intl/common/common_date.h | 2 ++
- ext/intl/common/common_enum.h | 1 +
- ext/intl/dateformat/dateformat_format_object.cpp | 6 ++++++
- ext/intl/dateformat/dateformat_helpers.cpp | 2 ++
- ext/intl/dateformat/dateformat_helpers.h | 5 +++++
- ext/intl/intl_convertcpp.h | 2 ++
- ext/intl/msgformat/msgformat_helpers.cpp | 10 ++++++++++
- ext/intl/timezone/timezone_class.cpp | 2 ++
- ext/intl/timezone/timezone_class.h | 2 ++
- ext/intl/timezone/timezone_methods.cpp | 4 ++++
- 21 files changed, 66 insertions(+)
-
---- a/ext/intl/breakiterator/breakiterator_class.cpp
-+++ b/ext/intl/breakiterator/breakiterator_class.cpp
-@@ -38,6 +38,7 @@ extern "C" {
- }
-
- using PHP::CodePointBreakIterator;
-+using U_ICU_NAMESPACE::RuleBasedBreakIterator;
-
- /* {{{ Global variables */
- zend_class_entry *BreakIterator_ce_ptr;
---- a/ext/intl/breakiterator/breakiterator_class.h
-+++ b/ext/intl/breakiterator/breakiterator_class.h
-@@ -26,6 +26,8 @@
-
- #ifndef USE_BREAKITERATOR_POINTER
- typedef void BreakIterator;
-+#else
-+using U_ICU_NAMESPACE::BreakIterator;
- #endif
-
- typedef struct {
---- a/ext/intl/breakiterator/breakiterator_methods.cpp
-+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
-@@ -32,6 +32,8 @@ extern "C" {
- }
-
- using PHP::CodePointBreakIterator;
-+using U_ICU_NAMESPACE::BreakIterator;
-+using U_ICU_NAMESPACE::Locale;
-
- U_CFUNC PHP_METHOD(BreakIterator, __construct)
- {
---- a/ext/intl/breakiterator/codepointiterator_internal.cpp
-+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
-@@ -33,6 +33,8 @@ typedef union {
-
- using namespace PHP;
-
-+using U_ICU_NAMESPACE::UCharCharacterIterator;
-+
- UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
-
- CodePointBreakIterator::CodePointBreakIterator()
---- a/ext/intl/breakiterator/codepointiterator_internal.h
-+++ b/ext/intl/breakiterator/codepointiterator_internal.h
-@@ -18,8 +18,11 @@
- #define CODEPOINTITERATOR_INTERNAL_H
-
- #include <unicode/brkiter.h>
-+#include <unicode/unistr.h>
-
- using U_ICU_NAMESPACE::BreakIterator;
-+using U_ICU_NAMESPACE::CharacterIterator;
-+using U_ICU_NAMESPACE::UnicodeString;
-
- namespace PHP {
-
---- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
-+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
-@@ -26,6 +26,9 @@ extern "C" {
- #include "../intl_convertcpp.h"
- #include "../intl_common.h"
-
-+using U_ICU_NAMESPACE::RuleBasedBreakIterator;
-+using U_ICU_NAMESPACE::Locale;
-+
- static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
- return (RuleBasedBreakIterator*)bio->biter;
- }
---- a/ext/intl/calendar/calendar_class.cpp
-+++ b/ext/intl/calendar/calendar_class.cpp
-@@ -34,6 +34,9 @@ extern "C" {
- #include <assert.h>
- }
-
-+using U_ICU_NAMESPACE::GregorianCalendar;
-+using U_ICU_NAMESPACE::Locale;
-+
- /* {{{ Global variables */
- zend_class_entry *Calendar_ce_ptr;
- zend_class_entry *GregorianCalendar_ce_ptr;
---- a/ext/intl/calendar/calendar_class.h
-+++ b/ext/intl/calendar/calendar_class.h
-@@ -26,6 +26,8 @@
-
- #ifndef USE_CALENDAR_POINTER
- typedef void Calendar;
-+#else
-+using U_ICU_NAMESPACE::Calendar;
- #endif
-
- typedef struct {
---- a/ext/intl/calendar/calendar_methods.cpp
-+++ b/ext/intl/calendar/calendar_methods.cpp
-@@ -40,6 +40,8 @@ extern "C" {
- }
- #include "../common/common_enum.h"
-
-+using U_ICU_NAMESPACE::Locale;
-+
- U_CFUNC PHP_METHOD(IntlCalendar, __construct)
- {
- zend_throw_exception( NULL,
---- a/ext/intl/calendar/gregoriancalendar_methods.cpp
-+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
-@@ -23,6 +23,8 @@
- #include <unicode/locid.h>
- #include <unicode/calendar.h>
- #include <unicode/gregocal.h>
-+#include <unicode/ustring.h>
-+
- extern "C" {
- #include "../php_intl.h"
- #include "../intl_common.h"
-@@ -34,6 +36,11 @@ extern "C" {
- #include "zend_exceptions.h"
- }
-
-+using U_ICU_NAMESPACE::GregorianCalendar;
-+using U_ICU_NAMESPACE::Locale;
-+using U_ICU_NAMESPACE::UnicodeString;
-+using U_ICU_NAMESPACE::StringPiece;
-+
- static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
- return (GregorianCalendar*)co->ucal;
- }
---- a/ext/intl/common/common_date.cpp
-+++ b/ext/intl/common/common_date.cpp
-@@ -25,6 +25,9 @@ extern "C" {
- #include <ext/date/php_date.h>
- }
-
-+using U_ICU_NAMESPACE::TimeZone;
-+using U_ICU_NAMESPACE::UnicodeString;
-+
- #include "zend_portability.h"
-
- /* {{{ timezone_convert_datetimezone
---- a/ext/intl/common/common_date.h
-+++ b/ext/intl/common/common_date.h
-@@ -28,6 +28,8 @@ U_CDECL_END
-
- #include <unicode/timezone.h>
-
-+using U_ICU_NAMESPACE::TimeZone;
-+
- U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func);
- U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
- intl_error *err, const char *func);
---- a/ext/intl/common/common_enum.h
-+++ b/ext/intl/common/common_enum.h
-@@ -75,6 +75,7 @@ U_CFUNC zval *zoi_with_current_get_curre
- U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter);
-
- #ifdef __cplusplus
-+using U_ICU_NAMESPACE::StringEnumeration;
- U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object);
- #endif
-
---- a/ext/intl/dateformat/dateformat_format_object.cpp
-+++ b/ext/intl/dateformat/dateformat_format_object.cpp
-@@ -33,6 +33,12 @@ extern "C" {
- #include "../common/common_date.h"
- }
-
-+using U_ICU_NAMESPACE::Locale;
-+using U_ICU_NAMESPACE::DateFormat;
-+using U_ICU_NAMESPACE::GregorianCalendar;
-+using U_ICU_NAMESPACE::StringPiece;
-+using U_ICU_NAMESPACE::SimpleDateFormat;
-+
- static const DateFormat::EStyle valid_styles[] = {
- DateFormat::kNone,
- DateFormat::kFull,
---- a/ext/intl/dateformat/dateformat_helpers.cpp
-+++ b/ext/intl/dateformat/dateformat_helpers.cpp
-@@ -28,6 +28,8 @@ extern "C" {
- #include "../calendar/calendar_class.h"
- }
-
-+using U_ICU_NAMESPACE::GregorianCalendar;
-+
- int datefmt_process_calendar_arg(zval* calendar_zv,
- Locale const& locale,
- const char *func_name,
---- a/ext/intl/dateformat/dateformat_helpers.h
-+++ b/ext/intl/dateformat/dateformat_helpers.h
-@@ -22,11 +22,16 @@
- #endif
-
- #include <unicode/calendar.h>
-+#include <unicode/datefmt.h>
-
- extern "C" {
- #include "../php_intl.h"
- }
-
-+using U_ICU_NAMESPACE::Locale;
-+using U_ICU_NAMESPACE::Calendar;
-+using U_ICU_NAMESPACE::DateFormat;
-+
- int datefmt_process_calendar_arg(zval* calendar_zv,
- Locale const& locale,
- const char *func_name,
---- a/ext/intl/intl_convertcpp.h
-+++ b/ext/intl/intl_convertcpp.h
-@@ -26,6 +26,8 @@
- #include <unicode/unistr.h>
- #include <zend_types.h>
-
-+using U_ICU_NAMESPACE::UnicodeString;
-+
- int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status);
-
- zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status);
---- a/ext/intl/msgformat/msgformat_helpers.cpp
-+++ b/ext/intl/msgformat/msgformat_helpers.cpp
-@@ -76,6 +76,16 @@ MessageFormatAdapter::getMessagePattern(
- #endif
- U_NAMESPACE_END
-
-+using U_ICU_NAMESPACE::Formattable;
-+using U_ICU_NAMESPACE::Format;
-+using U_ICU_NAMESPACE::DateFormat;
-+using U_ICU_NAMESPACE::MessageFormat;
-+#ifdef HAS_MESSAGE_PATTERN
-+using U_ICU_NAMESPACE::MessagePattern;
-+#endif
-+using U_ICU_NAMESPACE::MessageFormatAdapter;
-+using U_ICU_NAMESPACE::FieldPosition;
-+
- U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
- {
- int32_t fmt_count = 0;
---- a/ext/intl/timezone/timezone_class.cpp
-+++ b/ext/intl/timezone/timezone_class.cpp
-@@ -37,6 +37,8 @@ extern "C" {
- #include <ext/date/php_date.h>
- }
-
-+using U_ICU_NAMESPACE::Calendar;
-+
- /* {{{ Global variables */
- U_CDECL_BEGIN
- zend_class_entry *TimeZone_ce_ptr = NULL;
---- a/ext/intl/timezone/timezone_class.h
-+++ b/ext/intl/timezone/timezone_class.h
-@@ -29,6 +29,8 @@
-
- #ifndef USE_TIMEZONE_POINTER
- typedef void TimeZone;
-+#else
-+using U_ICU_NAMESPACE::TimeZone;
- #endif
-
- typedef struct {
---- a/ext/intl/timezone/timezone_methods.cpp
-+++ b/ext/intl/timezone/timezone_methods.cpp
-@@ -23,6 +23,7 @@
- #include <unicode/locid.h>
- #include <unicode/timezone.h>
- #include <unicode/ustring.h>
-+#include <unicode/calendar.h>
- #include "intl_convertcpp.h"
-
- #include "../common/common_date.h"
-@@ -37,6 +38,9 @@ extern "C" {
- }
- #include "common/common_enum.h"
-
-+using U_ICU_NAMESPACE::Locale;
-+using U_ICU_NAMESPACE::Calendar;
-+
- U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
- {
- zend_throw_exception( NULL,
+++ /dev/null
-From d8200e48857aeaf09f7127751efc5632ef7660a7 Mon Sep 17 00:00:00 2001
-From: Anatol Belski <ab@php.net>
-Date: Sun, 1 Apr 2018 01:03:40 +0200
-Subject: [PATCH] Simplify namespace access
-
-The icu namespace is an alias which resolves to the real namespace.
----
- ext/intl/breakiterator/breakiterator_class.cpp | 2 +-
- ext/intl/breakiterator/breakiterator_class.h | 2 +-
- ext/intl/breakiterator/breakiterator_methods.cpp | 4 ++--
- ext/intl/breakiterator/codepointiterator_internal.cpp | 2 +-
- ext/intl/breakiterator/codepointiterator_internal.h | 6 +++---
- ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp | 4 ++--
- ext/intl/calendar/calendar_class.cpp | 4 ++--
- ext/intl/calendar/calendar_class.h | 2 +-
- ext/intl/calendar/calendar_methods.cpp | 2 +-
- ext/intl/calendar/gregoriancalendar_methods.cpp | 8 ++++----
- ext/intl/common/common_date.cpp | 4 ++--
- ext/intl/common/common_date.h | 2 +-
- ext/intl/common/common_enum.h | 2 +-
- ext/intl/dateformat/dateformat_format_object.cpp | 10 +++++-----
- ext/intl/dateformat/dateformat_helpers.cpp | 2 +-
- ext/intl/dateformat/dateformat_helpers.h | 6 +++---
- ext/intl/intl_convertcpp.h | 2 +-
- ext/intl/msgformat/msgformat_helpers.cpp | 14 +++++++-------
- ext/intl/timezone/timezone_class.cpp | 2 +-
- ext/intl/timezone/timezone_class.h | 2 +-
- ext/intl/timezone/timezone_methods.cpp | 4 ++--
- 21 files changed, 43 insertions(+), 43 deletions(-)
-
---- a/ext/intl/breakiterator/breakiterator_class.cpp
-+++ b/ext/intl/breakiterator/breakiterator_class.cpp
-@@ -38,7 +38,7 @@ extern "C" {
- }
-
- using PHP::CodePointBreakIterator;
--using U_ICU_NAMESPACE::RuleBasedBreakIterator;
-+using icu::RuleBasedBreakIterator;
-
- /* {{{ Global variables */
- zend_class_entry *BreakIterator_ce_ptr;
---- a/ext/intl/breakiterator/breakiterator_class.h
-+++ b/ext/intl/breakiterator/breakiterator_class.h
-@@ -27,7 +27,7 @@
- #ifndef USE_BREAKITERATOR_POINTER
- typedef void BreakIterator;
- #else
--using U_ICU_NAMESPACE::BreakIterator;
-+using icu::BreakIterator;
- #endif
-
- typedef struct {
---- a/ext/intl/breakiterator/breakiterator_methods.cpp
-+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
-@@ -32,8 +32,8 @@ extern "C" {
- }
-
- using PHP::CodePointBreakIterator;
--using U_ICU_NAMESPACE::BreakIterator;
--using U_ICU_NAMESPACE::Locale;
-+using icu::BreakIterator;
-+using icu::Locale;
-
- U_CFUNC PHP_METHOD(BreakIterator, __construct)
- {
---- a/ext/intl/breakiterator/codepointiterator_internal.cpp
-+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
-@@ -33,7 +33,7 @@ typedef union {
-
- using namespace PHP;
-
--using U_ICU_NAMESPACE::UCharCharacterIterator;
-+using icu::UCharCharacterIterator;
-
- UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator);
-
---- a/ext/intl/breakiterator/codepointiterator_internal.h
-+++ b/ext/intl/breakiterator/codepointiterator_internal.h
-@@ -20,9 +20,9 @@
- #include <unicode/brkiter.h>
- #include <unicode/unistr.h>
-
--using U_ICU_NAMESPACE::BreakIterator;
--using U_ICU_NAMESPACE::CharacterIterator;
--using U_ICU_NAMESPACE::UnicodeString;
-+using icu::BreakIterator;
-+using icu::CharacterIterator;
-+using icu::UnicodeString;
-
- namespace PHP {
-
---- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
-+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
-@@ -26,8 +26,8 @@ extern "C" {
- #include "../intl_convertcpp.h"
- #include "../intl_common.h"
-
--using U_ICU_NAMESPACE::RuleBasedBreakIterator;
--using U_ICU_NAMESPACE::Locale;
-+using icu::RuleBasedBreakIterator;
-+using icu::Locale;
-
- static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) {
- return (RuleBasedBreakIterator*)bio->biter;
---- a/ext/intl/calendar/calendar_class.cpp
-+++ b/ext/intl/calendar/calendar_class.cpp
-@@ -34,8 +34,8 @@ extern "C" {
- #include <assert.h>
- }
-
--using U_ICU_NAMESPACE::GregorianCalendar;
--using U_ICU_NAMESPACE::Locale;
-+using icu::GregorianCalendar;
-+using icu::Locale;
-
- /* {{{ Global variables */
- zend_class_entry *Calendar_ce_ptr;
---- a/ext/intl/calendar/calendar_class.h
-+++ b/ext/intl/calendar/calendar_class.h
-@@ -27,7 +27,7 @@
- #ifndef USE_CALENDAR_POINTER
- typedef void Calendar;
- #else
--using U_ICU_NAMESPACE::Calendar;
-+using icu::Calendar;
- #endif
-
- typedef struct {
---- a/ext/intl/calendar/calendar_methods.cpp
-+++ b/ext/intl/calendar/calendar_methods.cpp
-@@ -40,7 +40,7 @@ extern "C" {
- }
- #include "../common/common_enum.h"
-
--using U_ICU_NAMESPACE::Locale;
-+using icu::Locale;
-
- U_CFUNC PHP_METHOD(IntlCalendar, __construct)
- {
---- a/ext/intl/calendar/gregoriancalendar_methods.cpp
-+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
-@@ -36,10 +36,10 @@ extern "C" {
- #include "zend_exceptions.h"
- }
-
--using U_ICU_NAMESPACE::GregorianCalendar;
--using U_ICU_NAMESPACE::Locale;
--using U_ICU_NAMESPACE::UnicodeString;
--using U_ICU_NAMESPACE::StringPiece;
-+using icu::GregorianCalendar;
-+using icu::Locale;
-+using icu::UnicodeString;
-+using icu::StringPiece;
-
- static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
- return (GregorianCalendar*)co->ucal;
---- a/ext/intl/common/common_date.cpp
-+++ b/ext/intl/common/common_date.cpp
-@@ -25,8 +25,8 @@ extern "C" {
- #include <ext/date/php_date.h>
- }
-
--using U_ICU_NAMESPACE::TimeZone;
--using U_ICU_NAMESPACE::UnicodeString;
-+using icu::TimeZone;
-+using icu::UnicodeString;
-
- #include "zend_portability.h"
-
---- a/ext/intl/common/common_date.h
-+++ b/ext/intl/common/common_date.h
-@@ -28,7 +28,7 @@ U_CDECL_END
-
- #include <unicode/timezone.h>
-
--using U_ICU_NAMESPACE::TimeZone;
-+using icu::TimeZone;
-
- U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func);
- U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
---- a/ext/intl/common/common_enum.h
-+++ b/ext/intl/common/common_enum.h
-@@ -75,7 +75,7 @@ U_CFUNC zval *zoi_with_current_get_curre
- U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter);
-
- #ifdef __cplusplus
--using U_ICU_NAMESPACE::StringEnumeration;
-+using icu::StringEnumeration;
- U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object);
- #endif
-
---- a/ext/intl/dateformat/dateformat_format_object.cpp
-+++ b/ext/intl/dateformat/dateformat_format_object.cpp
-@@ -33,11 +33,11 @@ extern "C" {
- #include "../common/common_date.h"
- }
-
--using U_ICU_NAMESPACE::Locale;
--using U_ICU_NAMESPACE::DateFormat;
--using U_ICU_NAMESPACE::GregorianCalendar;
--using U_ICU_NAMESPACE::StringPiece;
--using U_ICU_NAMESPACE::SimpleDateFormat;
-+using icu::Locale;
-+using icu::DateFormat;
-+using icu::GregorianCalendar;
-+using icu::StringPiece;
-+using icu::SimpleDateFormat;
-
- static const DateFormat::EStyle valid_styles[] = {
- DateFormat::kNone,
---- a/ext/intl/dateformat/dateformat_helpers.cpp
-+++ b/ext/intl/dateformat/dateformat_helpers.cpp
-@@ -28,7 +28,7 @@ extern "C" {
- #include "../calendar/calendar_class.h"
- }
-
--using U_ICU_NAMESPACE::GregorianCalendar;
-+using icu::GregorianCalendar;
-
- int datefmt_process_calendar_arg(zval* calendar_zv,
- Locale const& locale,
---- a/ext/intl/dateformat/dateformat_helpers.h
-+++ b/ext/intl/dateformat/dateformat_helpers.h
-@@ -28,9 +28,9 @@ extern "C" {
- #include "../php_intl.h"
- }
-
--using U_ICU_NAMESPACE::Locale;
--using U_ICU_NAMESPACE::Calendar;
--using U_ICU_NAMESPACE::DateFormat;
-+using icu::Locale;
-+using icu::Calendar;
-+using icu::DateFormat;
-
- int datefmt_process_calendar_arg(zval* calendar_zv,
- Locale const& locale,
---- a/ext/intl/intl_convertcpp.h
-+++ b/ext/intl/intl_convertcpp.h
-@@ -26,7 +26,7 @@
- #include <unicode/unistr.h>
- #include <zend_types.h>
-
--using U_ICU_NAMESPACE::UnicodeString;
-+using icu::UnicodeString;
-
- int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status);
-
---- a/ext/intl/msgformat/msgformat_helpers.cpp
-+++ b/ext/intl/msgformat/msgformat_helpers.cpp
-@@ -76,15 +76,15 @@ MessageFormatAdapter::getMessagePattern(
- #endif
- U_NAMESPACE_END
-
--using U_ICU_NAMESPACE::Formattable;
--using U_ICU_NAMESPACE::Format;
--using U_ICU_NAMESPACE::DateFormat;
--using U_ICU_NAMESPACE::MessageFormat;
-+using icu::Formattable;
-+using icu::Format;
-+using icu::DateFormat;
-+using icu::MessageFormat;
- #ifdef HAS_MESSAGE_PATTERN
--using U_ICU_NAMESPACE::MessagePattern;
-+using icu::MessagePattern;
- #endif
--using U_ICU_NAMESPACE::MessageFormatAdapter;
--using U_ICU_NAMESPACE::FieldPosition;
-+using icu::MessageFormatAdapter;
-+using icu::FieldPosition;
-
- U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt)
- {
---- a/ext/intl/timezone/timezone_class.cpp
-+++ b/ext/intl/timezone/timezone_class.cpp
-@@ -37,7 +37,7 @@ extern "C" {
- #include <ext/date/php_date.h>
- }
-
--using U_ICU_NAMESPACE::Calendar;
-+using icu::Calendar;
-
- /* {{{ Global variables */
- U_CDECL_BEGIN
---- a/ext/intl/timezone/timezone_class.h
-+++ b/ext/intl/timezone/timezone_class.h
-@@ -30,7 +30,7 @@
- #ifndef USE_TIMEZONE_POINTER
- typedef void TimeZone;
- #else
--using U_ICU_NAMESPACE::TimeZone;
-+using icu::TimeZone;
- #endif
-
- typedef struct {
---- a/ext/intl/timezone/timezone_methods.cpp
-+++ b/ext/intl/timezone/timezone_methods.cpp
-@@ -38,8 +38,8 @@ extern "C" {
- }
- #include "common/common_enum.h"
-
--using U_ICU_NAMESPACE::Locale;
--using U_ICU_NAMESPACE::Calendar;
-+using icu::Locale;
-+using icu::Calendar;
-
- U_CFUNC PHP_METHOD(IntlTimeZone, __construct)
- {
include $(TOPDIR)/rules.mk
PKG_NAME:=django-constance
-PKG_VERSION:=2.0.0
+PKG_VERSION:=2.3.0
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/8a/37/4fa87dd0e43aa0a66fc419d58e67a9b6da70e1853d646c4b501c1ee7208b/
-PKG_HASH:=6eec9f3ac4e5657b93e64f3379181d1e727088df10dd34f0398cd12119b9f0b0
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-constance
+PKG_HASH:=6b9b4c6b221f2a4e8bd22c462f2ec253f9f4978632d01843f9836caa2b61b6d3
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=django-formtools
+PKG_VERSION:=2.1
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/4a/86/ccbb8225dec0621f99f7e19f3dea0a629f1e41bd99fd58ac3e2f388e028f
+PKG_HASH:=7703793f1675aa6e871f9fed147e8563816d7a5b9affdc5e3459899596217f7c
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+define Package/django-formtools
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+ TITLE:=A set of high-level abstractions for Django forms
+ URL:=https://django-formtools.readthedocs.io/en/latest/
+ DEPENDS:=+python +django
+endef
+
+define Package/django-formtools/description
+ Django "formtools" is a set of high-level abstractions for Django forms.
+ Currently for form previews and multi-step forms.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-formtools/install
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(CP) \
+ $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+ $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-formtools))
include $(TOPDIR)/rules.mk
PKG_NAME:=django-picklefield
-PKG_VERSION:=1.0.0
+PKG_VERSION:=1.1.0
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/e8/69/232d78ef16cad8dd4c2f871b0f44d87bcde36ed6a90597416e903034600b/
-PKG_HASH:=61e3ba7f6df82d8df9e6be3a8c55ef589eb3bf926c3d25d2b7949b07eae78354
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-picklefield
+PKG_HASH:=ce7fee5c6558fe5dc8924993d994ccde75bb75b91cd82787cbd4c92b95a69f9c
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Pickled object field for Django
- URL:=http://github.com/gintas/django-picklefield/
+ URL:=https://github.com/gintas/django-picklefield
DEPENDS:=+python +django
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=django-postoffice
-PKG_VERSION:=3.0.3
+PKG_VERSION:=3.1.0
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=django-post_office-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/0f/8c/8c7e1d8998741fd195f7df947c509bc31a03d505aca03488c39e59da11f0/
-PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)/
-PKG_HASH:=8d691b2e53ba8121d770ce448f05568874cf78a3cf63215918ad49536db5e76a
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-post_office
+PKG_HASH:=827937a944fe47cea393853069cd9315d080298c8ddb0faf787955d6aa51a030
+PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=django-ranged-response
+PKG_VERSION:=0.2.0
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/70/e3/9372fcdca8e9c3205e7979528ccd1a14354a9a24d38efff11c1846ff8bf1
+PKG_HASH:=f71fff352a37316b9bead717fc76e4ddd6c9b99c4680cdf4783b9755af1cf985
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+define Package/django-ranged-response
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+ TITLE:=Modified Django FileResponse that adds Content-Range headers.
+ URL:=https://github.com/wearespindle/django-ranged-fileresponse
+ DEPENDS:=+python +django
+endef
+
+define Package/django-ranged-response/description
+ Modified Django FileResponse that adds Content-Range headers.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-ranged-response/install
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(CP) \
+ $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+ $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-ranged-response))
include $(TOPDIR)/rules.mk
PKG_NAME:=django-restframework
-PKG_VERSION:=3.7.1
+PKG_VERSION:=3.8.2
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=djangorestframework-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/d0/ab/8b991e7d3e26af7cf6327c84b341e60004fc56325d8a4d4019e1474f7456/
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/djangorestframework
+PKG_HASH:=b6714c3e4b0f8d524f193c91ecf5f5450092c2145439ac2769711f7eba89a9d9
PKG_BUILD_DIR:=$(BUILD_DIR)/djangorestframework-$(PKG_VERSION)
-PKG_HASH:=305b2c6564ca46d3b558ba21110ed717135c467adf1a6dfd192bd85f4bb04d50
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Web APIs for Django, made easy.
- URL:=http://www.django-rest-framework.org/
+ URL:=https://www.django-rest-framework.org
DEPENDS:=+python +django
endef
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=django-simple-captcha
+PKG_VERSION:=0.5.9
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/d7/f4/ea95b04ed3abc7bf225716f17e35c5a185f6100db4d7541a46696ce40351
+PKG_HASH:=0c30a14f02502119fd1a4d308dd5d2b899d0f4284825a396bbb010afd904754a
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+define Package/django-simple-captcha
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+ TITLE:=A very simple, yet powerful, Django captcha application
+ URL:=https://github.com/mbi/django-simple-captcha
+ DEPENDS:=+python +python-six +django +pillow +django-ranged-response
+endef
+
+define Package/django-simple-captcha/description
+ Django Simple Captcha is an extremely simple, yet highly customizable Django
+ application to add captcha images to any Django form.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-simple-captcha/install
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(CP) \
+ $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+ $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-simple-captcha))
include $(TOPDIR)/rules.mk
PKG_NAME:=django-statici18n
-PKG_VERSION:=1.6.1
+PKG_VERSION:=1.8.2
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/0a/24/1bed254529fc492ee5daf4cba18cf188b059866049889ecf1f178f25a2c2/
-PKG_HASH:=47d30939d52bcbbf1cbfe56b786bc2f2ea874266a8315cb027c061f320c4e2f6
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-statici18n
+PKG_HASH:=ba9eeb3c4517027922645999359f8335fbb9fea04c457123cfbd6b4a36cbeda4
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=A Django app that provides helper for generating JavaScript catalog to static files.
- URL:=http://django-statici18n.readthedocs.org/
+ URL:=https://django-statici18n.readthedocs.org/
DEPENDS:=+python +django
endef
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=django-webpack-loader
+PKG_VERSION:=0.6.0
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/ff/0f/e812908c5dcc7c8cac5beba2cddd14bbfe045496117b3d306a71b19fc828
+PKG_HASH:=60bab6b9a037a5346fad12d2a70a6bc046afb33154cf75ed640b93d3ebd5f520
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+define Package/django-webpack-loader
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+ TITLE:=Transparently use webpack with django
+ URL:=https://github.com/owais/django-webpack-loader
+ DEPENDS:=+python +django
+endef
+
+define Package/django-webpack-loader/description
+ Use webpack to generate your static bundles without django’s staticfiles or opaque wrappers.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-webpack-loader/install
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(CP) \
+ $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+ $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-webpack-loader))
include $(TOPDIR)/rules.mk
PKG_NAME:=django
-PKG_VERSION:=1.8.18
+PKG_VERSION:=1.11.15
PKG_RELEASE=1
PKG_LICENSE:=BSD-3-Clause
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/django/django.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=2d4bc5a60aa8a076689667c550ded96b87bc463e
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=c82c2cc338ae46ba8572d9960fc98dca932edc43a00f011fed102810a86185ae
+PKG_SOURCE:=Django-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/D/Django
+PKG_HASH:=b18235d82426f09733d2de9910cee975cf52ff05e5f836681eb957d105a05a40
+PKG_BUILD_DIR=$(BUILD_DIR)/Django-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=flup
-PKG_VERSION:=1.0.2
+PKG_VERSION:=1.0.3
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://pypi.python.org/packages/source/f/flup/
-PKG_HASH:=4bad317a5fc1ce3d4fe5e9b6d846ec38a8023e16876785d4f88102f2c8097dd9
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/f/flup
+PKG_HASH:=5eb09f26eb0751f8380d8ac43d1dfb20e1d42eca0fa45ea9289fa532a79cd159
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Random assortment of WSGI servers
- URL:=http://www.saddi.com/software/flup/
+ URL:=https://www.saddi.com/software/flup/
DEPENDS:=+python
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=gunicorn
-PKG_VERSION:=19.7.1
+PKG_VERSION:=19.9.0
PKG_RELEASE=1
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/30/3a/10bb213cede0cc4d13ac2263316c872a64bf4c819000c8ccd801f1d5f822/
-PKG_HASH:=eee1169f0ca667be05db3351a0960765620dad53f53434262ff8901b68a1b622
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/g/gunicorn
+PKG_HASH:=fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
TITLE:=WSGI HTTP Server for UNIX
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- URL:=http://gunicorn.org/
+ URL:=https://gunicorn.org
DEPENDS:=+python +python-setuptools
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=jdcal
-PKG_VERSION:=1.3
+PKG_VERSION:=1.4
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/9b/fa/40beb2aa43a13f740dd5be367a10a03270043787833409c61b79e69f1dfd/
-PKG_HASH:=b760160f8dc8cc51d17875c6b663fafe64be699e10ce34b6a95184b5aa0fdc9e
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/j/jdcal
+PKG_HASH:=ea0a5067c5f0f50ad4c7bdc80abad3d976604f6fb026b0b3a17a9d84bb9046c9
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Julian dates from proleptic Gregorian and Julian calendars.
- URL:=http://github.com/phn/jdcal
+ URL:=https://github.com/phn/jdcal
DEPENDS:=+python
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=micropython-lib
-PKG_VERSION=1.9-$(PKG_SOURCE_VERSION)
+PKG_VERSION:=1.9.3
PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/micropython/micropython-lib/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=66e15380eb109613263beb6825b8eecb9191088270c1a59e8c7d922dd57183c7
+
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=MIT, PSFL
PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git
-PKG_SOURCE_VERSION:=f5fe55aaef1a39d3d56f07040c0ff9f7e841fdf7
-
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
-PKG_MIRROR_HASH:=76565b5d44d47ccf61562f98dcf166d8103760eed7f3d84f5f7f31610140d780
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=micropython
-PKG_VERSION=1.9.2-$(PKG_SOURCE_VERSION)
+PKG_VERSION:=1.9.4
PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/micropython/micropython/releases/download/v$(PKG_VERSION)
+PKG_HASH:=0db042011bffcbd65362b67eb3cca87eaefa9f2a55b747fa75e922c706b8ce1a
+
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/micropython/micropython.git
-PKG_SOURCE_VERSION:=1f78e7a43130acfa4bedf16c1007a1b0f37c75c3
-
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
-PKG_MIRROR_HASH:=18234ffd1e91ac461080b4213399a6a18d4163fe314782b2e6ffbd1bfe48537b
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=lang
CATEGORY:=Languages
TITLE:=Micro Python
- URL:=http://micropython.org
+ URL:=https://micropython.org
DEPENDS:=+libffi
endef
endef
-MAKE_FLAGS += -C $(PKG_BUILD_DIR)/unix FROZEN_MPY_DIR=
+MAKE_FLAGS += -C $(PKG_BUILD_DIR)/ports/unix FROZEN_MPY_DIR=
define Build/Compile
- $(call Build/Compile/Default,axtls)
- $(call Build/Compile/Default)
+ $(call Build/Compile/Default,axtls)
+ $(call Build/Compile/Default)
endef
define Package/micropython/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/unix/micropython $(1)/usr/bin/micropython
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ports/unix/micropython $(1)/usr/bin/micropython
endef
$(eval $(call BuildPackage,micropython))
+++ /dev/null
-Index: micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile
-===================================================================
---- micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755.orig/unix/Makefile 2016-11-17 02:43:13.000000000 +0100
-+++ micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile 2016-11-17 16:49:02.937809018 +0100
-@@ -21,7 +21,7 @@
- INC += -I$(BUILD)
-
- # compiler settings
--CWARN = -Wall -Werror
-+CWARN = -Wall
- CWARN += -Wpointer-arith -Wuninitialized
- CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
-
--- /dev/null
+diff --git a/ports/unix/Makefile b/ports/unix/Makefile
+index cbdd3f3..0ab157d 100644
+--- a/ports/unix/Makefile
++++ b/ports/unix/Makefile
+@@ -21,7 +21,7 @@ INC += -I$(TOP)
+ INC += -I$(BUILD)
+
+ # compiler settings
+-CWARN = -Wall -Werror
++CWARN = -Wall
+ CWARN += -Wpointer-arith -Wuninitialized
+ CFLAGS = $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
+
+++ /dev/null
---- a/py/persistentcode.c 2017-09-22 13:26:04.914339465 +0000
-+++ b/py/persistentcode.c 2017-09-22 13:26:22.618319621 +0000
-@@ -373,7 +373,7 @@
-
- // here we define mp_raw_code_save_file depending on the port
- // TODO abstract this away properly
-
--#if defined(__i386__) || defined(__x86_64__) || (defined(__arm__) && (defined(__unix__)))
-+#if defined(__i386__) || defined(__x86_64__) || defined(__unix__)
-
- #include <unistd.h>
-
include $(TOPDIR)/rules.mk
PKG_NAME:=openpyxl
-PKG_VERSION:=2.5.0b1
+PKG_VERSION:=2.5.7
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/88/3c/34fbe561fc92e6a75f297478b123c2590ca986d9f2d2dbf340d879aa24dd/
-PKG_HASH:=3b42ece7933b46b2128f8d4111c57c80fb5aa46f4d16e7f83281f169e7398ba7
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/o/openpyxl
+PKG_HASH:=d3da4d6a78077d6f9fb1a1ec12d4aa500f7caa4661b8528538503b24ed72d632
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pyjwt
+PKG_VERSION:=1.6.4
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=PyJWT-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/00/5e/b358c9bb24421e6155799d995b4aa3aa3307ffc7ecae4ad9d29fd7e07a73
+PKG_HASH:=4ee413b357d53fd3fb44704577afac88e72e878716116270d722723d65b42176
+PKG_BUILD_DIR:=$(BUILD_DIR)/PyJWT-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+define Package/pyjwt
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+ TITLE:=JSON Web Token implementation in Python
+ URL:=http://github.com/jpadilla/pyjwt
+ DEPENDS:=+python
+endef
+
+define Package/pyjwt/description
+ A Python implementation of RFC 7519.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/pyjwt/install
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(CP) \
+ $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+ $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,pyjwt))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-asn1crypto
-PKG_VERSION:=0.23.0
+PKG_VERSION:=0.24.0
PKG_RELEASE:=1
PKG_SOURCE:=asn1crypto-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/31/53/8bca924b30cb79d6d70dbab6a99e8731d1e4dd3b090b7f3d8412a8d8ffbc
-PKG_HASH:=0874981329cfebb366d6584c3d16e913f2a0eb026c9463efcc4aaf42a9d94d70
+PKG_SOURCE_URL:=https://pypi.io/packages/source/a/asn1crypto
+PKG_HASH:=9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49
PKG_LICENSE:=MIT
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=python-attrs
-PKG_VERSION:=17.4.0
-PKG_RELEASE:=2
+PKG_VERSION:=18.1.0
+PKG_RELEASE:=1
PKG_SOURCE:=attrs-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/8b/0b/a06cfcb69d0cb004fde8bc6f0fd192d96d565d1b8aa2829f0f20adb796e5
-PKG_HASH:=1c7960ccfd6a005cd9f7ba884e6316b5e430a3f1a6c37c5f87d8b43f83b54ec9
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/attrs
+PKG_HASH:=e0d0eb91441a3b53dab4d9b743eafc1ac44476296a2053b6ca3af0b139faf87b
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-attrs-$(PKG_VERSION)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=https://attrs.readthedocs.org/
+ URL:=http://www.attrs.org/
endef
define Package/python-attrs
$(call Package/python-attrs/Default)
- TITLE:=python-attrs
+ TITLE:=Classes Without Boilerplate
DEPENDS:=+PACKAGE_python-attrs:python-light
VARIANT:=python
endef
define Package/python3-attrs
$(call Package/python-attrs/Default)
- TITLE:=python3-attrs
+ TITLE:=Classes Without Boilerplate
DEPENDS:=+PACKAGE_python3-attrs:python3-light
VARIANT:=python3
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-automat
-PKG_VERSION:=0.6.0
+PKG_VERSION:=0.7.0
PKG_RELEASE:=1
PKG_SOURCE:=Automat-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/A/Automat
-PKG_HASH:=3c1fd04ecf08ac87b4dd3feae409542e9bf7827257097b2b6ed5692f69d6f6a8
+PKG_HASH:=cbd78b83fa2d81fe2a4d23d258e1661dd7493c9a50ee2f1a5b2cac61c1793b0e
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-automat-$(PKG_VERSION)
- 'm2r',
- ],
install_requires=[
- "attrs",
+ "attrs>=16.1.0",
"six",
--- a/setup.py
+++ b/setup.py
@@ -27,15 +27,6 @@ setup(
- "attrs",
+ "attrs>=16.1.0",
"six",
],
- extras_require={
+ packages=find_packages(exclude=["*._test", "*._test.*"]),
package_dir={'automat': 'automat'},
install_requires=[
- "attrs",
+ "attrs>=16.1.0",
@@ -30,6 +30,7 @@ setup(
author='Glyph',
author_email='glyph@twistedmatrix.com',
+ exclude_package_data={'':['_test/*']},
license="MIT",
keywords='fsm finite state machine automata',
- )
+ classifiers=[
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-certifi
+PKG_VERSION:=2018.8.24
+PKG_RELEASE:=1
+PKG_LICENSE:=MPL-2.0
+
+PKG_SOURCE:=certifi-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/certifi
+PKG_HASH:=376690d6f16d32f9d1fe8932551d80b23e9d393a8578c5633a2ed39a64861638
+PKG_BUILD_DIR:=$(BUILD_DIR)/certifi-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+define Package/python-certifi
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+ TITLE:=Python package for providing Mozilla's CA Bundle.
+ URL:=http://certifi.io/
+ DEPENDS:=+python
+endef
+
+define Package/python-certifi/description
+ Certifi is a carefully curated collection of Root Certificates for validating the
+ trustworthiness of SSL certificates while verifying the identity of TLS hosts.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/python-certifi/install
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(CP) \
+ $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+ $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,python-certifi))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-cffi
-PKG_VERSION:=1.11.4
+PKG_VERSION:=1.11.5
PKG_RELEASE:=1
PKG_SOURCE:=cffi-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/10/f7/3b302ff34045f25065091d40e074479d6893882faef135c96f181a57ed06
-PKG_HASH:=df9083a992b17a28cd4251a3f5c879e0198bb26c9e808c4647e0a18739f1d11d
+PKG_SOURCE_URL:=https://pypi.io/packages/source/c/cffi
+PKG_HASH:=e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cffi-$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=python-cryptography
-PKG_VERSION:=2.1.4
-PKG_RELEASE:=2
+PKG_VERSION:=2.3.1
+PKG_RELEASE:=1
PKG_SOURCE:=cryptography-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/78/c5/7188f15a92413096c93053d5304718e1f6ba88b818357d05d19250ebff85
-PKG_HASH:=e4d967371c5b6b2e67855066471d844c5d52d210c36c28d49a8507b96e2c5291
+PKG_SOURCE_URL:= https://files.pythonhosted.org/packages/source/c/cryptography
+PKG_HASH:=8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6
PKG_LICENSE:=Apache-2.0 BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
--- a/src/_cffi_src/openssl/ssl.py
+++ b/src/_cffi_src/openssl/ssl.py
-@@ -597,9 +597,6 @@ static const long TLS_ST_OK = 0;
+@@ -646,13 +646,6 @@ static const long TLS_ST_OK = 0;
#if defined(OPENSSL_NO_DTLS) || CRYPTOGRAPHY_OPENSSL_LESS_THAN_102
static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 0;
-const SSL_METHOD *(*DTLS_method)(void) = NULL;
-const SSL_METHOD *(*DTLS_server_method)(void) = NULL;
-const SSL_METHOD *(*DTLS_client_method)(void) = NULL;
+-static const long SSL_OP_NO_DTLSv1 = NULL;
+-static const long SSL_OP_NO_DTLSv1_2 = NULL;
+-long *(*DTLS_set_link_mtu)(SSL *, long) = NULL;
+-long *(*DTLS_get_link_min_mtu)(SSL *) = NULL;
#else
static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 1;
#endif
include $(TOPDIR)/rules.mk
PKG_NAME:=pycurl
-PKG_VERSION:=7.43.0.1
+PKG_VERSION:=7.43.0.2
PKG_RELEASE:=1
PKG_MAINTAINER:=Waldemar Konik <informatyk74@interia.pl>
PKG_LICENSE:=LGPL-2.1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dl.bintray.com/pycurl/pycurl/
-PKG_HASH:=43231bf2bafde923a6d9bb79e2407342a5f3382c1ef0a3b2e491c6a4e50b91aa
+PKG_HASH:=0f0cdfc7a92d4f2a5c44226162434e34f7d6967d3af416a6f1448649c09a25a4
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
endef
define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+ $(call Build/Compile/PyMod,,install --with-openssl --prefix=/usr --root=$(PKG_INSTALL_DIR))
endef
define Package/python-curl/install
include $(TOPDIR)/rules.mk
PKG_NAME:=python-dateutil
-PKG_VERSION:=2.6.1
+PKG_VERSION:=2.7.3
PKG_RELEASE:=1
PKG_LICENSE:=BSD-2-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/54/bb/f1db86504f7a49e1d9b9301531181b00a1c7325dc85a29160ee3eaa73a54/
-PKG_HASH:=891c38b2a02f5bb1be3e4793866c8df49c7d19baabf9c1bad62547e0b4866aca
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-dateutil
+PKG_HASH:=e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=python-evdev
-PKG_VERSION:=0.7.0
+PKG_VERSION:=1.1.2
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=Paulo Costa <me@paulo.costa.nom.br>, Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_SOURCE:=evdev-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/67/15/eac376f3e1fc1960a54439c21459b2582e68340001aff83b4ace9e5bd110
-PKG_HASH:=57edafc469a414f58b51af1bfb9ee2babb9f626dd2df530d71c1176871850aa1
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/e/evdev
+PKG_HASH:=2dd67291be20e70643e8ef6f2381efc10e0c6e44a32abb3c1db74996ea3b0351
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-evdev-$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=python-gnupg
-PKG_VERSION:=0.4.1
+PKG_VERSION:=0.4.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/f1/df6c06da34939f67ea622e0b31dbc5bdb5121b271ab530d151df59974425/
-PKG_HASH:=ef47b02eaf41dee3cf4b02ddf83130827318de9fe3eae89d01a3f05859e20e1a
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/fd/a6/4ae8ec46a256444f65d745a92827c05fe6d4f3f4e1a40289a58ac37fe2b9
+PKG_HASH:=2d158dfc6b54927752b945ebe57e6a0c45da27747fa3b9ae66eccc0d2147ac0d
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=LICENSE
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=https://github.com/isislovecruft/python-gnupg
+ URL:=https://gnupg.readthedocs.io/en/latest/
DEPENDS:=+gnupg
endef
$(HOST_PYTHON_PIP) install \
--root=$(1) \
--prefix=$(2) \
- --ignore-installed \
$(3)
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-hyperlink
-PKG_VERSION:=17.3.1
+PKG_VERSION:=18.0.0
PKG_RELEASE:=1
PKG_SOURCE:=hyperlink-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/h/hyperlink
-PKG_HASH:=bc4ffdbde9bdad204d507bd8f554f16bba82dd356f6130cb16f41422909c33bc
+PKG_HASH:=f01b4ff744f14bc5d0a22a6b9f1525ab7d6312cb0ff967f59414bbac52f0a306
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-hyperlink-$(PKG_VERSION)
define Package/python-hyperlink
$(call Package/python-hyperlink/Default)
TITLE:=Pure-Python immutable URLs
- DEPENDS:=+PACKAGE_python-hyperlink:python-light
+ DEPENDS:= \
+ +PACKAGE_python-hyperlink:python-light \
+ +PACKAGE_python-hyperlink:python-idna
VARIANT:=python
endef
define Package/python3-hyperlink
$(call Package/python-hyperlink/Default)
TITLE:=Pure-Python immutable URLs
- DEPENDS:=+PACKAGE_python3-hyperlink:python3-light
+ DEPENDS:= \
+ +PACKAGE_python3-hyperlink:python3-light \
+ +PACKAGE_python3-hyperlink:python3-idna
VARIANT:=python3
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-idna
-PKG_VERSION:=2.6
-PKG_RELEASE:=2
+PKG_VERSION:=2.7
+PKG_RELEASE:=1
PKG_SOURCE:=idna-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/f4/bd/0467d62790828c23c47fc1dfa1b1f052b24efdf5290f071c7a91d0d82fd3
-PKG_HASH:=2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f
+PKG_SOURCE_URL:=https://pypi.io/packages/source/i/idna
+PKG_HASH:=684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.rst
include $(TOPDIR)/rules.mk
PKG_NAME:=python-ipaddress
-PKG_VERSION:=1.0.19
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.22
+PKG_RELEASE:=1
PKG_SOURCE:=ipaddress-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/f0/ba/860a4a3e283456d6b7e2ab39ce5cf11a3490ee1a363652ac50abf9f0f5df
-PKG_HASH:=200d8686011d470b5e4de207d803445deee427455cd0cb7c982b68cf82524f81
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/i/ipaddress
+PKG_HASH:=b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-ipaddress-$(PKG_VERSION)
define Package/python-ipaddress
$(call Package/python-ipaddress/Default)
- TITLE:=python-ipaddress
+ TITLE:=Python 3.3+'s ipaddress
DEPENDS:=+PACKAGE_python-ipaddress:python-light
VARIANT:=python
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-lxml
-PKG_VERSION:=4.1.1
+PKG_VERSION:=4.2.5
PKG_RELEASE:=1
-PKG_SOURCE:=lxml-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://lxml.de/files/
-PKG_HASH:=940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a5cfd0f40e
+PKG_SOURCE:=lxml-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/l/lxml
+PKG_HASH:=36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-lxml-$(PKG_VERSION)
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=http://lxml.de
+ URL:=https://lxml.de
DEPENDS:=+libxml2 +libxslt +libexslt
endef
#
-# Copyright (C) 2007-2014 OpenWrt.org
+# Copyright (C) 2007-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
-PKG_NAME:=MySQL-python
-PKG_VERSION:=1.2.5
-PKG_RELEASE:=1
+PKG_NAME:=python-mysql
+PKG_VERSION:=1.3.12
+PKG_RELEASE:=3
PKG_LICENSE:=GPL-2.0
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/M/MySQL-python/
-PKG_HASH:=811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e140c74
+PKG_SOURCE:=mysqlclient-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/mysqlclient
+PKG_HASH:=2d9ec33de39f4d9c64ad7322ede0521d85829ce36a76f9dd3d6ab76a9c8648e5
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-mysql-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
+# python-mysql needs iconv
+include $(INCLUDE_DIR)/nls.mk
-define Package/python-mysql
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-mysql/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- TITLE:=MySQL database adapter for Python
- URL:=https://pypi.python.org/pypi/MySQL-python
+ URL:=https://pypi.python.org/project/mysqlclient
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- DEPENDS:=+python +libmysqlclient
+endef
+
+define Package/python-mysql
+ $(call Package/python-mysql/Default)
+ TITLE:=MySQL database adapter for Python
+ DEPENDS:=+PACKAGE_python-mysql:python +libmysqlclient
+ VARIANT:=python
+endef
+
+define Package/python3-mysql
+ $(call Package/python-mysql/Default)
+ TITLE:=MySQL database adapter for Python3
+ DEPENDS:=+PACKAGE_python3-mysql:python3 +libmysqlclient
+ VARIANT:=python3
endef
define Package/python-mysql/description
server that provides the Python database API.
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/python-mysql/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-mysql/description
+$(call Package/python-mysql/description)
+.
+(Variant for Python3)
endef
+$(eval $(call PyPackage,python-mysql))
$(eval $(call BuildPackage,python-mysql))
+
+$(eval $(call Py3Package,python3-mysql))
+$(eval $(call BuildPackage,python3-mysql))
+++ /dev/null
---- MySQL-python-1.2.2/site_orig.cfg 2007-08-15 12:58:40.000000000 +0200
-+++ MySQL-python-1.2.2/site.cfg 2007-08-15 12:58:49.000000000 +0200
-@@ -4,7 +4,7 @@
- # static: link against a static library (probably required for embedded)
-
- embedded = False
--threadsafe = True
-+threadsafe = False
- static = False
-
- # The path to mysql_config.
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-oauthlib
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_SOURCE:=oauthlib-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/df/5f/3f4aae7b28db87ddef18afed3b71921e531ca288dc604eb981e9ec9f8853
+PKG_HASH:=ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162
+PKG_BUILD_DIR:=$(BUILD_DIR)/oauthlib-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+define Package/python-oauthlib
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+ TITLE:=A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
+ URL:=https://github.com/oauthlib/oauthlib
+ DEPENDS:=+python
+endef
+
+define Package/python-oauthlib/description
+ A generic, spec-compliant, thorough implementation of the OAuth request-signing logic for Python
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/python-oauthlib/install
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(CP) \
+ $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+ $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,python-oauthlib))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-pcapy
-PKG_VERSION:=0.11.1
+PKG_VERSION:=0.11.4
PKG_RELEASE:=1
+
+PKG_SOURCE:=pcapy-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pcapy
+PKG_HASH:=aa239913678d7ba116e66057a37f914de7726aecd11d00db470127df115c4e78
+PKG_BUILD_DIR:=$(BUILD_DIR)/pcapy-$(PKG_VERSION)
+
PKG_MAINTAINER:=Andrew McConachie <andrew@depht.com>
PKG_LICENSE:=Apache-1.1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=05c8d6978baa3512070ff4c041e5931384e702bbc2ac2c8063760176035958f1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/CoreSecurity/pcapy.git
-PKG_SOURCE_VERSION:=b91a418374d1636408c435f11799ef725ef70097
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=python-ply
-PKG_VERSION:=3.10
-PKG_RELEASE:=2
+PKG_VERSION:=3.11
+PKG_RELEASE:=1
PKG_SOURCE:=ply-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.dabeaz.com/ply
-PKG_HASH:=96e94af7dd7031d8d6dd6e2a8e0de593b511c211a86e28a9c9621c275ac8bacb
+PKG_SOURCE_URL:=http://www.dabeaz.com/ply \
+ https://files.pythonhosted.org/packages/source/p/ply
+PKG_HASH:=00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-ply-$(PKG_VERSION)
define Package/python-ply
$(call Package/python-ply/Default)
- TITLE:=python-ply
+ TITLE:=lex and yacc for Python
DEPENDS:=+PACKAGE_python-ply:python-light
VARIANT:=python
endef
define Package/python3-ply
$(call Package/python-ply/Default)
- TITLE:=python3-ply
+ TITLE:=lex and yacc for Python
DEPENDS:=+PACKAGE_python3-ply:python3-light
VARIANT:=python3
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-pyasn1-modules
-PKG_VERSION:=0.2.1
-PKG_RELEASE:=2
+PKG_VERSION:=0.2.2
+PKG_RELEASE:=1
PKG_SOURCE:=pyasn1-modules-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/ab/76/36ab0e099e6bd27ed95b70c2c86c326d3affa59b9b535c63a2f892ac9f45
-PKG_HASH:=af00ea8f2022b6287dc375b2c70f31ab5af83989fc6fe9eacd4976ce26cd7ccc
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyasn1-modules
+PKG_HASH:=a0cf3e1842e7c60fde97cb22d275eb6f9524f5c5250489e292529de841417547
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE.txt
include $(TOPDIR)/rules.mk
PKG_NAME:=python-pyasn1
-PKG_VERSION:=0.4.2
-PKG_RELEASE:=2
+PKG_VERSION:=0.4.4
+PKG_RELEASE:=1
PKG_SOURCE:=pyasn1-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/eb/3d/b7d0fdf4a882e26674c68c20f40682491377c4db1439870f5b6f862f76ed
-PKG_HASH:=d258b0a71994f7770599835249cece1caef3c70def868c4915e6e5ca49b67d15
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyasn1
+PKG_HASH:=f58f2a3d12fd754aa123e9fa74fb7345333000a035f3921dbdaa08597aa53137
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE.txt
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=http://pyasn1.sourceforge.net/
+ URL:=https://github.com/etingof/pyasn1
endef
define Package/python-pyasn1
$(call Package/python-pyasn1/Default)
- TITLE:=python-pyasn1
+ TITLE:=ASN.1 library for Python
DEPENDS:=+PACKAGE_python-pyasn1:python-light
VARIANT:=python
endef
define Package/python3-pyasn1
$(call Package/python-pyasn1/Default)
- TITLE:=python3-pyasn1
+ TITLE:=ASN.1 library for Python
DEPENDS:=+PACKAGE_python3-pyasn1:python3-light
VARIANT:=python3
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-pyopenssl
-PKG_VERSION:=17.5.0
-PKG_RELEASE:=2
+PKG_VERSION:=18.0.0
+PKG_RELEASE:=1
PKG_SOURCE:=pyOpenSSL-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/3b/15/a5d90ab1a41075e8f0fae334f13452549528f82142b3b9d0c9d86ab7178c
-PKG_HASH:=2c10cfba46a52c0b0950118981d61e72c1e5b1aac451ca1bc77de1a679456773
+
+PKG_SOURCE_URL:=https://pypi.io/packages/source/p/pyOpenSSL
+PKG_HASH:=6488f1423b00f73b7ad5167885312bb0ce410d3312eb212393795b53c8caa580
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
include $(TOPDIR)/rules.mk
PKG_NAME:=python-pyserial
-PKG_VERSION:=3.1.1
+PKG_VERSION:=3.4
PKG_RELEASE:=1
-PKG_MAINTAINER:=Micke Prag <micke.prag@telldus.se>
-PKG_LICENSE:=Python-2.0
PKG_SOURCE:=pyserial-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://pypi.python.org/packages/3c/d8/a9fa247ca60b02b3bebbd61766b4f321393b57b13c53b18f6f62cf172c08/
-PKG_HASH:=d657051249ce3cbd0446bcfb2be07a435e1029da4d63f53ed9b4cdde7373364c
+PKG_SOURCE_URL:=https://pypi.python.org/packages/cc/74/11b04703ec416717b247d789103277269d567db575d2fd88f25d9767fe3d/
+PKG_HASH:=6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyserial-$(PKG_VERSION)
-PKG_BUILD_DIR:=$(BUILD_DIR)/pyserial-$(PKG_VERSION)
-PKG_BUILD_DEPENDS:=python
+PKG_LICENSE:=BSD
+PKG_MAINTAINER:=Micke Prag <micke.prag@telldus.se>
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/python-pyserial
- SUBMENU:=Python
- SECTION:=lang
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-pyserial/Default
+ SECTION:=lang-python
CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=https://github.com/pyserial/pyserial
+endef
+
+define Package/python-pyserial
+$(call Package/python-pyserial/Default)
TITLE:=python-pyserial
- URL:=http://pyserial.sourceforge.net
DEPENDS:=+python-light
+ VARIANT:=python
endef
-define Package/python-pyserial/description
- serial port python bindings
+define Package/python3-pyserial
+$(call Package/python-pyserial/Default)
+ TITLE:=python3-pyserial
+ DEPENDS:=+python3-light
+ VARIANT:=python3
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root="$(PKG_INSTALL_DIR)")
+define Package/python-pyserial/description
+This module encapsulates the access for the serial port. It provides backends
+for Python running on Windows, OSX, Linux, BSD (possibly any POSIX compliant
+system) and IronPython. The module named "serial" automatically selects the
+appropriate backend.
endef
-define Package/python-pyserial/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-pyserial/description
+$(call Package/python-pyserial/description)
+.
+(Variant for Python3)
endef
+$(eval $(call PyPackage,python-pyserial))
$(eval $(call BuildPackage,python-pyserial))
+$(eval $(call BuildPackage,python-pyserial-src))
+
+$(eval $(call Py3Package,python3-pyserial))
+$(eval $(call BuildPackage,python3-pyserial))
+$(eval $(call BuildPackage,python3-pyserial-src))
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-qrcode
+PKG_VERSION:=6.0
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_SOURCE:=qrcode-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/8d/b6/beed3d50e1047a2aa6437d3a653e5f31feb7f4de8bc054299dc205682e41
+PKG_HASH:=037b0db4c93f44586e37f84c3da3f763874fcac85b2974a69a98e399ac78e1bf
+PKG_BUILD_DIR:=$(BUILD_DIR)/qrcode-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+define Package/python-qrcode
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+ TITLE:=QR Code image generator
+ URL:=https://github.com/lincolnloop/python-qrcode
+ DEPENDS:=+python +python-six
+endef
+
+define Package/python-qrcode/description
+ Pure python QR Code generator
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/python-qrcode/install
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(CP) \
+ $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+ $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,python-qrcode))
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-requests-oauthlib
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+PKG_LICENSE:=ISC
+
+PKG_SOURCE:=requests-oauthlib-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/95/be/072464f05b70e4142cb37151e215a2037b08b1400f8a56f2538b76ca6205
+PKG_HASH:=8886bfec5ad7afb391ed5443b1f697c6f4ae98d0e5620839d8b4499c032ada3f
+PKG_BUILD_DIR:=$(BUILD_DIR)/requests-oauthlib-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+define Package/python-requests-oauthlib
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+ TITLE:=OAuthlib authentication support for Requests.
+ URL:=https://github.com/requests/requests-oauthlib
+ DEPENDS:=+python +python-requests +python-oauthlib +python-cryptography +pyjwt
+endef
+
+define Package/python-requests-oauthlib/description
+ This project provides first-class OAuth library support for Requests.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/python-requests-oauthlib/install
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(CP) \
+ $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+ $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,python-requests-oauthlib))
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-requests
+PKG_VERSION:=2.19.1
+PKG_RELEASE:=1
+PKG_LICENSE:=Apache-2.0
+
+PKG_SOURCE:=requests-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9
+PKG_HASH:=ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a
+PKG_BUILD_DIR:=$(BUILD_DIR)/requests-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+define Package/python-requests
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
+ TITLE:=HTTP library for Python
+ URL:=http://python-requests.org/
+ DEPENDS:=+python +chardet +python-idna +python-urllib3 +python-certifi
+endef
+
+define Package/python-requests/description
+ Requests is the only Non-GMO HTTP library for Python, safe for human consumption.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/python-requests/install
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(CP) \
+ $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+ $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,python-requests))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-urllib3
-PKG_VERSION:=1.22
+PKG_VERSION:=1.23
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=urllib3-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/urllib3-$(PKG_VERSION)/
-PKG_SOURCE_URL:=https://pypi.python.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/
-PKG_HASH:=cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f
+PKG_SOURCE_URL:=https://pypi.io/packages/source/u/urllib3
+PKG_HASH:=a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
#
PYTHON_VERSION:=2.7
-PYTHON_VERSION_MICRO:=14
+PYTHON_VERSION_MICRO:=15
-PYTHON_SETUPTOOLS_VERSION:=28.8.0
-PYTHON_PIP_VERSION:=9.0.1
+PYTHON_SETUPTOOLS_PKG_RELEASE:=1
+PYTHON_PIP_PKG_RELEASE:=1
+
+PYTHON_SETUPTOOLS_VERSION:=39.0.1
+PYTHON_PIP_VERSION:=9.0.3
+
+PYTHON_SETUPTOOLS_VERSION:=$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)
+PYTHON_PIP_VERSION:=$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE)
include $(TOPDIR)/rules.mk
PKG_NAME:=PyYAML
-PKG_VERSION:=3.12
+PKG_VERSION:=3.13
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://pyyaml.org/download/pyyaml/
-PKG_HASH:=592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/PyYAML
+PKG_HASH:=3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- URL:=http://pyyaml.org/wiki/PyYAML
+ URL:=https://pyyaml.org/wiki/PyYAML
DEPENDS:=+libyaml
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=python-zope-interface
-PKG_VERSION:=4.4.3
-PKG_RELEASE:=2
+PKG_VERSION:=4.5.0
+PKG_RELEASE:=1
PKG_SOURCE:=zope.interface-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/bd/d2/25349ed41f9dcff7b3baf87bd88a4c82396cf6e02f1f42bb68657a3132af
-PKG_HASH:=d6d26d5dfbfd60c65152938fcb82f949e8dada37c041f72916fef6621ba5c5ce
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/z/zope.interface
+PKG_HASH:=57c38470d9f57e37afb460c399eb254e7193ac7fb8042bd09bdc001981a9c74c
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-zope-interface-$(PKG_VERSION)
define Package/python-zope-interface
$(call Package/python-zope-interface/Default)
- TITLE:=python-zope-interface
+ TITLE:=Interfaces for Python
DEPENDS:=+PACKAGE_python-zope-interface:python-light
VARIANT:=python
endef
define Package/python3-zope-interface
$(call Package/python-zope-interface/Default)
- TITLE:=python3-zope-interface
+ TITLE:=Interfaces for Python
DEPENDS:=+PACKAGE_python3-zope-interface:python3-light
VARIANT:=python3
endef
(Variant for Python3)
endef
-define PyPackage/python-zope-interface/filespec
-+|$(PYTHON_PKG_DIR)
--|$(PYTHON_PKG_DIR)/zope/interface/common/tests
--|$(PYTHON_PKG_DIR)/zope/interface/tests
-endef
-
-define Py3Package/python3-zope-interface/filespec
-+|$(PYTHON3_PKG_DIR)
--|$(PYTHON3_PKG_DIR)/zope/interface/common/tests
--|$(PYTHON3_PKG_DIR)/zope/interface/tests
-endef
-
$(eval $(call PyPackage,python-zope-interface))
$(eval $(call BuildPackage,python-zope-interface))
$(eval $(call BuildPackage,python-zope-interface-src))
--- /dev/null
+diff --git a/setup.py b/setup.py
+index 0eb36ea..2e64aae 100644
+--- a/setup.py
++++ b/setup.py
+@@ -121,7 +121,7 @@ setup(name='zope.interface',
+ "Framework :: Zope3",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ ],
+- packages=find_packages('src'),
++ packages=find_packages('src', exclude=["*.tests", "*.tests.*"]),
+ package_dir={'': 'src'},
+ namespace_packages=["zope"],
+ cmdclass={
+@@ -129,6 +129,7 @@ setup(name='zope.interface',
+ },
+ test_suite='zope.interface.tests',
+ include_package_data=True,
++ exclude_package_data={'':['tests/*']},
+ zip_safe=False,
+ tests_require=tests_require,
+ install_requires=['setuptools'],
PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=10
+PKG_RELEASE:=1
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_HASH:=71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66
+PKG_HASH:=22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574
PKG_LICENSE:=PSF
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
CONFIG_PYTHON_BLUETOOTH_SUPPORT
PKG_BUILD_DEPENDS:=python/host
-HOST_BUILD_DEPENDS:=bzip2/host expat/host zlib/host
+HOST_BUILD_DEPENDS:=bzip2/host expat/host
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
endef
HOST_LDFLAGS += \
- $$$$(pkg-config --static --libs libcrypto libssl)
+ $$$$(pkg-config --static --libs libcrypto libssl) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib
ifeq ($(HOST_OS),Linux)
HOST_LDFLAGS += \
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1110,6 +1110,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL
+@@ -1127,6 +1127,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL
done; \
done
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
-@@ -1136,6 +1137,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL
+@@ -1153,6 +1154,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
-@@ -79,7 +79,7 @@ int Py_InteractiveFlag; /* Needed by Py_
+@@ -71,7 +71,7 @@ int Py_InteractiveFlag; /* Needed by Py_
int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */
int Py_NoSiteFlag; /* Suppress 'import site' */
int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
int Py_FrozenFlag; /* Needed by getpath.c */
int Py_UnicodeFlag = 0; /* Needed by compile.c */
-@@ -185,7 +185,7 @@ Py_InitializeEx(int install_sigs)
- if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0')
- Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p);
- if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0')
-- Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p);
-+ Py_DontWriteBytecodeFlag = atoi(p);
- /* The variable is only tested for existence here; _PyRandom_Init will
- check its value further. */
- if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0')
-diff --git a/configure b/configure
-index 4c0435e..0068a9d 100755
--- a/configure
+++ b/configure
-@@ -7045,7 +7045,7 @@ sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/
+@@ -7077,7 +7077,7 @@ sys/param.h sys/poll.h sys/random.h sys/
sys/termio.h sys/time.h \
sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
--bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
-+linux/tipc.h spawn.h util.h alloca.h
+-bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h
++linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-@@ -7267,6 +7267,24 @@ fi
+@@ -7299,6 +7299,24 @@ fi
fi
# On Linux, netlink.h requires asm/types.h
for ac_header in linux/netlink.h
do :
-diff --git a/configure.ac b/configure.ac
-index 780f275..dceca1c 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1702,10 +1702,17 @@ sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/
+@@ -1732,10 +1732,17 @@ sys/param.h sys/poll.h sys/random.h sys/
sys/termio.h sys/time.h \
sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
--bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h)
-+linux/tipc.h spawn.h util.h alloca.h)
+-bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h)
++linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h)
AC_HEADER_DIRENT
AC_HEADER_MAJOR
+++ /dev/null
---- a/Modules/_cursesmodule.c
-+++ b/Modules/_cursesmodule.c
-@@ -117,7 +117,6 @@ char *PyCursesVersion = "2.2";
- #defines many common symbols (such as "lines") which breaks the
- curses module in other ways. So the code will just specify
- explicit prototypes here. */
--extern int setupterm(char *,int,int *);
- #ifdef __sgi
- #include <term.h>
- #endif
--- a/Lib/py_compile.py
+++ b/Lib/py_compile.py
-@@ -108,6 +108,7 @@ def compile(file, cfile=None, dfile=None, doraise=False):
+@@ -108,6 +108,7 @@ def compile(file, cfile=None, dfile=None
timestamp = long(os.fstat(f.fileno()).st_mtime)
except AttributeError:
timestamp = long(os.stat(file).st_mtime)
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -625,6 +625,16 @@ regen-all: regen-opcode-targets regen-gr
+@@ -634,6 +634,16 @@ regen-all: regen-opcode-targets regen-gr
############################################################################
# Special rules for object files
Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(OBJECT_OBJS) \
$(PYTHON_OBJS) \
-@@ -633,6 +643,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
+@@ -642,6 +652,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(MODOBJS) \
$(srcdir)/Modules/getbuildinfo.c
$(CC) -c $(PY_CFLAGS) \
$(HOST_PYTHON3_PIP) install \
--root=$(1) \
--prefix=$(2) \
- --ignore-installed \
$(3)
endef
# Note: keep in sync with setuptools & pip
PYTHON3_VERSION_MAJOR:=3
-PYTHON3_VERSION_MINOR:=6
-PYTHON3_VERSION_MICRO:=4
+PYTHON3_VERSION_MINOR:=7
+PYTHON3_VERSION_MICRO:=0
PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
-PYTHON3_SETUPTOOLS_VERSION:=28.8.0
-PYTHON3_PIP_VERSION:=9.0.1
+PYTHON3_SETUPTOOLS_PKG_RELEASE:=1
+PYTHON3_PIP_PKG_RELEASE:=1
+
+PYTHON3_SETUPTOOLS_VERSION:=39.0.1
+PYTHON3_PIP_VERSION:=10.0.1
+
+PYTHON3_SETUPTOOLS_VERSION:=$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)
+PYTHON3_PIP_VERSION:=$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3
-PKG_RELEASE:=5
+PKG_RELEASE:=2
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_HASH:=159b932bf56aeaa76fd66e7420522d8c8853d486b8567c459b84fe2ed13bcaba
+PKG_HASH:=0382996d1ee6aafe59763426cf0139ffebe36984474d0ec4126dd1c40a8b3549
PKG_LICENSE:=PSF
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
CONFIG_PYTHON3_BLUETOOTH_SUPPORT
PKG_BUILD_DEPENDS:=python3/host
-HOST_BUILD_DEPENDS:=bzip2/host expat/host libffi/host zlib/host
+HOST_BUILD_DEPENDS:=bzip2/host expat/host libffi/host
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/python3-light
$(call Package/python3/Default)
TITLE:=Python $(PYTHON_VERSION) light installation
- DEPENDS:=+python3-base +libffi +libbz2 +PYTHON3_BLUETOOTH_SUPPORT:bluez-libs
+ DEPENDS:=+python3-base +libffi +libbz2 +PYTHON3_BLUETOOTH_SUPPORT:bluez-libs +libuuid
endef
define Package/python3-light/config
endef
HOST_LDFLAGS += \
- $$$$(pkg-config --static --libs libcrypto libssl)
+ $$$$(pkg-config --static --libs libcrypto libssl) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib
ifeq ($(HOST_OS),Linux)
HOST_LDFLAGS += \
ac_cv_file__dev_ptmx=yes
ac_cv_file__dev_ptc=no
ac_cv_buggy_getaddrinfo=no
+ac_cv_header_uuid_h=yes
--- a/Modules/Setup.dist
+++ b/Modules/Setup.dist
-@@ -363,7 +363,7 @@ _symtable symtablemodule.c
+@@ -335,7 +335,7 @@ _symtable symtablemodule.c
# Andrew Kuchling's zlib module.
# This require zlib 1.1.3 (or later).
# See http://www.gzip.org/zlib/
--- /dev/null
+diff --git a/Modules/_ssl.c b/Modules/_ssl.c
+index 2bce4816d2..3c93884809 100644
+--- a/Modules/_ssl.c
++++ b/Modules/_ssl.c
+@@ -63,6 +63,7 @@ static PySocketModule_APIObject PySocketModule;
+ #include "openssl/err.h"
+ #include "openssl/rand.h"
+ #include "openssl/bio.h"
++#include "openssl/dh.h"
+
+ #ifndef HAVE_X509_VERIFY_PARAM_SET1_HOST
+ # ifdef LIBRESSL_VERSION_NUMBER
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1341,6 +1341,7 @@ libinstall: build_all $(srcdir)/Modules/
+@@ -1381,6 +1381,7 @@ libinstall: build_all $(srcdir)/Modules/
$(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
$(DESTDIR)$(LIBDEST); \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
-@@ -1376,6 +1377,7 @@ libinstall: build_all $(srcdir)/Modules/
+@@ -1416,6 +1417,7 @@ libinstall: build_all $(srcdir)/Modules/
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
+endif
python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
- # Substitution happens here, as the completely-expanded BINDIR
+ @ # Substitution happens here, as the completely-expanded BINDIR
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
-@@ -88,7 +88,7 @@ int Py_BytesWarningFlag; /* Warn on str(
- int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
- int Py_FrozenFlag; /* Needed by getpath.c */
- int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */
--int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.pyc) */
+@@ -120,7 +120,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo
+ int Py_BytesWarningFlag = 0; /* Warn on str(bytes) and str(buffer) */
+ int Py_FrozenFlag = 0; /* Needed by getpath.c */
+ int Py_IgnoreEnvironmentFlag = 0; /* e.g. PYTHONPATH, PYTHONHOME */
+-int Py_DontWriteBytecodeFlag = 0; /* Suppress writing bytecode files (*.pyc) */
+int Py_DontWriteBytecodeFlag = 1; /* Suppress writing bytecode files (*.pyc) */
int Py_NoUserSiteDirectory = 0; /* for -s and site.py */
int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */
int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
-@@ -329,7 +329,7 @@ _Py_InitializeEx_Private(int install_sig
- if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0')
- Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p);
- if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0')
-- Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p);
-+ Py_DontWriteBytecodeFlag = atoi(p);
- /* The variable is only tested for existence here; _PyRandom_Init will
- check its value further. */
- if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0')
--- a/setup.py
+++ b/setup.py
-@@ -512,16 +512,9 @@ class PyBuildExt(build_ext):
- return ['m']
+@@ -537,16 +537,9 @@ class PyBuildExt(build_ext):
+ os.unlink(tmpfile)
def detect_modules(self):
- # Ensure that /usr/local is always used, but the local build
--- a/setup.py
+++ b/setup.py
-@@ -522,8 +522,9 @@ class PyBuildExt(build_ext):
+@@ -547,8 +547,9 @@ class PyBuildExt(build_ext):
# directly since an inconsistently reproducible issue comes up where
# the environment variable is not set even though the value were passed
# into configure and stored in the Makefile (issue found on OS X 10.3).
+++ /dev/null
---- a/Lib/py_compile.py
-+++ b/Lib/py_compile.py
-@@ -137,8 +137,9 @@ def compile(file, cfile=None, dfile=None
- except FileExistsError:
- pass
- source_stats = loader.path_stats(file)
-+ mtime = int(os.getenv('SOURCE_DATE_EPOCH', source_stats['mtime']))
- bytecode = importlib._bootstrap_external._code_to_bytecode(
-- code, source_stats['mtime'], source_stats['size'])
-+ code, mtime, source_stats['size'])
- mode = importlib._bootstrap_external._calc_mode(file)
- importlib._bootstrap_external._write_atomic(cfile, bytecode, mode)
- return cfile
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -725,6 +725,16 @@ regen-all: regen-opcode regen-opcode-tar
+@@ -743,6 +743,16 @@ regen-all: regen-opcode regen-opcode-tar
############################################################################
# Special rules for object files
Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(OBJECT_OBJS) \
$(PYTHON_OBJS) \
-@@ -732,6 +742,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
+@@ -750,6 +760,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(MODOBJS) \
$(srcdir)/Modules/getbuildinfo.c
$(CC) -c $(PY_CORE_CFLAGS) \
--- a/configure
+++ b/configure
-@@ -14986,7 +14986,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
+@@ -14962,7 +14962,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
$as_echo "$ABIFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
$as_echo_n "checking SOABI... " >&6; }
--- a/configure.ac
+++ b/configure.ac
-@@ -4639,7 +4639,7 @@ AC_SUBST(SOABI)
+@@ -4665,7 +4665,7 @@ AC_SUBST(SOABI)
AC_MSG_CHECKING(ABIFLAGS)
AC_MSG_RESULT($ABIFLAGS)
AC_MSG_CHECKING(SOABI)
--- a/setup.py
+++ b/setup.py
-@@ -333,6 +333,7 @@ class PyBuildExt(build_ext):
+@@ -354,6 +354,7 @@ class PyBuildExt(build_ext):
print("Failed to build these modules:")
print_three_column(failed)
print()
global _config_vars
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
-@@ -343,6 +343,7 @@ def get_makefile_filename():
+@@ -337,6 +337,7 @@ def get_makefile_filename():
def _get_sysconfigdata_name():
abi=sys.abiflags,
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1338,7 +1338,7 @@ libinstall: build_all $(srcdir)/Modules/
+@@ -1390,7 +1390,7 @@ libinstall: build_all $(srcdir)/Modules/
esac; \
done; \
done
$(DESTDIR)$(LIBDEST); \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
ifeq (@COMPILE_ALL_TESTS@,yes)
-@@ -1475,7 +1475,7 @@ sharedinstall: sharedmods
+@@ -1525,7 +1525,7 @@ sharedinstall: sharedmods
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
--root=$(DESTDIR)/
# Here are a couple of targets for MacOSX again, to install a full
--- a/configure
+++ b/configure
-@@ -15005,7 +15005,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
+@@ -14981,7 +14981,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
$as_echo "$LDVERSION" >&6; }
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
--- a/configure.ac
+++ b/configure.ac
-@@ -4656,7 +4656,7 @@ AC_MSG_RESULT($LDVERSION)
+@@ -4682,7 +4682,7 @@ AC_MSG_RESULT($LDVERSION)
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST(PY_ENABLE_SHARED)
include $(TOPDIR)/rules.mk
PKG_NAME:=pytz
-PKG_VERSION:=2018.3
+PKG_VERSION:=2018.5
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/1b/50/4cdc62fc0753595fc16c8f722a89740f487c6e5670c644eb8983946777be/
-PKG_HASH:=410bcd1d6409026fbaa65d9ed33bf6dd8b1e94a499e32168acfc7b332e4095c0
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pytz
+PKG_HASH:=ffb9ef1de172603304d9d2819af6f5ece76f2e85ec10692a524dd876e72bf277
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=simplejson
-PKG_VERSION:=3.11.1
+PKG_VERSION:=3.16.0
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/08/48/c97b668d6da7d7bebe7ea1817a6f76394b0ec959cb04214ca833c34359df/
-PKG_HASH:=01a22d49ddd9a168b136f26cac87d9a335660ce07aa5c630b8e3607d6f4325e7
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson
+PKG_HASH:=b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
CATEGORY:=Languages
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
TITLE:=Simple, fast, extensible JSON encoder/decoder for Python
- URL:=http://simplejson.readthedocs.org/
+ URL:=https://simplejson.readthedocs.org/
DEPENDS:=+python
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=twisted
-PKG_VERSION:=17.9.0
-PKG_RELEASE:=1
+PKG_VERSION:=18.4.0
+PKG_RELEASE:=2
PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/T/Twisted
-PKG_HASH:=0da1a7e35d5fcae37bc9c7978970b5feb3bc82822155b8654ec63925c05af75c
+PKG_HASH:=a4cc164a781859c74de47f17f0e85f4bce8a3321a9d0892c015c8f80c4158ad9
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-twisted-$(PKG_VERSION)
-PKG_BUILD_DEPENDS:=USE_MUSL:librpc
+PKG_BUILD_DEPENDS:=libtirpc
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
+++ /dev/null
-diff --git a/src/twisted/python/_setup.py b/src/twisted/python/_setup.py
-index 3b5f69d4b..c69c5d13c 100644
---- a/src/twisted/python/_setup.py
-+++ b/src/twisted/python/_setup.py
-@@ -142,7 +142,6 @@ _CONSOLE_SCRIPTS = [
- "cftp = twisted.conch.scripts.cftp:run",
- "conch = twisted.conch.scripts.conch:run",
- "pyhtmlizer = twisted.scripts.htmlizer:run",
-- "tkconch = twisted.conch.scripts.tkconch:run",
- "trial = twisted.scripts.trial:run",
- "twist = twisted.application.twist._twist:Twist.main",
- "twistd = twisted.scripts.twistd:run",
-diff --git a/src/twisted/python/twisted-completion.zsh b/src/twisted/python/twisted-completion.zsh
-index 4d97aa5d3..9a8d4d82e 100644
---- a/src/twisted/python/twisted-completion.zsh
-+++ b/src/twisted/python/twisted-completion.zsh
-@@ -1,4 +1,4 @@
--#compdef twistd trial conch cftp ckeygen pyhtmlizer tkconch
-+#compdef twistd trial conch cftp ckeygen pyhtmlizer
- #
- # This is the ZSH completion file for Twisted commands. It calls the current
- # command-line with the special "--_shell-completion" option which is handled
--- /dev/null
+--- a/src/twisted/python/_setup.py
++++ b/src/twisted/python/_setup.py
+@@ -143,7 +143,6 @@ _CONSOLE_SCRIPTS = [
+ "conch = twisted.conch.scripts.conch:run",
+ "mailmail = twisted.mail.scripts.mailmail:run",
+ "pyhtmlizer = twisted.scripts.htmlizer:run",
+- "tkconch = twisted.conch.scripts.tkconch:run",
+ "trial = twisted.scripts.trial:run",
+ "twist = twisted.application.twist._twist:Twist.main",
+ "twistd = twisted.scripts.twistd:run",
+--- a/src/twisted/python/twisted-completion.zsh
++++ b/src/twisted/python/twisted-completion.zsh
+@@ -1,4 +1,4 @@
+-#compdef twist twistd trial conch cftp ckeygen pyhtmlizer tkconch
++#compdef twist twistd trial conch cftp ckeygen pyhtmlizer
+ #
+ # This is the ZSH completion file for Twisted commands. It calls the current
+ # command-line with the special "--_shell-completion" option which is handled
-diff --git a/src/twisted/python/_setup.py b/src/twisted/python/_setup.py
-index 3b5f69d4b..2dca47aa5 100644
--- a/src/twisted/python/_setup.py
+++ b/src/twisted/python/_setup.py
-@@ -175,11 +175,6 @@ class ConditionalExtension(Extension, object):
-
+@@ -169,11 +169,6 @@ class ConditionalExtension(Extension, ob
# The C extensions used for Twisted.
_EXTENSIONS = [
-- ConditionalExtension(
+ ConditionalExtension(
- "twisted.test.raiser",
- sources=["src/twisted/test/raiser.c"],
- condition=lambda _: _isCPython),
-
- ConditionalExtension(
+- ConditionalExtension(
"twisted.internet.iocpreactor.iocpsupport",
sources=[
-@@ -232,7 +227,7 @@ def getSetupArgs(extensions=_EXTENSIONS):
- requirements.append("hyperlink >= 17.1.1")
+ "src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c",
+@@ -240,7 +235,7 @@ def getSetupArgs(extensions=_EXTENSIONS)
+ ]
arguments.update(dict(
- packages=find_packages("src"),
use_incremental=True,
setup_requires=["incremental >= 16.10.1"],
install_requires=requirements,
-@@ -241,6 +236,7 @@ def getSetupArgs(extensions=_EXTENSIONS):
+@@ -249,6 +244,7 @@ def getSetupArgs(extensions=_EXTENSIONS)
},
cmdclass=command_classes,
include_package_data=True,
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:ruby-lang:ruby
PKG_BUILD_DEPENDS:=ruby/host
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=alsa-lib
-PKG_VERSION:=1.1.5
+PKG_VERSION:=1.1.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
http://distfiles.gentoo.org/distfiles/
-PKG_HASH:=f4f68ad3c6da36b0b5241ac3c798a7a71e0e97d51f972e9f723b3f20a9650ae6
+PKG_HASH:=5f2cd274b272cae0d0d111e8a9e363f08783329157e8dd68b3de0c096de6d724
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
Peter Wagner <tripolar@gmx.at>
include $(TOPDIR)/rules.mk
PKG_NAME:=apr-util
-PKG_VERSION:=1.6.0
+PKG_VERSION:=1.6.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@APACHE/apr/
-PKG_HASH:=8474c93fa74b56ac6ca87449abe3e155723d5f534727f3f33283f6631a48ca4c
+PKG_HASH:=d3e12f7b6ad12687572a3a39475545a072608f4ba03a6ce8a3778f607dd0035b
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=Apache License
include $(TOPDIR)/rules.mk
PKG_NAME:=apr
-PKG_VERSION:=1.6.2
+PKG_VERSION:=1.6.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@APACHE/apr/
-PKG_HASH:=09109cea377bab0028bba19a92b5b0e89603df9eab05c0f7dbd4dd83d48dcebd
+PKG_HASH:=a67ca9fcf9c4ff59bce7f428a323c8b5e18667fdea7b0ebad47d194371b0a105
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=Apache License
include $(TOPDIR)/rules.mk
PKG_NAME:=avahi
-PKG_VERSION:=0.6.32
-PKG_RELEASE:=3
+PKG_VERSION:=0.7
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION)
-PKG_HASH:=d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454
+PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION) \
+ https://avahi.org/download
+PKG_HASH:=57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804
+
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_CPE_ID:=cpe:/a:avahi:avahi
PKG_BUILD_DEPENDS:=intltool/host
-
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh
+diff --git a/Makefile.am b/Makefile.am
+index 8234d69..156d4c4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -75,8 +75,7 @@ SUBDIRS = \
DX_INPUT = \
$(srcdir)/avahi-common/address.h \
+diff --git a/avahi-python/avahi-discover/Makefile.am b/avahi-python/avahi-discover/Makefile.am
+index 5fc4b25..4c39d3d 100644
--- a/avahi-python/avahi-discover/Makefile.am
+++ b/avahi-python/avahi-discover/Makefile.am
@@ -38,7 +38,6 @@ if HAVE_GDBM
avahi_discover_PYTHON += __init__.py
endif
+diff --git a/avahi-ui/Makefile.am b/avahi-ui/Makefile.am
+index 238d43a..65a147a 100644
--- a/avahi-ui/Makefile.am
+++ b/avahi-ui/Makefile.am
-@@ -78,7 +78,6 @@ endif
+@@ -80,7 +80,6 @@ endif
bin_PROGRAMS = bssh
desktop_DATA += bssh.desktop bvnc.desktop
bssh_SOURCES = bssh.c
-@@ -106,6 +105,4 @@ endif # HAVE_GLIB
+@@ -108,6 +107,4 @@ endif # HAVE_GLIB
endif
endif
-@INTLTOOL_DESKTOP_RULE@
-
CLEANFILES = $(desktop_DATA) $(desktop_DATA_in)
+diff --git a/configure.ac b/configure.ac
+index 6678971..00dac6e 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -23,7 +23,7 @@ AC_INIT([avahi],[0.6.29],[avahi (at) lis
+@@ -23,7 +23,7 @@ AC_INIT([avahi],[0.7],[avahi (at) lists (dot) freedesktop (dot) org])
AC_CONFIG_SRCDIR([avahi-core/server.c])
AC_CONFIG_MACRO_DIR([common])
AC_CONFIG_HEADERS([config.h])
AC_CHECK_PROG([STOW], [stow], [yes], [no])
AS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [
-@@ -412,12 +410,6 @@ if test "x$have_kqueue" = "xyes" ; then
+@@ -413,12 +411,6 @@ if test "x$have_kqueue" = "xyes" ; then
AC_DEFINE([HAVE_KQUEUE], 1, [Enable BSD kqueue() usage])
fi
+++ /dev/null
-diff --git a/avahi-common/simple-watch.c b/avahi-common/simple-watch.c
-index 8df18dd..08d8090 100644
---- a/avahi-common/simple-watch.c
-+++ b/avahi-common/simple-watch.c
-@@ -21,7 +21,7 @@
- #include <config.h>
- #endif
-
--#include <sys/poll.h>
-+#include <poll.h>
- #include <assert.h>
- #include <string.h>
- #include <errno.h>
-diff --git a/avahi-common/simple-watch.h b/avahi-common/simple-watch.h
-index 72c1905..db87122 100644
---- a/avahi-common/simple-watch.h
-+++ b/avahi-common/simple-watch.h
-@@ -22,7 +22,7 @@
-
- /** \file simple-watch.h Simple poll() based main loop implementation */
-
--#include <sys/poll.h>
-+#include <poll.h>
- #include <avahi-common/cdecl.h>
- #include <avahi-common/watch.h>
-
-diff --git a/avahi-common/thread-watch.c b/avahi-common/thread-watch.c
-index c0cadeb..ecb202b 100644
---- a/avahi-common/thread-watch.c
-+++ b/avahi-common/thread-watch.c
-@@ -21,7 +21,7 @@
- #include <config.h>
- #endif
-
--#include <sys/poll.h>
-+#include <poll.h>
- #include <assert.h>
- #include <string.h>
- #include <errno.h>
-diff --git a/avahi-common/thread-watch.h b/avahi-common/thread-watch.h
-index dec0cf3..1b44ccb 100644
---- a/avahi-common/thread-watch.h
-+++ b/avahi-common/thread-watch.h
-@@ -22,7 +22,7 @@
-
- /** \file thread-watch.h Threaded poll() based main loop implementation */
-
--#include <sys/poll.h>
-+#include <poll.h>
- #include <avahi-common/cdecl.h>
- #include <avahi-common/watch.h>
-
-diff --git a/avahi-common/watch.h b/avahi-common/watch.h
-index 86e63d3..eea12ec 100644
---- a/avahi-common/watch.h
-+++ b/avahi-common/watch.h
-@@ -22,7 +22,7 @@
-
- /** \file watch.h Simplistic main loop abstraction */
-
--#include <sys/poll.h>
-+#include <poll.h>
- #include <sys/time.h>
-
- #include <avahi-common/cdecl.h>
--- /dev/null
+From ef0ea001f6dd13d6a2e0bc17d13f595d2829f8a8 Mon Sep 17 00:00:00 2001
+From: Jeremiah McConnell <miah@miah.com>
+Date: Fri, 15 Jun 2018 11:31:10 -0600
+Subject: [PATCH] move runtime_dir to /var/run
+
+Upstream transitioned to using /run as runtime_dir for 0.7. Revert
+that change for procd compatibility.
+
+Signed-off-by: Jeremiah McConnell <miah@miah.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 72d61478..8f6e9768 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -984,7 +984,7 @@ AC_DEFINE_UNQUOTED(AVAHI_AUTOIPD_GROUP,"$AVAHI_AUTOIPD_GROUP", [Group for runnin
+ #
+ # Avahi runtime dir
+ #
+-avahi_runtime_dir="/run"
++avahi_runtime_dir="${localstatedir}/run"
+ avahi_socket="${avahi_runtime_dir}/avahi-daemon/socket"
+ AC_SUBST(avahi_runtime_dir)
+ AC_SUBST(avahi_socket)
#
-# Copyright (C) 2015-2017 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# Dude, this "boost" is really one of the most crude stuff I ported yet.
#
-
include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/nls.mk
-include $(INCLUDE_DIR)/target.mk
PKG_NAME:=boost
-PKG_VERSION:=1.66.0
-PKG_SOURCE_VERSION:=1_66_0
-PKG_RELEASE:=1
+PKG_VERSION:=1.68.0
+PKG_SOURCE_VERSION:=1_68_0
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://sourceforge.net/projects/boost/files/boost/$(PKG_VERSION)
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
-PKG_HASH:=5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9
+PKG_HASH:=7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7
PKG_LICENSE:=Boost Software License <http://www.boost.org/users/license.html>
PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
-PKG_BUILD_PARALLEL:=0
+PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/host-build.mk
-
+include $(INCLUDE_DIR)/nls.mk
define Package/boost/Default
SECTION:=libs
endef
define Package/boost/description
-This package provides the Boost v1.66.0 libraries.
+This package provides the Boost v1.68.0 libraries.
Boost is a set of free, peer-reviewed, portable C++ source libraries.
-----------------------------------------------------------------------------
- chrono
- container
- context
+ - contract
- coroutine (Deprecated - use Coroutine2)
- - coroutine2 (Requires GCC v5 and up)
- date_time
- wave
There are many more header-only libraries supported by Boost.
-See more at http://www.boost.org/doc/libs/1_66_0/
+See more at http://www.boost.org/doc/libs/1_67_0/
endef
PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3
+include ../../lang/python/python-version.mk
+BOOST_PYTHON_VER=$(PYTHON_VERSION)
+
+include ../../lang/python/python3-version.mk
+BOOST_PYTHON3_VER=$(PYTHON3_VERSION)
+
BOOST_LIBS =
define Package/boost-libs
select boost-coroutine2
select boost-graph-parallel
+ # Invisible config dependency
+ config boost-fiber-exclude
+ bool
+ default y if (CPU_TYPE=mips32 || CPU_TYPE=mips64)
+
config boost-test-pkg
bool "Boost test package."
default m if ALL
$(foreach lib,$(BOOST_LIBS), \
config PACKAGE_boost-$(lib)
- prompt "Boost $(lib) library."
+ prompt "Boost $(lib) $(if $(findstring python,$(lib)),$(paren_left)v$(if $(findstring 3,$(lib)),$(BOOST_PYTHON3_VER),$(BOOST_PYTHON_VER))$(paren_right) ,)library."
default m if ALL
$(if $(findstring locale,$(lib)),depends on BUILD_NLS,)\
- $(if $(findstring python,$(lib)),depends on PACKAGE_$(lib),)
-
+ $(if $(findstring python,$(lib)),depends on PACKAGE_$(lib),)\
+ $(if $(findstring fiber,$(lib)),depends on (CPU_TYPE!=mips32 && CPU_TYPE!=mips64),)
)
endmenu
$(eval $(call DefineBoostLibrary,chrono,system,))
$(eval $(call DefineBoostLibrary,container,,))
$(eval $(call DefineBoostLibrary,context,chrono system thread,))
+$(eval $(call DefineBoostLibrary,contract,system,))
$(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,))
$(eval $(call DefineBoostLibrary,date_time,,))
#$(eval $(call DefineBoostLibrary,exception,,))
-$(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,))
+$(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,!boost-fiber-exclude))
$(eval $(call DefineBoostLibrary,filesystem,system,))
$(eval $(call DefineBoostLibrary,graph,regex,))
$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2))
$(eval $(call DefineBoostLibrary,type_erasure,chrono system thread,))
$(eval $(call DefineBoostLibrary,wave,date_time thread filesystem,))
+include $(INCLUDE_DIR)/host-build.mk
define Host/Compile
# b2 does not provide a configure-script nor a Makefile
TARGET_LDFLAGS += -pthread -lrt
TARGET_CFLAGS += \
- $(if $(CONFIG_PACKAGE_boost-python), -I$(STAGING_DIR)/usr/include/python2.7/) \
- $(if $(CONFIG_PACKAGE_boost-python3), -I$(STAGING_DIR)/usr/include/python3.6/) \
$(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC
EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
comma := ,
define Build/Compile
- $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CPU_TYPE) $(CPU_SUBTYPE))
+ $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CONFIG_CPU_TYPE) $(if $(CONFIG_CPU_SUBTYPE),and cpu subtype $(CONFIG_CPU_SUBTYPE),))
( cd $(PKG_BUILD_DIR) ; \
- echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \
- $(if $(CONFIG_PACKAGE_boost-python3), \
- echo "using python : 3.6 : : $(STAGING_DIR)/usr/include/python3.6/ : $(STAGING_DIR)/usr/lib/libpython3.6.so ;" >> \
- tools/build/src/user-config.jam; \
- ) \
- $(if $(CONFIG_PACKAGE_boost-python), \
- echo "using python : 2.7 : : $(STAGING_DIR)/usr/include/python2.7/ : $(STAGING_DIR)/usr/lib/libpython2.7.so ;" >> \
- tools/build/src/user-config.jam; \
- ) \
+ echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+ tools/build/src/user-config.jam ; \
b2 \
$(CONFIGURE_ARGS) \
--ignore-site-config \
--without-mpi \
$(if $(CONFIG_boost-graph-parallel),,--without-graph_parallel) \
$(if $(CONFIG_PACKAGE_boost-test),,--without-test) \
+ --without-python \
$(foreach lib,$(BOOST_LIBS), \
- $(if $(findstring python,$(lib)), \
- $(if $(CONFIG_PACKAGE_boost-python),python=2.7,--without-python), \
- $(if $(CONFIG_PACKAGE_boost-$(lib)),, \
- $(if $(findstring $(lib),wserialization),,--without-$(lib)) \
- ) \
+ $(if $(findstring python,$(lib)),, \
+ $(if $(CONFIG_PACKAGE_boost-$(lib)),, \
+ $(if $(findstring wserialization,$(lib)),,--without-$(lib)) \
) \
+ ) \
) \
$(if $(CONFIG_PACKAGE_boost-locale),boost.locale.iconv=on -sICONV_PATH=$(ICONV_PREFIX) boost.locale.posix=$(if $(USE_MUSL),on,off), \
boost.locale.iconv=off) \
$(if $(CONFIG_PACKAGE_boost-iostreams),-sNO_BZIP2=1 -sZLIB_INCLUDE=$(STAGING_DIR)/usr/include \
-sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
install ;\
+ $(if $(CONFIG_PACKAGE_boost-python), \
+ echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+ tools/build/src/user-config.jam ; \
+ echo "using python : $(BOOST_PYTHON_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON_VER).so ;" >> \
+ tools/build/src/user-config.jam; \
+ b2 -a \
+ $(CONFIGURE_ARGS) \
+ --ignore-site-config \
+ --toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
+ --disable-long-double \
+ $(if $(CONFIG_boost-variant-release), variant=release,) \
+ $(if $(CONFIG_boost-variant-debug), variant=debug,) \
+ $(if $(CONFIG_boost-variant-profile), variant=profile,) \
+ $(if $(CONFIG_boost-use-name-tags),--layout=tagged,--layout=system) \
+ $(if $(CONFIG_boost-build-type-complete),--build-type=complete,--build-type=minimal) \
+ $(if $(CONFIG_boost-shared-libs),link=shared,) \
+ $(if $(CONFIG_boost-static-libs),link=static,) \
+ $(if $(CONFIG_boost-static-and-shared-libs),link=static$(comma)shared,) \
+ $(if $(CONFIG_boost-runtime-shared),runtime-link=shared,) \
+ $(if $(CONFIG_boost-runtime-static),runtime-link=static,) \
+ $(if $(CONFIG_boost-runtime-static-and-shared),runtime-link=shared$(comma)static,) \
+ $(if $(CONFIG_boost-single-thread),threading=single,) \
+ threading=multi \
+ --with-python \
+ install ;\
+ ,) \
$(if $(CONFIG_PACKAGE_boost-python3), \
- b2 \
+ echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+ tools/build/src/user-config.jam ; \
+ echo "using python : $(BOOST_PYTHON3_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON3_VER).so ;" >> \
+ tools/build/src/user-config.jam; \
+ b2 -a \
$(CONFIGURE_ARGS) \
--ignore-site-config \
--toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
$(if $(CONFIG_boost-runtime-static-and-shared),runtime-link=shared$(comma)static,) \
$(if $(CONFIG_boost-single-thread),threading=single,) \
threading=multi \
- $(foreach lib,$(BOOST_LIBS), \
- $(if $(findstring python,$(lib)), \
- $(if $(CONFIG_PACKAGE_boost-python3),python=3.6,), \
- ) \
- ) \
+ --with-python \
install ;\
,) \
)
# copies _all_ header files - independent of <--with-library>-argument above
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) -v $(PKG_INSTALL_DIR)/lib/*.a $(1)/usr/lib/ # copies all compiled archive files
- $(FIND) $(PKG_INSTALL_DIR)/lib/ -name '*.so*' -exec $(CP) {} $(1)/usr/lib/ \; # copies all the shared objects files
+ # copies all compiled archive and shared object files
+ $(CP) -v $(PKG_INSTALL_DIR)/lib/*.{a,so*} $(1)/usr/lib/
endef
define Host/Install
- $(INSTALL_DIR) \
- $(STAGING_DIR_HOSTPKG)/bin
-
- $(CP) \
- $(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 \
- $(STAGING_DIR_HOSTPKG)/bin/
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
+ $(CP) $(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 $(STAGING_DIR_HOSTPKG)/bin/
endef
define Package/boost/Default/install
- $(INSTALL_DIR) \
- $(1)/usr/lib
-
- $(FIND) \
- $(PKG_INSTALL_DIR)/lib/ -name 'libboost_$(2).so*' -exec $(CP) {} $(1)/usr/lib/ \;
- $(FIND) \
- $(PKG_INSTALL_DIR)/lib/ -name 'libboost_$(2)_*.so*' -exec $(CP) {} $(1)/usr/lib/ \;
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(if $(findstring python,$(2)), $(if $(findstring 3,$(2)), \
+ $(CP) $(PKG_INSTALL_DIR)/lib/libboost_python3*.so* $(1)/usr/lib/ , \
+ $(CP) $(PKG_INSTALL_DIR)/lib/libboost_python2*.so* $(1)/usr/lib/ ), \
+ $(CP) $(PKG_INSTALL_DIR)/lib/libboost_$(2)*.so* $(1)/usr/lib/ )
endef
define Package/boost-test/install
- $(INSTALL_DIR) \
- $(1)/usr/lib
-
- $(FIND) \
- $(PKG_INSTALL_DIR)/lib/ -name 'libboost_unit_test_framework*.so*' -exec $(CP) {} $(1)/usr/lib/ \;
-
- $(FIND) \
- $(PKG_INSTALL_DIR)/lib/ -name 'libboost_prg_exec_monitor*.so*' -exec $(CP) {} $(1)/usr/lib/ \;
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/lib/libboost_unit_test_framework*.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/lib/libboost_prg_exec_monitor*.so* $(1)/usr/lib/
endef
define BuildBoostLibrary
PKG_NAME:=classpath
PKG_VERSION:=0.99
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
--- /dev/null
+--- a/native/jni/java-math/gnu_java_math_GMP.c
++++ b/native/jni/java-math/gnu_java_math_GMP.c
+@@ -1132,6 +1132,7 @@
+ break;
+ case 1:
+ res = mpz_popcount (_this);
++ __attribute__((fallthrough));
+ default:
+ JCL_ThrowException (env, "java/lang/Error",
+ "Unexpected sign value for a native MPI");
include $(TOPDIR)/rules.mk
PKG_NAME:=confuse
-PKG_VERSION:=3.2.1
+PKG_VERSION:=3.2.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/martinh/libconfuse/releases/download/v$(PKG_VERSION)
-PKG_HASH:=23c63272baf2ef4e2cbbafad2cf57de7eb81f006ec347c00b954819824add25e
+PKG_HASH:=a9240b653d02e8cfc52db48e8c4224426e528e1faa09b65e8ca08a197fad210b
PKG_MAINTAINER:=
PKG_LICENSE:=ISC
-PKG_FIXUP:=autoreconf
-
include $(INCLUDE_DIR)/package.mk
define Package/confuse
include $(TOPDIR)/rules.mk
PKG_NAME:=cyrus-sasl
-PKG_VERSION:=2.1.26
-PKG_RELEASE:=3
+PKG_VERSION_BASE:=2.1.27
+PKG_VERSION:=$(PKG_VERSION_BASE)-rc7
+PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=ftp://ftp.cyrusimap.org/cyrus-sasl/
-PKG_HASH:=8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3
+PKG_SOURCE_URL:=https://www.cyrusimap.org/releases/
+PKG_HASH:=c1846b80e80286c94941a1e27974bba759b171ccad25d5b49bd8d9deab10f54b
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION_BASE)
PKG_LICENSE:=BSD-4c BSD
PKG_LICENSE_FILES:=COPYING cmulocal/COPYING saslauthd/COPYING
#
-# Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2016-2018 Yousong Zhou <yszhou4tech@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=dtc
-PKG_VERSION:=1.4.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.4.7
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=13456ee9840abbbcb956d0711c580d28524e2ee17840e556e744311f2d8afaac
-PKG_SOURCE_URL:=https://www.kernel.org/pub/software/utils/dtc
+PKG_HASH:=6643e8f00ff86350f465bb54b2185058b5b1b7bac01a0842c81a52b86589cde7
+PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=GPL
PKG_INSTALL:=1
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Device Tree Compiler
- URL:=http://devicetree.org/Device_Tree_Compiler
+ URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
endef
define Package/dtc/description
endef
+# See Documentation/manual.txt for details about each utility
+define Package/fdt-utils
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Flat Device Tree Utilities
+ URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
+endef
+
+define Package/fdt-utils/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/convert-dtsv0 $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtdump $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtget $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtput $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtoverlay $(1)/usr/bin
+endef
+
+
define Package/libfdt
SECTION:=libs
CATEGORY:=Libraries
TITLE:=a utility library for reading and manipulating dtb files
- URL:=http://devicetree.org/Device_Tree_Compiler
+ URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
endef
define Package/libfdt/description
TARGET_CFLAGS += \
$(FPIC)
+# NO_PYTHON is for disabling pylibfdt
MAKE_FLAGS += \
PREFIX= \
+ NO_PYTHON=1 \
CFLAGS="$(TARGET_CFLAGS)"
define Build/InstallDev
endef
$(eval $(call BuildPackage,dtc))
+$(eval $(call BuildPackage,fdt-utils))
$(eval $(call BuildPackage,libfdt))
+++ /dev/null
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=eventlog
-PKG_VERSION:=0.2.12
-PKG_RELEASE:=2
-
-PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
-
-PKG_SOURCE_URL:=https://my.balabit.com/downloads/eventlog/0.2/
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
-PKG_HASH:=494dac8e01dc5ce323df2ad554d94874938dab51aa025987677b2bc6906a9c66
-
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/libeventlog
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=A new API to format and send structured log messages.
-endef
-
-define Package/eventlog/description
- A new API to format and send structured log messages. It supports multiple message
- representations (plain, XML attributes and XML tags) and multiple output methods
- (local syslogd).
-endef
-
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/eventlog $(1)/usr/include/
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.{a,so*} $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/eventlog.pc $(1)/usr/lib/pkgconfig/
-endef
-
-define Package/libeventlog/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.so* $(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,libeventlog))
include $(TOPDIR)/rules.mk
PKG_NAME:=expat
-PKG_VERSION:=2.2.5
+PKG_VERSION:=2.2.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/expat
-PKG_HASH:=d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6
+PKG_HASH:=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>, \
Ted Hess <thess@kitschensync.net>
CONFIGURE_ARGS += \
--enable-shared \
- --enable-static
+ --enable-static \
+ --without-docbook
+
+HOST_CONFIGURE_ARGS += \
+ --without-docbook
define Host/Install
$(MAKE) -C $(HOST_BUILD_DIR) install
include $(TOPDIR)/rules.mk
PKG_NAME:=faad2
-PKG_VERSION:=2.8.6
+PKG_VERSION:=2.8.8
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/faac/faad2-src/$(PKG_NAME)-2.8.0
-PKG_HASH:=654977adbf62eb81f4fca00152aca58ce3b6dd157181b9edd7bed687a7c73f21
+PKG_HASH:=985c3fadb9789d2815e50f4ff714511c79c2710ac27a4aaaf5c0c2662141426d
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_FIXUP:=autoreconf
#
-# Copyright (C) 2007-2017 OpenWrt.org
+# Copyright (C) 2007-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=fftw3
-PKG_VERSION:=3.3.7
+PKG_VERSION:=3.3.8
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0+
PKG_SOURCE:=fftw-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.fftw.org
-PKG_HASH:=3b609b7feba5230e8f6dd8d245ddbefac324c5a6ae4186947670d9ac2cd25573
+PKG_HASH:=6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/fftw-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
define Package/fftw3
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=@!avr32 +libpthread
+ DEPENDS:=+libpthread
VARIANT:=double
TITLE:=Fast Fourier transform library
URL:=http://www.fftw.org/
define Package/fftw3l
$(call Package/fftw3)
- DEPENDS:=@BROKEN
VARIANT:=long-double
TITLE+= (long-double precision)
endef
+++ /dev/null
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -241,7 +241,7 @@
- CTAGS = ctags
- CSCOPE = cscope
- DIST_SUBDIRS = support genfft kernel simd-support dft rdft reodft api \
-- libbench2 . threads tests mpi doc tools m4
-+ libbench2 . threads mpi doc tools m4
- am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(srcdir)/fftw.pc.in AUTHORS COPYING ChangeLog INSTALL NEWS \
- README TODO compile config.guess config.sub install-sh \
-@@ -470,7 +470,7 @@
- # tools are available, such as fig2dev in maintainer mode)
- @BUILD_DOC_TRUE@DOCDIR = doc
- SUBDIRS = support $(GENFFT) kernel simd-support dft rdft reodft api \
--libbench2 $(CHICKEN_EGG) tests mpi $(DOCDIR) tools m4
-+libbench2 $(CHICKEN_EGG) mpi m4
-
- EXTRA_DIST = COPYRIGHT bootstrap.sh CONVENTIONS fftw.pc.in
- SIMD_LIBS = \
include $(TOPDIR)/rules.mk
PKG_NAME:=file
-PKG_VERSION:=5.25
-PKG_RELEASE:=2
+PKG_VERSION:=5.34
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://sources.lede-project.org/ \
- http://pkgs.fedoraproject.org/lookaside/pkgs/file/ \
+PKG_SOURCE_URL:=https://pkgs.fedoraproject.org/lookaside/pkgs/file/ \
http://download.openpkg.org/components/cache/file/ \
ftp://ftp.astron.com/pub/file/
-PKG_HASH:=3735381563f69fb4239470b8c51b876a80425348b8285a7cded8b61d6b890eca
+PKG_HASH:=f15a50dbbfa83fec0bd1161e8e191b092ec832720e30cd14536e044ac623b20a
PKG_LICENSE:=BSD-2c
PKG_LICENSE_FILES:=COPYING
-PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
define Package/file/Default
TITLE:=File type determination
- URL:=ftp://ftp.astron.com/pub/file/
+ URL:=https://darwinsys.com/file/
MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
endef
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
+ --disable-libseccomp
MAKE_PATH := src
$(SED) "/^#/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
$(SED) "/^$$$$/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/file/magic $(1)/usr/share/misc/
-
- # For some reason both "magic" and "magic.mgc" MUST exist
- ln -sf magic $(1)/usr/share/misc/magic.mgc
endef
define Package/libmagic/install
PKG_NAME:=flac
PKG_VERSION:=1.3.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://downloads.xiph.org/releases/flac/
+PKG_SOURCE_URL:=https://downloads.xiph.org/releases/flac/
PKG_HASH:=91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GFDL-1.2 GPL-2 LGPL-2.1 BSD-3-Clause
PKG_LICENSE_FILES:=README COPYING.FDL COPYING.GPL COPYING.LGPL COPYING.Xiph
+PKG_CPE_ID:=cpe:/a:flac_project:flac
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
--- /dev/null
+From 4f47b63e9c971e6391590caf00a0f2a5ed612e67 Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <erikd@mega-nerd.com>
+Date: Sat, 8 Apr 2017 18:34:49 +1000
+Subject: [PATCH] stream_decoder.c: Fix a memory leak
+
+Leak reported by Secunia Research.
+---
+ src/libFLAC/stream_decoder.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c
+index 14d5fe7f..a5527511 100644
+--- a/src/libFLAC/stream_decoder.c
++++ b/src/libFLAC/stream_decoder.c
+@@ -1759,6 +1759,9 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre
+ }
+ memset (obj->comments[i].entry, 0, obj->comments[i].length) ;
+ if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) {
++ /* Current i-th entry is bad, so we delete it. */
++ free (obj->comments[i].entry) ;
++ obj->comments[i].entry = NULL ;
+ obj->num_comments = i;
+ goto skip;
+ }
+--
+2.17.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=freetype
-PKG_VERSION:=2.9
+PKG_VERSION:=2.9.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/freetype
-PKG_HASH:=e6ffba3c8cef93f557d1f767d7bc3dee860ac7a3aaff588a521e081bc36f4c8a
+PKG_HASH:=db8d87ea720ea9d5edc5388fc7a0497bb11ba9fe972245e0f7f4c7e8b1e1e84d
PKG_LICENSE:=FTL GPL-2.0 MIT ZLIB
PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h
+PKG_CPE_ID:=cpe:/a:freetype:freetype2
PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
PKG_FIXUP:=autoreconf
CATEGORY:=Libraries
TITLE:=A free, high-quality and portable font engine
URL:=http://www.freetype.org/
- DEPENDS:=+zlib +libbz2 +libpng
+ DEPENDS:=+zlib +libpng
endef
define Package/libfreetype/description
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
+ --enable-freetype-config \
--enable-shared \
--enable-static \
- --with-bzip2=yes \
+ --with-bzip2=no \
--with-zlib=yes \
--with-png=yes
getdns can be configured for stub resolution mode only. (Removes libunbound dependency)
default y
-config GETDNS_ENABLE_IDN_LIBIDN
- bool "GETDNS_ENABLE_IDN_LIBIDN"
+config GETDNS_ENABLE_IDN_LIBIDN2
+ bool "GETDNS_ENABLE_IDN_LIBIDN2"
help
- getdns can be configured with some IDN Support. (Requires libidn dependency)
+ getdns can be configured with some IDN Support. (Requires libidn2 dependency)
default n
endmenu
include $(TOPDIR)/rules.mk
PKG_NAME:=getdns
-PKG_VERSION:=1.4.1
-PKG_RELEASE:=1
+PKG_VERSION:=1.4.2
+PKG_RELEASE:=2
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://getdnsapi.net/dist/
-PKG_HASH:=245233dc780f615b6ab1472f2b9cdcd957a451a736f3036717d0da466ab1c51e
+PKG_HASH:=1685b82dfe297cffc4bae08a773cdc88a3edf9a4e5a1ea27d8764bb5affc0e80
PKG_FIXUP:=autoreconf
PKG_CONFIG_DEPENDS:= \
CONFIG_GETDNS_ENABLE_STUB_ONLY \
- CONFIG_GETDNS_ENABLE_IDN_LIBIDN
+ CONFIG_GETDNS_ENABLE_IDN_LIBIDN2
include $(INCLUDE_DIR)/package.mk
SECTION:=libs
CATEGORY:=Libraries
TITLE+= (library)
- DEPENDS+= +libopenssl +!GETDNS_ENABLE_STUB_ONLY:libunbound +GETDNS_ENABLE_IDN_LIBIDN:libidn
+ DEPENDS+= +libopenssl +!GETDNS_ENABLE_STUB_ONLY:libunbound +GETDNS_ENABLE_IDN_LIBIDN2:libidn2
MENU:=1
endef
CONFIGURE_ARGS += \
$(if $(CONFIG_GETDNS_ENABLE_STUB_ONLY), --enable-stub-only, ) \
- $(if $(CONFIG_GETDNS_ENABLE_IDN_LIBIDN), , --without-libidn ) \
- --without-libidn2 \
+ --without-libidn \
+ $(if $(CONFIG_GETDNS_ENABLE_IDN_LIBIDN2), , --without-libidn2 ) \
--with-ssl="$(STAGING_DIR)/usr" \
+# This will make 'configure' think that our libbsd.so is missing the
+# functions inet_pton, inet_ntop, strlcpy and use the builtin. This
+# removes the libbsd dependency
+CONFIGURE_VARS += LIBBSD_LIBS=-lc
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/getdns/
$(CP) $(PKG_INSTALL_DIR)/usr/include/getdns/getdns*.h $(1)/usr/include/getdns/
--- /dev/null
+From 05bce5263735b77f91078a930ec55b9cf181d999 Mon Sep 17 00:00:00 2001
+From: Willem Toorop <willem@nlnetlabs.nl>
+Date: Sun, 13 May 2018 11:59:14 +0200
+Subject: [PATCH] Bugfix #399: Reinclude <linux/sysctl.h> in getentropy_linux.c
+
+---
+ src/compat/getentropy_linux.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/compat/getentropy_linux.c b/src/compat/getentropy_linux.c
+index 744783c..abb28f4 100644
+--- a/src/compat/getentropy_linux.c
++++ b/src/compat/getentropy_linux.c
+@@ -62,6 +62,7 @@
+
+ #include <linux/types.h>
+ #include <linux/random.h>
++#include <linux/sysctl.h>
+ #ifdef HAVE_GETAUXVAL
+ #include <sys/auxv.h>
+ #endif
+--
+2.14.1
+
+
include $(TOPDIR)/rules.mk
PKG_NAME:=giflib
-PKG_VERSION:=5.1.2
+PKG_VERSION:=5.1.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/giflib
-PKG_HASH:=76c0a084c3b02f9315ff937b8be6096186002fea26f33e2123081ba2be6e2a7c
+PKG_HASH:=df27ec3ff24671f80b29e6ab1c4971059c14ac3db95406884fc26574631ba8d5
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:giflib_project:giflib
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
include $(TOPDIR)/rules.mk
PKG_NAME:=glib2
-PKG_VERSION:=2.56.0
-PKG_RELEASE:=1
+PKG_VERSION:=2.58.1
+PKG_RELEASE:=2
PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
-PKG_SOURCE_URL:=@GNOME/glib/2.56
-PKG_HASH:=ecef6e17e97b8d9150d0e8a4b3edee1ac37331213b8a2a87a083deea408a0fc7
+PKG_SOURCE_URL:=@GNOME/glib/2.58
+PKG_HASH:=97d6a9d926b6aa3dfaadad3077cfb43eec74432ab455dff14250c769d526d7d6
PKG_BUILD_PARALLEL:=1
HOST_BUILD_PARALLEL:=1
The GLib library of C routines
endef
+TARGET_CFLAGS += -Wno-error=implicit-function-declaration
+
HOST_CONFIGURE_ARGS += \
--disable-selinux \
--with-libiconv=gnu \
--with-pcre=internal \
- --enable-libmount=no
+ --disable-libmount
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
- --enable-debug=no \
+ --disable-debug \
--disable-selinux \
- --enable-libmount=no \
+ --disable-libmount \
--disable-fam \
+ --disable-gtk-doc-html \
+ --disable-man \
--with-libiconv=gnu \
--with-pcre=internal
ac_cv_func_posix_getgrgid_r=yes
define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/bin/* \
+ $(1)/usr/bin/
+
$(INSTALL_DIR) $(1)/usr/include
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
---- a/gtk-doc.make
+diff --git a/gtk-doc.make b/gtk-doc.make
+new file mode 100644
+index 0000000..14f18fd
+--- /dev/null
+++ b/gtk-doc.make
-@@ -298,7 +298,7 @@ uninstall-local:
- #
- # Require gtk-doc when making dist
- #
--if HAVE_GTK_DOC
-+if ENABLE_GTK_DOC
- dist-check-gtkdoc: docs
- else
- dist-check-gtkdoc:
+@@ -0,0 +1,2 @@
++EXTRA_DIST =
++CLEANFILES =
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
-@@ -869,6 +869,8 @@ do_lookup_records (GTask *task,
- records = g_resolver_records_from_res_query (lrd->rrname, rrtype, answer->data, len, herr, &error);
- g_byte_array_free (answer, TRUE);
+@@ -871,6 +871,8 @@ do_lookup_records (GTask *task,
+
+ #ifdef HAVE_RES_NQUERY
+#ifdef HAVE_RES_NQUERY
+
#if defined(HAVE_RES_NDESTROY)
res_ndestroy (&res);
#elif defined(HAVE_RES_NCLOSE)
-@@ -877,6 +879,8 @@ do_lookup_records (GTask *task,
- #error "Your platform has res_ninit() but not res_nclose() or res_ndestroy(). Please file a bug at https://bugzilla.gnome.org/enter_bug.cgi?product=glib"
- #endif
+@@ -881,6 +883,8 @@ do_lookup_records (GTask *task,
+
+ #endif /* HAVE_RES_NQUERY */
+#endif
+
include $(TOPDIR)/rules.mk
PKG_NAME:=glpk
-PKG_VERSION:=4.63
+PKG_VERSION:=4.65
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=914d27f1a51c2bf4a51f1bd4a507f875fcca99db7b219380b836a25b29b3e7f6
+PKG_HASH:=4281e29b628864dfe48d393a7bedd781e5b475387c20d8b0158f329994721a10
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
SECTION:=libs
CATEGORY:=Libraries
TITLE:=The GNU Linear Programming Kit
- URL:=http://www.gnu.org/software/glpk/
+ URL:=https://www.gnu.org/software/glpk/
endef
define Package/libglpk/description
SECTION:=libs
CATEGORY:=Libraries
TITLE:=The GNU Linear Programming Kit (glpsol)
- URL:=http://www.gnu.org/software/glpk/
+ URL:=https://www.gnu.org/software/glpk/
DEPENDS:=libglpk
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=gnutls
-PKG_VERSION:=3.5.16
+PKG_VERSION:=3.5.19
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5
-PKG_HASH:=0924dec90c37c05f49fec966eba3672dab4d336d879e5c06e06e13325cbfec25
+PKG_HASH:=1936eb64f03aaefd6eb16cef0567457777618573826b94d03376bb6a4afadc44
#PKG_FIXUP:=autoreconf gettext-version
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
PKG_LICENSE:=LGPLv2.1+
+PKG_CPE_ID:=cpe:/a:gnu:gnutls
PKG_INSTALL:=1
PKG_LIBTOOL_PATHS:=. lib
PKG_NAME:=hiredis
PKG_VERSION:=0.13.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/redis/hiredis.git
-PKG_SOURCE_VERSION:=010756025e8cefd1bc66c6d4ed3b1648ef6f1f95
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=ac774e318215cbfad4b8e493a84b4fe9a03f9882828ea01eac5357f28b5e9cd4
+PKG_SOURCE_URL:=https://codeload.github.com/redis/hiredis/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=717e6fc8dc2819bef522deaca516de9e51b9dfa68fe393b7db5c3b6079196f78
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hwloc
+PKG_VERSION:=2.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://download.open-mpi.org/release/$(PKG_NAME)/v2.0/
+PKG_HASH:=f1156df22fc2365a31a3dc5f752c53aad49e34a5e22d75ed231cd97eaa437f9d
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_INSTALL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hwloc/Default
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Portable Hardware Locality
+ URL:=https://www.open-mpi.org/projects/hwloc/
+endef
+
+define Package/hwloc/Default/description
+ The Portable Hardware Locality (hwloc) software package provides a
+ portable abstraction (across OS, versions, architectures, ...) of the
+ hierarchical topology of modern architectures, including NUMA memory
+ nodes, sockets, shared caches, cores and simultaneous multithreading. It
+ also gathers various system attributes such as cache and memory
+ information as well as the locality of I/O devices such as network
+ interfaces, InfiniBand HCAs or GPUs.
+endef
+
+define Package/hwloc-utils
+$(call Package/hwloc/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE+= utilities
+ DEPENDS+= +libhwloc
+endef
+
+define Package/hwloc-utils/description
+$(call Package/hwloc/Default/description)
+ This package contains the hwloc utilities.
+endef
+
+define Package/libhwloc
+$(call Package/hwloc/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE+= libraries
+endef
+
+define Package/libhwloc/description
+$(call Package/hwloc/Default/description)
+ This package contains the hwloc libraries.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/hwloc.h $(STAGING_DIR)/usr/include/
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include/hwloc
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/hwloc/*.h $(STAGING_DIR)/usr/include/hwloc/
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include/hwloc/autogen
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/hwloc/autogen/*.h $(STAGING_DIR)/usr/include/hwloc/autogen/
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(STAGING_DIR)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
+ $(1)/usr/lib/pkgconfig
+endef
+
+define Package/hwloc-utils/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+endef
+
+define Package/libhwloc/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,hwloc-utils))
+$(eval $(call BuildPackage,libhwloc))
PKG_NAME:=ibrcommon
PKG_VERSION:=1.0.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
--- /dev/null
+From fe7ae129b8be052e5178b07e76e19ede21b13261 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Tue, 22 May 2018 16:40:20 -0300
+Subject: [PATCH] ibrcommon: added openssl 1.1 compatibility
+
+This patch adds compatibility to openssl 1.1.0.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+---
+ ibrcommon/ssl/HMacStream.cpp | 11 ++++----
+ ibrcommon/ssl/HMacStream.h | 2 +-
+ ibrcommon/ssl/RSASHA256Stream.cpp | 28 +++++++++---------
+ ibrcommon/ssl/RSASHA256Stream.h | 2 +-
+ ibrcommon/ssl/iostreamBIO.cpp | 44 ++++++++++++++++++++++-------
+ ibrcommon/ssl/openssl_compat.h | 38 +++++++++++++++++++++++++
+ 6 files changed, 95 insertions(+), 30 deletions(-)
+ create mode 100644 ibrcommon/ssl/openssl_compat.h
+
+diff --git a/ibrcommon/ssl/HMacStream.cpp b/ibrcommon/ssl/HMacStream.cpp
+index e5d317e3..66d8ce42 100644
+--- a/ibrcommon/ssl/HMacStream.cpp
++++ b/ibrcommon/ssl/HMacStream.cpp
+@@ -20,29 +20,30 @@
+ */
+
+ #include "ibrcommon/ssl/HMacStream.h"
++#include "openssl_compat.h"
+
+ namespace ibrcommon
+ {
+ HMacStream::HMacStream(const unsigned char * const key, const int key_size)
+ : HashStream(EVP_MAX_MD_SIZE, BUFF_SIZE), key_(key), key_size_(key_size)
+ {
+- HMAC_CTX_init(&ctx_);
+- HMAC_Init_ex(&ctx_, key_, key_size_, EVP_sha1(), NULL);
++ ctx_ = HMAC_CTX_new();
++ HMAC_Init_ex(ctx_, key_, key_size_, EVP_sha1(), NULL);
+ }
+
+ HMacStream::~HMacStream()
+ {
+- HMAC_CTX_cleanup(&ctx_);
++ HMAC_CTX_free(ctx_);
+ }
+
+ void HMacStream::update(char *buf, const size_t size)
+ {
+ // hashing
+- HMAC_Update(&ctx_, (unsigned char*)buf, size);
++ HMAC_Update(ctx_, (unsigned char*)buf, size);
+ }
+
+ void HMacStream::finalize(char * hash, unsigned int &size)
+ {
+- HMAC_Final(&ctx_, (unsigned char*)hash, &size);
++ HMAC_Final(ctx_, (unsigned char*)hash, &size);
+ }
+ }
+diff --git a/ibrcommon/ssl/HMacStream.h b/ibrcommon/ssl/HMacStream.h
+index 7dcea168..d04bceb8 100644
+--- a/ibrcommon/ssl/HMacStream.h
++++ b/ibrcommon/ssl/HMacStream.h
+@@ -44,7 +44,7 @@ namespace ibrcommon
+ const unsigned char * const key_;
+ const int key_size_;
+
+- HMAC_CTX ctx_;
++ HMAC_CTX* ctx_;
+ };
+ }
+
+diff --git a/ibrcommon/ssl/RSASHA256Stream.cpp b/ibrcommon/ssl/RSASHA256Stream.cpp
+index d94430ed..d25c5d2f 100644
+--- a/ibrcommon/ssl/RSASHA256Stream.cpp
++++ b/ibrcommon/ssl/RSASHA256Stream.cpp
+@@ -21,6 +21,7 @@
+
+ #include "ibrcommon/ssl/RSASHA256Stream.h"
+ #include "ibrcommon/Logger.h"
++#include "openssl_compat.h"
+ #include <openssl/err.h>
+
+ namespace ibrcommon
+@@ -30,11 +31,11 @@ namespace ibrcommon
+ {
+ // Initialize get pointer. This should be zero so that underflow is called upon first read.
+ setp(&out_buf_[0], &out_buf_[BUFF_SIZE - 1]);
+- EVP_MD_CTX_init(&_ctx);
++ _ctx = EVP_MD_CTX_new();
+
+ if (!_verify)
+ {
+- if (!EVP_SignInit_ex(&_ctx, EVP_sha256(), NULL))
++ if (!EVP_SignInit_ex(_ctx, EVP_sha256(), NULL))
+ {
+ IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to initialize the signature function" << IBRCOMMON_LOGGER_ENDL;
+ ERR_print_errors_fp(stderr);
+@@ -42,7 +43,7 @@ namespace ibrcommon
+ }
+ else
+ {
+- if (!EVP_VerifyInit_ex(&_ctx, EVP_sha256(), NULL))
++ if (!EVP_VerifyInit_ex(_ctx, EVP_sha256(), NULL))
+ {
+ IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to initialize the verification function" << IBRCOMMON_LOGGER_ENDL;
+ ERR_print_errors_fp(stderr);
+@@ -52,18 +53,19 @@ namespace ibrcommon
+
+ RSASHA256Stream::~RSASHA256Stream()
+ {
+- EVP_MD_CTX_cleanup(&_ctx);
++ EVP_MD_CTX_free(_ctx);
+ }
+
+ void RSASHA256Stream::reset()
+ {
+- EVP_MD_CTX_cleanup(&_ctx);
+-
+- EVP_MD_CTX_init(&_ctx);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ EVP_MD_CTX_cleanup(_ctx);
++#endif
++ EVP_MD_CTX_init(_ctx);
+
+ if (!_verify)
+ {
+- if (!EVP_SignInit_ex(&_ctx, EVP_sha256(), NULL))
++ if (!EVP_SignInit_ex(_ctx, EVP_sha256(), NULL))
+ {
+ IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to initialize the signature function" << IBRCOMMON_LOGGER_ENDL;
+ ERR_print_errors_fp(stderr);
+@@ -71,7 +73,7 @@ namespace ibrcommon
+ }
+ else
+ {
+- if (!EVP_VerifyInit_ex(&_ctx, EVP_sha256(), NULL))
++ if (!EVP_VerifyInit_ex(_ctx, EVP_sha256(), NULL))
+ {
+ IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to initialize the verfication function" << IBRCOMMON_LOGGER_ENDL;
+ ERR_print_errors_fp(stderr);
+@@ -91,7 +93,7 @@ namespace ibrcommon
+ std::vector<unsigned char> sign(EVP_PKEY_size(_pkey));
+ unsigned int size = EVP_PKEY_size(_pkey);
+
+- _return_code = EVP_SignFinal(&_ctx, &sign[0], &size, _pkey);
++ _return_code = EVP_SignFinal(_ctx, &sign[0], &size, _pkey);
+
+ _sign = std::string((const char*)&sign[0], size);
+
+@@ -107,7 +109,7 @@ namespace ibrcommon
+ if (!_sign_valid)
+ {
+ sync();
+- _return_code = EVP_VerifyFinal(&_ctx, reinterpret_cast<const unsigned char *>(their_sign.c_str()), static_cast<unsigned int>(their_sign.size()), _pkey);
++ _return_code = EVP_VerifyFinal(_ctx, reinterpret_cast<const unsigned char *>(their_sign.c_str()), static_cast<unsigned int>(their_sign.size()), _pkey);
+ _sign_valid = true;
+ }
+ return _return_code;
+@@ -145,7 +147,7 @@ namespace ibrcommon
+ if (!_verify)
+ // hashing
+ {
+- if (!EVP_SignUpdate(&_ctx, &out_buf_[0], iend - ibegin))
++ if (!EVP_SignUpdate(_ctx, &out_buf_[0], iend - ibegin))
+ {
+ IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to feed data into the signature function" << IBRCOMMON_LOGGER_ENDL;
+ ERR_print_errors_fp(stderr);
+@@ -153,7 +155,7 @@ namespace ibrcommon
+ }
+ else
+ {
+- if (!EVP_VerifyUpdate(&_ctx, &out_buf_[0], iend - ibegin))
++ if (!EVP_VerifyUpdate(_ctx, &out_buf_[0], iend - ibegin))
+ {
+ IBRCOMMON_LOGGER_TAG("RSASHA256Stream", critical) << "failed to feed data into the verification function" << IBRCOMMON_LOGGER_ENDL;
+ ERR_print_errors_fp(stderr);
+diff --git a/ibrcommon/ssl/RSASHA256Stream.h b/ibrcommon/ssl/RSASHA256Stream.h
+index 344f8e10..6f3a1168 100644
+--- a/ibrcommon/ssl/RSASHA256Stream.h
++++ b/ibrcommon/ssl/RSASHA256Stream.h
+@@ -106,7 +106,7 @@ namespace ibrcommon
+
+ /** the context in which the streamed data will be feed into for
+ calculation of the hash/signature */
+- EVP_MD_CTX _ctx;
++ EVP_MD_CTX * _ctx;
+
+ /** tells if the context needs to be finalized to get a valid signature or
+ verification */
+diff --git a/ibrcommon/ssl/iostreamBIO.cpp b/ibrcommon/ssl/iostreamBIO.cpp
+index 18c1b55c..ea6c63eb 100644
+--- a/ibrcommon/ssl/iostreamBIO.cpp
++++ b/ibrcommon/ssl/iostreamBIO.cpp
+@@ -23,6 +23,7 @@
+
+ #include "ibrcommon/Logger.h"
+
++#include "openssl_compat.h"
+ #include <openssl/err.h>
+
+ namespace ibrcommon
+@@ -42,7 +43,20 @@ static int create(BIO *bio);
+ //static int destroy(BIO *bio);
+ //static long (*callback_ctrl)(BIO *, int, bio_info_cb *);
+
+-
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++BIO_METHOD * BIO_iostream_method()
++{
++ static BIO_METHOD *iostream_method = NULL;
++ if (iostream_method) {
++ iostream_method = BIO_meth_new(iostreamBIO::type, iostreamBIO::name);
++ BIO_meth_set_write(iostream_method, bwrite);
++ BIO_meth_set_read(iostream_method, bread);
++ BIO_meth_set_ctrl(iostream_method, ctrl);
++ BIO_meth_set_create(iostream_method, create);
++ }
++ return iostream_method;
++}
++#else
+ static BIO_METHOD iostream_method =
+ {
+ iostreamBIO::type,
+@@ -56,12 +70,17 @@ static BIO_METHOD iostream_method =
+ NULL,//destroy,
+ NULL//callback_ctrl
+ };
++BIO_METHOD * BIO_iostream_method()
++{
++ return &iostream_method;
++}
++#endif
+
+ iostreamBIO::iostreamBIO(iostream *stream)
+ : _stream(stream)
+ {
+ /* create BIO */
+- _bio = BIO_new(&iostream_method);
++ _bio = BIO_new(BIO_iostream_method());
+ if(!_bio){
+ /* creation failed, throw exception */
+ char err_buf[ERR_BUF_SIZE];
+@@ -72,7 +91,7 @@ iostreamBIO::iostreamBIO(iostream *stream)
+ }
+
+ /* save the iostream in the bio object */
+- _bio->ptr = stream;
++ BIO_set_data(_bio, (void *) stream);
+ }
+
+ BIO * iostreamBIO::getBIO(){
+@@ -81,10 +100,10 @@ BIO * iostreamBIO::getBIO(){
+
+ static int create(BIO *bio)
+ {
+- bio->ptr = NULL;
+- /* (from openssl memory bio) */
+- bio->shutdown=1;
+- bio->init=1;
++ BIO_set_data(bio, NULL);
++ BIO_set_shutdown(bio, 1);
++ BIO_set_init(bio, 1);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ /* from bss_mem.c (openssl):
+ * bio->num is used to hold the value to return on 'empty', if it is
+ * 0, should_retry is not set
+@@ -93,6 +112,7 @@ static int create(BIO *bio)
+ * it is set to 0 since the underlying stream is blocking
+ */
+ bio->num= 0;
++#endif
+
+ return 1;
+ }
+@@ -102,7 +122,7 @@ static int create(BIO *bio)
+ static long ctrl(BIO *bio, int cmd, long num, void *)
+ {
+ long ret;
+- iostream *stream = reinterpret_cast<iostream*>(bio->ptr);
++ iostream *stream = reinterpret_cast<iostream*>(BIO_get_data(bio));
+
+ IBRCOMMON_LOGGER_DEBUG_TAG("iostreamBIO", 90) << "ctrl called, cmd: " << cmd << ", num: " << num << "." << IBRCOMMON_LOGGER_ENDL;
+
+@@ -147,8 +167,12 @@ static long ctrl(BIO *bio, int cmd, long num, void *)
+
+ static int bread(BIO *bio, char *buf, int len)
+ {
+- iostream *stream = reinterpret_cast<iostream*>(bio->ptr);
++ iostream *stream = reinterpret_cast<iostream*>(BIO_get_data(bio));
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ int num_bytes = 0;
++#else
+ int num_bytes = bio->num;
++#endif
+
+ try{
+ /* make sure to read at least 1 byte and then read as much as we can */
+@@ -170,7 +194,7 @@ static int bwrite(BIO *bio, const char *buf, int len)
+ if(len == 0){
+ return 0;
+ }
+- iostream *stream = reinterpret_cast<iostream*>(bio->ptr);
++ iostream *stream = reinterpret_cast<iostream*>(BIO_get_data(bio));
+
+ /* write the data */
+ try{
+diff --git a/ibrcommon/ssl/openssl_compat.h b/ibrcommon/ssl/openssl_compat.h
+new file mode 100644
+index 00000000..e491677f
+--- /dev/null
++++ b/ibrcommon/ssl/openssl_compat.h
+@@ -0,0 +1,38 @@
++#ifndef OPENSSL_COMPAT_H
++#define OPENSSL_COMPAT_H
++
++#include <openssl/crypto.h>
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
++#include <openssl/evp.h>
++#include <openssl/hmac.h>
++
++static inline EVP_MD_CTX * EVP_MD_CTX_new()
++{
++ EVP_MD_CTX *ctx;
++
++ ctx = (EVP_MD_CTX *) OPENSSL_malloc(sizeof(EVP_MD_CTX));
++ EVP_MD_CTX_init(ctx);
++ return ctx;
++}
++#define EVP_MD_CTX_free(c) if (c != NULL) OPENSSL_free(c)
++
++static inline HMAC_CTX * HMAC_CTX_new()
++{
++ HMAC_CTX *ctx;
++
++ ctx = (HMAC_CTX *) OPENSSL_malloc(sizeof(HMAC_CTX));
++ HMAC_CTX_init(ctx);
++ return ctx;
++}
++#define HMAC_CTX_free(c) if (c != NULL) OPENSSL_free(c)
++
++#define BIO_get_data(b) b->ptr
++#define BIO_set_data(b, v) b->ptr=v
++#define BIO_set_shutdown(b, v) b->shutdown=v
++#define BIO_set_init(b, v) b->init=v
++
++#endif /* OPENSSL_VERSION_NUMBER */
++
++#endif /* OPENSSL_COMPAT_H */
++
+--
+2.16.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=icu4c
-PKG_VERSION:=61.1
-PKG_RELEASE:=1
+PKG_VERSION:=62.1
+PKG_RELEASE:=2
-PKG_SOURCE:=$(PKG_NAME)-61_1-src.tgz
+PKG_SOURCE:=$(PKG_NAME)-62_1-src.tgz
PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION)
-PKG_HASH:=d007f89ae8a2543a53525c74359b65b36412fa84b3349f1400be6dcf409fafef
+PKG_HASH:=3dd9868d666350dda66a6e305eecde9d479fb70b30d5b55d78a1deffb97d5aa3
PKG_LICENSE:=ICU-1.8.1+
PKG_LICENSE_FILES:=LICENSE
DEPENDS:=+libstdcpp +libpthread
endef
+define Package/icu/description
+ ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms and between C/C++ and Java software.
+ This package supports C/C++.
+endef
+
+define Package/icu-full-data
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Full ICU Data
+ URL:=http://icu-project.org
+ DEPENDS:=+icu
+endef
+
+define Package/icu-full-data/description
+ ICU makes use of a wide variety of data tables to provide many of its services. Examples include converter mapping tables, collation rules, transliteration rules, break iterator rules and dictionaries, and other locale data.
+ This package contains the complete data library provided by ICU.
+ A custom data library can be generated at http://apps.icu-project.org/datacustom/
+endef
+
+define Package/icu-data-tools
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=ICU Data manipulation tools
+ URL:=http://icu-project.org
+ DEPENDS:=+icu
+endef
+
+define Package/icu-data-tools/description
+ This package provides tools for manipulating ICU data.
+endef
+
CONFIGURE_CMD:= ./runConfigureICU
CONFIGURE_ARGS:= \
Linux/gcc \
--disable-tracing \
--disable-extras \
--enable-dyload \
- --disable-tools \
+ --with-data-packaging=archive \
--disable-tests \
--disable-samples \
--with-cross-build="$(STAGING_DIR_HOSTPKG)/share/icu/$(PKG_VERSION)" \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
endef
-$(eval $(call BuildPackage,icu))
+define Package/icu-full-data/install
+ $(INSTALL_DIR) $(1)/usr/share/icu/$(PKG_VERSION)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/icu/$(PKG_VERSION)/icudt*.dat \
+ $(1)/usr/share/icu/$(PKG_VERSION)/
+endef
+
+define Package/icu-data-tools/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
+endef
+
$(eval $(call HostBuild))
+$(eval $(call BuildPackage,icu))
+$(eval $(call BuildPackage,icu-full-data))
+$(eval $(call BuildPackage,icu-data-tools))
include $(TOPDIR)/rules.mk
PKG_NAME:=intltool
-PKG_LIBVER:=0.40
-PKG_VERSION:=$(PKG_LIBVER).6
-PKG_RELEASE:=3
+PKG_LIBVER:=0.51
+PKG_VERSION:=$(PKG_LIBVER).0
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@GNOME/intltool/$(PKG_LIBVER)
-PKG_HASH:=4d1e5f8561f09c958e303d4faa885079a5e173a61d28437d0013ff5efc9e3b64
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://launchpad.net/intltool/trunk/$(PKG_VERSION)/+download
+PKG_HASH:=67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_HOST_ONLY:=1
SECTION:=libs
CATEGORY:=Libraries
TITLE:=set of tools to centralize translation using GNU gettext
- URL:=http://www.freedesktop.org/wiki/Software/intltool
+ URL:=https://www.freedesktop.org/wiki/Software/intltool
BUILDONLY:=1
endef
---- a/configure.in
-+++ b/configure.in
-@@ -25,7 +25,7 @@ AC_MSG_CHECKING([for XML::Parser])
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,7 +27,7 @@ AC_MSG_CHECKING([for XML::Parser])
if `$PERL -e "require XML::Parser" 2>/dev/null`; then
AC_MSG_RESULT([ok])
else
- AC_MSG_ERROR([XML::Parser perl module is required for intltool])
-+ AC_MSG_RESULT([XML::Parser perl module is required for some intltool utilitities])
++ AC_MSG_RESULT([XML::Parser perl module is required for intltool])
fi
+ AC_PATH_PROG(BZR, bzr)
- AC_OUTPUT([
--- a/intltool.m4
+++ b/intltool.m4
-@@ -127,7 +127,7 @@ if test "x$2" != "xno-xml"; then
+@@ -148,7 +148,7 @@ if test "x$2" != "xno-xml"; then
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
AC_MSG_RESULT([ok])
else
- AC_MSG_ERROR([XML::Parser perl module is required for intltool])
-+ AC_MSG_RESULT([XML::Parser perl module is required for some intltool utilitities])
++ AC_MSG_RESULT([XML::Parser perl module is required for intltool])
fi
fi
include $(TOPDIR)/rules.mk
PKG_NAME:=jansson
-PKG_VERSION:=2.10
+PKG_VERSION:=2.11
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.digip.org/jansson/releases/
-PKG_HASH:=241125a55f739cd713808c4e0089986b8c3da746da8b384952912ad659fa2f5a
+PKG_HASH:=783132e2fc970feefc2fa54199ef65ee020bd8e0e991a78ea44b8586353a0947
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=keyutils
+PKG_VERSION:=1.5.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://people.redhat.com/dhowells/keyutils/
+PKG_HASH:=115c3deae7f181778fd0e0ffaa2dad1bf1fe2f5677cf2e0e348cdb7a1c93afb6
+
+PKG_FIXUP:=libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libkeyutils
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Key utilities library
+ URL:=http://people.redhat.com/dhowells/keyutils/
+endef
+
+define Package/keyutils/description
+ Key utilities library
+endef
+
+define Build/Install
+ make -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) LIBDIR=/usr/lib install
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkeyutils.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libkeyutils/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkeyutils.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libkeyutils))
--- /dev/null
+Author: Marcus Meissner <meissner@suse.de>
+Description: Added 2 cifs helpers to request-key.conf (for CIFS DFS support)
+
+diff -Naurp keyutils.orig/request-key.conf keyutils/request-key.conf
+--- keyutils.orig/request-key.conf 2011-08-22 11:46:30.332025250 +0200
++++ keyutils/request-key.conf 2011-08-22 11:49:40.096967441 +0200
+@@ -38,4 +38,6 @@ create user debug:* expired
+ create user debug:* revoked /bin/keyctl reject %k 30 %c %S
+ create user debug:loop:* * |/bin/cat
+ create user debug:* * /usr/share/keyutils/request-key-debug.sh %k %d %c %S
++create cifs.spnego * * /usr/sbin/cifs.upcall -c %k
++create dns_resolver * * /usr/sbin/cifs.upcall %k
+ negate * * * /bin/keyctl negate %k 30 %S
--- /dev/null
+Author: Nobuhiro Iwamatsu <iwamatsu@debian.org>
+Description: Avoid setting Intel Architecture specific CFLAGS (Closes: #638925).
+
+diff -Naurp keyutils.orig/Makefile keyutils/Makefile
+--- keyutils.orig/Makefile 2011-08-22 11:51:20.521464216 +0200
++++ keyutils/Makefile 2011-08-24 19:17:09.855361713 +0200
+@@ -56,12 +56,10 @@ BUILDFOR := $(shell file /usr/bin/make |
+ LNS := ln -sf
+
+ ifeq ($(BUILDFOR),32-bit)
+-CFLAGS += -m32
+ LIBDIR := /lib
+ USRLIBDIR := /usr/lib
+ else
+ ifeq ($(BUILDFOR),64-bit)
+-CFLAGS += -m64
+ LIBDIR := /lib64
+ USRLIBDIR := /usr/lib64
+ endif
include $(TOPDIR)/rules.mk
PKG_NAME:=ldns
-PKG_VERSION:=1.6.17
+PKG_VERSION:=1.7.0
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/ldns
-PKG_HASH:=8b88e059452118e8949a2752a55ce59bc71fa5bc414103e17f5b6b06f9bcc8cd
+PKG_HASH:=c19f5b1b4fb374cfe34f4845ea11b1e0551ddc67803bd6ddd5d2a20f0997a6cc
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_MAINTAINER:=
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
endef
CONFIGURE_ARGS += \
+ --disable-dane-ta-usage \
--disable-ecdsa \
--disable-gost \
--with-drill \
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -842,7 +842,7 @@ ACX_CHECK_FORMAT_ATTRIBUTE
+ ACX_CHECK_UNUSED_ATTRIBUTE
+
+ # check OSX deployment target, if needed
+-if echo $build_os | grep darwin > /dev/null; then
++if echo $target_os | grep darwin > /dev/null; then
+ sdk_p=`xcode-select -print-path`;
+ sdk_v="$( /usr/bin/xcrun --show-sdk-version )";
+ case $sdk_v in
+++ /dev/null
---- a/doc/doxyparse.pl
-+++ b/doc/doxyparse.pl
-@@ -273,7 +273,7 @@ foreach (keys %manpages) {
-
- print MAN $MAN_MIDDLE;
-
-- if (defined(@$also)) {
-+ if (@$also) {
- print MAN "\n.SH SEE ALSO\n\\fI";
- print MAN join "\\fR, \\fI", @$also;
- print MAN "\\fR.\nAnd ";
--- /dev/null
+From c8391790c96d4c8a2c10f9ab1460fda83b509fc2 Mon Sep 17 00:00:00 2001
+From: Willem Toorop <willem@nlnetlabs.nl>
+Date: Thu, 27 Apr 2017 00:14:58 +0200
+Subject: [PATCH] Check parse limit before t increment
+
+Thanks Stephan Zeisberg
+---
+ parse.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/parse.c b/parse.c
+index e68627c..947dbb8 100644
+--- a/parse.c
++++ b/parse.c
+@@ -118,6 +118,10 @@ ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *li
+ if (line_nr) {
+ *line_nr = *line_nr + 1;
+ }
++ if (limit > 0 && (i >= limit || (size_t)(t-token) >= limit)) {
++ *t = '\0';
++ return -1;
++ }
+ *t++ = ' ';
+ prev_c = c;
+ continue;
+--
+2.9.5
+
--- /dev/null
+From 3bdeed02505c9bbacb3b64a97ddcb1de967153b7 Mon Sep 17 00:00:00 2001
+From: Willem Toorop <willem@nlnetlabs.nl>
+Date: Thu, 27 Apr 2017 00:25:20 +0200
+Subject: [PATCH] bugfix #1257: Free after reallocing to 0 size
+
+Thanks Stephan Zeisberg
+---
+ str2host.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/str2host.c b/str2host.c
+index b274b17..f2a317b 100644
+--- a/str2host.c
++++ b/str2host.c
+@@ -1525,8 +1525,10 @@ ldns_str2rdf_long_str(ldns_rdf **rd, const char *str)
+ if (! str) {
+ return LDNS_STATUS_SYNTAX_BAD_ESCAPE;
+ }
+- length = (size_t)(dp - data);
+-
++ if (!(length = (size_t)(dp - data))) {
++ LDNS_FREE(data);
++ return LDNS_STATUS_SYNTAX_EMPTY;
++ }
+ /* Lose the overmeasure */
+ data = LDNS_XREALLOC(dp = data, uint8_t, length);
+ if (! data) {
+--
+2.9.5
+
include $(TOPDIR)/rules.mk
PKG_NAME:=libantlr3c
-PKG_VERSION:=3.2
+PKG_VERSION:=3.4
PKG_RELEASE:=1
-PKG_HASH:=2ccfb8a8bdd3d6c1d60742ff3a5a954af6d5a8d7f8901c87229fc6fa540ac99a
+PKG_HASH:=ca914a97f1a2d2f2c8e1fca12d3df65310ff0286d35c48b7ae5f11dcc8b2eb52
-PKG_SOURCE_URL:=http://www.antlr3.org/download/C
+PKG_SOURCE_URL:=https://www.antlr3.org/download/C
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_MAINTAINER:=Espen Jürgensen <espenjurgensen+openwrt@gmail.com>
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libantlr3c
- URL:=http://www.antlr3.org/
+ URL:=https://www.antlr3.org/
endef
define Package/libantlr3c/description
--- /dev/null
+#
+# Copyright (C) 2006-2012 OpenWrt.org
+# Copyright (C) 2017-2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cups
+PKG_VERSION:=2.2.8
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.gz
+PKG_SOURCE_URL:=https://github.com/apple/cups/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=3968fc1d26fc48727508db1c1380e36c6694ab90177fd6920aec5f6cc73af9e4
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=LICENSE.txt
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libcups/Default
+ URL:=http://www.cups.org/
+ SUBMENU:=Printing
+endef
+
+define Package/libcups
+$(call Package/cups/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+zlib +libpthread +libpng +libjpeg +libusb-1.0
+ TITLE:=Common UNIX Printing System - Core library
+endef
+
+define Package/libcups/description
+ Common UNIX Printing System - Core library
+endef
+
+TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+
+CONFIGURE_ARGS+=--with-cups-user="nobody" \
+ --with-cups-group="nogroup" \
+ --with-components="core" \
+ --with-pdftops="none" \
+ --without-perl \
+ --without-python \
+ --without-php \
+ --enable-shared \
+ --enable-image \
+ --enable-libusb \
+ --disable-acl \
+ --disable-dbus \
+ --disable-dnssd \
+ --disable-launchd \
+ --disable-ldap \
+ --disable-pam \
+ --disable-slp \
+ --disable-gnutls \
+ --disable-openssl \
+ --disable-cdsassl \
+ --disable-ssl \
+ --disable-gssapi \
+ --disable-tiff \
+ UNAME="Linux" \
+ LIBS="$(TARGET_LDFLAGS) -lz -lpng -ljpeg"
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR)/cups \
+ $(TARGET_CONFIGURE_OPTS) \
+ DSTROOT="$(PKG_INSTALL_DIR)" \
+ STRIP="/bin/true" \
+ libcups.so.2 install-libs install-headers
+ $(MAKE) -C $(PKG_BUILD_DIR)/filter \
+ $(TARGET_CONFIGURE_OPTS) \
+ DSTROOT="$(PKG_INSTALL_DIR)" \
+ STRIP="/bin/true" \
+ libcupsimage.so.2 install-libs install-headers
+ $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cups-config $(PKG_INSTALL_DIR)/usr/bin
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(2)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(2)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib*/libcups*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libcups))
include $(TOPDIR)/rules.mk
PKG_NAME:=libdaq
-PKG_VERSION:=2.0.4
+PKG_VERSION:=2.0.6
PKG_RELEASE:=2
PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
@SF/snort
PKG_SOURCE:=daq-$(PKG_VERSION).tar.gz
-PKG_HASH:=a294aa3d01cd8902bf842d320e7f2c043af9ead95d0e7198c3b71a0dbc9d253c
+PKG_HASH:=d41da5f7793e66044e6927dd868c0525e7ee4ec1a3515bf74ef9a30cd9273af0
PKG_BUILD_DIR:=$(BUILD_DIR)/daq-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
--- a/configure
+++ b/configure
-@@ -12967,10 +12967,11 @@ if ${daq_cv_libpcap_version_1x+:} false;
+@@ -13552,10 +13552,11 @@ if ${daq_cv_libpcap_version_1x+:} false;
else
if test "$cross_compiling" = yes; then :
include $(TOPDIR)/rules.mk
PKG_NAME:=libdmapsharing
-PKG_VERSION:=2.9.39
+PKG_VERSION:=3.9.3
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=libdmapsharing-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.flyn.org/projects/libdmapsharing/
-PKG_HASH:=a90dc0681ae81700e46efc539f70edb6edd936b782a9a695434bea660a43a5ef
+PKG_SOURCE_URL:=https://www.flyn.org/projects/libdmapsharing/
+PKG_HASH:=a19df4b6fbd669fc95824860c235aa4aed33b69ecc25eb9d9d6dccb4e98c3f18
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
define Package/libdmapsharing
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libsoup +mdnsresponder +gstreamer1 +gst1-plugins-base +libgst1app
+ DEPENDS:=+libsoup +mdnsresponder +gstreamer1-libs +gstreamer1-plugins-base +gst1-mod-app
TITLE:=libdmapsharing
- URL:=http://www.flyn.org/projects/libdmapsharing/
+ URL:=https://www.flyn.org/projects/libdmapsharing/
endef
define Package/libdmapsharing/decription
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/
$(CP) \
- $(PKG_INSTALL_DIR)/usr/include/libdmapsharing-3.0/ \
+ $(PKG_INSTALL_DIR)/usr/include/libdmapsharing-4.0/ \
$(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) \
+++ /dev/null
---- a/config/config.sub
-+++ b/config/config.sub
-@@ -228,7 +228,7 @@ case $basic_machine in
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
-@@ -290,7 +290,7 @@ case $basic_machine in
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
-- | avr-* \
-+ | avr-* | avr32-* \
- | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c54x-* \
- | clipper-* | cydra-* \
PKG_NAME:=libesmtp
PKG_VERSION:=1.0.6
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_LICENSE:=LGPL-2.0+
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/tru7/libesmtp.git
-PKG_SOURCE_VERSION=10e9a6df9f76da610941addf71b9a3cbf94f2e9f
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=6f703766be05cc0cd861790ee041d1c2910b6d6e7bb8805ed739839c7801bfcc
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://brianstafford.info/libesmtp
+PKG_HASH:=d0a61a5c52d99fa7ce7d00ed0a07e341dbda67101dbed1ab0cdae3f37db4eb0b
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A Library for Posting Electronic Mail
- URL:=https://github.com/tru7/libesmtp.git
+ URL:=http://brianstafford.info/libesmtp/
DEPENDS:=+libpthread +libopenssl
endef
--- /dev/null
+diff --git a/configure b/configure
+index d586ca2..ee39284 100755
+--- a/configure
++++ b/configure
+@@ -11896,9 +11896,9 @@ fi
+
+ fi
+ if test x$with_openssl != xno ; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
+-$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
+-if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then :
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
++$as_echo_n "checking for SSL_new in -lssl... " >&6; }
++if test "${ac_cv_lib_ssl_SSL_new+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+@@ -11913,27 +11913,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char SSL_library_init ();
++char SSL_new ();
+ int
+ main ()
+ {
+-return SSL_library_init ();
++return SSL_new ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_ssl_SSL_library_init=yes
++ ac_cv_lib_ssl_SSL_new=yes
+ else
+- ac_cv_lib_ssl_SSL_library_init=no
++ ac_cv_lib_ssl_SSL_new=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
+-$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
+-if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
++$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
++if test "x$ac_cv_lib_ssl_SSL_new" = x""yes; then :
+
+ with_openssl=yes
+ LIBS="-lssl -lcrypto $LIBS"
+diff --git a/smtp-tls.c b/smtp-tls.c
+index 9a66806..5bdc191 100644
+--- a/smtp-tls.c
++++ b/smtp-tls.c
+@@ -64,10 +64,12 @@ openssl_mutexcb (int mode, int n,
+ const char *file __attribute__ ((unused)),
+ int line __attribute__ ((unused)))
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (mode & CRYPTO_LOCK)
+ pthread_mutex_lock (&openssl_mutex[n]);
+ else
+ pthread_mutex_unlock (&openssl_mutex[n]);
++#endif
+ }
+ #endif
+
+@@ -76,7 +78,7 @@ starttls_init (void)
+ {
+ if (tls_init)
+ return 1;
+-
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ #ifdef USE_PTHREADS
+ /* Set up mutexes for the OpenSSL library */
+ if (openssl_mutex == NULL)
+@@ -94,9 +96,12 @@ starttls_init (void)
+ CRYPTO_set_locking_callback (openssl_mutexcb);
+ }
+ #endif
+- tls_init = 1;
+ SSL_load_error_strings ();
+ SSL_library_init ();
++#else
++ OPENSSL_init_ssl(0, NULL);
++#endif
++ tls_init = 1;
+ return 1;
+ }
+
--- /dev/null
+Description: Add TLSv1.1 and TLSv1.2 support
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/802658
+Forwarded: yes
+Author: Salvatore Bonaccorso <carnil@debian.org>
+Last-Update: 2015-11-07
+
+--- a/smtp-tls.c
++++ b/smtp-tls.c
+@@ -197,11 +197,24 @@ starttls_create_ctx (smtp_session_t sess
+ ckf_t status;
+
+ /* The decision not to support SSL v2 and v3 but instead to use only
+- TLSv1 is deliberate. This is in line with the intentions of RFC
++ TLSv1.X is deliberate. This is in line with the intentions of RFC
+ 3207. Servers typically support SSL as well as TLS because some
+ versions of Netscape do not support TLS. I am assuming that all
+ currently deployed servers correctly support TLS. */
+- ctx = SSL_CTX_new (TLSv1_client_method ());
++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
++ !defined(LIBRESSL_VERSION_NUMBER) && !defined(OPENSSL_IS_BORINGSSL)
++ ctx = SSL_CTX_new (TLS_client_method ());
++#else
++ ctx = SSL_CTX_new (SSLv23_client_method ());
++#endif
++
++#ifdef OPENSSL_NO_SSL3
++ SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3);
++#endif
++
++#ifdef OPENSSL_NO_SSL2
++ SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
++#endif
+
+ /* Load our keys and certificates. To avoid messing with configuration
+ variables etc, use fixed paths for the certificate store. These are
include $(TOPDIR)/rules.mk
PKG_NAME:=libev
-PKG_VERSION:=4.22
+PKG_VERSION:=4.24
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/
-PKG_HASH:=736079e8ac543c74d59af73f9c52737b3bfec9601f020bf25a87a4f4d0f01bd6
+PKG_HASH:=973593d3479abdf657674a55afe5f78624b0e440614e2b8cb3a07f16d4d7f821
PKG_LICENSE:=BSD-2-Clause
PKG_MAINTAINER:=Karl Palsson <karlp@tweak.net.au>
PKG_NAME:=libevhtp
PKG_VERSION:=1.1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE_PROTO:=git
--- /dev/null
+--- a/evhtp.c
++++ b/evhtp.c
+@@ -1686,16 +1686,15 @@ _evhtp_ssl_thread_lock(int mode, int typ
+ #endif
+ static void
+ _evhtp_ssl_delete_scache_ent(evhtp_ssl_ctx_t * ctx, evhtp_ssl_sess_t * sess) {
+- evhtp_t * htp;
+- evhtp_ssl_cfg_t * cfg;
+- unsigned char * sid;
+- unsigned int slen;
++ evhtp_t * htp;
++ evhtp_ssl_cfg_t * cfg;
++ evhtp_ssl_data_t * sid;
++ unsigned int slen;
+
+ htp = (evhtp_t *)SSL_CTX_get_app_data(ctx);
+ cfg = htp->ssl_cfg;
+
+- sid = sess->session_id;
+- slen = sess->session_id_length;
++ sid = (evhtp_ssl_data_t *)SSL_SESSION_get_id(sess, &slen);
+
+ if (cfg->scache_del) {
+ (cfg->scache_del)(htp, sid, slen);
+@@ -1706,14 +1705,17 @@ static int
+ _evhtp_ssl_add_scache_ent(evhtp_ssl_t * ssl, evhtp_ssl_sess_t * sess) {
+ evhtp_connection_t * connection;
+ evhtp_ssl_cfg_t * cfg;
+- unsigned char * sid;
++ evhtp_ssl_data_t * sid;
+ int slen;
+
+ connection = (evhtp_connection_t *)SSL_get_app_data(ssl);
+- cfg = connection->htp->ssl_cfg;
++ if (connection->htp == NULL)
++ {
++ return 0; /* We cannot get the ssl_cfg */
++ }
+
+- sid = sess->session_id;
+- slen = sess->session_id_length;
++ cfg = connection->htp->ssl_cfg;
++ sid = (evhtp_ssl_data_t *)SSL_SESSION_get_id(sess, &slen);
+
+ SSL_set_timeout(sess, cfg->scache_timeout);
+
+@@ -1725,7 +1727,7 @@ _evhtp_ssl_add_scache_ent(evhtp_ssl_t *
+ }
+
+ static evhtp_ssl_sess_t *
+-_evhtp_ssl_get_scache_ent(evhtp_ssl_t * ssl, unsigned char * sid, int sid_len, int * copy) {
++_evhtp_ssl_get_scache_ent(evhtp_ssl_t * ssl, evhtp_ssl_data_t * sid, int sid_len, int * copy) {
+ evhtp_connection_t * connection;
+ evhtp_ssl_cfg_t * cfg;
+ evhtp_ssl_sess_t * sess;
+@@ -1767,12 +1769,12 @@ _evhtp_ssl_servername(evhtp_ssl_t * ssl,
+ connection->vhost_via_sni = 1;
+
+ SSL_set_SSL_CTX(ssl, evhtp_vhost->ssl_ctx);
+- SSL_set_options(ssl, SSL_CTX_get_options(ssl->ctx));
++ SSL_set_options(ssl, SSL_CTX_get_options(SSL_get_SSL_CTX(ssl)));
+
+ if ((SSL_get_verify_mode(ssl) == SSL_VERIFY_NONE) ||
+ (SSL_num_renegotiations(ssl) == 0)) {
+- SSL_set_verify(ssl, SSL_CTX_get_verify_mode(ssl->ctx),
+- SSL_CTX_get_verify_callback(ssl->ctx));
++ SSL_set_verify(ssl, SSL_CTX_get_verify_mode(SSL_get_SSL_CTX(ssl)),
++ SSL_CTX_get_verify_callback(SSL_get_SSL_CTX(ssl)));
+ }
+
+ return SSL_TLSEXT_ERR_OK;
+@@ -3017,15 +3019,21 @@ evhtp_ssl_init(evhtp_t * htp, evhtp_ssl_
+ return -1;
+ }
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
+ SSL_load_error_strings();
++#endif
+ RAND_poll();
+
+ STACK_OF(SSL_COMP) * comp_methods = SSL_COMP_get_compression_methods();
+ sk_SSL_COMP_zero(comp_methods);
+
+ htp->ssl_cfg = cfg;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ htp->ssl_ctx = SSL_CTX_new(SSLv23_server_method());
++#else
++ htp->ssl_ctx = SSL_CTX_new(TLS_server_method());
++#endif
+
+ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ SSL_CTX_set_options(htp->ssl_ctx, SSL_MODE_RELEASE_BUFFERS);
+@@ -3062,7 +3070,11 @@ evhtp_ssl_init(evhtp_t * htp, evhtp_ssl_
+ SSL_CTX_set_verify(htp->ssl_ctx, cfg->verify_peer, cfg->x509_verify_cb);
+
+ if (cfg->x509_chk_issued_cb != NULL) {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ htp->ssl_ctx->cert_store->check_issued = cfg->x509_chk_issued_cb;
++#else
++ X509_STORE_set_check_issued(SSL_CTX_get_cert_store(htp->ssl_ctx), cfg->x509_chk_issued_cb);
++#endif
+ }
+
+ if (cfg->verify_depth) {
+--- a/evhtp.h
++++ b/evhtp.h
+@@ -34,6 +34,11 @@ typedef SSL evhtp_
+ typedef SSL_CTX evhtp_ssl_ctx_t;
+ typedef X509 evhtp_x509_t;
+ typedef X509_STORE_CTX evhtp_x509_store_ctx_t;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++typedef unsigned char evhtp_ssl_data_t;
++#else
++typedef const unsigned char evhtp_ssl_data_t;
++#endif
+ #else
+ typedef void evhtp_ssl_sess_t;
+ typedef void evhtp_ssl_t;
+@@ -154,9 +159,9 @@ typedef int (*evhtp_headers_iterator)(ev
+ typedef int (*evhtp_ssl_verify_cb)(int pre_verify, evhtp_x509_store_ctx_t * ctx);
+ typedef int (*evhtp_ssl_chk_issued_cb)(evhtp_x509_store_ctx_t * ctx, evhtp_x509_t * x, evhtp_x509_t * issuer);
+
+-typedef int (*evhtp_ssl_scache_add)(evhtp_connection_t * connection, unsigned char * sid, int sid_len, evhtp_ssl_sess_t * sess);
+-typedef void (*evhtp_ssl_scache_del)(evhtp_t * htp, unsigned char * sid, int sid_len);
+-typedef evhtp_ssl_sess_t * (*evhtp_ssl_scache_get)(evhtp_connection_t * connection, unsigned char * sid, int sid_len);
++typedef int (*evhtp_ssl_scache_add)(evhtp_connection_t * connection, evhtp_ssl_data_t * sid, int sid_len, evhtp_ssl_sess_t * sess);
++typedef void (*evhtp_ssl_scache_del)(evhtp_t * htp, evhtp_ssl_data_t * sid, int sid_len);
++typedef evhtp_ssl_sess_t * (*evhtp_ssl_scache_get)(evhtp_connection_t * connection, evhtp_ssl_data_t * sid, int sid_len);
+ typedef void * (*evhtp_ssl_scache_init)(evhtp_t *);
+
+ #define EVHTP_VERSION "1.1.6"
include $(TOPDIR)/rules.mk
PKG_NAME:=libfastjson
-PKG_VERSION:=0.99.2
-PKG_RELEASE:=2
+PKG_VERSION:=0.99.8
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=66676a4c8de8c5399dfe1cfd064d140afca58e3d8187bae0a3dccdf83165d9d1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/rsyslog/libfastjson.git
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_SOURCE_URL:=http://download.rsyslog.com/libfastjson
+PKG_HASH:=3544c757668b4a257825b3cbc26f800f59ef3c1ff2a260f40f96b48ab1d59e07
PKG_MAINTAINER:=Dov Murik <dmurik@us.ibm.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
-PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=libfmt
-PKG_VERSION:=4.1.0
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/fmtlib/fmt.git
-PKG_SOURCE_VERSION:=$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_MIRROR_HASH:=112c964c1537fbc2f3a993f405547fc57b0f3d1524c808006920c53fab42c233
+PKG_VERSION:=5.2.1
+PKG_RELEASE:=2
+
+PKG_SOURCE_NAME:=fmt
+PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/fmtlib/$(PKG_SOURCE_NAME)/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=3c812a18e9f72a88631ab4732a97ce9ef5bcbefb3235e9fd465f059ba204359b
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_LICENSE:=BSD-2-Clause
PKG_NAME:=libftdi1
PKG_VERSION:=1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
--- /dev/null
+--- a/python/CMakeLists.txt
++++ b/python/CMakeLists.txt
+@@ -3,7 +3,7 @@ option ( LINK_PYTHON_LIBRARY "Link again
+
+ if ( PYTHON_BINDINGS )
+ # workaround for cmake bug #0013449
+- if ( NOT DEFINED CMAKE_FIND_ROOT_PATH )
++ if ( NOT DEFINED CMAKE_FIND_ROOT_PATH OR CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0 )
+ find_package ( SWIG )
+ else ()
+ find_program ( SWIG_EXECUTABLE NAMES swig2.0 swig )
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libgabe
+PKG_VERSION:=0.99
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/schanzen/libgabe.git
+PKG_SOURCE_VERSION:=f72c594eaed35d5a506e8f6c091200a73e17e702
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_MIRROR_HASH:=cc5527f7976d904d6c50f40612c5b3d0617342cfc8cf856434a305cfb42e27ff
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libgabe
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+glib2 +libgcrypt +libgmp +libpbc
+ TITLE:=Ciphertext-Policy Attribute-Based Encryption
+ URL:=https://github.com/schanzen/libgabe
+endef
+
+define Package/libgabe/description
+ This is a fork of the libbswabe library by John Bethencourt
+ (http://hms.isi.jhu.edu/acsc/cpabe/) replacing openssl with libgcrypt
+ and fixing some bugs.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/libgabe/install
+# static library only
+endef
+
+$(eval $(call BuildPackage,libgabe))
include $(TOPDIR)/rules.mk
PKG_NAME:=libgcrypt
-PKG_VERSION:=1.6.6
-PKG_RELEASE:=2
+PKG_VERSION:=1.8.3
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/libgcrypt/
-PKG_HASH:=f9461b4619bb78b273a88d468915750d418e89a3ea3b641bab0563a9af4b04d0
+PKG_HASH:=66ec90be036747602f2b48f98312361a9180c97c68a690a5f376fa0f67d0af7c
PKG_LICENSE:=LGPL-2.1+ GPL-2.0+
PKG_LICENSE_FILES:=COPYING
--enable-shared \
--enable-static \
--disable-asm \
+ --disable-doc \
--with-gpg-error-prefix="$(STAGING_DIR)/usr"
TARGET_CFLAGS += $(FPIC)
+++ /dev/null
-diff -u --recursive libgcrypt-1.6.1-vanilla/Makefile.am libgcrypt-1.6.1/Makefile.am
---- libgcrypt-1.6.1-vanilla/Makefile.am 2014-07-18 00:31:21.020329371 -0400
-+++ libgcrypt-1.6.1/Makefile.am 2014-07-18 00:31:49.076314616 -0400
-@@ -25,8 +25,8 @@
- # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
- GITLOG_TO_CHANGELOG=gitlog-to-changelog
-
--DIST_SUBDIRS = m4 compat mpi cipher random src doc tests
--SUBDIRS = compat mpi cipher random src doc tests
-+DIST_SUBDIRS = m4 compat mpi cipher random src
-+SUBDIRS = compat mpi cipher random src
-
- EXTRA_DIST = autogen.sh autogen.rc README.GIT LICENSES \
- ChangeLog-2011 build-aux/ChangeLog-2011 doc/ChangeLog-2011 \
-diff -u --recursive libgcrypt-1.6.1-vanilla/Makefile.in libgcrypt-1.6.1/Makefile.in
---- libgcrypt-1.6.1-vanilla/Makefile.in 2014-07-18 00:31:21.020329371 -0400
-+++ libgcrypt-1.6.1/Makefile.in 2014-07-18 00:31:54.974311498 -0400
-@@ -331,8 +331,8 @@
-
- # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
- GITLOG_TO_CHANGELOG = gitlog-to-changelog
--DIST_SUBDIRS = m4 compat mpi cipher random src doc tests
--SUBDIRS = compat mpi cipher random src doc tests
-+DIST_SUBDIRS = m4 compat mpi cipher random src
-+SUBDIRS = compat mpi cipher random src
- EXTRA_DIST = autogen.sh autogen.rc README.GIT LICENSES \
- ChangeLog-2011 build-aux/ChangeLog-2011 doc/ChangeLog-2011 \
- m4/ChangeLog-2011 cipher/ChangeLog-2011 src/ChangeLog-2011 \
+++ /dev/null
-From a785cc3db0c4e8eb8ebbf784b833a40d2c42ec3e Mon Sep 17 00:00:00 2001
-From: Werner Koch <wk@gnupg.org>
-Date: Tue, 25 Aug 2015 21:11:05 +0200
-Subject: [PATCH] Add configure option --enable-build-timestamp.
-
-* configure.ac (BUILD_TIMESTAMP): Set to "<none>" by default.
---
-
-This is based on
-libgpg-error commit d620005fd1a655d591fccb44639e22ea445e4554
-but changed to be disabled by default. Check there for some
-background.
-
-Signed-off-by: Werner Koch <wk@gnupg.org>
----
- configure.ac | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 48e217947287..2acfa3630cac 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2272,7 +2272,16 @@ changequote([,])dnl
- BUILD_FILEVERSION="${BUILD_FILEVERSION}mym4_revision_dec"
- AC_SUBST(BUILD_FILEVERSION)
-
--BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
-+AC_ARG_ENABLE([build-timestamp],
-+ AC_HELP_STRING([--enable-build-timestamp],
-+ [set an explicit build timestamp for reproducibility.
-+ (default is the current time in ISO-8601 format)]),
-+ [if test "$enableval" = "yes"; then
-+ BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
-+ else
-+ BUILD_TIMESTAMP="$enableval"
-+ fi],
-+ [BUILD_TIMESTAMP="<none>"])
- AC_SUBST(BUILD_TIMESTAMP)
- AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP",
- [The time this package was configured for a build])
---
-2.15.1
-
include $(TOPDIR)/rules.mk
PKG_NAME:=libgee
-PKG_VERSION:=0.20.0
+PKG_VERSION:=0.20.1
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNOME/libgee/0.20/
-PKG_HASH:=21308ba3ed77646dda2e724c0e8d5a2f8d101fb05e078975a532d7887223c2bb
+PKG_HASH:=bb2802d29a518e8c6d2992884691f06ccfcc25792a5686178575c7111fea4630
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=libgpg-error
-PKG_VERSION:=1.12
+PKG_VERSION:=1.32
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=ftp://ftp.gnupg.org/gcrypt/libgpg-error
-PKG_HASH:=cafc9ed6a87c53a35175d5a1220a96ca386696eef2fa059cc0306211f246e55f
+PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/libgpg-error/
+PKG_HASH:=c345c5e73cc2332f8d50db84a2280abfb1d8f6d4f1858b9daa30404db44540ca
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
include $(INCLUDE_DIR)/package.mk
define Package/libgpg-error
--- /dev/null
+diff -u --recursive libgpg-error-1.32-vanilla/configure.ac libgpg-error-1.32/configure.ac
+--- libgpg-error-1.32-vanilla/configure.ac 2018-07-15 01:23:30.028462129 -0400
++++ libgpg-error-1.32/configure.ac 2018-07-15 01:25:32.214267179 -0400
+@@ -74,6 +74,18 @@
+ AC_CANONICAL_HOST
+ AB_INIT
+
++case "${host}" in
++ x86_64-openwrt-linux-gnu|i?86-openwrt-linux-gnu)
++ host=$(echo $host | sed 's/openwrt/pc/g')
++ ;;
++ arm-openwrt-linux-gnu)
++ host=arm-unknown-linux-gnueabi
++ ;;
++ *)
++ host=$(echo $host | sed 's/openwrt/unknown/g')
++ ;;
++esac
++
+ # Checks for programs.
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+++ /dev/null
-From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
-Date: Mon, 16 Mar 2015 17:40:12 +0000 (-0400)
-Subject: Avoid breakage with gcc 5
-X-Git-Tag: libgpg-error-1.19~7
-X-Git-Url: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commitdiff_plain;h=c01c8f0c4f55d76b037c7f6aa44ad25ede18d38a
-
-Avoid breakage with gcc 5
-
-* src/Makefile.am: Add -P to the C preprocessor when building
-mkerrcodes.h, to avoid a noisy intermediate pipeline.
-
---
-
-With gcc 5 without this patch, we see many errors like the following:
-
-gcc -I. -I. -o mkerrcodes ./mkerrcodes.c
-In file included from ./mkerrcodes.c:26:0:
-./mkerrcodes.h:9:5: error: expected expression before ‘,’ token
- { , "GPG_ERR_E2BIG" },
- ^
-./mkerrcodes.h:10:5: error: expected expression before ‘,’ token
- { , "GPG_ERR_EACCES" },
- ^
-
-This patch cleans up the generated mkerrcodes.h by making the
-intermediate stage clean for all the versions of gcc i tested (4.x and
-5).
-
-Debian-Bug-Id: 777374
-Signed-Off-By: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
----
-
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -140,7 +140,7 @@ code-to-errno.h: Makefile mkerrnos.awk e
- # It is correct to use $(CPP). We want the host's idea of the error codes.
- mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
- $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
-- $(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
-+ $(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
- $(AWK) -f $(srcdir)/mkerrcodes.awk >$@
- -rm _$@
-
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -979,7 +979,7 @@ code-to-errno.h: Makefile mkerrnos.awk e
- # It is correct to use $(CPP). We want the host's idea of the error codes.
- mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
- $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
-- $(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
-+ $(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
- $(AWK) -f $(srcdir)/mkerrcodes.awk >$@
- -rm _$@
-
#
# Copyright (C) 2006-2012 OpenWrt.org
-# Copyright (C) 2017 Leonardo Medici
+# Copyright (C) 2017-2018 Leonardo Medici
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=libgphoto2
-PKG_VERSION:=2.5.16
+PKG_VERSION:=2.5.19
PKG_RELEASE:=1
PORT_VERSION:=0.12.0
PKG_MAINTAINER:=Leonardo Medici <leonardo_medici@me.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/gphoto
-PKG_HASH:=e757416d1623e01a9d0d294b2e790162e434c0964f50d3b7ff1a3424b62a2906
+PKG_HASH:=62523e52e3b8542301e072635b518387f2bd0948347775cf10cb2da9a6612c63
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING
-Index: libgphoto2-2.5.16/configure.ac
+Index: libgphoto2-2.5.19/configure.ac
===================================================================
---- libgphoto2-2.5.16.orig/configure.ac
-+++ libgphoto2-2.5.16/configure.ac
+--- libgphoto2-2.5.19.orig/configure.ac
++++ libgphoto2-2.5.19/configure.ac
@@ -209,7 +209,6 @@ ALL_LINGUAS="cs da de es eu fr hu it ja
GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2_CURRENT_MIN}],[The gPhoto Team],[${MAIL_GPHOTO_TRANSLATION}])
AM_GNU_GETTEXT_VERSION([0.14.1])
AM_ICONV()
GP_GETTEXT_FLAGS()
-Index: libgphoto2-2.5.16/libgphoto2_port/configure.ac
+Index: libgphoto2-2.5.19/libgphoto2_port/configure.ac
===================================================================
---- libgphoto2-2.5.16.orig/libgphoto2_port/configure.ac
-+++ libgphoto2-2.5.16/libgphoto2_port/configure.ac
+--- libgphoto2-2.5.19.orig/libgphoto2_port/configure.ac
++++ libgphoto2-2.5.19/libgphoto2_port/configure.ac
@@ -124,7 +124,6 @@ GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2
ALL_LINGUAS="cs da de es eu fi fr it ja nl pl pt_BR ru sk sr sv uk vi zh_CN zh_TW"
AM_GNU_GETTEXT_VERSION([0.14.1])
-Index: libgphoto2-2.5.16/Makefile.am
+Index: libgphoto2-2.5.19/Makefile.am
===================================================================
---- libgphoto2-2.5.16.orig/Makefile.am
-+++ libgphoto2-2.5.16/Makefile.am
+--- libgphoto2-2.5.19.orig/Makefile.am
++++ libgphoto2-2.5.19/Makefile.am
@@ -8,7 +8,7 @@ bin_SCRIPTS = gphoto2-config
EXTRA_DIST = HACKING MAINTAINERS TESTERS installcheck.mk
EXTRA_DIST += libgphoto2.pc.in
pkgconfig_DATA = libgphoto2.pc
-Index: libgphoto2-2.5.16/Makefile.in
+Index: libgphoto2-2.5.19/Makefile.in
===================================================================
---- libgphoto2-2.5.16.orig/Makefile.in
-+++ libgphoto2-2.5.16/Makefile.in
+--- libgphoto2-2.5.19.orig/Makefile.in
++++ libgphoto2-2.5.19/Makefile.in
@@ -482,7 +482,7 @@ EXTRA_DIST = HACKING MAINTAINERS TESTERS
INSTALL README.in README README.packaging
pkgconfig_DATA = libgphoto2.pc
noinst_DATA = libgphoto2-uninstalled.pc
doc_DATA = AUTHORS COPYING NEWS ABOUT-NLS ChangeLog README \
-Index: libgphoto2-2.5.16/configure.ac
+Index: libgphoto2-2.5.19/configure.ac
===================================================================
---- libgphoto2-2.5.16.orig/configure.ac
-+++ libgphoto2-2.5.16/configure.ac
+--- libgphoto2-2.5.19.orig/configure.ac
++++ libgphoto2-2.5.19/configure.ac
@@ -635,20 +635,11 @@ gphoto-m4/Makefile
libgphoto2/Makefile
libgphoto2.pc
],[
dnl This relies on this code being called for each of the above files
dnl with ac_file set to the filename.
-Index: libgphoto2-2.5.16/libgphoto2_port/Makefile.am
+Index: libgphoto2-2.5.19/libgphoto2_port/Makefile.am
===================================================================
---- libgphoto2-2.5.16.orig/libgphoto2_port/Makefile.am
-+++ libgphoto2-2.5.16/libgphoto2_port/Makefile.am
+--- libgphoto2-2.5.19.orig/libgphoto2_port/Makefile.am
++++ libgphoto2-2.5.19/libgphoto2_port/Makefile.am
@@ -25,7 +25,7 @@ udevscript_PROGRAMS =
bin_SCRIPTS = gphoto2-port-config
########################################################################
-Index: libgphoto2-2.5.16/libgphoto2_port/Makefile.in
+Index: libgphoto2-2.5.19/libgphoto2_port/Makefile.in
===================================================================
---- libgphoto2-2.5.16.orig/libgphoto2_port/Makefile.in
-+++ libgphoto2-2.5.16/libgphoto2_port/Makefile.in
+--- libgphoto2-2.5.19.orig/libgphoto2_port/Makefile.in
++++ libgphoto2-2.5.19/libgphoto2_port/Makefile.in
@@ -574,7 +574,7 @@ EXTRA_LTLIBRARIES = disk.la ptpip.la ser
bin_SCRIPTS = gphoto2-port-config
########################################################################
# All iolibs are defined as EXTRA_LTLIBRARIES. This requires that
-Index: libgphoto2-2.5.16/libgphoto2_port/configure.ac
+Index: libgphoto2-2.5.19/libgphoto2_port/configure.ac
===================================================================
---- libgphoto2-2.5.16.orig/libgphoto2_port/configure.ac
-+++ libgphoto2-2.5.16/libgphoto2_port/configure.ac
+--- libgphoto2-2.5.19.orig/libgphoto2_port/configure.ac
++++ libgphoto2-2.5.19/libgphoto2_port/configure.ac
@@ -512,13 +512,10 @@ AC_SUBST([AM_LDFLAGS])
# ---------------------------------------------------------------------------
AC_CONFIG_FILES([
include $(TOPDIR)/rules.mk
PKG_NAME:=libgpiod
-PKG_VERSION:=1.0
+PKG_VERSION:=1.1.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/libs/libgpiod/
-PKG_HASH:=34c76b3730b9d4a1159bcb14000f78b1e890251b8a3823b794fa930654eabdd0
+PKG_HASH:=172fa1544ecb51f37533b3e67862298d50c0a5cc84975f3c0706dc15467f0dfd
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=libhttp-parser
-PKG_VERSION:=2.8.0
-PKG_RELEASE=1
+PKG_VERSION:=2.8.1
+PKG_RELEASE:=1
PKG_MAINTAINER:=Ramanathan Sivagurunathan <ramzthecoder@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE-MIT
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=83acea397da4cdb9192c27abbd53a9eb8e5a9e1bcea2873b499f7ccc0d68f518
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=git://github.com/nodejs/http-parser.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/nodejs/http-parser/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=51615f68b8d67eadfd2482decc63b3e55d749ce0055502bbb5b0032726d22d96
+PKG_BUILD_DIR:=$(BUILD_DIR)/http-parser-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/libhttp-parser/description
A parser for HTTP messages written in C. It parses both requests and responses.
- The parser is designed to be used in performance HTTP applications.
- It does not make any syscalls nor allocations, it does not buffer data,
- it can be interrupted at anytime. Depending on your architecture,
- it only requires about 40 bytes of data per message stream
+ The parser is designed to be used in performance HTTP applications.
+ It does not make any syscalls nor allocations, it does not buffer data,
+ it can be interrupted at anytime. Depending on your architecture,
+ it only requires about 40 bytes of data per message stream
(in a web server that is per connection).
endef
define Build/Compile
- $(call Build/Compile/Default, library)
+ $(call Build/Compile/Default, library)
endef
define Build/InstallDev
include $(TOPDIR)/rules.mk
PKG_NAME:=libical
-PKG_VERSION:=1.0
+PKG_VERSION:=3.0.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=7c39b3448e4927a2de2775d853f52b3aaeb42400970a3db0b01a78987e6ec0b7
-PKG_SOURCE_URL:=@SF/freeassociation
+PKG_HASH:=72b216e10233c3f60cb06062facf41f3b0f70615e5a60b47f9853341a0d5d145
+PKG_SOURCE_URL:=https://github.com/libical/libical/releases/download/v$(PKG_VERSION)/
-PKG_LICENSE:=LGPL-2.1 MPL-1.0
+PKG_LICENSE:=LGPL-2.1 MPL-2.0
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
-
-PKG_FIXUP:=libtool
-PKG_INSTALL:=1
+PKG_MAINTAINER:=Jose Zapater <jzapater@gmail.com>
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/libical
SECTION:=libs
CATEGORY:=Libraries
- TITLE:=iCal (RFC 2445) library
- URL:=http://www.nabber.org/projects/ical/
+ TITLE:=An implementation of iCalendar protocols and data formats
+ URL:=http://libical.github.io/libical/
DEPENDS:=+libpthread
endef
define Package/libical/description
- This package provides a a read/write library of classes for object oriented
- languages (Initial goals of PHP and Python) that implement and enforce the iCal
- standard (RFC 2445).
+ Libical is an Open Source implementation of the iCalendar protocols and protocol
+ data units. The iCalendar specification describes how calendar clients can
+ communicate with calendar servers so users can store their calendar data and
+ arrange meetings with other users.
+ Libical implements RFC2445, RFC2446 and some of RFC2447.
endef
-CONFIGURE_ARGS += \
- --enable-shared \
- --enable-static \
- --disable-cxx \
- --disable-java \
- --disable-python \
+CMAKE_OPTIONS += -DWITH_CXX_BINDINGS=false -DICAL_BUILD_DOCS=false -DICAL_GLIB=false
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/{ical.h,libical} $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/include/libical
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libical/* $(1)/usr/include/libical/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libical{,ss,vcal}.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
--- /dev/null
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1cc7180..295bc20 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -161,43 +161,43 @@ endif()
+ # libicu is highly recommended for RSCALE support
+ # libicu can be found at http://www.icu-project.org
+ # RSCALE info at http://tools.ietf.org/html/rfc7529
+-find_package(ICU)
+-set_package_properties(ICU PROPERTIES
+- TYPE RECOMMENDED
+- PURPOSE "For RSCALE (RFC7529) support"
+-)
+-add_feature_info(
+- "RSCALE support (RFC7529)"
+- ICU_FOUND
+- "build in RSCALE support"
+-)
+-if(ICU_FOUND)
+- set(REQUIRES_PRIVATE_ICU "Requires.private: icu-i18n") #for libical.pc
+- set(HAVE_LIBICU 1)
+- if(ICU_MAJOR_VERSION VERSION_GREATER 50)
+- set(HAVE_ICU_DANGI TRUE)
+- else()
+- set(HAVE_ICU_DANGI FALSE)
+- endif()
+-endif()
+-if(ICU_I18N_FOUND)
+- set(HAVE_LIBICU_I18N 1)
+-endif()
++# find_package(ICU)
++# set_package_properties(ICU PROPERTIES
++# TYPE RECOMMENDED
++# PURPOSE "For RSCALE (RFC7529) support"
++# )
++# add_feature_info(
++# "RSCALE support (RFC7529)"
++# ICU_FOUND
++# "build in RSCALE support"
++# )
++# if(ICU_FOUND)
++# set(REQUIRES_PRIVATE_ICU "Requires.private: icu-i18n") #for libical.pc
++# set(HAVE_LIBICU 1)
++# if(ICU_MAJOR_VERSION VERSION_GREATER 50)
++# set(HAVE_ICU_DANGI TRUE)
++# else()
++# set(HAVE_ICU_DANGI FALSE)
++# endif()
++# endif()
++# if(ICU_I18N_FOUND)
++# set(HAVE_LIBICU_I18N 1)
++# endif()
+
+ # compile in Berkeley DB support
+-find_package(BDB)
+-set_package_properties(BDB PROPERTIES
+- TYPE OPTIONAL
+- PURPOSE "For Berkeley DB storage support"
+-)
+-add_feature_info(
+- "Berkeley DB storage support"
+- BDB_FOUND
+- "build in support for Berkeley DB storage"
+-)
+-if(BDB_FOUND)
+- set(HAVE_BDB True)
+-endif()
++# find_package(BDB)
++# set_package_properties(BDB PROPERTIES
++# TYPE OPTIONAL
++# PURPOSE "For Berkeley DB storage support"
++# )
++# add_feature_info(
++# "Berkeley DB storage support"
++# BDB_FOUND
++# "build in support for Berkeley DB storage"
++# )
++# if(BDB_FOUND)
++# set(HAVE_BDB True)
++# endif()
+
+ # MSVC specific definitions
+ if(WIN32)
include $(TOPDIR)/rules.mk
PKG_NAME:=libidn
-PKG_VERSION:=1.33
-PKG_RELEASE:=2
-
+PKG_VERSION:=1.35
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/libidn
-PKG_HASH:=44a7aab635bb721ceef6beecc4d49dfd19478325e1b47f3196f7d2acc4930e19
+PKG_HASH:=f11af1005b46b7b15d057d7f107315a1ad46935c7fcdf243c16e46ec14f0fe1e
PKG_LICENSE:=GPL-2.0+ GPL-3.0+ LGPL-2.1+ LGPL-3.0+ Apache-2.0
PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYINGv3 COPYING.LESSERv2 COPYING.LESSERv3 java/LICENSE-2.0.txt
-PKG_FIXUP:=autoreconf
-PKG_REMOVE_FILES:=GNUmakefile aclocal.m4
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=net
CATEGORY:=Network
URL:=http://www.gnu.org/software/libidn/
- MAINTAINER:=Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
endef
define Package/idn/Default/description
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
- --enable-shared \
- --enable-static \
-
-MAKE_FLAGS += \
- CC="$(TARGET_CC)" \
+ --disable-rpath \
+ --disable-doc
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -16,7 +16,7 @@
- # You should have received a copy of the GNU General Public License
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
-
--SUBDIRS = gl lib/gl lib po src doc gltests lib/gltests tests examples \
-+SUBDIRS = gl lib/gl lib src \
- java csharp
-
- EXTRA_DIST = cfg.mk maint.mk .clcopying
---- a/configure.ac
-+++ b/configure.ac
-@@ -47,8 +47,6 @@ LT_INIT([win32-dll])
- # Checks for programs.
- AM_MISSING_PROG(PERL, perl, $missing_dir)
- AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
--AM_GNU_GETTEXT(external)
--AM_GNU_GETTEXT_VERSION(0.19.3)
- AM_ICONV
- AM_PATH_LISPDIR
-
--- /dev/null
+#
+# Copyright (C) 2017-2018 Daniel Engberg <daniel.engberg.lists@pyret.net>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libidn2
+PKG_VERSION:=2.0.5
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+PKG_LICENSE:=GPL-2.0-or-later LGPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYING.LESSERv3
+
+PKG_SOURCE_URL:=@GNU/libidn
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=53f69170886f1fa6fa5b332439c7a77a7d22626a82ef17e2c1224858bb4ca2b8
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/idn2/Default
+ SECTION:=net
+ CATEGORY:=Network
+ URL:=http://www.gnu.org/software/libidn/
+endef
+
+define Package/idn2/Default/description
+ Libidn2 is a free software implementation of IDNA2008,
+ Punycode and TR46 in library form. It contains
+ functionality to convert internationalized domain
+ names to and from ASCII Compatible Encoding (ACE),
+ following the IDNA2008 and TR46 standards.
+endef
+
+define Package/idn2
+ $(call Package/idn2/Default)
+ SUBMENU:=IP Addresses and Names
+ TITLE:=GNU IDN2 (Internationalized Domain Name) tool
+ DEPENDS:=+libidn2
+endef
+
+define Package/idn2/description
+$(call Package/idn2/Default/description)
+
+ Command line tool using libidn2
+
+endef
+
+define Package/libidn2
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+libunistring $(ICONV_DEPENDS) $(INTL_DEPENDS)
+ TITLE:=International domain name library (IDNA2008, Punycode and TR46)
+ URL:=https://www.gnu.org/software/libidn/#libidn2
+endef
+
+define Package/libidn2/description
+$(call Package/idn2/Default/description)
+
+ Library only package
+
+endef
+
+CONFIGURE_ARGS += \
+ --disable-rpath \
+ --disable-doc
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/idn2.h $(1)/usr/include
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libidn2.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/idn2/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+endef
+
+define Package/libidn2/install
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,idn2))
+$(eval $(call BuildPackage,libidn2))
include $(TOPDIR)/rules.mk
PKG_NAME:=libiio
-PKG_VERSION:=0.14
-PKG_RELEASE:=2
+PKG_VERSION:=0.15
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/analogdevicesinc/libiio/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=12063db7a9366aa00bfd789db30afaddb29686bc29b3ce1e5d4adfe1c3b42527
+PKG_HASH:=a729f8ff48137ad271a3e2951f322b35c1bf2ec075b488d75c8bd071c693fd19
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING.txt
TITLE:=Library for interfacing with Linux IIO devices
URL:=https://github.com/analogdevicesinc/libiio
DEPENDS:=\
+ +zlib \
+LIBIIO_USB_BACKEND:libusb-1.0 \
+LIBIIO_NETWORK_BACKEND:libavahi-client \
+LIBIIO_XML_BACKEND:libxml2
include $(TOPDIR)/rules.mk
PKG_NAME:=liblo
-PKG_VERSION:=0.28
+PKG_VERSION:=0.29
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/liblo
-PKG_HASH:=da94a9b67b93625354dd89ff7fe31e5297fc9400b6eaf7378c82ee1caf7db909
+PKG_HASH:=ace1b4e234091425c150261d1ca7070cece48ee3c228a5612d048116d864c06a
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=libmpdclient
-PKG_VERSION:=2.11
+PKG_VERSION:=2.14
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=15fe693893c0d7ea3f4c35c4016fbd0332836164178b20983eec9b470846baf6
-PKG_SOURCE_URL:=http://www.musicpd.org/download/libmpdclient/2/
-PGK_HASH:=15fe693893c0d7ea3f4c35c4016fbd0332836164178b20983eec9b470846baf6
+PKG_HASH:=0a84e2791bfe3077cf22ee1784c805d5bb550803dffe56a39aa3690a38061372
+PKG_SOURCE_URL:=https://www.musicpd.org/download/libmpdclient/2/
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
+PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
A stable, documented, asynchronous API library for interfacing MPD in the C, C++ & Objective C languages.
endef
-TARGET_CFLAGS+="-std=gnu99"
+CONFIGURE_ARGS+= --disable-documentation
-define Build/Configure
- $(call Build/Configure/Default, \
- --disable-documentation \
- )
+# Newer sources require meson/ninja to build so...
+# Use our hacked-up version of the libmpdclient v2.11 autotools.
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ $(CP) ./autotools-files/* $(PKG_BUILD_DIR)/
endef
define Build/InstallDev
--- /dev/null
+ACLOCAL_AMFLAGS = -I m4
+AUTOMAKE_OPTIONS = foreign 1.11 dist-xz subdir-objects
+
+mpdincludedir = $(includedir)/mpd
+mpdinclude_HEADERS = \
+ include/mpd/async.h \
+ include/mpd/audio_format.h \
+ include/mpd/client.h \
+ include/mpd/capabilities.h \
+ include/mpd/compiler.h \
+ include/mpd/connection.h \
+ include/mpd/database.h \
+ include/mpd/directory.h \
+ include/mpd/entity.h \
+ include/mpd/error.h \
+ include/mpd/idle.h \
+ include/mpd/list.h \
+ include/mpd/mixer.h \
+ include/mpd/parser.h \
+ include/mpd/password.h \
+ include/mpd/player.h \
+ include/mpd/playlist.h \
+ include/mpd/protocol.h \
+ include/mpd/queue.h \
+ include/mpd/recv.h \
+ include/mpd/response.h \
+ include/mpd/send.h \
+ include/mpd/status.h \
+ include/mpd/stats.h \
+ include/mpd/tag.h \
+ include/mpd/output.h \
+ include/mpd/pair.h \
+ include/mpd/search.h \
+ include/mpd/socket.h \
+ include/mpd/song.h \
+ include/mpd/sticker.h \
+ include/mpd/settings.h \
+ include/mpd/message.h \
+ include/mpd/version.h
+
+AM_CPPFLAGS += -I$(srcdir)/include -Iinclude
+
+lib_LTLIBRARIES = src/libmpdclient.la
+
+src_libmpdclient_la_SOURCES = \
+ src/async.c src/iasync.h \
+ src/buffer.h \
+ src/internal.h \
+ src/ierror.c src/ierror.h \
+ src/resolver.c src/resolver.h \
+ src/capabilities.c \
+ src/connection.c \
+ src/database.c \
+ src/directory.c \
+ src/rdirectory.c \
+ src/error.c \
+ src/fd_util.c src/fd_util.h \
+ src/output.c \
+ src/coutput.c \
+ src/entity.c \
+ src/idle.c \
+ src/iso8601.h \
+ src/iso8601.c \
+ src/kvlist.c \
+ src/list.c \
+ src/mixer.c \
+ src/parser.c \
+ src/password.c \
+ src/player.c \
+ src/playlist.c \
+ src/rplaylist.c \
+ src/cplaylist.c \
+ src/queue.c \
+ src/quote.c src/quote.h \
+ src/recv.c \
+ src/response.c \
+ src/run.c src/run.h \
+ src/search.c \
+ src/send.c src/isend.h \
+ src/socket.c src/socket.h \
+ src/song.c \
+ src/status.c \
+ src/cstatus.c \
+ src/stats.c \
+ src/cstats.c \
+ src/sync.c src/sync.h \
+ src/tag.c \
+ src/sticker.c \
+ src/settings.c \
+ src/message.c \
+ src/cmessage.c \
+ src/uri.h
+
+src_libmpdclient_la_LDFLAGS = -version-info @LIBMPDCLIENT_LIBTOOL_VERSION@ \
+ -no-undefined
+
+if HAVE_GNU_LD
+src_libmpdclient_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libmpdclient.ld
+endif
+
+#
+# Installation
+#
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libmpdclient.pc
+
+#
+# Distribution
+#
+
+EXTRA_DIST = \
+ libmpdclient.ld \
+ libmpdclient.pc.in
--- /dev/null
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Default MPD host */
+#undef DEFAULT_HOST
+
+/* Default MPD port */
+#undef DEFAULT_PORT
+
+/* Default UNIX socket path */
+#undef DEFAULT_SOCKET
+
+/* Define to enable TCP support */
+#undef ENABLE_TCP
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
--- /dev/null
+AC_PREREQ(2.60)
+AC_INIT(libmpdclient, 2.14, musicpd-dev-team@lists.sourceforge.net)
+AC_CONFIG_SRCDIR([src/connection.c])
+AC_CONFIG_AUX_DIR(build)
+AM_INIT_AUTOMAKE([foreign 1.11 dist-xz subdir-objects silent-rules])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_SUBST(MAJOR_VERSION,2)
+AC_SUBST(MINOR_VERSION,14)
+AC_SUBST(PATCH_VERSION,0)
+
+LIBMPDCLIENT_LIBTOOL_VERSION=2:14:0
+AC_SUBST(LIBMPDCLIENT_LIBTOOL_VERSION)
+
+# Remove the check for c++ and fortran compiler
+m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])
+m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
+
+dnl Check for programs
+AC_PROG_CC_C99
+AC_PROG_INSTALL
+
+AC_PROG_LD
+AM_CONDITIONAL(HAVE_GNU_LD, test x$with_gnu_ld = xyes)
+
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+
+
+dnl
+dnl initialize variables
+dnl
+
+set -- $CFLAGS
+
+
+dnl
+dnl OS specific defaults
+dnl
+
+AC_CANONICAL_HOST
+
+case "$host_os" in
+mingw32* | windows*)
+ LIBS="$LIBS -lws2_32"
+ ;;
+esac
+
+
+dnl
+dnl Check for libraries
+dnl
+
+AC_SEARCH_LIBS([socket], [network socket])
+
+
+dnl
+dnl build options
+dnl
+
+AC_ARG_ENABLE(documentation,
+ AS_HELP_STRING([--disable-documentation],
+ [Disable API doc generation @<:@default=enabled@:>@]),,
+ [enable_documentation=yes])
+
+if test "x$enable_documentation" = xyes; then
+ AC_PATH_PROG(DOXYGEN, doxygen)
+ if test x$DOXYGEN = x; then
+ AC_MSG_ERROR([doxygen not found])
+ fi
+
+ AC_SUBST(DOXYGEN)
+fi
+AM_CONDITIONAL(DOXYGEN, test x$enable_documentation = xyes)
+
+AC_ARG_ENABLE(tcp,
+ AS_HELP_STRING([--disable-tcp],
+ [Disable TCP support @<:@default=enabled@:>@]),,
+ [enable_tcp=yes])
+if test "x$enable_tcp" = xyes; then
+ AC_DEFINE([ENABLE_TCP], 1, [Define to enable TCP support])
+ AC_SEARCH_LIBS([gethostbyname], [nsl])
+ AC_CHECK_FUNCS([getaddrinfo])
+ AC_CHECK_FUNCS([strndup])
+fi
+
+AC_ARG_ENABLE(werror,
+ AS_HELP_STRING([--enable-werror],
+ [Treat warnings as errors @<:@default=disabled@:>@]),
+ enable_werror=no)
+
+if test "x$enable_werror" = xyes; then
+ AM_CFLAGS="$AM_CFLAGS -Werror -pedantic-errors"
+fi
+
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug],
+ [Enable debugging @<:@default=disabled@:>@]),
+ enable_debug=no)
+
+if test "x$enable_debug" = xno; then
+ AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
+fi
+
+
+dnl
+dnl CFLAGS
+dnl
+
+AC_SUBST(AM_CFLAGS)
+AC_SUBST(AM_CPPFLAGS)
+
+WANTED_CFLAGS="-Wall -W -Wextra -Wno-deprecated-declarations -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wcast-qual -Wwrite-strings"
+for flag in $WANTED_CFLAGS ; do
+ AX_CHECK_COMPILER_FLAGS([$flag], [CFLAGS="$CFLAGS $flag"],)
+done
+
+dnl
+dnl Compile-time options
+dnl
+
+AC_ARG_WITH([default-socket],
+ AC_HELP_STRING([--with-default-socket=PATH],
+ [default path of the socket file @<:@/var/run/mpd/socket@:>@]),,
+ [with_default_socket=auto])
+
+if test x$with_default_socket = xauto; then
+ case "$host_os" in
+ mingw32* | windows*)
+ # no UNIX domain sockets on WIN32
+ with_default_socket=no
+ ;;
+ *)
+ with_default_socket=/var/run/mpd/socket
+ ;;
+ esac
+fi
+
+if test x$with_default_socket != xno; then
+ AC_DEFINE_UNQUOTED([DEFAULT_SOCKET], ["$with_default_socket"],
+ [Default UNIX socket path])
+fi
+
+AC_ARG_WITH([default-host],
+ AC_HELP_STRING([--with-default-host=ARG],
+ [default MPD host @<:@localhost@:>@]),,
+ [with_default_host=localhost])
+AC_DEFINE_UNQUOTED([DEFAULT_HOST], ["$with_default_host"], [Default MPD host])
+
+AC_ARG_WITH([default-port],
+ AC_HELP_STRING([--with-default-port=ARG],
+ [default MPD port @<:@6600@:>@]),,
+ [with_default_port=6600])
+AC_DEFINE_UNQUOTED([DEFAULT_PORT], [$with_default_port], [Default MPD port])
+
+
+dnl
+dnl Done
+dnl
+
+AC_OUTPUT([Makefile include/mpd/version.h libmpdclient.pc doc/doxygen.conf])
--- /dev/null
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libmpdclient
+Description: Music Player Daemon client library
+Version: @VERSION@
+Libs: -L${libdir} -lmpdclient
+Cflags: -I${includedir}
--- /dev/null
+# ===========================================================================
+# http://www.nongnu.org/autoconf-archive/ax_check_compiler_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
+#
+# DESCRIPTION
+#
+# Check whether the given compiler FLAGS work with the current language's
+# compiler, or whether they give an error. (Warnings, however, are
+# ignored.)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# LICENSE
+#
+# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2009 Matteo Frigo
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
+[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
+AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
+AS_LITERAL_IF([$1],
+ [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]), [
+ ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
+ AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
+ _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
+ [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
+ eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
+ _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
+eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])
+AC_MSG_RESULT($ax_check_compiler_flags)
+if test "x$ax_check_compiler_flags" = xyes; then
+ m4_default([$2], :)
+else
+ m4_default([$3], :)
+fi
+])dnl AX_CHECK_COMPILER_FLAGS
include $(TOPDIR)/rules.mk
PKG_NAME:=libmraa
-PKG_VERSION:=0.8.0
+PKG_VERSION:=0.9.0
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/intel-iot-devkit/mraa.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=70600dece4138b0c0dbaff42f57828f1559cd840
+PKG_SOURCE_VERSION:=049ba5fa9f2d18ac0ec6729c46916b34998d3c5f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=9cbda58e7c7790db3d62cee62f399975effcdc2d9688d3d6bb2b4a86748faff9
+PKG_MIRROR_HASH:=0c81cff6dcfe401ead0d8976c6f9a6a86b75ab38413a45a40b7eb20b639d78e4
PKG_BUILD_DEPENDS:=node python/host swig/host node/host
CMAKE_INSTALL:=1
-From 6fecad819376442d057bdd35a0909cfac9df02f5 Mon Sep 17 00:00:00 2001
-From: John Crispin <blogic@openwrt.org>
-Date: Thu, 23 Jul 2015 12:18:39 +0200
-Subject: [PATCH 1/4] base
-
----
CMakeLists.txt | 10 ++++------
api/mraa/types.h | 1 +
include/mraa_internal.h | 7 +++++++
# Make a version file containing the current version from git.
-include (GetGitRevisionDescription)
-git_describe (VERSION "--tags")
--if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_HEAD-HASH-NOTFOUND")
+-if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_HEAD-HASH-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_-128-NOTFOUND")
- message (WARNING " - Install git to compile a production libmraa!")
-- set (VERSION "v0.8.0-dirty")
+- set (VERSION "v0.8.1-dirty")
-endif ()
-+set (VERSION "v0.8.0")
++set (VERSION "v0.9.0")
message (INFO " - libmraa Version ${VERSION}")
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://sourceforge.net/projects/libnet-dev/files/
+PKG_SOURCE_URL:=@SF/libnet-dev
PKG_HASH:=72c380785ad44183005e654b47cc12485ee0228d7fa6b0a87109ff7614be4a63
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_LICENSE:=GPL-2.0
include $(TOPDIR)/rules.mk
PKG_NAME:=libnetconf2
+PKG_VERSION:=0.12-r1
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-PKG_VERSION:=0.10.17
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/CESNET/libnetconf2/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=86269d3f1bc85bb17d8823d214f9a676ee3b14ee18a0b87a230380df8503e8f5
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=bd93b091d6e4414283c6c764dc451aee61e09997
-PKG_MIRROR_HASH:=499847be79d202cb0c933aad8133a38ebca7099344a1194404e488aa4d10ff08
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/cesnet/libnetconf2/
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
-
-PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
+CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-CMAKE_INSTALL:=1
-
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CATEGORY:=Libraries
TITLE:=NETCONF library
URL:=$(PKG_SOURCE_URL)
- DEPENDS:= +libyang +libssh +libopenssl
+ DEPENDS:= +libyang +libssh +libopenssl +libpthread
endef
define Package/libnetconf2/description
--- /dev/null
+Index: libnetconf2-0.12-r1/CMakeLists.txt
+===================================================================
+--- libnetconf2-0.12-r1.orig/CMakeLists.txt
++++ libnetconf2-0.12-r1/CMakeLists.txt
+@@ -172,8 +172,10 @@ target_link_libraries(netconf2 ${CMAKE_T
+
+ # check availability for some pthread functions
+ set(CMAKE_REQUIRED_LIBRARIES pthread)
++include(CheckFunctionExists)
+ check_function_exists(pthread_spin_lock HAVE_SPINLOCK)
+ check_function_exists(pthread_mutex_timedlock HAVE_PTHREAD_MUTEX_TIMEDLOCK)
++check_function_exists(pthread_rwlockattr_setkind_np HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)
+
+ # dependencies - openssl
+ if(ENABLE_TLS OR ENABLE_DNSSEC OR ENABLE_SSH)
+Index: libnetconf2-0.12-r1/src/config.h.in
+===================================================================
+--- libnetconf2-0.12-r1.orig/src/config.h.in
++++ libnetconf2-0.12-r1/src/config.h.in
+@@ -65,4 +65,7 @@
+ */
+ #define NC_PS_QUEUE_SIZE @MAX_PSPOLL_THREAD_COUNT@
+
++/* Portability feature-check macros. */
++#cmakedefine HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP
++
+ #endif /* NC_CONFIG_H_ */
+Index: libnetconf2-0.12-r1/src/session_server.c
+===================================================================
+--- libnetconf2-0.12-r1.orig/src/session_server.c
++++ libnetconf2-0.12-r1/src/session_server.c
+@@ -520,6 +520,7 @@ nc_server_init(struct ly_ctx *ctx)
+ errno=0;
+
+ if (pthread_rwlockattr_init(&attr) == 0) {
++#if defined(HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)
+ if (pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) == 0) {
+ if (pthread_rwlock_init(&server_opts.endpt_lock, &attr) != 0) {
+ ERR("%s: failed to init rwlock(%s).", __FUNCTION__, strerror(errno));
+@@ -530,6 +531,7 @@ nc_server_init(struct ly_ctx *ctx)
+ } else {
+ ERR("%s: failed set attribute (%s).", __FUNCTION__, strerror(errno));
+ }
++#endif
+ pthread_rwlockattr_destroy(&attr);
+ } else {
+ ERR("%s: failed init attribute (%s).", __FUNCTION__, strerror(errno));
include $(TOPDIR)/rules.mk
PKG_NAME:=libnetfilter_acct
-PKG_VERSION:=1.0.2
+PKG_VERSION:=1.0.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:= \
- http://www.netfilter.org/projects/libnetfilter_acct/files/ \
- ftp://ftp.netfilter.org/pub/libnetfilter_acct/ \
- http://mirrors.evolva.ro/netfilter.org/libnetfilter_acct/
-PKG_HASH:=0128f19c3419fbd84f7e6d46b13a33ef7bda9b9f5e493bc5ae1882d087514b71
+PKG_SOURCE_URL:=https://netfilter.org/projects/libnetfilter_acct/files
+PKG_HASH:=4250ceef3efe2034f4ac05906c3ee427db31b9b0a2df41b2744f4bf79a959a1a
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=nopoll
-PKG_VERSION:=0.4.2
-PKG_RELEASE:=2
+PKG_VERSION:=0.4.6
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ASPLes/nopoll.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=60a81fbd199551ac5dd017b9a44fb46e8530680b
+PKG_SOURCE_VERSION:=5cf7c10c3b0b758ad254504bf0ae7e600b118528
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=ce67b91ea54dda6678321e05a3e584648032a31323409a76df5dd60e7bfd17de
+PKG_MIRROR_HASH:=fae82c7c711520be07ed4e9828724d0a8ee5de7d7b4395e4ac9f72da25fcc524
PKG_MAINTAINER:=John Clark <inindev@gmail.com>
+++ /dev/null
-From 675ac7b4b64d398de8a61e9c713383b8c0d9071f Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <f.fainelli@gmail.com>
-Date: Tue, 20 Jun 2017 20:06:36 -0700
-Subject: [PATCH] nopoll: * [fix] Avoid clashes with isset() from sys/param.h
-
----
- src/nopoll_io.c | 4 ++--
- src/nopoll_loop.c | 4 ++--
- src/nopoll_private.h | 4 ++--
- 3 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/src/nopoll_io.c b/src/nopoll_io.c
-index 036aa2c1c685..b3e48c2385d0 100644
---- a/src/nopoll_io.c
-+++ b/src/nopoll_io.c
-@@ -204,8 +204,8 @@ noPollIoEngine * nopoll_io_get_engine (noPollCtx * ctx, noPollIoEngineType engin
- engine->destroy = nopoll_io_wait_select_destroy;
- engine->clear = nopoll_io_wait_select_clear;
- engine->wait = nopoll_io_wait_select_wait;
-- engine->addto = nopoll_io_wait_select_add_to;
-- engine->isset = nopoll_io_wait_select_is_set;
-+ engine->add_to = nopoll_io_wait_select_add_to;
-+ engine->is_set = nopoll_io_wait_select_is_set;
-
- /* call to create the object */
- engine->ctx = ctx;
-diff --git a/src/nopoll_loop.c b/src/nopoll_loop.c
-index f58b8133b79a..60112f8dbf58 100644
---- a/src/nopoll_loop.c
-+++ b/src/nopoll_loop.c
-@@ -64,7 +64,7 @@ nopoll_bool nopoll_loop_register (noPollCtx * ctx, noPollConn * conn, noPollPtr
-
- /* register the connection socket */
- /* nopoll_log (ctx, NOPOLL_LEVEL_DEBUG, "Adding socket id: %d", conn->session);*/
-- if (! ctx->io_engine->addto (conn->session, ctx, conn, ctx->io_engine->io_object)) {
-+ if (! ctx->io_engine->add_to (conn->session, ctx, conn, ctx->io_engine->io_object)) {
-
- /* remove this connection from registry */
- nopoll_ctx_unregister_conn (ctx, conn);
-@@ -109,7 +109,7 @@ nopoll_bool nopoll_loop_process (noPollCtx * ctx, noPollConn * conn, noPollPtr u
- int * conn_changed = (int *) user_data;
-
- /* check if the connection have something to notify */
-- if (ctx->io_engine->isset (ctx, conn->session, ctx->io_engine->io_object)) {
-+ if (ctx->io_engine->is_set (ctx, conn->session, ctx->io_engine->io_object)) {
-
- /* call to notify action according to role */
- switch (conn->role) {
-diff --git a/src/nopoll_private.h b/src/nopoll_private.h
-index 82fd27bb7fba..cd895d1e3ffd 100644
---- a/src/nopoll_private.h
-+++ b/src/nopoll_private.h
-@@ -340,8 +340,8 @@ struct _noPollIoEngine {
- noPollIoMechDestroy destroy;
- noPollIoMechClear clear;
- noPollIoMechWait wait;
-- noPollIoMechAddTo addto;
-- noPollIoMechIsSet isset;
-+ noPollIoMechAddTo add_to;
-+ noPollIoMechIsSet is_set;
- };
-
- struct _noPollMsg {
---
-2.11.0
-
include $(TOPDIR)/rules.mk
PKG_NAME:=libogg
-PKG_VERSION:=1.3.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.3.3
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://downloads.xiph.org/releases/ogg/
-PKG_HASH:=3f687ccdd5ac8b52d76328fbbfebc70c459a40ea891dbf3dccb74a210826e79b
+PKG_SOURCE_URL:=https://downloads.xiph.org/releases/ogg/
+PKG_HASH:=4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=BSD-3-Clause
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libpbc
+PKG_VERSION:=0.5.14
+PKG_RELEASE:=1
+PKG_HASH:=772527404117587560080241cedaf441e5cac3269009cdde4c588a1dce4c23d2
+
+PKG_SOURCE:=pbc-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://crypto.stanford.edu/pbc/files/
+PKG_BUILD_DIR:=$(BUILD_DIR)/pbc-$(PKG_VERSION)
+PKG_INSTALL:=1
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_LICENSE:=LGPL-3.0+
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libpbc
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=The Pairing-Based Cryptography Library
+ URL:=https://crypto.stanford.edu/pbc/
+ DEPENDS:=+libgmp
+endef
+
+define Package/libpbc/description
+ Pairing-based cryptography is a relatively young area of cryptography
+ that revolves around a certain function with special properties.
+
+ The PBC (Pairing-Based Cryptography) library is a free C library
+ (released under the GNU Lesser General Public License) built on the GMP
+ library that performs the mathematical operations underlying
+ pairing-based cryptosystems.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/pbc
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/pbc/*.h $(1)/usr/include/pbc
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpbc* $(1)/usr/lib/
+endef
+
+define Package/libpbc/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpbc.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libpbc))
--- /dev/null
+#
+# Copyright (C) 2017 Banglang Huang
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libpfring
+PKG_VERSION:=7.2.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
+
+PKG_LICENSE:=LGPL-2.1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=5d349ac37a6ece5966bf606a6f131d628b98d88654c2f502d3c4b8bbf6ef9796
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/PF_RING-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+PKG_FIXUP:=patch-libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_PATH:=userland
+MAKE_PATH:=userland/lib
+
+define Package/libpfring
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Library for PR_RING (package process framework)
+ URL:=https://github.com/ntop/pf_ring
+ DEPENDS:=+kmod-pf-ring +libpcap +libpthread
+endef
+
+define Package/libpfring/description
+ PF_RING is a high speed packet capture library that turns a commodity PC into an efficient and cheap
+ network measurement box suitable for both packet and active traffic analysis and manipulation.
+ Moreover, PF_RING opens totally new markets as it enables the creation of efficient application such as
+ traffic balancers or packet filters in a matter of lines of codes.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/* \
+ $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/libpfring.so* \
+ $(1)/usr/lib/
+endef
+
+CONFIGURE_VARS += \
+ MACHINE="$(ARCH)" \
+ ac_cv_lib_nl_3_nl_socket_alloc=no
+
+define Package/libpfring/install
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/libpfring.so* \
+ $(1)/usr/lib/
+ $(LN) libpfring.so $(1)/usr/lib/libpfring.so.1
+endef
+
+$(eval $(call BuildPackage,libpfring))
--- /dev/null
+--- a/userland/configure
++++ b/userland/configure
+@@ -3745,12 +3745,6 @@ fi
+ if test "$IS_FREEBSD" != "1"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if r/w locks are supported" >&5
+ $as_echo_n "checking if r/w locks are supported... " >&6; }
+- if test "$cross_compiling" = yes; then :
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5; }
+-else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -3763,7 +3757,7 @@ else
+
+
+ _ACEOF
+-if ac_fn_c_try_run "$LINENO"; then :
++if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ cat >>confdefs.h <<_ACEOF
+@@ -3777,7 +3771,6 @@ $as_echo "no" >&6; }
+ fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+-fi
+
+ fi
+
--- /dev/null
+--- a/userland/configure
++++ b/userland/configure
+@@ -3296,14 +3296,16 @@ fi
+ done
+
+
+-MACHINE=`uname -m`
++if test -z "$MACHINE"; then
++ MACHINE=`uname -m`
++fi
+ CFLAGS=""
+ SYS_LIBS=""
+
+ VER=`cat ../kernel/linux/pf_ring.h | grep RING_VERSION | head -1 | cut -d '"' -f 2`
+ MAJOR_VER=`cat ../kernel/linux/pf_ring.h | grep RING_VERSION | head -1 | cut -d '"' -f 2 | cut -d '.' -f 1`
+
+-NATIVE=`$CC -c -Q -march=native --help=target| grep "march" | xargs | cut -d ' ' -f 2`
++NATIVE=`$CC -c -Q --help=target| grep "march" | xargs | cut -d ' ' -f 2`
+ if test -f "lib/libs/libpfring_zc_x86_64_$NATIVE.a"; then
+ CFLAGS="-march=native -mtune=native $CFLAGS"
+ LIBARCH="_$NATIVE"
--- /dev/null
+--- a/userland/lib/pfring_mod.c
++++ b/userland/lib/pfring_mod.c
+@@ -24,6 +24,7 @@
+ #include <ifaddrs.h>
+
+ #ifdef ENABLE_BPF
++#include <string.h>
+ #include <pcap/pcap.h>
+ #include <pcap/bpf.h>
+ #include <pcap-int.h>
include $(TOPDIR)/rules.mk
PKG_NAME:=libpng
-PKG_VERSION:=1.6.34
+PKG_VERSION:=1.6.35
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/libpng
-PKG_HASH:=2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6
+PKG_HASH:=23912ec8c9584917ed9b09c5023465d71709dce089be503c7867fec68a93bcd7
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause
PKC_LICENSE_FILES:=LICENSE contrib/gregbook/COPYING contrib/gregbook/LICENSE
+PKG_CPE_ID:=cpe:/a:libpng:libpng
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
--- /dev/null
+#
+# Copyright (C) 2007-2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libpsl
+PKG_VERSION:=0.20.2
+PKG_RELEASE:=2
+
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/rockdaboot/libpsl/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
+PKG_HASH:=f8fd0aeb66252dfcc638f14d9be1e2362fdaf2ca86bde0444ff4d5cc961b560f
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libpsl
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=C library to handle the Public Suffix List
+ URL:=https://github.com/rockdaboot/libpsl
+ DEPENDS:=+libidn2 +libunistring
+endef
+
+define Package/libpsl/description
+ C library to handle the Public Suffix List
+endef
+
+CONFIGURE_ARGS += \
+ --disable-gtk-doc-html \
+ --disable-man \
+ --disable-rpath
+
+define Build/InstallDev
+ $(INSTALL_DIR) \
+ $(1)/usr/lib \
+ $(1)/usr/include
+
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/* \
+ $(1)/usr/include/
+
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/* \
+ $(1)/usr/lib/
+endef
+
+define Package/libpsl/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/*.so* \
+ $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libpsl))
include $(TOPDIR)/rules.mk
PKG_NAME:=libradcli
-PKG_VERSION:=1.2.5
+PKG_VERSION:=1.2.10
PKG_RELEASE:=1
PKG_SOURCE:=radcli-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/radcli/radcli/releases/download/$(PKG_VERSION)/
-PKG_HASH:=be7551bcf0c210b8efffe4d2952d61feb8591edc922660910488bfaab040e82c
+PKG_SOURCE_URL:=https://github.com/radcli/radcli/releases/download/$(PKG_VERSION)
+PKG_HASH:=03e1962ef8d3652b41042b89604227110015f27d0334867b81a5fc6685930001
PKG_BUILD_DIR:=$(BUILD_DIR)/radcli-$(PKG_VERSION)
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A library for radius clients
- URL:=http://radcli.github.io/radcli/
+ URL:=https://radcli.github.io/radcli
MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
DEPENDS:= +RADCLI_TLS:libgnutls +libnettle
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=libsamplerate
-PKG_VERSION:=0.1.8
+PKG_VERSION:=0.1.9
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.mega-nerd.com/SRC/
-PKG_HASH:=93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06
+PKG_HASH:=0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
include $(TOPDIR)/rules.mk
PKG_NAME:=libsearpc
-PKG_VERSION:=6.2.2
+PKG_VERSION:=3.0.8
PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
PKG_LICENSE:=GPL-3.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/haiwen/libsearpc.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=8998e7b2c5587f0b94c48db24e2952d08def5add
+PKG_SOURCE_VERSION:=12a01268825e9c7e17794c58c367e3b4db912ad9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=207baa1fc63a60c117cf4985b60a18212b151fa070f208621633c3b53ab679bf
+PKG_MIRROR_HASH:=8ca4785c4d276afeac212a26a143b22e45b85cf196c1218e4630f6072a33f430
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=libseccomp
-PKG_VERSION:=2.2.1
+PKG_VERSION:=2.3.3
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/
-PKG_HASH:=0ba1789f54786c644af54cdffc9fd0dd0a8bb2b2ee153933f658855d2851a740
+PKG_HASH:=7fc28f4294cc72e61c529bedf97e705c3acf9c479a8f1a3028d4cd2ca9f3b155
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_LIBTOOL_PATHS:=. lib
-PKG_CHECK_FORMAT_SECURITY:=0
PKG_CONFIG_DEPENDS:= \
CONFIG_KERNEL_SECCOMP
+++ /dev/null
-Index: libseccomp-2.2.1/src/system.h
-===================================================================
---- libseccomp-2.2.1.orig/src/system.h
-+++ libseccomp-2.2.1/src/system.h
-@@ -23,7 +23,9 @@
- #define _SYSTEM_H
-
- #include <linux/filter.h>
-+#ifdef __GLIBC__
- #include <linux/prctl.h>
-+#endif
-
- #include "configure.h"
-
PKG_NAME:=libshout
PKG_VERSION:=2.4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
--- /dev/null
+diff --git a/src/tls.c b/src/tls.c
+index 4562c73..f946946 100644
+--- a/src/tls.c
++++ b/src/tls.c
+@@ -63,12 +63,16 @@ static inline int tls_setup(shout_tls_t *tls)
+ {
+ SSL_METHOD *meth;
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
+ SSL_load_error_strings();
+ SSLeay_add_all_algorithms();
+ SSLeay_add_ssl_algorithms();
+
+ meth = TLSv1_client_method();
++#else
++ meth = TLS_client_method();
++#endif
+ if (!meth)
+ goto error;
+
TITLE:=Library for reading/writing audio files
URL:=http://www.mega-nerd.com/libsndfile/
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
- DEPENDS:=@!avr32
endef
define Package/libsndfile/description
include $(TOPDIR)/rules.mk
PKG_NAME:=libsoc
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/jackmitch/libsoc.git
+PKG_MIRROR_HASH:=bdfaace3d59da30c4aa5ef78b5e235b5e9c41cd56867e04cb0acefc4dcd62d33
PKG_SOURCE_DATE:=2016-12-22
PKG_SOURCE_VERSION:=5b788d4d558a78c52e6cfe97325e4564b307a3a0
--enable-static \
--disable-cxx
-MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS)" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all install
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_board.h $(1)/usr/include/
include $(TOPDIR)/rules.mk
PKG_NAME:=libsoup
-PKG_VERSION:=2.60.3
+PKG_VERSION:=2.63.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.60
-PKG_HASH:=1b0dc762f23abe4e0d29b77370e539fd35f31d8e8e0318d6ddccff395be68a22
+PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.63
+PKG_HASH:=3931f8ae282f010fa0d6c31841751d7c4bff72f116d13f34a5bf98a96550a4f9
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
TITLE:=libsoup
URL:=http://live.gnome.org/LibSoup
MAINTAINER:=W. Michael Petullo <mike@flyn.org>
- DEPENDS:=+glib2 +libxml2 +libgnutls +libsqlite3 $(ICONV_DEPENDS) $(INTL_DEPENDS)
+ DEPENDS:=+glib2 +libxml2 +libgnutls +libsqlite3 +libpsl $(ICONV_DEPENDS) $(INTL_DEPENDS)
endef
define Build/Configure
PKG_NAME:=libssh
PKG_VERSION:=0.7.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://red.libssh.org/attachments/download/218/
--- /dev/null
+--- a/src/libcrypto.c
++++ b/src/libcrypto.c
+@@ -43,10 +43,12 @@
+ #include <openssl/hmac.h>
+ #include <openssl/opensslv.h>
+ #include <openssl/rand.h>
++#include "libcrypto-compat.h"
+
+ #ifdef HAVE_OPENSSL_AES_H
+ #define HAS_AES
+ #include <openssl/aes.h>
++#include <openssl/modes.h>
+ #endif
+ #ifdef HAVE_OPENSSL_BLOWFISH_H
+ #define HAS_BLOWFISH
+@@ -133,18 +135,20 @@ static const EVP_MD *nid_to_evpmd(int ni
+ void evp(int nid, unsigned char *digest, int len, unsigned char *hash, unsigned int *hlen)
+ {
+ const EVP_MD *evp_md = nid_to_evpmd(nid);
+- EVP_MD_CTX md;
++ EVP_MD_CTX *md;
+
+- EVP_DigestInit(&md, evp_md);
+- EVP_DigestUpdate(&md, digest, len);
+- EVP_DigestFinal(&md, hash, hlen);
++ md = EVP_MD_CTX_new();
++ EVP_DigestInit(md, evp_md);
++ EVP_DigestUpdate(md, digest, len);
++ EVP_DigestFinal(md, hash, hlen);
++ EVP_MD_CTX_free(md);
+ }
+
+ EVPCTX evp_init(int nid)
+ {
+ const EVP_MD *evp_md = nid_to_evpmd(nid);
+
+- EVPCTX ctx = malloc(sizeof(EVP_MD_CTX));
++ EVPCTX ctx = EVP_MD_CTX_new();
+ if (ctx == NULL) {
+ return NULL;
+ }
+@@ -322,32 +326,33 @@ void ssh_mac_final(unsigned char *md, ss
+ HMACCTX hmac_init(const void *key, int len, enum ssh_hmac_e type) {
+ HMACCTX ctx = NULL;
+
+- ctx = malloc(sizeof(*ctx));
++ ctx = HMAC_CTX_new();
+ if (ctx == NULL) {
+ return NULL;
+ }
+
+ #ifndef OLD_CRYPTO
+- HMAC_CTX_init(ctx); // openssl 0.9.7 requires it.
++ HMAC_CTX_reset(ctx); // openssl 0.9.7 requires it.
+ #endif
+
+ switch(type) {
+ case SSH_HMAC_SHA1:
+- HMAC_Init(ctx, key, len, EVP_sha1());
++ HMAC_Init_ex(ctx, key, len, EVP_sha1(), NULL);
+ break;
+ case SSH_HMAC_SHA256:
+- HMAC_Init(ctx, key, len, EVP_sha256());
++ HMAC_Init_ex(ctx, key, len, EVP_sha256(), NULL);
+ break;
+ case SSH_HMAC_SHA384:
+- HMAC_Init(ctx, key, len, EVP_sha384());
++ HMAC_Init_ex(ctx, key, len, EVP_sha384(), NULL);
+ break;
+ case SSH_HMAC_SHA512:
+- HMAC_Init(ctx, key, len, EVP_sha512());
++ HMAC_Init_ex(ctx, key, len, EVP_sha512(), NULL);
+ break;
+ case SSH_HMAC_MD5:
+- HMAC_Init(ctx, key, len, EVP_md5());
++ HMAC_Init_ex(ctx, key, len, EVP_md5(), NULL);
+ break;
+ default:
++ HMAC_CTX_free(ctx);
+ SAFE_FREE(ctx);
+ ctx = NULL;
+ }
+@@ -363,7 +368,8 @@ void hmac_final(HMACCTX ctx, unsigned ch
+ HMAC_Final(ctx,hashmacbuf,len);
+
+ #ifndef OLD_CRYPTO
+- HMAC_CTX_cleanup(ctx);
++ HMAC_CTX_free(ctx);
++ ctx = NULL;
+ #else
+ HMAC_cleanup(ctx);
+ #endif
+@@ -455,7 +461,11 @@ static void aes_ctr128_encrypt(struct ss
+ * Same for num, which is being used to store the current offset in blocksize in CTR
+ * function.
+ */
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ AES_ctr128_encrypt(in, out, len, cipher->key, cipher->IV, tmp_buffer, &num);
++#else
++ CRYPTO_ctr128_encrypt(in, out, len, cipher->key, cipher->IV, tmp_buffer, &num, (block128_f)AES_encrypt);
++#endif
+ }
+ #endif /* BROKEN_AES_CTR */
+ #endif /* HAS_AES */
+--- a/src/pki_crypto.c
++++ b/src/pki_crypto.c
+@@ -31,6 +31,7 @@
+ #include <openssl/dsa.h>
+ #include <openssl/err.h>
+ #include <openssl/rsa.h>
++#include "libcrypto-compat.h"
+
+ #ifdef HAVE_OPENSSL_EC_H
+ #include <openssl/ec.h>
+@@ -230,7 +231,10 @@ ssh_key pki_key_dup(const ssh_key key, i
+ }
+
+ switch (key->type) {
+- case SSH_KEYTYPE_DSS:
++ case SSH_KEYTYPE_DSS: {
++ const BIGNUM *p = NULL, *q = NULL, *g = NULL,
++ *pub_key = NULL, *priv_key = NULL;
++ BIGNUM *np, *nq, *ng, *npub_key, *npriv_key;
+ new->dsa = DSA_new();
+ if (new->dsa == NULL) {
+ goto fail;
+@@ -243,36 +247,54 @@ ssh_key pki_key_dup(const ssh_key key, i
+ * pub_key = public key y = g^x
+ * priv_key = private key x
+ */
+- new->dsa->p = BN_dup(key->dsa->p);
+- if (new->dsa->p == NULL) {
++ DSA_get0_pqg(key->dsa, &p, &q, &g);
++ np = BN_dup(p);
++ nq = BN_dup(q);
++ ng = BN_dup(g);
++ if (np == NULL || nq == NULL || ng == NULL) {
++ BN_free(np);
++ BN_free(nq);
++ BN_free(ng);
+ goto fail;
+ }
+
+- new->dsa->q = BN_dup(key->dsa->q);
+- if (new->dsa->q == NULL) {
++ rc = DSA_set0_pqg(new->dsa, np, nq, ng);
++ if (rc == 0) {
++ BN_free(np);
++ BN_free(nq);
++ BN_free(ng);
+ goto fail;
+ }
+
+- new->dsa->g = BN_dup(key->dsa->g);
+- if (new->dsa->g == NULL) {
++ DSA_get0_key(key->dsa, &pub_key, &priv_key);
++ npub_key = BN_dup(pub_key);
++ if (npub_key == NULL) {
+ goto fail;
+ }
+
+- new->dsa->pub_key = BN_dup(key->dsa->pub_key);
+- if (new->dsa->pub_key == NULL) {
++ rc = DSA_set0_key(new->dsa, npub_key, NULL);
++ if (rc == 0) {
+ goto fail;
+ }
+
+ if (!demote && (key->flags & SSH_KEY_FLAG_PRIVATE)) {
+- new->dsa->priv_key = BN_dup(key->dsa->priv_key);
+- if (new->dsa->priv_key == NULL) {
++ npriv_key = BN_dup(priv_key);
++ if (npriv_key == NULL) {
++ goto fail;
++ }
++
++ rc = DSA_set0_key(new->dsa, NULL, npriv_key);
++ if (rc == 0) {
+ goto fail;
+ }
+ }
+
+ break;
++ }
+ case SSH_KEYTYPE_RSA:
+- case SSH_KEYTYPE_RSA1:
++ case SSH_KEYTYPE_RSA1: {
++ const BIGNUM *n = NULL, *e = NULL, *d = NULL;
++ BIGNUM *nn, *ne, *nd;
+ new->rsa = RSA_new();
+ if (new->rsa == NULL) {
+ goto fail;
+@@ -288,62 +310,82 @@ ssh_key pki_key_dup(const ssh_key key, i
+ * dmq1 = d mod (q-1)
+ * iqmp = q^-1 mod p
+ */
+- new->rsa->n = BN_dup(key->rsa->n);
+- if (new->rsa->n == NULL) {
++ RSA_get0_key(key->rsa, &n, &e, &d);
++ nn = BN_dup(n);
++ ne = BN_dup(e);
++ if (nn == NULL || ne == NULL) {
++ BN_free(nn);
++ BN_free(ne);
+ goto fail;
+ }
+
+- new->rsa->e = BN_dup(key->rsa->e);
+- if (new->rsa->e == NULL) {
++ rc = RSA_set0_key(new->rsa, nn, ne, NULL);
++ if (rc == 0) {
++ BN_free(nn);
++ BN_free(ne);
+ goto fail;
+ }
+
+ if (!demote && (key->flags & SSH_KEY_FLAG_PRIVATE)) {
+- new->rsa->d = BN_dup(key->rsa->d);
+- if (new->rsa->d == NULL) {
++ const BIGNUM *p = NULL, *q = NULL, *dmp1 = NULL,
++ *dmq1 = NULL, *iqmp = NULL;
++ BIGNUM *np, *nq, *ndmp1, *ndmq1, *niqmp;
++
++ nd = BN_dup(d);
++ if (nd == NULL) {
++ goto fail;
++ }
++
++ rc = RSA_set0_key(new->rsa, NULL, NULL, nd);
++ if (rc == 0) {
+ goto fail;
+ }
+
+ /* p, q, dmp1, dmq1 and iqmp may be NULL in private keys, but the
+ * RSA operations are much faster when these values are available.
+ */
+- if (key->rsa->p != NULL) {
+- new->rsa->p = BN_dup(key->rsa->p);
+- if (new->rsa->p == NULL) {
++ RSA_get0_factors(key->rsa, &p, &q);
++ if (p != NULL && q != NULL) { /* need to set both of them */
++ np = BN_dup(p);
++ nq = BN_dup(q);
++ if (np == NULL || nq == NULL) {
++ BN_free(np);
++ BN_free(nq);
+ goto fail;
+ }
+- }
+
+- if (key->rsa->q != NULL) {
+- new->rsa->q = BN_dup(key->rsa->q);
+- if (new->rsa->q == NULL) {
++ rc = RSA_set0_factors(new->rsa, np, nq);
++ if (rc == 0) {
++ BN_free(np);
++ BN_free(nq);
+ goto fail;
+ }
+ }
+
+- if (key->rsa->dmp1 != NULL) {
+- new->rsa->dmp1 = BN_dup(key->rsa->dmp1);
+- if (new->rsa->dmp1 == NULL) {
++ RSA_get0_crt_params(key->rsa, &dmp1, &dmq1, &iqmp);
++ if (dmp1 != NULL || dmq1 != NULL || iqmp != NULL) {
++ ndmp1 = BN_dup(dmp1);
++ ndmq1 = BN_dup(dmq1);
++ niqmp = BN_dup(iqmp);
++ if (ndmp1 == NULL || ndmq1 == NULL || niqmp == NULL) {
++ BN_free(ndmp1);
++ BN_free(ndmq1);
++ BN_free(niqmp);
+ goto fail;
+ }
+- }
+
+- if (key->rsa->dmq1 != NULL) {
+- new->rsa->dmq1 = BN_dup(key->rsa->dmq1);
+- if (new->rsa->dmq1 == NULL) {
+- goto fail;
+- }
+- }
+-
+- if (key->rsa->iqmp != NULL) {
+- new->rsa->iqmp = BN_dup(key->rsa->iqmp);
+- if (new->rsa->iqmp == NULL) {
++ rc = RSA_set0_crt_params(new->rsa, ndmp1, ndmq1, niqmp);
++ if (rc == 0) {
++ BN_free(ndmp1);
++ BN_free(ndmq1);
++ BN_free(niqmp);
+ goto fail;
+ }
+ }
+ }
+
+ break;
++ }
+ case SSH_KEYTYPE_ECDSA:
+ #ifdef HAVE_OPENSSL_ECC
+ new->ecdsa_nid = key->ecdsa_nid;
+@@ -409,11 +451,30 @@ int pki_key_generate_rsa(ssh_key key, in
+
+ int pki_key_generate_dss(ssh_key key, int parameter){
+ int rc;
++#if OPENSSL_VERSION_NUMBER > 0x10100000L
++ key->dsa = DSA_new();
++ if (key->dsa == NULL) {
++ return SSH_ERROR;
++ }
++ rc = DSA_generate_parameters_ex(key->dsa,
++ parameter,
++ NULL, /* seed */
++ 0, /* seed_len */
++ NULL, /* counter_ret */
++ NULL, /* h_ret */
++ NULL); /* cb */
++ if (rc != 1) {
++ DSA_free(key->dsa);
++ key->dsa = NULL;
++ return SSH_ERROR;
++ }
++#else
+ key->dsa = DSA_generate_parameters(parameter, NULL, 0, NULL, NULL,
+ NULL, NULL);
+ if(key->dsa == NULL){
+ return SSH_ERROR;
+ }
++#endif
+ rc = DSA_generate_key(key->dsa);
+ if (rc != 1){
+ DSA_free(key->dsa);
+@@ -466,51 +527,64 @@ int pki_key_compare(const ssh_key k1,
+ enum ssh_keycmp_e what)
+ {
+ switch (k1->type) {
+- case SSH_KEYTYPE_DSS:
++ case SSH_KEYTYPE_DSS: {
++ const BIGNUM *p1, *p2, *q1, *q2, *g1, *g2,
++ *pub_key1, *pub_key2, *priv_key1, *priv_key2;
+ if (DSA_size(k1->dsa) != DSA_size(k2->dsa)) {
+ return 1;
+ }
+- if (bignum_cmp(k1->dsa->p, k2->dsa->p) != 0) {
++ DSA_get0_pqg(k1->dsa, &p1, &q1, &g1);
++ DSA_get0_pqg(k2->dsa, &p2, &q2, &g2);
++ if (bignum_cmp(p1, p2) != 0) {
+ return 1;
+ }
+- if (bignum_cmp(k1->dsa->q, k2->dsa->q) != 0) {
++ if (bignum_cmp(q1, q2) != 0) {
+ return 1;
+ }
+- if (bignum_cmp(k1->dsa->g, k2->dsa->g) != 0) {
++ if (bignum_cmp(g1, g2) != 0) {
+ return 1;
+ }
+- if (bignum_cmp(k1->dsa->pub_key, k2->dsa->pub_key) != 0) {
++ DSA_get0_key(k1->dsa, &pub_key1, &priv_key1);
++ DSA_get0_key(k2->dsa, &pub_key2, &priv_key2);
++ if (bignum_cmp(pub_key1, pub_key2) != 0) {
+ return 1;
+ }
+
+ if (what == SSH_KEY_CMP_PRIVATE) {
+- if (bignum_cmp(k1->dsa->priv_key, k2->dsa->priv_key) != 0) {
++ if (bignum_cmp(priv_key1, priv_key2) != 0) {
+ return 1;
+ }
+ }
+ break;
++ }
+ case SSH_KEYTYPE_RSA:
+- case SSH_KEYTYPE_RSA1:
++ case SSH_KEYTYPE_RSA1: {
++ const BIGNUM *e1, *e2, *n1, *n2, *p1, *p2, *q1, *q2;
+ if (RSA_size(k1->rsa) != RSA_size(k2->rsa)) {
+ return 1;
+ }
+- if (bignum_cmp(k1->rsa->e, k2->rsa->e) != 0) {
++ RSA_get0_key(k1->rsa, &n1, &e1, NULL);
++ RSA_get0_key(k2->rsa, &n2, &e2, NULL);
++ if (bignum_cmp(e1, e2) != 0) {
+ return 1;
+ }
+- if (bignum_cmp(k1->rsa->n, k2->rsa->n) != 0) {
++ if (bignum_cmp(n1, n2) != 0) {
+ return 1;
+ }
+
+ if (what == SSH_KEY_CMP_PRIVATE) {
+- if (bignum_cmp(k1->rsa->p, k2->rsa->p) != 0) {
++ RSA_get0_factors(k1->rsa, &p1, &q1);
++ RSA_get0_factors(k2->rsa, &p2, &q2);
++ if (bignum_cmp(p1, p2) != 0) {
+ return 1;
+ }
+
+- if (bignum_cmp(k1->rsa->q, k2->rsa->q) != 0) {
++ if (bignum_cmp(q1, q2) != 0) {
+ return 1;
+ }
+ }
+ break;
++ }
+ case SSH_KEYTYPE_ECDSA:
+ #ifdef HAVE_OPENSSL_ECC
+ {
+@@ -586,7 +660,7 @@ ssh_string pki_private_key_to_pem(const
+ } else {
+ rc = PEM_write_bio_DSAPrivateKey(mem,
+ key->dsa,
+- NULL, /* cipher */
++ EVP_aes_128_cbc(),
+ NULL, /* kstr */
+ 0, /* klen */
+ NULL, /* auth_fn */
+@@ -611,7 +685,7 @@ ssh_string pki_private_key_to_pem(const
+ } else {
+ rc = PEM_write_bio_RSAPrivateKey(mem,
+ key->rsa,
+- NULL, /* cipher */
++ EVP_aes_128_cbc(),
+ NULL, /* kstr */
+ 0, /* klen */
+ NULL, /* auth_fn */
+@@ -621,8 +695,8 @@ ssh_string pki_private_key_to_pem(const
+ goto err;
+ }
+ break;
+- case SSH_KEYTYPE_ECDSA:
+ #ifdef HAVE_ECC
++ case SSH_KEYTYPE_ECDSA:
+ if (passphrase == NULL) {
+ struct pem_get_password_struct pgp = { auth_fn, auth_data };
+
+@@ -636,7 +710,7 @@ ssh_string pki_private_key_to_pem(const
+ } else {
+ rc = PEM_write_bio_ECPrivateKey(mem,
+ key->ecdsa,
+- NULL, /* cipher */
++ EVP_aes_128_cbc(),
+ NULL, /* kstr */
+ 0, /* klen */
+ NULL, /* auth_fn */
+@@ -819,43 +893,65 @@ int pki_pubkey_build_dss(ssh_key key,
+ ssh_string q,
+ ssh_string g,
+ ssh_string pubkey) {
++ int rc;
++ BIGNUM *bp, *bq, *bg, *bpub_key;
++
+ key->dsa = DSA_new();
+ if (key->dsa == NULL) {
+ return SSH_ERROR;
+ }
+
+- key->dsa->p = make_string_bn(p);
+- key->dsa->q = make_string_bn(q);
+- key->dsa->g = make_string_bn(g);
+- key->dsa->pub_key = make_string_bn(pubkey);
+- if (key->dsa->p == NULL ||
+- key->dsa->q == NULL ||
+- key->dsa->g == NULL ||
+- key->dsa->pub_key == NULL) {
+- DSA_free(key->dsa);
+- return SSH_ERROR;
++ bp = make_string_bn(p);
++ bq = make_string_bn(q);
++ bg = make_string_bn(g);
++ bpub_key = make_string_bn(pubkey);
++ if (bp == NULL || bq == NULL ||
++ bg == NULL || bpub_key == NULL) {
++ goto fail;
++ }
++
++ rc = DSA_set0_pqg(key->dsa, bp, bq, bg);
++ if (rc == 0) {
++ goto fail;
++ }
++
++ rc = DSA_set0_key(key->dsa, bpub_key, NULL);
++ if (rc == 0) {
++ goto fail;
+ }
+
+ return SSH_OK;
++fail:
++ DSA_free(key->dsa);
++ return SSH_ERROR;
+ }
+
+ int pki_pubkey_build_rsa(ssh_key key,
+ ssh_string e,
+ ssh_string n) {
++ int rc;
++ BIGNUM *be, *bn;
++
+ key->rsa = RSA_new();
+ if (key->rsa == NULL) {
+ return SSH_ERROR;
+ }
+
+- key->rsa->e = make_string_bn(e);
+- key->rsa->n = make_string_bn(n);
+- if (key->rsa->e == NULL ||
+- key->rsa->n == NULL) {
+- RSA_free(key->rsa);
+- return SSH_ERROR;
++ be = make_string_bn(e);
++ bn = make_string_bn(n);
++ if (be == NULL || bn == NULL) {
++ goto fail;
++ }
++
++ rc = RSA_set0_key(key->rsa, bn, be, NULL);
++ if (rc == 0) {
++ goto fail;
+ }
+
+ return SSH_OK;
++fail:
++ RSA_free(key->rsa);
++ return SSH_ERROR;
+ }
+
+ ssh_string pki_publickey_to_blob(const ssh_key key)
+@@ -889,23 +985,26 @@ ssh_string pki_publickey_to_blob(const s
+ }
+
+ switch (key->type) {
+- case SSH_KEYTYPE_DSS:
+- p = make_bignum_string(key->dsa->p);
++ case SSH_KEYTYPE_DSS: {
++ const BIGNUM *bp, *bq, *bg, *bpub_key;
++ DSA_get0_pqg(key->dsa, &bp, &bq, &bg);
++ p = make_bignum_string((BIGNUM *)bp);
+ if (p == NULL) {
+ goto fail;
+ }
+
+- q = make_bignum_string(key->dsa->q);
++ q = make_bignum_string((BIGNUM *)bq);
+ if (q == NULL) {
+ goto fail;
+ }
+
+- g = make_bignum_string(key->dsa->g);
++ g = make_bignum_string((BIGNUM *)bg);
+ if (g == NULL) {
+ goto fail;
+ }
+
+- n = make_bignum_string(key->dsa->pub_key);
++ DSA_get0_key(key->dsa, &bpub_key, NULL);
++ n = make_bignum_string((BIGNUM *)bpub_key);
+ if (n == NULL) {
+ goto fail;
+ }
+@@ -937,14 +1036,17 @@ ssh_string pki_publickey_to_blob(const s
+ n = NULL;
+
+ break;
++ }
+ case SSH_KEYTYPE_RSA:
+- case SSH_KEYTYPE_RSA1:
+- e = make_bignum_string(key->rsa->e);
++ case SSH_KEYTYPE_RSA1: {
++ const BIGNUM *be, *bn;
++ RSA_get0_key(key->rsa, &bn, &be, NULL);
++ e = make_bignum_string((BIGNUM *)be);
+ if (e == NULL) {
+ goto fail;
+ }
+
+- n = make_bignum_string(key->rsa->n);
++ n = make_bignum_string((BIGNUM *)bn);
+ if (n == NULL) {
+ goto fail;
+ }
+@@ -964,6 +1066,7 @@ ssh_string pki_publickey_to_blob(const s
+ n = NULL;
+
+ break;
++ }
+ case SSH_KEYTYPE_ECDSA:
+ #ifdef HAVE_OPENSSL_ECC
+ rc = ssh_buffer_reinit(buffer);
+@@ -1065,13 +1168,15 @@ int pki_export_pubkey_rsa1(const ssh_key
+ char *e;
+ char *n;
+ int rsa_size = RSA_size(key->rsa);
++ const BIGNUM *be, *bn;
+
+- e = bignum_bn2dec(key->rsa->e);
++ RSA_get0_key(key->rsa, &bn, &be, NULL);
++ e = bignum_bn2dec(be);
+ if (e == NULL) {
+ return SSH_ERROR;
+ }
+
+- n = bignum_bn2dec(key->rsa->n);
++ n = bignum_bn2dec(bn);
+ if (n == NULL) {
+ OPENSSL_free(e);
+ return SSH_ERROR;
+@@ -1136,6 +1241,7 @@ static ssh_string pki_dsa_signature_to_b
+ {
+ char buffer[40] = { 0 };
+ ssh_string sig_blob = NULL;
++ const BIGNUM *pr, *ps;
+
+ ssh_string r;
+ int r_len, r_offset_in, r_offset_out;
+@@ -1143,12 +1249,13 @@ static ssh_string pki_dsa_signature_to_b
+ ssh_string s;
+ int s_len, s_offset_in, s_offset_out;
+
+- r = make_bignum_string(sig->dsa_sig->r);
++ DSA_SIG_get0(sig->dsa_sig, &pr, &ps);
++ r = make_bignum_string((BIGNUM *)pr);
+ if (r == NULL) {
+ return NULL;
+ }
+
+- s = make_bignum_string(sig->dsa_sig->s);
++ s = make_bignum_string((BIGNUM *)ps);
+ if (s == NULL) {
+ ssh_string_free(r);
+ return NULL;
+@@ -1201,13 +1308,15 @@ ssh_string pki_signature_to_blob(const s
+ ssh_string s;
+ ssh_buffer b;
+ int rc;
++ const BIGNUM *pr, *ps;
+
+ b = ssh_buffer_new();
+ if (b == NULL) {
+ return NULL;
+ }
+
+- r = make_bignum_string(sig->ecdsa_sig->r);
++ ECDSA_SIG_get0(sig->ecdsa_sig, &pr, &ps);
++ r = make_bignum_string((BIGNUM *)pr);
+ if (r == NULL) {
+ ssh_buffer_free(b);
+ return NULL;
+@@ -1219,7 +1328,7 @@ ssh_string pki_signature_to_blob(const s
+ return NULL;
+ }
+
+- s = make_bignum_string(sig->ecdsa_sig->s);
++ s = make_bignum_string((BIGNUM *)ps);
+ if (s == NULL) {
+ ssh_buffer_free(b);
+ return NULL;
+@@ -1324,6 +1433,7 @@ ssh_signature pki_signature_from_blob(co
+ ssh_string s;
+ size_t len;
+ int rc;
++ BIGNUM *pr = NULL, *ps = NULL;
+
+ sig = ssh_signature_new();
+ if (sig == NULL) {
+@@ -1363,9 +1473,9 @@ ssh_signature pki_signature_from_blob(co
+ }
+ ssh_string_fill(r, ssh_string_data(sig_blob), 20);
+
+- sig->dsa_sig->r = make_string_bn(r);
++ pr = make_string_bn(r);
+ ssh_string_free(r);
+- if (sig->dsa_sig->r == NULL) {
++ if (pr == NULL) {
+ ssh_signature_free(sig);
+ return NULL;
+ }
+@@ -1377,9 +1487,15 @@ ssh_signature pki_signature_from_blob(co
+ }
+ ssh_string_fill(s, (char *)ssh_string_data(sig_blob) + 20, 20);
+
+- sig->dsa_sig->s = make_string_bn(s);
++ ps = make_string_bn(s);
+ ssh_string_free(s);
+- if (sig->dsa_sig->s == NULL) {
++ if (ps == NULL) {
++ ssh_signature_free(sig);
++ return NULL;
++ }
++
++ rc = DSA_SIG_set0(sig->dsa_sig, pr, ps);
++ if (rc == 0) {
+ ssh_signature_free(sig);
+ return NULL;
+ }
+@@ -1427,17 +1543,17 @@ ssh_signature pki_signature_from_blob(co
+ ssh_print_hexa("r", ssh_string_data(r), ssh_string_len(r));
+ #endif
+
+- make_string_bn_inplace(r, sig->ecdsa_sig->r);
++ pr = make_string_bn(r);
+ ssh_string_burn(r);
+ ssh_string_free(r);
+- if (sig->ecdsa_sig->r == NULL) {
++ if (pr == NULL) {
+ ssh_buffer_free(b);
+ ssh_signature_free(sig);
+ return NULL;
+ }
+
+ s = buffer_get_ssh_string(b);
+- rlen = buffer_get_rest_len(b);
++ rlen = buffer_get_len(b);
+ ssh_buffer_free(b);
+ if (s == NULL) {
+ ssh_signature_free(sig);
+@@ -1448,10 +1564,16 @@ ssh_signature pki_signature_from_blob(co
+ ssh_print_hexa("s", ssh_string_data(s), ssh_string_len(s));
+ #endif
+
+- make_string_bn_inplace(s, sig->ecdsa_sig->s);
++ ps = make_string_bn(s);
+ ssh_string_burn(s);
+ ssh_string_free(s);
+- if (sig->ecdsa_sig->s == NULL) {
++ if (ps == NULL) {
++ ssh_signature_free(sig);
++ return NULL;
++ }
++
++ rc = ECDSA_SIG_set0(sig->ecdsa_sig, pr, ps);
++ if (rc == 0) {
+ ssh_signature_free(sig);
+ return NULL;
+ }
+@@ -1578,8 +1700,12 @@ ssh_signature pki_do_sign(const ssh_key
+ }
+
+ #ifdef DEBUG_CRYPTO
+- ssh_print_bignum("r", sig->dsa_sig->r);
+- ssh_print_bignum("s", sig->dsa_sig->s);
++ {
++ const BIGNUM *pr, *ps;
++ DSA_SIG_get0(sig->dsa_sig, &pr, &ps);
++ ssh_print_bignum("r", (BIGNUM *) pr);
++ ssh_print_bignum("s", (BIGNUM *) ps);
++ }
+ #endif
+
+ break;
+@@ -1601,8 +1727,12 @@ ssh_signature pki_do_sign(const ssh_key
+ }
+
+ # ifdef DEBUG_CRYPTO
+- ssh_print_bignum("r", sig->ecdsa_sig->r);
+- ssh_print_bignum("s", sig->ecdsa_sig->s);
++ {
++ const BIGNUM *pr, *ps;
++ ECDSA_SIG_get0(sig->ecdsa_sig, &pr, &ps);
++ ssh_print_bignum("r", (BIGNUM *) pr);
++ ssh_print_bignum("s", (BIGNUM *) ps);
++ }
+ # endif /* DEBUG_CRYPTO */
+
+ break;
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -164,6 +164,9 @@ else (WITH_GCRYPT)
+ ${libssh_SRCS}
+ pki_crypto.c
+ )
++ if(OPENSSL_VERSION VERSION_LESS "1.1.0")
++ set(libssh_SRCS ${libssh_SRCS} libcrypto-compat.c)
++ endif()
+ endif (WITH_GCRYPT)
+
+ if (WITH_SFTP)
+--- /dev/null
++++ b/src/libcrypto-compat.c
+@@ -0,0 +1,334 @@
++/*
++ * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
++ *
++ * Licensed under the OpenSSL license (the "License"). You may not use
++ * this file except in compliance with the License. You can obtain a copy
++ * in the file LICENSE in the source distribution or at
++ * https://www.openssl.org/source/license.html
++ */
++
++#include "config.h"
++
++#include <string.h>
++#include <openssl/engine.h>
++#include "libcrypto-compat.h"
++
++static void *OPENSSL_zalloc(size_t num)
++{
++ void *ret = OPENSSL_malloc(num);
++
++ if (ret != NULL)
++ memset(ret, 0, num);
++ return ret;
++}
++
++int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
++{
++ /* If the fields n and e in r are NULL, the corresponding input
++ * parameters MUST be non-NULL for n and e. d may be
++ * left NULL (in case only the public key is used).
++ */
++ if ((r->n == NULL && n == NULL)
++ || (r->e == NULL && e == NULL))
++ return 0;
++
++ if (n != NULL) {
++ BN_free(r->n);
++ r->n = n;
++ }
++ if (e != NULL) {
++ BN_free(r->e);
++ r->e = e;
++ }
++ if (d != NULL) {
++ BN_free(r->d);
++ r->d = d;
++ }
++
++ return 1;
++}
++
++int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q)
++{
++ /* If the fields p and q in r are NULL, the corresponding input
++ * parameters MUST be non-NULL.
++ */
++ if ((r->p == NULL && p == NULL)
++ || (r->q == NULL && q == NULL))
++ return 0;
++
++ if (p != NULL) {
++ BN_free(r->p);
++ r->p = p;
++ }
++ if (q != NULL) {
++ BN_free(r->q);
++ r->q = q;
++ }
++
++ return 1;
++}
++
++int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp)
++{
++ /* If the fields dmp1, dmq1 and iqmp in r are NULL, the corresponding input
++ * parameters MUST be non-NULL.
++ */
++ if ((r->dmp1 == NULL && dmp1 == NULL)
++ || (r->dmq1 == NULL && dmq1 == NULL)
++ || (r->iqmp == NULL && iqmp == NULL))
++ return 0;
++
++ if (dmp1 != NULL) {
++ BN_free(r->dmp1);
++ r->dmp1 = dmp1;
++ }
++ if (dmq1 != NULL) {
++ BN_free(r->dmq1);
++ r->dmq1 = dmq1;
++ }
++ if (iqmp != NULL) {
++ BN_free(r->iqmp);
++ r->iqmp = iqmp;
++ }
++
++ return 1;
++}
++
++void RSA_get0_key(const RSA *r,
++ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
++{
++ if (n != NULL)
++ *n = r->n;
++ if (e != NULL)
++ *e = r->e;
++ if (d != NULL)
++ *d = r->d;
++}
++
++void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q)
++{
++ if (p != NULL)
++ *p = r->p;
++ if (q != NULL)
++ *q = r->q;
++}
++
++void RSA_get0_crt_params(const RSA *r,
++ const BIGNUM **dmp1, const BIGNUM **dmq1,
++ const BIGNUM **iqmp)
++{
++ if (dmp1 != NULL)
++ *dmp1 = r->dmp1;
++ if (dmq1 != NULL)
++ *dmq1 = r->dmq1;
++ if (iqmp != NULL)
++ *iqmp = r->iqmp;
++}
++
++void DSA_get0_pqg(const DSA *d,
++ const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
++{
++ if (p != NULL)
++ *p = d->p;
++ if (q != NULL)
++ *q = d->q;
++ if (g != NULL)
++ *g = d->g;
++}
++
++int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g)
++{
++ /* If the fields p, q and g in d are NULL, the corresponding input
++ * parameters MUST be non-NULL.
++ */
++ if ((d->p == NULL && p == NULL)
++ || (d->q == NULL && q == NULL)
++ || (d->g == NULL && g == NULL))
++ return 0;
++
++ if (p != NULL) {
++ BN_free(d->p);
++ d->p = p;
++ }
++ if (q != NULL) {
++ BN_free(d->q);
++ d->q = q;
++ }
++ if (g != NULL) {
++ BN_free(d->g);
++ d->g = g;
++ }
++
++ return 1;
++}
++
++void DSA_get0_key(const DSA *d,
++ const BIGNUM **pub_key, const BIGNUM **priv_key)
++{
++ if (pub_key != NULL)
++ *pub_key = d->pub_key;
++ if (priv_key != NULL)
++ *priv_key = d->priv_key;
++}
++
++int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
++{
++ /* If the field pub_key in d is NULL, the corresponding input
++ * parameters MUST be non-NULL. The priv_key field may
++ * be left NULL.
++ */
++ if (d->pub_key == NULL && pub_key == NULL)
++ return 0;
++
++ if (pub_key != NULL) {
++ BN_free(d->pub_key);
++ d->pub_key = pub_key;
++ }
++ if (priv_key != NULL) {
++ BN_free(d->priv_key);
++ d->priv_key = priv_key;
++ }
++
++ return 1;
++}
++
++void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
++{
++ if (pr != NULL)
++ *pr = sig->r;
++ if (ps != NULL)
++ *ps = sig->s;
++}
++
++int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
++{
++ if (r == NULL || s == NULL)
++ return 0;
++ BN_clear_free(sig->r);
++ BN_clear_free(sig->s);
++ sig->r = r;
++ sig->s = s;
++ return 1;
++}
++
++void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
++{
++ if (pr != NULL)
++ *pr = sig->r;
++ if (ps != NULL)
++ *ps = sig->s;
++}
++
++int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
++{
++ if (r == NULL || s == NULL)
++ return 0;
++ BN_clear_free(sig->r);
++ BN_clear_free(sig->s);
++ sig->r = r;
++ sig->s = s;
++ return 1;
++}
++
++EVP_MD_CTX *EVP_MD_CTX_new(void)
++{
++ return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
++}
++
++static void OPENSSL_clear_free(void *str, size_t num)
++{
++ if (str == NULL)
++ return;
++ if (num)
++ OPENSSL_cleanse(str, num);
++ OPENSSL_free(str);
++}
++
++/* This call frees resources associated with the context */
++int EVP_MD_CTX_reset(EVP_MD_CTX *ctx)
++{
++ if (ctx == NULL)
++ return 1;
++
++ /*
++ * Don't assume ctx->md_data was cleaned in EVP_Digest_Final, because
++ * sometimes only copies of the context are ever finalised.
++ */
++ if (ctx->digest && ctx->digest->cleanup
++ && !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_CLEANED))
++ ctx->digest->cleanup(ctx);
++ if (ctx->digest && ctx->digest->ctx_size && ctx->md_data
++ && !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE)) {
++ OPENSSL_clear_free(ctx->md_data, ctx->digest->ctx_size);
++ }
++ EVP_PKEY_CTX_free(ctx->pctx);
++#ifndef OPENSSL_NO_ENGINE
++ ENGINE_finish(ctx->engine);
++#endif
++ OPENSSL_cleanse(ctx, sizeof(*ctx));
++
++ return 1;
++}
++
++void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
++{
++ EVP_MD_CTX_reset(ctx);
++ OPENSSL_free(ctx);
++}
++
++HMAC_CTX *HMAC_CTX_new(void)
++{
++ HMAC_CTX *ctx = OPENSSL_zalloc(sizeof(HMAC_CTX));
++
++ if (ctx != NULL) {
++ if (!HMAC_CTX_reset(ctx)) {
++ HMAC_CTX_free(ctx);
++ return NULL;
++ }
++ }
++ return ctx;
++}
++
++static void hmac_ctx_cleanup(HMAC_CTX *ctx)
++{
++ EVP_MD_CTX_reset(&ctx->i_ctx);
++ EVP_MD_CTX_reset(&ctx->o_ctx);
++ EVP_MD_CTX_reset(&ctx->md_ctx);
++ ctx->md = NULL;
++ ctx->key_length = 0;
++ OPENSSL_cleanse(ctx->key, sizeof(ctx->key));
++}
++
++void HMAC_CTX_free(HMAC_CTX *ctx)
++{
++ if (ctx != NULL) {
++ hmac_ctx_cleanup(ctx);
++#if OPENSSL_VERSION_NUMBER > 0x10100000L
++ EVP_MD_CTX_free(&ctx->i_ctx);
++ EVP_MD_CTX_free(&ctx->o_ctx);
++ EVP_MD_CTX_free(&ctx->md_ctx);
++#endif
++ OPENSSL_free(ctx);
++ }
++}
++
++int HMAC_CTX_reset(HMAC_CTX *ctx)
++{
++ HMAC_CTX_init(ctx);
++ return 1;
++}
++
++#ifndef HAVE_OPENSSL_EVP_CIPHER_CTX_NEW
++EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void)
++{
++ return OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
++}
++
++void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
++{
++ /* EVP_CIPHER_CTX_reset(ctx); alias */
++ EVP_CIPHER_CTX_init(ctx);
++ OPENSSL_free(ctx);
++}
++#endif
+--- /dev/null
++++ b/src/libcrypto-compat.h
+@@ -0,0 +1,42 @@
++#ifndef LIBCRYPTO_COMPAT_H
++#define LIBCRYPTO_COMPAT_H
++
++#include <openssl/opensslv.h>
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
++#include <openssl/rsa.h>
++#include <openssl/dsa.h>
++#include <openssl/ecdsa.h>
++#include <openssl/dh.h>
++#include <openssl/evp.h>
++#include <openssl/hmac.h>
++
++int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
++int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
++int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp);
++void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d);
++void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q);
++void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp);
++
++void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);
++int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
++void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key);
++int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key);
++
++void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
++int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
++
++void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
++int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
++
++int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
++EVP_MD_CTX *EVP_MD_CTX_new(void);
++void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
++
++HMAC_CTX *HMAC_CTX_new(void);
++int HMAC_CTX_reset(HMAC_CTX *ctx);
++void HMAC_CTX_free(HMAC_CTX *ctx);
++
++#endif /* OPENSSL_VERSION_NUMBER */
++
++#endif /* LIBCRYPTO_COMPAT_H */
include $(TOPDIR)/rules.mk
PKG_NAME:=libstrophe
-PKG_VERSION:=0.9.1
+PKG_VERSION:=0.9.2
PKG_RELEASE=1
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Chih-Wei Chen <changeway@gmail.com>
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=https://github.com/strophe/libstrophe
-PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://codeload.github.com/strophe/libstrophe/tar.gz/$(PKG_VERSION)?
PKG_SOURCE_VERSION:=9931ad4fa2aa7f204c608010eb2ebf84bcf7d542
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=6a499bcfc7c52db6765957ff38f48a344ad121ac0b665fd3d4adb7d8deadc427
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=158145bc1565a5fd0bbd7f57e3e15d768e58b8a460897ab5918a5a689d67ae6f
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
#
-# Copyright (C) 2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=talloc
-PKG_VERSION:=2.1.11
+PKG_VERSION:=2.1.14
MAJOR_VERSION:=2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://www.samba.org/ftp/talloc/
-PKG_HASH:=639eb35556a0af999123c4d883e79be05ff9f00ab4f9e4ac2e5775f9c5eeeed3
+PKG_SOURCE_URL:=https://www.samba.org/ftp/talloc
+PKG_HASH:=b185602756a628bac507fa8af8b9df92ace69d27c0add5dab93190ad7c3367ce
-PKG_MAINTAINER:=Lucile Quirion <lucile.quirion@savoirfairelinux.com>
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=LGPL-3.0+
PKG_BUILD_PARALLEL:=0
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Core memory allocator used in Samba
- DEPENDS:=+USE_GLIBC:libbsd $(ICONV_DEPENDS) +libattr
+ DEPENDS:=$(ICONV_DEPENDS) +libattr
URL:=https://talloc.samba.org/talloc/doc/html/index.html
endef
--- /dev/null
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -340,22 +340,13 @@ def configure(conf):
+
+ conf.CHECK_FUNCS('prctl dirname basename')
+
+- strlcpy_in_bsd = False
++ # Not checking for libbsd
++ conf.CHECK_FUNCS('strlcpy strlcat')
++ conf.CHECK_FUNCS('getpeereid')
++ conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
++ conf.CHECK_FUNCS('setproctitle_init')
+
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+- checklibc=True):
+- strlcpy_in_bsd = True
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ conf.CHECK_FUNCS('closefrom')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+@@ -698,9 +689,6 @@ def configure(conf):
+
+ # look for a method of finding the list of network interfaces
+ for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+- bsd_for_strlcpy = ''
+- if strlcpy_in_bsd:
+- bsd_for_strlcpy = ' bsd'
+ if conf.CHECK_CODE('''
+ #define %s 1
+ #define NO_CONFIG_H 1
+@@ -713,7 +701,7 @@ def configure(conf):
+ #include "test/getifaddrs.c"
+ ''' % method,
+ method,
+- lib='nsl socket' + bsd_for_strlcpy,
++ lib='nsl socket',
+ addmain=False,
+ execute=True):
+ break
+@@ -761,7 +749,6 @@ def build(bld):
+ break
+
+ extra_libs = ''
+- if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
+
+ bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
+ REPLACE_HOSTCC_SOURCE,
include $(TOPDIR)/rules.mk
PKG_NAME:=libtasn1
-PKG_VERSION:=4.12
+PKG_VERSION:=4.13
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=6753da2e621257f33f5b051cc114d417e5206a0818fe0b1ecfd6153f70934753
+PKG_HASH:=7e528e8c317ddd156230c4e31d082cd13e7ddeb7a54824be82632209550c8cca
PKG_LICENSE:=LGPLv2.1+
PKG_LICENSE_FILES:=COPYING.LIB
include $(TOPDIR)/rules.mk
PKG_NAME:=libtirpc
-PKG_VERSION:=1.0.3
+PKG_VERSION:=1.1.4
PKG_RELEASE:=1
PKG_SOURCE_URL:=@SF/libtirpc
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=86c3a78fc1bddefa96111dd233124c703b22a78884203c55c3e06b3be6a0fd5e
+PKG_HASH:=2ca529f02292e10c158562295a1ffd95d2ce8af97820e3534fe1b0e3aec7561d
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_FIXUP:=autoreconf
+PKG_REMOVE_FILES:=autogen.sh aclocal.m4
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
define Package/libtirpc
SECTION:=libs
endef
CONFIGURE_ARGS += --disable-gssapi
-# Info from Buildroot Makefile
-# getrpcby{number,name} are only provided if 'GQ' is defined
-TARGET_CFLAGS += -DGQ
-#CONFIGURE_VARS += \
-# GSSGLUE_LIBS="-lkrb5 -lk5crypto -l:libcom_err.so.3 -lkeyutils -lresolv -gssapi_krb5" \
-# GSSGLUE_CFLAGS=-I$(STAGING_DIR)/usr/include/krb5/
+HOST_CONFIGURE_ARGS += --disable-gssapi
-#EXTRA_LDFLAGS := -lgssapi_krb5
+TARGET_CFLAGS += -DGQ
+HOST_CFLAGS += -DGQ
define Package/libtirpc/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtirpc.so* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtirpc.so* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/netconfig $(1)/etc/
endef
define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtirpc.pc $(1)/usr/lib/pkgconfig/libtirpc.pc
endef
+$(eval $(call HostBuild))
$(eval $(call BuildPackage,libtirpc))
--- /dev/null
+Consider musl provided built-in defines
+
+Helps compile libtirpc with musl
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- ./tirpc/rpc/types.h.orig 2018-03-17 10:23:10.022055255 +0100
++++ ./tirpc/rpc/types.h 2018-03-17 10:23:30.877751656 +0100
+@@ -66,7 +66,7 @@
+ #define mem_free(ptr, bsize) free(ptr)
+
+
+-#if defined __APPLE_CC__ || defined __FreeBSD__
++#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined(__GLIBC__)
+ # define __u_char_defined
+ # define __daddr_t_defined
+ #endif
+++ /dev/null
-From 15adb318818f5d0ac609ef2b87643dd760487cb6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
-Date: Mon, 20 Jul 2015 20:30:11 +0200
-Subject: [PATCH 1/1] Disable parts of TIRPC requiring NIS support
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-[yann.morin.1998@free.fr: update for 0.3.1]
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-[joerg.krause@embedded.rocks: update for 0.3.2]
-Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
-[peda@axentia.se: update for 1.0.1]
-Signed-off-by: Peter Rosin <peda@axentia.se>
-[bernd.kuhls@t-online.de: update for 1.0.2]
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/Makefile.am | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 6cc567a..9834f9a 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -24,7 +24,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln
- rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
- svc_auth_des.c \
- svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
-- auth_time.c auth_des.c authdes_prot.c debug.c des_crypt.c des_impl.c
-+ auth_des.c authdes_prot.c debug.c des_crypt.c des_impl.c
-
- ## XDR
- libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c
-@@ -41,8 +41,8 @@ if GSS
- libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS)
- endif
-
--libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
--libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
-+#libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
-+#libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
-
- CLEANFILES = cscope.* *~
- DISTCLEANFILES = Makefile.in
---
-2.4.6
-
+++ /dev/null
-From 7aa1fe6a0f9280571117c30c03c2cc521cd86ec3 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Sat, 23 Jun 2012 21:58:07 +0200
-Subject: [PATCH] uClibc without RPC support and musl does not install rpcent.h
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-[yann.morin.1998@free.fr: update for 0.3.1]
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-[joerg.krause@embedded.rocks: musl fix]
-Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
-[bernd.kuhls@t-online.de: update for 1.0.2]
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- tirpc/rpc/rpcent.h | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h
-index 147f909..4a58180 100644
---- a/tirpc/rpc/rpcent.h
-+++ b/tirpc/rpc/rpcent.h
-@@ -48,8 +48,9 @@
- extern "C" {
- #endif
-
--/* These are defined in /usr/include/rpc/netdb.h */
--#if !defined(__GLIBC__) || defined(__UCLIBC__)
-+/* These are defined in /usr/include/rpc/netdb.h, unless we are using
-+ the C library without RPC support. */
-+#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__)
- struct rpcent {
- char *r_name; /* name of server for this rpc program */
- char **r_aliases; /* alias list */
---
-1.9.1
-
+++ /dev/null
-From 79975eb4104667be85abd06874c258438826b674 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
-Date: Fri, 24 Jul 2015 14:45:52 +0200
-Subject: [PATCH] Disable DES authentification support
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-uClibc and musl does not provide DES authentication.
-
-Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
-[peda@axentia.se: update for 1.0.1]
-Signed-off-by: Peter Rosin <peda@axentia.se>
-[bernd.kuhls@t-online.de: update for 1.0.2]
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- src/Makefile.am | 2 +-
- src/rpc_soc.c | 32 --------------------------------
- 2 files changed, 1 insertion(+), 33 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 960a522..3a88e31 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -22,9 +22,8 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln
- pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \
- rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
- rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
-- svc_auth_des.c \
- svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
-- auth_des.c authdes_prot.c debug.c des_crypt.c des_impl.c
-+ debug.c
-
- ## XDR
- libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c
-diff --git a/src/svc_auth.c b/src/svc_auth.c
---- a/src/svc_auth.c
-+++ b/src/svc_auth.c
-@@ -114,9 +114,6 @@ _gss_authenticate(rqst, msg, no_dispatch)
- case AUTH_SHORT:
- dummy = _svcauth_short(rqst, msg);
- return (dummy);
-- case AUTH_DES:
-- dummy = _svcauth_des(rqst, msg);
-- return (dummy);
- #ifdef HAVE_RPCSEC_GSS
- case RPCSEC_GSS:
- dummy = _svcauth_gss(rqst, msg, no_dispatch);
-diff --git a/src/rpc_soc.c b/src/rpc_soc.c
-index e146ed4..161a1ec 100644
---- a/src/rpc_soc.c
-+++ b/src/rpc_soc.c
-@@ -522,86 +521,6 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
- }
-
- /*
-- * Create the client des authentication object. Obsoleted by
-- * authdes_seccreate().
-- */
--AUTH *
--authdes_create(servername, window, syncaddr, ckey)
-- char *servername; /* network name of server */
-- u_int window; /* time to live */
-- struct sockaddr *syncaddr; /* optional hostaddr to sync with */
-- des_block *ckey; /* optional conversation key to use */
--{
-- AUTH *nauth;
-- char hostname[NI_MAXHOST];
--
-- if (syncaddr) {
-- /*
-- * Change addr to hostname, because that is the way
-- * new interface takes it.
-- */
-- switch (syncaddr->sa_family) {
-- case AF_INET:
-- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
-- sizeof hostname, NULL, 0, 0) != 0)
-- goto fallback;
-- break;
-- case AF_INET6:
-- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in6), hostname,
-- sizeof hostname, NULL, 0, 0) != 0)
-- goto fallback;
-- break;
-- default:
-- goto fallback;
-- }
-- nauth = authdes_seccreate(servername, window, hostname, ckey);
-- return (nauth);
-- }
--fallback:
-- return authdes_seccreate(servername, window, NULL, ckey);
--}
--
--/*
-- * Create the client des authentication object. Obsoleted by
-- * authdes_pk_seccreate().
-- */
--extern AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *,
-- const des_block *, nis_server *);
--
--AUTH *
--authdes_pk_create(servername, pkey, window, syncaddr, ckey)
-- char *servername; /* network name of server */
-- netobj *pkey; /* public key */
-- u_int window; /* time to live */
-- struct sockaddr *syncaddr; /* optional hostaddr to sync with */
-- des_block *ckey; /* optional conversation key to use */
--{
-- AUTH *nauth;
-- char hostname[NI_MAXHOST];
--
-- if (syncaddr) {
-- /*
-- * Change addr to hostname, because that is the way
-- * new interface takes it.
-- */
-- switch (syncaddr->sa_family) {
-- case AF_INET:
-- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
-- sizeof hostname, NULL, 0, 0) != 0)
-- goto fallback;
-- break;
-- default:
-- goto fallback;
-- }
-- nauth = authdes_pk_seccreate(servername, pkey, window, hostname, ckey, NULL);
-- return (nauth);
-- }
--fallback:
-- return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL);
--}
--
--
--/*
- * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
- */
- CLIENT *
---
-2.4.6
-
+++ /dev/null
---- a/tirpc/rpc/types.h 2018-03-27
-+++ b/tirpc/rpc/types.h 2018-03-27
-@@ -66,7 +66,7 @@ typedef int32_t rpc_inline_t;
- #define mem_free(ptr, bsize) free(ptr)
-
-
--#if defined __APPLE_CC__ || defined __FreeBSD__
-+#if defined __APPLE_CC__ || defined __FreeBSD__ || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
- # define __u_char_defined
- # define __daddr_t_defined
- #endif
include $(TOPDIR)/rules.mk
PKG_NAME:=libtorrent
-PKG_VERSION:=0.13.6-git-1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_VERSION:=0.13.7
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/rakshasa/libtorrent.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=14e793b75dac95c51ad64ff9cd2dc6772b68c625
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=0971c21d0e6b7028bc319e97c82bdb213c17dfc503fc0f89b809e5ed7ce98142
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/rakshasa/libtorrent/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=86b4b1753385aaddf9e59ad94f1292eee5102139eb57520e84d1af2f04693708
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Rakshasa's BitTorrent library
- URL:=http://libtorrent.rakshasa.no/
+ URL:=https://rakshasa.github.io/rtorrent/
DEPENDS:=+libopenssl +libsigcxx +zlib
- MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+ MAINTAINER:=Rosen Penev <rosenp@gmail.com>
endef
define Package/libtorrent/description
---- a/configure.ac
-+++ b/configure.ac
-@@ -19,7 +19,6 @@ AC_SUBST(LIBTORRENT_INTERFACE_VERSION_NO
-
- AM_INIT_AUTOMAKE
- AC_CONFIG_HEADERS(config.h)
--AM_PATH_CPPUNIT(1.9.6)
-
- AC_PROG_CXX
-
--- a/scripts/checks.m4
+++ b/scripts/checks.m4
@@ -96,7 +96,7 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [
--- /dev/null
+From 4607bbf78040789dee29266878ce109136b984ef Mon Sep 17 00:00:00 2001
+From: rakshasa <sundell.software@gmail.com>
+Date: Tue, 20 Dec 2016 19:51:02 +0900
+Subject: [PATCH] Added support for openssl 1.1.
+
+---
+ configure.ac | 4 ++++
+ src/utils/diffie_hellman.cc | 36 ++++++++++++++++++++++++++++++++++--
+ 2 files changed, 38 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 65e34872..27e33570 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,12 +71,15 @@ AC_ARG_ENABLE(openssl,
+ [ --disable-openssl Don't use OpenSSL's SHA1 implementation.],
+ [
+ if test "$enableval" = "yes"; then
++dnl move to scripts.
+ PKG_CHECK_MODULES(OPENSSL, libcrypto,
+ CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS";
+ LIBS="$LIBS $OPENSSL_LIBS")
+
+ AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
+ AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
++ AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])
++
+ else
+ AC_DEFINE(USE_NSS_SHA, 1, Using Mozilla's SHA1 implementation.)
+ fi
+@@ -87,6 +90,7 @@ AC_ARG_ENABLE(openssl,
+
+ AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
+ AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
++ AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])
+ ]
+ )
+
+diff --git a/src/utils/diffie_hellman.cc b/src/utils/diffie_hellman.cc
+index aa653d45..7ec13165 100644
+--- a/src/utils/diffie_hellman.cc
++++ b/src/utils/diffie_hellman.cc
+@@ -54,11 +54,23 @@ DiffieHellman::DiffieHellman(const unsigned char *prime, int primeLength,
+ m_secret(NULL), m_size(0) {
+
+ #ifdef USE_OPENSSL
++
+ m_dh = DH_new();
++
++#ifdef USE_OPENSSL_1_1
++ BIGNUM * const dh_p = BN_bin2bn(prime, primeLength, NULL);
++ BIGNUM * const dh_g = BN_bin2bn(generator, generatorLength, NULL);
++
++ if (dh_p == NULL || dh_g == NULL ||
++ !DH_set0_pqg(m_dh, dh_p, NULL, dh_g))
++ throw internal_error("Could not generate Diffie-Hellman parameters");
++#else
+ m_dh->p = BN_bin2bn(prime, primeLength, NULL);
+ m_dh->g = BN_bin2bn(generator, generatorLength, NULL);
++#endif
+
+ DH_generate_key(m_dh);
++
+ #else
+ throw internal_error("Compiled without encryption support.");
+ #endif
+@@ -74,7 +86,19 @@ DiffieHellman::~DiffieHellman() {
+ bool
+ DiffieHellman::is_valid() const {
+ #ifdef USE_OPENSSL
++ if (m_dh == NULL)
++ return false;
++
++#ifdef USE_OPENSSL_1_1
++ const BIGNUM *pub_key;
++
++ DH_get0_key(m_dh, &pub_key, NULL);
++
++ return pub_key != NULL;
++#else
+ return m_dh != NULL && m_dh->pub_key != NULL;
++#endif
++
+ #else
+ return false;
+ #endif
+@@ -103,8 +127,16 @@ DiffieHellman::store_pub_key(unsigned char* dest, unsigned int length) {
+ #ifdef USE_OPENSSL
+ std::memset(dest, 0, length);
+
+- if ((int)length >= BN_num_bytes(m_dh->pub_key))
+- BN_bn2bin(m_dh->pub_key, dest + length - BN_num_bytes(m_dh->pub_key));
++ const BIGNUM *pub_key;
++
++#ifdef USE_OPENSSL_1_1
++ DH_get0_key(m_dh, &pub_key, NULL);
++#else
++ pub_key = m_dh->pub_key;
++#endif
++
++ if ((int)length >= BN_num_bytes(pub_key))
++ BN_bn2bin(pub_key, dest + length - BN_num_bytes(pub_key));
+ #endif
+ }
+
include $(TOPDIR)/rules.mk
PKG_NAME:=libuhttpd
-PKG_VERSION:=2.0.3
-PKG_RELEASE:=1
+PKG_VERSION:=2.2.1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_SOURCE_URL=https://github.com/zhaojh329/libuhttpd.git
-PKG_MIRROR_HASH:=f20e4081ba1bbea277a3c86f28fa451d54546817a58814fff91470550a5b8e5d
+PKG_MIRROR_HASH:=e6b3d540a0d32a77739ab6b028ded46fbf4997d241fabb578ef1f212581eea33
CMAKE_INSTALL:=1
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
$(Package/libuhttpd/default)
TITLE += (NO SSL)
VARIANT:=nossl
+ CONFLICTS:=libuhttpd-openssl libuhttpd-wolfssl libuhttpd-mbedtls
endef
define Package/libuhttpd-openssl
TITLE += (openssl)
DEPENDS += +libustream-openssl
VARIANT:=openssl
+ CONFLICTS:=libuhttpd-wolfssl libuhttpd-mbedtls
endef
define Package/libuhttpd-wolfssl
TITLE += (wolfssl)
DEPENDS += +libustream-wolfssl
VARIANT:=wolfssl
+ CONFLICTS:=libuhttpd-mbedtls
endef
define Package/libuhttpd-mbedtls
endif
define Package/libuhttpd/default/install
- $(INSTALL_DIR) $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/ $(1)/usr/lib/lua/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libuhttpd.so* $(1)/usr/lib/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/uhttpd.so* $(1)/usr/lib/lua/
endef
Package/libuhttpd-nossl/install = $(Package/libuhttpd/default/install)
--- /dev/null
+Index: libuhttpd-2.1.0/src/CMakeLists.txt
+===================================================================
+--- libuhttpd-2.1.0.orig/src/CMakeLists.txt
++++ libuhttpd-2.1.0/src/CMakeLists.txt
+@@ -8,7 +8,7 @@ set(UHTTPD_VERSION_PATCH 0)
+
+ # Check the third party Libraries
+ find_package(Libubox REQUIRED)
+-find_package(Lua)
++find_package(Lua51)
+
+ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${LIBUBOX_INCLUDE_DIR})
+
+@@ -20,9 +20,9 @@ option(UHTTPD_SSL_SUPPORT "SSL support"
+
+
+ set(LUA_SUPPORT_DEFAULT "ON")
+-if (NOT LUA_FOUND)
++if (NOT LUA51_FOUND)
+ set(LUA_SUPPORT_DEFAULT "OFF")
+-endif (NOT LUA_FOUND)
++endif (NOT LUA51_FOUND)
+
+ set(UHTTPD_LUA_SUPPORT_CONFIG 1)
+ option(UHTTPD_LUA_SUPPORT "LUA support" ${LUA_SUPPORT_DEFAULT})
+@@ -34,9 +34,9 @@ else ()
+ endif ()
+
+ if (UHTTPD_LUA_SUPPORT)
+- if (NOT LUA_FOUND)
++ if (NOT LUA51_FOUND)
+ message(FATAL_ERROR "Lua was not found on your system")
+- endif (NOT LUA_FOUND)
++ endif (NOT LUA51_FOUND)
+
+ include_directories(${LUA_INCLUDE_DIR})
+ list(APPEND EXTRA_LIBS ${LUA_LIBRARY})
include $(TOPDIR)/rules.mk
PKG_NAME:=libunistring
-PKG_VERSION:=0.9.8
+PKG_VERSION:=0.9.10
PKG_RELEASE:=1
-PKG_HASH:=b792f2bd05d0fa7b339e39e353da7232b2e514e0db2cf5ed95beeff3feb53cf5
+PKG_HASH:=eb8fb2c3e4b6e2d336608377050892b54c3c983b646c561836550863003c05d7
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/libunistring
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-#
-# Copyright (C) 2006-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
include $(TOPDIR)/rules.mk
PKG_NAME:=libupnp
-PKG_VERSION:=1.6.19
-PKG_RELEASE:=2
+PKG_VERSION:=1.6.25
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/pupnp
-PKG_HASH:=b3142b39601243b50532eec90f4a27dba85eb86f58d4b849ac94edeb29d9b22a
+PKG_HASH:=c5a300b86775435c076d58a79cc0d5a977d76027d2a7d721590729b7f369fa43
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=libuv
-PKG_VERSION:=1.19.2
+PKG_VERSION:=1.20.3
PKG_RELEASE:=1
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://dist.libuv.org/dist/v$(PKG_VERSION)/
-PKG_HASH:=7cbcf2017e7116cf9da8ec1c6a146d578536b1e479458438873c991f984a53d7
+PKG_HASH:=3bb7aad916c7a5fd0053dcb6adee49905360a2a160f4a59bc62dbe4370328579
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_NAME:=libuvc
-PKG_VERSION=0.0.5-20140812-$(PKG_SOURCE_VERSION)
+PKG_VERSION:=0.0.6
PKG_RELEASE:=1
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/ktossell/libuvc.git
-PKG_SOURCE_VERSION:=2c6403405872aa865999b95ba15944295adf6c38
-
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=93f33620e00276989211d9c129a6d8b5e0f45df8d23235ff0c53c823c52a5ef5
+PKG_SOURCE_URL:=https://codeload.github.com/ktossell/libuvc/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=42175a53c1c704365fdc782b44233925e40c9344fbb7f942181c1090f06e2873
+
PKG_LICENSE:=BSD
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
CMAKE_INSTALL:=1
CATEGORY:=Libraries
TITLE:=libuvc
DEPENDS:=+libusb-1.0 +libjpeg
- URL:=https://int80k.com/libuvc
+ URL:=https://int80k.com/libuvc
endef
define Package/libuvc/description
- This package contains libuvc is a cross-platform library for USB video devices,
+ This package contains libuvc is a cross-platform library for USB video devices,
built atop libusb.
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=libuwsc
-PKG_VERSION:=2.0.1
+PKG_VERSION:=3.1.0
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_SOURCE_URL=https://github.com/zhaojh329/libuwsc.git
-PKG_MIRROR_HASH:=e0c4f8603a3059c49aec06fdd21e53ebc247855c26ace9ab3b50caf29846a610
+PKG_SOURCE_URL=https://codeload.github.com/zhaojh329/libuwsc/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=13355ee4194716843c6cc773e9e616bb97cf64a4dd201dd1a5e3e9f8bd0de1dc
CMAKE_INSTALL:=1
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
-define Package/libuwsc/default
+define Package/libuwsc/Default
+ TITLE:=A lightweight WebSocket client library based on libev
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=Networking
- TITLE:=Lightweight WebSocket client library
- DEPENDS:=+libubox
+ URL:=https://github.com/zhaojh329/libuwsc
+ DEPENDS:=+libev $(2)
+ VARIANT:=$(1)
+ PROVIDES:=libuwsc
endef
-define Package/libuwsc-nossl
- $(Package/libuwsc/default)
- TITLE += (NO SSL)
- VARIANT:=nossl
-endef
-
-define Package/libuwsc-openssl
- $(Package/libuwsc/default)
- TITLE += (openssl)
- DEPENDS += +libustream-openssl
- VARIANT:=openssl
-endef
-
-define Package/libuwsc-wolfssl
- $(Package/libuwsc/default)
- TITLE += (wolfssl)
- DEPENDS += +libustream-wolfssl
- VARIANT:=wolfssl
-endef
-
-define Package/libuwsc-mbedtls
- $(Package/libuwsc/default)
- TITLE += (mbedtls)
- DEPENDS += +libustream-mbedtls
- VARIANT:=mbedtls
-endef
-
-ifeq ($(BUILD_VARIANT),nossl)
- CMAKE_OPTIONS += -DUWSC_SSL_SUPPORT=off
+Package/libuwsc-openssl=$(call Package/libuwsc/Default,openssl,+PACKAGE_libuwsc-openssl:libopenssl)
+Package/libuwsc-wolfssl=$(call Package/libuwsc/Default,wolfssl,+PACKAGE_libuwsc-wolfssl:libwolfssl)
+Package/libuwsc-mbedtls=$(call Package/libuwsc/Default,mbedtls,+PACKAGE_libuwsc-mbedtls:libmbedtls)
+Package/libuwsc-nossl=$(call Package/libuwsc/Default,nossl)
+
+ifeq ($(BUILD_VARIANT),openssl)
+ CMAKE_OPTIONS += -DUWSC_USE_OPENSSL=ON
+else ifeq ($(BUILD_VARIANT),wolfssl)
+ CMAKE_OPTIONS += -DUWSC_USE_WOLFSSL=ON
+else ifeq ($(BUILD_VARIANT),mbedtls)
+ CMAKE_OPTIONS += -DUWSC_USE_MBEDTLS=ON
+else
+ CMAKE_OPTIONS += -DUWSC_SSL_SUPPORT=OFF
endif
-define Package/libuwsc/default/install
+define Package/libuwsc-$(BUILD_VARIANT)/install
$(INSTALL_DIR) $(1)/usr/lib/
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libuwsc.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuwsc.so* $(1)/usr/lib/
endef
-Package/libuwsc-nossl/install = $(Package/libuwsc/default/install)
-Package/libuwsc-openssl/install = $(Package/libuwsc/default/install)
-Package/libuwsc-wolfssl/install = $(Package/libuwsc/default/install)
-Package/libuwsc-mbedtls/install = $(Package/libuwsc/default/install)
-
-$(eval $(call BuildPackage,libuwsc-nossl))
-$(eval $(call BuildPackage,libuwsc-mbedtls))
-$(eval $(call BuildPackage,libuwsc-wolfssl))
$(eval $(call BuildPackage,libuwsc-openssl))
+$(eval $(call BuildPackage,libuwsc-wolfssl))
+$(eval $(call BuildPackage,libuwsc-mbedtls))
+$(eval $(call BuildPackage,libuwsc-nossl))
#
-# Copyright (C) 2009-2015 OpenWrt.org
-# Copyright (C) 2009 David Cooper <dave@kupesoft.com>
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=v4l-utils
-PKG_VERSION:=1.10.0
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://www.linuxtv.org/downloads/v4l-utils
-PKG_HASH:=78ead27ee58a701d7c6342303cf4520bdd4a2b88a7813bc99a0b389307e4336b
+PKG_SOURCE_URL:=https://www.linuxtv.org/downloads/v4l-utils
+PKG_HASH:=e6b962c4b1253cf852c31da13fd6b5bb7cbe5aa9e182881aec55123bae680692
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.{a,so*} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert,2rds}.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert}.pc $(1)/usr/lib/pkgconfig/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert,2rds}.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libv4l/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert,2rds}.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/libv4l
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l/v4l{1compat,2convert}.so $(1)/usr/lib/libv4l/
endef
$(CP) $(PKG_INSTALL_DIR)/etc/rc_maps.cfg $(1)/etc/
$(CP) $(PKG_INSTALL_DIR)/etc/rc_keymaps $(1)/etc/
$(INSTALL_DIR) $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/{cx18,ivtv}-ctl $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/{rds,media,cx18,ivtv}-ctl $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/decode_tm6000 $(1)/usr/bin/
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/ir-keytable $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/ir-{ctl,keytable} $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/v4l2-{compliance,ctl,sysfs-path} $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/cec-{compliance,ctl,follower} $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libv4l))
+--- a/utils/v4l2-ctl/v4l2-ctl.cpp
++++ b/utils/v4l2-ctl/v4l2-ctl.cpp
+@@ -46,6 +46,7 @@
+ #include <vector>
+ #include <map>
+ #include <algorithm>
++#include <string_iostream>
+ #include <fstream>
+
+ char options[OptLast];
--- a/utils/rds-ctl/rds-ctl.cpp
+++ b/utils/rds-ctl/rds-ctl.cpp
@@ -29,6 +29,7 @@
#include <libv4l2.h>
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
-@@ -14,6 +14,7 @@
+@@ -17,6 +17,7 @@
#include <sys/mman.h>
#include <dirent.h>
#include <math.h>
+#include <time.h>
#include "v4l2-ctl.h"
+ #include "v4l-stream.h"
+--- a/utils/cec-ctl/cec-ctl.cpp
++++ b/utils/cec-ctl/cec-ctl.cpp
+@@ -30,6 +30,7 @@
+ #include <errno.h>
+ #include <sys/ioctl.h>
+ #include <stdarg.h>
++#include <time.h>
+ #include <cerrno>
+ #include <string>
+ #include <vector>
+--- a/utils/cec-compliance/cec-compliance.h
++++ b/utils/cec-compliance/cec-compliance.h
+@@ -21,6 +21,7 @@
+ #define _CEC_COMPLIANCE_H_
+ #include <stdarg.h>
++#include <time.h>
+ #include <cerrno>
+ #include <string>
+ #include <linux/cec-funcs.h>
+--- a/utils/cec-follower/cec-follower.h
++++ b/utils/cec-follower/cec-follower.h
+@@ -37,6 +37,7 @@
+ #define _CEC_FOLLOWER_H_
+
+ #include <stdarg.h>
++#include <time.h>
+ #include <cerrno>
+ #include <string>
+ #include <linux/cec-funcs.h>
+++ /dev/null
---- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
-+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
-@@ -671,15 +671,18 @@ static bool parse_subset(char *optarg)
-
- static bool parse_next_subopt(char **subs, char **value)
- {
-- static char *const subopts[] = {
-- NULL
-- };
-- int opt = getsubopt(subs, subopts, value);
-+ char *stmp = *subs;
-+ *value = NULL;
-
-- if (opt < 0 || *value)
-+ if (*subs) {
-+ *subs = strchr(stmp, ',');
-+ if (*subs)
-+ *(*subs)++ = 0;
-+ else *subs = stmp + strlen(stmp);
-+
-+ *value = stmp;
- return false;
-- fprintf(stderr, "No value given to suboption <%s>\n",
-- subopts[opt]);
-+ }
- return true;
- }
-
include $(TOPDIR)/rules.mk
PKG_NAME:=libvorbis
-PKG_VERSION:=1.3.5
-PKG_RELEASE:=2
+PKG_VERSION:=1.3.6
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://downloads.xiph.org/releases/vorbis/
-PKG_HASH:=54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1
+PKG_HASH:=af00bb5a784e7c9e69f56823de4637c350643deedaf333d0fa86ecdba6fcb415
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=BSD-3-Clause
fee, royalty or patent concerns.
endef
+ifneq ($(findstring arm,$(CONFIG_ARCH)),)
+ TARGET_CFLAGS += -flto
+ TARGET_CXX_FLAGS += -flto
+ TARGET_LDFLAGS += -flto
+endif
+
CONFIGURE_ARGS+= \
--disable-oggtest \
+++ /dev/null
---- a/lib/info.c
-+++ b/lib/info.c
-@@ -583,7 +583,8 @@ int vorbis_analysis_headerout(vorbis_dsp
- oggpack_buffer opb;
- private_state *b=v->backend_state;
-
-- if(!b||vi->channels<=0){
-+ if(!b||vi->channels<=0||vi->channels>255){
-+ b = NULL;
- ret=OV_EFAULT;
- goto err_out;
- }
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_CPE_ID:=cpe:/a:john_koleszar:libvpx
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=libwebsockets
-PKG_VERSION:=2.4.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://codeload.github.com/warmcat/libwebsockets/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=29414be4f79f6abc0e6aadccd09a4da0f0c431e3b5691f496acd081ae6a8240c
-
+PKG_HASH:=cb0cdd8d0954fcfd97a689077568f286cdbb44111883e0a85d29860449c47cbf
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+++ /dev/null
-From d7b6c04aaf416344332e73f49fe457013e3ccf36 Mon Sep 17 00:00:00 2001
-From: Alexander Couzens <lynxis@fe80.eu>
-Date: Sun, 10 Dec 2017 00:54:06 +0100
-Subject: [PATCH] CMakeLists: build reproducible by default
-Merged-upstream: yes
-
-Using the build user and build hostname as part of the git hash breaks
-reproducible builds. Make this part optional, but build reproducible by
-default.
----
- CMakeLists.txt | 47 +++++++++++++++++++++++++++--------------------
- 1 file changed, 27 insertions(+), 20 deletions(-)
-
-Index: libwebsockets-2.4.0/CMakeLists.txt
-===================================================================
---- libwebsockets-2.4.0.orig/CMakeLists.txt
-+++ libwebsockets-2.4.0/CMakeLists.txt
-@@ -39,26 +39,32 @@ message(STATUS "CMAKE_TOOLCHAIN_FILE='${
- find_package(Git)
- if(GIT_EXECUTABLE)
- execute_process(
-- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-- COMMAND "${GIT_EXECUTABLE}" describe
-- OUTPUT_VARIABLE GIT_HASH
-- OUTPUT_STRIP_TRAILING_WHITESPACE
-- )
-- execute_process(
-- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-- COMMAND "whoami"
-- OUTPUT_VARIABLE GIT_USER
-- OUTPUT_STRIP_TRAILING_WHITESPACE
-- )
-- execute_process(
-- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-- COMMAND "hostname"
-- OUTPUT_VARIABLE GIT_HOST
-- OUTPUT_STRIP_TRAILING_WHITESPACE
-- )
-- string(REGEX REPLACE "([^\\])[\\]([^\\])" "\\1\\\\\\\\\\2" GIT_USER ${GIT_USER})
-- set(LWS_BUILD_HASH ${GIT_USER}@${GIT_HOST}-${GIT_HASH})
-- message("Git commit hash: ${LWS_BUILD_HASH}")
-+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-+ COMMAND "${GIT_EXECUTABLE}" describe
-+ OUTPUT_VARIABLE GIT_HASH
-+ OUTPUT_STRIP_TRAILING_WHITESPACE
-+ )
-+ set(LWS_BUILD_HASH ${GIT_HASH})
-+
-+ # appen the build user and hostname
-+ if(NOT LWS_REPRODUCIBLE)
-+ execute_process(
-+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-+ COMMAND "whoami"
-+ OUTPUT_VARIABLE GIT_USER
-+ OUTPUT_STRIP_TRAILING_WHITESPACE
-+ )
-+ execute_process(
-+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-+ COMMAND "hostname"
-+ OUTPUT_VARIABLE GIT_HOST
-+ OUTPUT_STRIP_TRAILING_WHITESPACE
-+ )
-+ string(REGEX REPLACE "([^\\])[\\]([^\\])" "\\1\\\\\\\\\\2" GIT_USER ${GIT_USER})
-+ set(LWS_BUILD_HASH ${GIT_USER}@${GIT_HOST}-${GIT_HASH})
-+ endif()
-+
-+ message("Git commit hash: ${LWS_BUILD_HASH}")
- endif()
-
- set(LWS_WITH_BUNDLED_ZLIB_DEFAULT OFF)
-@@ -121,6 +127,7 @@ option(LWS_AVOID_SIGPIPE_IGN "Android 7+
- option(LWS_WITH_STATS "Keep statistics of lws internal operations" OFF)
- option(LWS_WITH_SOCKS5 "Allow use of SOCKS5 proxy on client connections" OFF)
- option(LWS_WITH_PEER_LIMITS "Track peers and restrict resources a single peer can allocate" OFF)
-+option(LWS_REPRODUCIBLE "Build libwebsockets reproducible. It removes the build user and hostname from the build" ON)
-
- macro(confirm_command CMD NOCMD)
- find_program (HAVE_CMD_${CMD} ${CMD} )
--- /dev/null
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b260969..ece281d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1050,9 +1050,9 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_C_COMPILER_ID
+ endif()
+
+ if (UNIX AND NOT LWS_WITH_ESP32)
+- set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized -Werror ${VISIBILITY_FLAG} -Wundef ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" )
++ set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized ${VISIBILITY_FLAG} -Wundef ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" )
+ else()
+- set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized -Werror ${VISIBILITY_FLAG} ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" )
++ set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized ${VISIBILITY_FLAG} ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" )
+ endif()
+ endif ()
+
include $(TOPDIR)/rules.mk
PKG_NAME:=x264
-PKG_VERSION:=snapshot-20170623-2245-stable
-PKG_RELEASE:=1
+PKG_VERSION:=snapshot-20180401-2245
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://download.videolan.org/x264/snapshots/
PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>
-PKG_HASH:=e8af5d199b6af8124b6e54631ab7b2ff20f1ce86bbcc2f58bd800bc85bee6b2f
+PKG_HASH:=657a915497a5b0ffed3598988657395358cf4dc961db14aebd918b7ffb7c5364
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
-TARGET_CFLAGS+=-std=gnu99 -fPIC -O3 -ffast-math -I.
+TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS)) -std=gnu99 -fPIC -O3 -ffast-math -I.
MAKE_FLAGS+= LD="$(TARGET_CC) -o"
# ARM ASM depends on ARM1156 or later, blacklist earlier or incompatible cores
CONFIGURE_ARGS += --disable-asm
else
ifneq ($(CONFIG_TARGET_x86),)
-ifeq ($(CONFIG_YASM),y)
- CONFIGURE_VARS+= AS=yasm
- MAKE_FLAGS+= AS=yasm
+ifeq ($(CONFIG_NASM),y)
+ CONFIGURE_VARS+= AS=nasm
+ MAKE_FLAGS+= AS=nasm
else
CONFIGURE_VARS+= AS=
MAKE_FLAGS+= AS=
PKG_NAME:=xerces-c
PKG_MAIN_VER:=3.2
-PKG_VERSION:=3.2.0
+PKG_VERSION:=3.2.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@APACHE/xerces/c/3/sources
-PKG_HASH:=35d8db18ebe6db353850903981cd07cca64abeba071602e7e32596714352de08
+PKG_HASH:=02deac7c863027381910a8371f634f8bd14b39232a387efedd27c18f24f989cb
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_NAME:=libxml2
PKG_VERSION:=2.9.8
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://xmlsoft.org/sources/
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:xmlsoft:libxml2
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
--- /dev/null
+From a436374994c47b12d5de1b8b1d191a098fa23594 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 30 Jul 2018 12:54:38 +0200
+Subject: [PATCH 12/13] Fix nullptr deref with XPath logic ops
+
+If the XPath stack is corrupted, for example by a misbehaving extension
+function, the "and" and "or" XPath operators could dereference NULL
+pointers. Check that the XPath stack isn't empty and optimize the
+logic operators slightly.
+
+Closes: https://gitlab.gnome.org/GNOME/libxml2/issues/5
+
+Also see
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901817
+https://bugzilla.redhat.com/show_bug.cgi?id=1595985
+
+This is CVE-2018-14404.
+
+Thanks to Guy Inbar for the report.
+---
+ xpath.c | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/xpath.c b/xpath.c
+index 3fae0bf4..5e3bb9ff 100644
+--- a/xpath.c
++++ b/xpath.c
+@@ -13297,9 +13297,8 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
+ return(0);
+ }
+ xmlXPathBooleanFunction(ctxt, 1);
+- arg1 = valuePop(ctxt);
+- arg1->boolval &= arg2->boolval;
+- valuePush(ctxt, arg1);
++ if (ctxt->value != NULL)
++ ctxt->value->boolval &= arg2->boolval;
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ return (total);
+ case XPATH_OP_OR:
+@@ -13323,9 +13322,8 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
+ return(0);
+ }
+ xmlXPathBooleanFunction(ctxt, 1);
+- arg1 = valuePop(ctxt);
+- arg1->boolval |= arg2->boolval;
+- valuePush(ctxt, arg1);
++ if (ctxt->value != NULL)
++ ctxt->value->boolval |= arg2->boolval;
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ return (total);
+ case XPATH_OP_EQUAL:
+--
+2.18.0
+
--- /dev/null
+From 2240fbf5912054af025fb6e01e26375100275e74 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 30 Jul 2018 13:14:11 +0200
+Subject: [PATCH 13/13] Fix infinite loop in LZMA decompression
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Check the liblzma error code more thoroughly to avoid infinite loops.
+
+Closes: https://gitlab.gnome.org/GNOME/libxml2/issues/13
+Closes: https://bugzilla.gnome.org/show_bug.cgi?id=794914
+
+This is CVE-2018-9251 and CVE-2018-14567.
+
+Thanks to Dongliang Mu and Simon Wörner for the reports.
+---
+ xzlib.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/xzlib.c b/xzlib.c
+index a839169e..0ba88cfa 100644
+--- a/xzlib.c
++++ b/xzlib.c
+@@ -562,6 +562,10 @@ xz_decomp(xz_statep state)
+ "internal error: inflate stream corrupt");
+ return -1;
+ }
++ /*
++ * FIXME: Remapping a couple of error codes and falling through
++ * to the LZMA error handling looks fragile.
++ */
+ if (ret == Z_MEM_ERROR)
+ ret = LZMA_MEM_ERROR;
+ if (ret == Z_DATA_ERROR)
+@@ -587,6 +591,11 @@ xz_decomp(xz_statep state)
+ xz_error(state, LZMA_PROG_ERROR, "compression error");
+ return -1;
+ }
++ if ((state->how != GZIP) &&
++ (ret != LZMA_OK) && (ret != LZMA_STREAM_END)) {
++ xz_error(state, ret, "lzma error");
++ return -1;
++ }
+ } while (strm->avail_out && ret != LZMA_STREAM_END);
+
+ /* update available output and crc check value */
+--
+2.18.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=libyang
-PKG_VERSION:=0.14.53
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_VERSION:=0.16-r1
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=2698bd6484526facbf82b1263810b938b82a2f23
-PKG_MIRROR_HASH:=3bfe4fd8236f0d1903d275aa76e039645d1093ef4204ab3b9bef46aecbe68f72
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/CESNET/libyang.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/CESNET/libyang/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=43ab396fc7529251dc9cf02fbd8da48dcf476b998ea0f9e66197632988969074
-PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
+CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libyang.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/libyang
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang/* $(1)/usr/lib/libyang/
+ $(INSTALL_DIR) $(1)/usr/lib/libyang/extensions
+ $(INSTALL_DIR) $(1)/usr/lib/libyang/user_types
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang/extensions/* $(1)/usr/lib/libyang/extensions
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang/user_types/* $(1)/usr/lib/libyang/user_types
endef
define Package/yanglint/install
PKG_NAME:=libzdb
PKG_VERSION:=3.1
-PKG_RELEASE:=3
+PKG_RELEASE:=6
PKG_LICENSE:=GPL-3.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DEPENDS:=libzdb/host
include $(INCLUDE_DIR)/package.mk
+# libzdb needs to find iconv when linking to libmariadb
+include $(INCLUDE_DIR)/nls.mk
define Package/libzdb
SECTION:=libs
- DBCPPFLAGS="$DBCPPFLAGS `$MYSQLCONFIG --include`"
- DBLDFLAGS="$DBLDFLAGS `$MYSQLCONFIG --libs`"
+ DBCPPFLAGS="$DBCPPFLAGS -I$STAGING_DIR/usr/include/mysql"
-+ DBLDFLAGS="$DBLDFLAGS -L$STAGING_DIR/usr/lib/mysql -L$STAGING_DIR/usr/lib -lmysqlclient -lz -lcrypt -lm"
++ DBLDFLAGS="$DBLDFLAGS -L$STAGING_DIR/usr/lib/mysql -L$STAGING_DIR/usr/lib -lmysqlclient -liconv -lz -lcrypt -lm"
AC_DEFINE([HAVE_LIBMYSQLCLIENT], 1, [Define to 1 to enable mysql])
else
CPPFLAGS=$svd_CPPFLAGS
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -141,7 +141,7 @@ AC_ARG_ENABLE([openssl],
+ else
+ openssl="true"
+ if test "x$enableval" = "xyes"; then
+- AC_CHECK_LIB([ssl], [SSL_library_init], [], [AC_MSG_ERROR([libssl not found])])
++ AC_CHECK_LIB([ssl], [SSL_CTX_new], [], [AC_MSG_ERROR([libssl not found])])
+ AC_CHECK_LIB([crypto], [SHA1_Init], [], [AC_MSG_ERROR([libcrypto not found])])
+ else
+ AC_MSG_CHECKING([for openssl in $enableval])
define Package/loudmouth
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+glib2 +libopenssl
+ DEPENDS:=+glib2 +libopenssl +PACKAGE_krb5-libs:krb5-libs
TITLE:=loudmouth
URL:=https://github.com/mcabber/loudmouth
endef
--- /dev/null
+diff -u --recursive loudmouth-1.5.3-vanilla/loudmouth/lm-sasl.c loudmouth-1.5.3/loudmouth/lm-sasl.c
+--- loudmouth-1.5.3-vanilla/loudmouth/lm-sasl.c 2018-07-27 22:42:03.250616281 -0400
++++ loudmouth-1.5.3/loudmouth/lm-sasl.c 2018-07-27 22:42:26.756659723 -0400
+@@ -529,7 +529,7 @@
+ }
+
+ nonce = g_hash_table_lookup (challenge, "nonce");
+- if (nonce == NULL || nonce == '\0') {
++ if (nonce == NULL || *nonce == '\0') {
+ g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_SASL,
+ "%s: server didn't provide a nonce in the challenge",
+ G_STRFUNC);
include $(TOPDIR)/rules.mk
PKG_NAME:=mxml
-PKG_VERSION:=2.10
+PKG_VERSION:=2.11
PKG_RELEASE:=1
-PKG_HASH:=267ff58b64ddc767170d71dab0c729c06f45e1df9a9b6f75180b564f09767891
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/michaelrsweet/mxml/releases/download/release-$(PKG_VERSION)/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/michaelrsweet/mxml.git
+PKG_SOURCE_VERSION:=7b0bb60e51d39b2aaa8e8ca5bf9f3c38e63d643b
+PKG_MIRROR_HASH:=e6f38a91f420c0bc64f892163049c37c5cc7744bffbcb05ad1fddec7b34ea438
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
PKG_FIXUP:=autoreconf
PKG_MAINTAINER:=Espen Jürgensen <espenjurgensen+openwrt@gmail.com>
+++ /dev/null
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -88,7 +88,7 @@ PUBLIBOBJS = mxml-attr.o mxml-entity.o m
- mxml-index.o mxml-node.o mxml-search.o mxml-set.o
- LIBOBJS = $(PUBLIBOBJS) mxml-private.o mxml-string.o
- OBJS = mxmldoc.o testmxml.o $(LIBOBJS)
--TARGETS = $(LIBMXML) mxmldoc testmxml mxml.xml doc/mxml.man
-+TARGETS = $(LIBMXML)
-
-
- #
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.webdav.org/neon
+PKG_SOURCE_URL:=https://web.archive.org/web/20170923042221/http://webdav.org:80/neon/
PKG_HASH:=db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca
PKG_INSTALL:=1
SECTION:=libs
CATEGORY:=Libraries
TITLE:=HTTP and WebDAV client library
- URL:=http://www.webdav.org/neon/
+ URL:=https://web.archive.org/web/20170923042221/http://webdav.org:80/neon/
DEPENDS:=+libopenssl +libexpat +zlib
MAINTAINER:=Federico Di Marco <fededim@gmail.com>
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=openldap
-PKG_VERSION:=2.4.45
-PKG_RELEASE:=2
+PKG_VERSION:=2.4.46
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ \
- ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/openldap-release/ \
- ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ \
- ftp://ftp.plig.org/pub/OpenLDAP/openldap-release/
-PKG_HASH:=cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824
+PKG_SOURCE_URL:=https://gpl.savoirfairelinux.net/pub/mirrors/openldap/openldap-release/ \
+ http://mirror.eu.oneandone.net/software/openldap/openldap-release/ \
+ http://mirror.switch.ch/ftp/software/mirror/OpenLDAP/openldap-release/ \
+ https://www.openldap.org/software/download/OpenLDAP/openldap-release/
+PKG_HASH:=9a90dcb86b99ae790ccab93b7585a31fbcbeec8c94bf0f7ab0ca0a87ea0c4b2d
PKG_LICENSE:=OLDAP-2.8
PKG_LICENSE_FILES:=LICENSE
/etc/openldap/slapd.conf
endef
-TARGET_CFLAGS += $(FPIC) -lpthread
+TARGET_CFLAGS += $(FPIC) -lpthread \
+ -DURANDOM_DEVICE=\\\"/dev/urandom\\\"
CONFIGURE_ARGS += \
--enable-shared \
include $(TOPDIR)/rules.mk
PKG_NAME:=p11-kit
-PKG_VERSION:=0.23.10
+PKG_VERSION:=0.23.14
PKG_RELEASE:=1
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=f9212a3f225ef543e13fae9945527d66c0cbb67246320035dd94fab2bce5ae43
+PKG_HASH:=1cb9fa6d237539f25f62f4c3d4ec71a1c8e0772957ec45ec5af92134129e0d70
PKG_SOURCE_URL:=https://github.com/p11-glue/$(PKG_NAME)/releases/download/$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=pcre
-PKG_VERSION:=8.41
-PKG_RELEASE:=2
+PKG_VERSION:=8.42
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=e62c7eac5ae7c0e7286db61ff82912e1c0b7a0c13706616e94a7dd729321b530
+PKG_HASH:=2cd04b7c887808be030254e8d77de11d3fe9d4505c39d4b15d2664ffe8bf9301
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=BSD-3-Clause
include $(TOPDIR)/rules.mk
PKG_NAME:=pcre2
-PKG_VERSION:=10.30
+PKG_VERSION:=10.31
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=90bd41c605d30e3745771eb81928d779f158081a51b2f314bbcc1f73de5773db
+PKG_SOURCE_URL:=@SF/$(PKG_NAME) \
+ ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
+PKG_HASH:=e07d538704aa65e477b6a392b32ff9fc5edf75ab9a40ddfc876186c4ff4d68ac
PKG_MAINTAINER:=Shane Peelar <lookatyouhacker@gmail.com>
PKG_LICENSE:=BSD-3-Clause
include $(TOPDIR)/rules.mk
PKG_NAME:=poco
-PKG_VERSION:=1.7.7
+PKG_VERSION:=1.8.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://pocoproject.org/releases/$(PKG_NAME)-$(PKG_VERSION)
-PKG_HASH:=17783e30f5ef9c852544ac0e9d1fd316c4804317026059a9d6aad798b61c77f8
+PKG_HASH:=2e4c07ac73174ee06c7e2c7cf2b7642a5b3aea81d0203e1c069b32ac4a8ecfbc
PKG_LICENSE:=BSL-1.0
PKG_LICENSE_FILES:=LICENSE
--- a/Foundation/src/Error.cpp
+++ b/Foundation/src/Error.cpp
-@@ -66,7 +66,7 @@
- without -D_GNU_SOURCE is needed, otherwise the GNU version is
- preferred.
- */
--#if defined _GNU_SOURCE && !POCO_ANDROID
-+#if (defined _GNU_SOURCE && (defined __GLIBC__ || defined __UCLIBC__)) && !POCO_ANDROID
- char errmsg[256] = "";
- return std::string(strerror_r(errorCode, errmsg, 256));
- #elif (_XOPEN_SOURCE >= 600) || POCO_ANDROID
+@@ -70,7 +70,7 @@ namespace Poco {
+
+ #if (_XOPEN_SOURCE >= 600) || POCO_ANDROID || __APPLE__
+ setMessage(strerror_r(err, _buffer, sizeof(_buffer)));
+-#elif _GNU_SOURCE
++#elif (_GNU_SOURCE && (defined __GLIBC__ || defined __UCLIBC__))
+ setMessage(strerror_r(err, _buffer, sizeof(_buffer)));
+ #else
+ setMessage(strerror(err));
include $(TOPDIR)/rules.mk
PKG_NAME:=postgresql
-PKG_VERSION:=9.6.8
+PKG_VERSION:=9.6.10
PKG_RELEASE:=1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=PostgreSQL
http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \
ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION)
-PKG_HASH:=eafdb3b912e9ec34bdd28b651d00226a6253ba65036cb9a41cad2d9e82e3eb70
+PKG_HASH:=8615acc56646401f0ede97a767dfd27ce07a8ae9c952afdb57163b7234fe8426
PKG_USE_MIPS16:=0
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=libprotobuf-c
-PKG_VERSION:=v1.2.1
-PKG_RELEASE:=$(PKG_SOURCE_VERSION)
+PKG_VERSION:=1.3.1
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_MIRROR_HASH:=2ebe48454fe454d118cf952655a24477c4bed892cee7ae085dc56d05ac711a8a
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=git://github.com/protobuf-c/protobuf-c.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=$(PKG_VERSION)
-
-PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
+PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
+PKG_HASH:=51472d3a191d6d7b425e32b612e477c06f73fe23e07f6a6a839b11808e9d2267
+PKG_BUILD_DIR:=$(BUILD_DIR)/protobuf-c-$(PKG_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/protobuf-c-$(PKG_VERSION)
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=BSD-2c
-PKG_MAINTAINER:=Jacob Siverskog <jacob@teenageengineering.com>
+PKG_BUILD_DEPENDS:=protobuf-c/host
+HOST_BUILD_DEPENDS:=protobuf/host
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
define Package/libprotobuf-c
TITLE:=Protocol Buffers library
SECTION:=libs
CATEGORY:=Libraries
- URL:=http://code.google.com/p/protobuf-c/
+ URL:=https://github.com/protobuf-c/protobuf-c
endef
define Package/libprotobuf-c/description
endef
$(eval $(call BuildPackage,libprotobuf-c))
+$(eval $(call HostBuild))
+
include $(TOPDIR)/rules.mk
PKG_NAME:=protobuf
-PKG_VERSION:=3.3.0
+PKG_VERSION:=3.5.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
-PKG_HASH:=578a2589bf9258adb03245dec5d624b61536867ebb732dbb8aeb30d96b0ada1f
+PKG_HASH:=c28dba8782da2cfea1e11c61d335958c31a9c1bc553063546af9cbe98f204092
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
-define Package/protobuf
+define Package/protobuf/Default
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A structured data encoding library
URL:=https://github.com/google/protobuf
DEPENDS:=+zlib +libpthread +libstdcpp
- MAINTAINER:=Per Sandström <per.j.sandstrom@gmail.com>
+ MAINTAINER:=Ken Keys <kkeys@caida.org>
+endef
+
+define Package/protobuf
+ $(call Package/protobuf/Default)
+ DEPENDS+=+protobuf-lite
+endef
+
+define Package/protobuf-lite
+ $(call Package/protobuf/Default)
+endef
+
+define Package/protobuf/description/Default
+Protocol Buffers are a way of encoding structured data in an efficient
+yet extensible format. Google uses Protocol Buffers for almost all
+of its internal RPC protocols and file formats.
endef
define Package/protobuf/description
- Protocol Buffers are a way of encoding structured data in an efficient
- yet extensible format. Google uses Protocol Buffers for almost all
- of its internal RPC protocols and file formats.
+$(call Package/protobuf/description/Default)
+
+This package provides the libprotoc, libprotobuf, and libprotobuf-lite
+libraries. For a much smaller protobuf package, see "protobuf-lite".
+
+endef
+
+define Package/protobuf-lite/description
+$(call Package/protobuf/description/Default)
+
+This package provides the libprotobuf-lite library.
+
endef
CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc
$(1)/usr/lib/
endef
-define Package/protobuf/install
+define Package/protobuf-lite/install
$(INSTALL_DIR) \
$(1)/usr/lib
$(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
+ $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
$(1)/usr/lib/
+endef
+
+define Package/protobuf/install
+ $(INSTALL_DIR) \
+ $(1)/usr/lib
$(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
+ $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
$(1)/usr/lib/
$(CP) \
endef
$(eval $(call BuildPackage,protobuf))
+$(eval $(call BuildPackage,protobuf-lite))
$(eval $(call HostBuild))
PKG_NAME:=sbc
PKG_VERSION:=1.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://www.kernel.org/pub/linux/bluetooth/
+PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
PKG_HASH:=e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309
PKG_LICENSE:=LGPL-2.1+
Needed for A2DP support.
endef
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -flto
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/sbc
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/sbc/sbc.h $(1)/usr/include/sbc/
include $(TOPDIR)/rules.mk
PKG_NAME:=sqlite
-PKG_VERSION:=3210000
-PKG_RELEASE:=3
+PKG_VERSION:=3240000
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
-PKG_HASH:=d7dd516775005ad87a57f428b6f86afd206cb341722927f104d3f0cf65fbbbe3
-PKG_SOURCE_URL:=http://www.sqlite.org/2017/
+PKG_HASH:=d9d14e88c6fb6d68de9ca0d1f9797477d82fc3aed613558f87ffbdbbc5ceb74a
+PKG_SOURCE_URL:=http://www.sqlite.org/2018/
PKG_LICENSE:=PUBLICDOMAIN
PKG_LICENSE_FILES:=
$(call Package/sqlite3/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libpthread
+ DEPENDS:=+libpthread +zlib
TITLE+= (library)
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=tdb
-PKG_VERSION:=1.3.15
-PKG_RELEASE:=1
+PKG_VERSION:=1.3.16
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.samba.org/ftp/tdb/
-PKG_HASH:=b4a1bf3833601bd9f10aff363cb750860aef9ce5b4617989239923192f946728
+PKG_HASH:=6a3fc2616567f23993984ada3cea97d953a27669ffd1bfbbe961f26e0cf96cc5
PKG_INSTALL:=1
include $(INCLUDE_DIR)/kernel.mk
# for $(VERSION_DIST)
include $(INCLUDE_DIR)/version.mk
-#include $(INCLUDE_DIR)/version.mk
define Package/tdb
SUBMENU:=database
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Trivial Database
+ DEPNEDS:=+libattr
URL:=http://sourceforge.net/projects/tdb/
MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
endef
define Package/tdb/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
endef
--- /dev/null
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index fd00a42..337d559 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -340,22 +340,13 @@ def configure(conf):
+
+ conf.CHECK_FUNCS('prctl dirname basename')
+
+- strlcpy_in_bsd = False
+-
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+- checklibc=True):
+- strlcpy_in_bsd = True
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ # Not checking for libbsd
++ conf.CHECK_FUNCS('strlcpy strlcat')
++ conf.CHECK_FUNCS('getpeereid')
++ conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
++ conf.CHECK_FUNCS('setproctitle_init')
++
++ conf.CHECK_FUNCS('closefrom')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+@@ -698,9 +689,6 @@ def configure(conf):
+
+ # look for a method of finding the list of network interfaces
+ for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+- bsd_for_strlcpy = ''
+- if strlcpy_in_bsd:
+- bsd_for_strlcpy = ' bsd'
+ if conf.CHECK_CODE('''
+ #define %s 1
+ #define NO_CONFIG_H 1
+@@ -713,7 +701,7 @@ def configure(conf):
+ #include "test/getifaddrs.c"
+ ''' % method,
+ method,
+- lib='nsl socket' + bsd_for_strlcpy,
++ lib='nsl socket',
+ addmain=False,
+ execute=True):
+ break
+@@ -761,7 +749,6 @@ def build(bld):
+ break
+
+ extra_libs = ''
+- if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
+
+ bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
+ REPLACE_HOSTCC_SOURCE,
PKG_NAME:=tiff
PKG_VERSION:=4.0.9
-PKG_RELEASE:=3
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.osgeo.org/libtiff
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:=COPYRIGHT
+PKG_CPE_ID:=cpe:/a:libtiff:libtiff
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_libtiffxx
+++ /dev/null
-From c6f41df7b581402dfba3c19a1e3df4454c551a01 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Sun, 31 Dec 2017 15:09:41 +0100
-Subject: [PATCH] libtiff/tif_print.c: TIFFPrintDirectory(): fix null pointer dereference on corrupted file. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2770
-
----
- libtiff/tif_print.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- a/libtiff/tif_print.c
-+++ b/libtiff/tif_print.c
-@@ -667,13 +667,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd,
- #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
- fprintf(fd, " %3lu: [%8I64u, %8I64u]\n",
- (unsigned long) s,
-- (unsigned __int64) td->td_stripoffset[s],
-- (unsigned __int64) td->td_stripbytecount[s]);
-+ td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0,
-+ td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0);
- #else
- fprintf(fd, " %3lu: [%8llu, %8llu]\n",
- (unsigned long) s,
-- (unsigned long long) td->td_stripoffset[s],
-- (unsigned long long) td->td_stripbytecount[s]);
-+ td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0,
-+ td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0);
- #endif
- }
- }
+++ /dev/null
---- a/libtiff/tif_dir.c
-+++ b/libtiff/tif_dir.c
-@@ -1067,6 +1067,9 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va
- if (td->td_samplesperpixel - td->td_extrasamples > 1) {
- *va_arg(ap, uint16**) = td->td_transferfunction[1];
- *va_arg(ap, uint16**) = td->td_transferfunction[2];
-+ } else {
-+ *va_arg(ap, uint16**) = NULL;
-+ *va_arg(ap, uint16**) = NULL;
- }
- break;
- case TIFFTAG_REFERENCEBLACKWHITE:
---- a/tools/tiff2pdf.c
-+++ b/tools/tiff2pdf.c
-@@ -237,7 +237,7 @@ typedef struct {
- float tiff_whitechromaticities[2];
- float tiff_primarychromaticities[6];
- float tiff_referenceblackwhite[2];
-- float* tiff_transferfunction[3];
-+ uint16* tiff_transferfunction[3];
- int pdf_image_interpolate; /* 0 (default) : do not interpolate,
- 1 : interpolate */
- uint16 tiff_transferfunctioncount;
-@@ -1047,6 +1047,8 @@ void t2p_read_tiff_init(T2P* t2p, TIFF*
- uint16 pagen=0;
- uint16 paged=0;
- uint16 xuint16=0;
-+ uint16 tiff_transferfunctioncount=0;
-+ uint16* tiff_transferfunction[3];
-
- directorycount=TIFFNumberOfDirectories(input);
- t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE)));
-@@ -1147,26 +1149,48 @@ void t2p_read_tiff_init(T2P* t2p, TIFF*
- }
- #endif
- if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION,
-- &(t2p->tiff_transferfunction[0]),
-- &(t2p->tiff_transferfunction[1]),
-- &(t2p->tiff_transferfunction[2]))) {
-- if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
-- (t2p->tiff_transferfunction[2] != (float*) NULL) &&
-- (t2p->tiff_transferfunction[1] !=
-- t2p->tiff_transferfunction[0])) {
-- t2p->tiff_transferfunctioncount = 3;
-- t2p->tiff_pages[i].page_extra += 4;
-- t2p->pdf_xrefcount += 4;
-- } else {
-- t2p->tiff_transferfunctioncount = 1;
-- t2p->tiff_pages[i].page_extra += 2;
-- t2p->pdf_xrefcount += 2;
-- }
-- if(t2p->pdf_minorversion < 2)
-- t2p->pdf_minorversion = 2;
-+ &(tiff_transferfunction[0]),
-+ &(tiff_transferfunction[1]),
-+ &(tiff_transferfunction[2]))) {
-+
-+ if((tiff_transferfunction[1] != (uint16*) NULL) &&
-+ (tiff_transferfunction[2] != (uint16*) NULL)
-+ ) {
-+ tiff_transferfunctioncount=3;
-+ } else {
-+ tiff_transferfunctioncount=1;
-+ }
- } else {
-- t2p->tiff_transferfunctioncount=0;
-+ tiff_transferfunctioncount=0;
- }
-+
-+ if (i > 0){
-+ if (tiff_transferfunctioncount != t2p->tiff_transferfunctioncount){
-+ TIFFError(
-+ TIFF2PDF_MODULE,
-+ "Different transfer function on page %d",
-+ i);
-+ t2p->t2p_error = T2P_ERR_ERROR;
-+ return;
-+ }
-+ }
-+
-+ t2p->tiff_transferfunctioncount = tiff_transferfunctioncount;
-+ t2p->tiff_transferfunction[0] = tiff_transferfunction[0];
-+ t2p->tiff_transferfunction[1] = tiff_transferfunction[1];
-+ t2p->tiff_transferfunction[2] = tiff_transferfunction[2];
-+ if(tiff_transferfunctioncount == 3){
-+ t2p->tiff_pages[i].page_extra += 4;
-+ t2p->pdf_xrefcount += 4;
-+ if(t2p->pdf_minorversion < 2)
-+ t2p->pdf_minorversion = 2;
-+ } else if (tiff_transferfunctioncount == 1){
-+ t2p->tiff_pages[i].page_extra += 2;
-+ t2p->pdf_xrefcount += 2;
-+ if(t2p->pdf_minorversion < 2)
-+ t2p->pdf_minorversion = 2;
-+ }
-+
- if( TIFFGetField(
- input,
- TIFFTAG_ICCPROFILE,
-@@ -1827,10 +1851,9 @@ void t2p_read_tiff_data(T2P* t2p, TIFF*
- &(t2p->tiff_transferfunction[0]),
- &(t2p->tiff_transferfunction[1]),
- &(t2p->tiff_transferfunction[2]))) {
-- if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
-- (t2p->tiff_transferfunction[2] != (float*) NULL) &&
-- (t2p->tiff_transferfunction[1] !=
-- t2p->tiff_transferfunction[0])) {
-+ if((t2p->tiff_transferfunction[1] != (uint16*) NULL) &&
-+ (t2p->tiff_transferfunction[2] != (uint16*) NULL)
-+ ) {
- t2p->tiff_transferfunctioncount=3;
- } else {
- t2p->tiff_transferfunctioncount=1;
--- /dev/null
+From 49723b0eb683cca80142b01a48ba1475fed5188a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
+Date: Fri, 23 Mar 2018 15:35:39 +0100
+Subject: [PATCH] Fix for bug 2772
+
+It is possible to craft a TIFF document where the IFD list is circular,
+leading to an infinite loop while traversing the chain. The libtiff
+directory reader has a failsafe that will break out of this loop after
+reading 65535 directory entries, but it will continue processing,
+consuming time and resources to process what is essentially a bogus TIFF
+document.
+
+This change fixes the above behavior by breaking out of processing when
+a TIFF document has >= 65535 directories and terminating with an error.
+---
+ contrib/addtiffo/tif_overview.c | 14 +++++++++++++-
+ tools/tiff2pdf.c | 10 ++++++++++
+ tools/tiffcrop.c | 13 +++++++++++--
+ 3 files changed, 34 insertions(+), 3 deletions(-)
+
+diff --git a/contrib/addtiffo/tif_overview.c b/contrib/addtiffo/tif_overview.c
+index c61ffbb..03b3573 100644
+--- a/contrib/addtiffo/tif_overview.c
++++ b/contrib/addtiffo/tif_overview.c
+@@ -65,6 +65,8 @@
+ # define MAX(a,b) ((a>b) ? a : b)
+ #endif
+
++#define TIFF_DIR_MAX 65534
++
+ void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
+ int (*)(double,void*), void * );
+
+@@ -91,6 +93,7 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize,
+ {
+ toff_t nBaseDirOffset;
+ toff_t nOffset;
++ tdir_t iNumDir;
+
+ (void) bUseSubIFDs;
+
+@@ -147,7 +150,16 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize,
+ return 0;
+
+ TIFFWriteDirectory( hTIFF );
+- TIFFSetDirectory( hTIFF, (tdir_t) (TIFFNumberOfDirectories(hTIFF)-1) );
++ iNumDir = TIFFNumberOfDirectories(hTIFF);
++ if( iNumDir > TIFF_DIR_MAX )
++ {
++ TIFFErrorExt( TIFFClientdata(hTIFF),
++ "TIFF_WriteOverview",
++ "File `%s' has too many directories.\n",
++ TIFFFileName(hTIFF) );
++ exit(-1);
++ }
++ TIFFSetDirectory( hTIFF, (tdir_t) (iNumDir - 1) );
+
+ nOffset = TIFFCurrentDirOffset( hTIFF );
+
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index 454befb..bdb9126 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -68,6 +68,8 @@ extern int getopt(int, char**, char*);
+
+ #define PS_UNIT_SIZE 72.0F
+
++#define TIFF_DIR_MAX 65534
++
+ /* This type is of PDF color spaces. */
+ typedef enum {
+ T2P_CS_BILEVEL = 0x01, /* Bilevel, black and white */
+@@ -1049,6 +1051,14 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+ uint16 xuint16=0;
+
+ directorycount=TIFFNumberOfDirectories(input);
++ if(directorycount > TIFF_DIR_MAX) {
++ TIFFError(
++ TIFF2PDF_MODULE,
++ "TIFF contains too many directories, %s",
++ TIFFFileName(input));
++ t2p->t2p_error = T2P_ERR_ERROR;
++ return;
++ }
+ t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE)));
+ if(t2p->tiff_pages==NULL){
+ TIFFError(
+diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
+index c69177e..c60cb38 100644
+--- a/tools/tiffcrop.c
++++ b/tools/tiffcrop.c
+@@ -217,6 +217,8 @@ extern int getopt(int argc, char * const argv[], const char *optstring);
+ #define DUMP_TEXT 1
+ #define DUMP_RAW 2
+
++#define TIFF_DIR_MAX 65534
++
+ /* Offsets into buffer for margins and fixed width and length segments */
+ struct offset {
+ uint32 tmargin;
+@@ -2233,7 +2235,7 @@ main(int argc, char* argv[])
+ pageNum = -1;
+ else
+ total_images = 0;
+- /* read multiple input files and write to output file(s) */
++ /* Read multiple input files and write to output file(s) */
+ while (optind < argc - 1)
+ {
+ in = TIFFOpen (argv[optind], "r");
+@@ -2241,7 +2243,14 @@ main(int argc, char* argv[])
+ return (-3);
+
+ /* If only one input file is specified, we can use directory count */
+- total_images = TIFFNumberOfDirectories(in);
++ total_images = TIFFNumberOfDirectories(in);
++ if (total_images > TIFF_DIR_MAX)
++ {
++ TIFFError (TIFFFileName(in), "File contains too many directories");
++ if (out != NULL)
++ (void) TIFFClose(out);
++ return (1);
++ }
+ if (image_count == 0)
+ {
+ dirnum = 0;
+--
+2.13.6
+
--- /dev/null
+From de5385cd882a5ff0970f63f4d93da0cbc87230c2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
+Date: Tue, 17 Apr 2018 18:42:09 +0200
+Subject: [PATCH] Fix NULL pointer dereference in TIFFPrintDirectory
+
+The TIFFPrintDirectory function relies on the following assumptions,
+supposed to be guaranteed by the specification:
+
+(a) A Transfer Function field is only present if the TIFF file has
+ photometric type < 3.
+
+(b) If SamplesPerPixel > Color Channels, then the ExtraSamples field
+ has count SamplesPerPixel - (Color Channels) and contains
+ information about supplementary channels.
+
+While respect of (a) and (b) are essential for the well functioning of
+TIFFPrintDirectory, no checks are realized neither by the callee nor
+by TIFFPrintDirectory itself. Hence, following scenarios might happen
+and trigger the NULL pointer dereference:
+
+(1) TIFF File of photometric type 4 or more has illegal Transfer
+ Function field.
+
+(2) TIFF File has photometric type 3 or less and defines a
+ SamplesPerPixel field such that SamplesPerPixel > Color Channels
+ without defining all extra samples in the ExtraSamples fields.
+
+In this patch, we address both issues with respect of the following
+principles:
+
+(A) In the case of (1), the defined transfer table should be printed
+ safely even if it isn't 'legal'. This allows us to avoid expensive
+ checks in TIFFPrintDirectory. Also, it is quite possible that
+ an alternative photometric type would be developed (not part of the
+ standard) and would allow definition of Transfer Table. We want
+ libtiff to be able to handle this scenario out of the box.
+
+(B) In the case of (2), the transfer table should be printed at its
+ right size, that is if TIFF file has photometric type Palette
+ then the transfer table should have one row and not three, even
+ if two extra samples are declared.
+
+In order to fulfill (A) we simply add a new 'i < 3' end condition to
+the broken TIFFPrintDirectory loop. This makes sure that in any case
+where (b) would be respected but not (a), everything stays fine.
+
+(B) is fulfilled by the loop condition
+'i < td->td_samplesperpixel - td->td_extrasamples'. This is enough as
+long as (b) is respected.
+
+Naturally, we also make sure (b) is respected. This is done in the
+TIFFReadDirectory function by making sure any non-color channel is
+counted in ExtraSamples.
+
+This commit addresses CVE-2018-7456.
+---
+ libtiff/tif_dirread.c | 62 +++++++++++++++++++++++++++++++++++++++++++
+ libtiff/tif_print.c | 2 +-
+ 2 files changed, 63 insertions(+), 1 deletion(-)
+
+diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c
+index 5e62e81..80aaf8d 100644
+--- a/libtiff/tif_dirread.c
++++ b/libtiff/tif_dirread.c
+@@ -167,6 +167,7 @@ static int TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, uint32 nstrips, uin
+ static int TIFFFetchSubjectDistance(TIFF*, TIFFDirEntry*);
+ static void ChopUpSingleUncompressedStrip(TIFF*);
+ static uint64 TIFFReadUInt64(const uint8 *value);
++static int _TIFFGetMaxColorChannels(uint16 photometric);
+
+ static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount );
+
+@@ -3506,6 +3507,35 @@ static void TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, c
+ }
+ }
+
++/*
++ * Return the maximum number of color channels specified for a given photometric
++ * type. 0 is returned if photometric type isn't supported or no default value
++ * is defined by the specification.
++ */
++static int _TIFFGetMaxColorChannels( uint16 photometric )
++{
++ switch (photometric) {
++ case PHOTOMETRIC_PALETTE:
++ case PHOTOMETRIC_MINISWHITE:
++ case PHOTOMETRIC_MINISBLACK:
++ return 1;
++ case PHOTOMETRIC_YCBCR:
++ case PHOTOMETRIC_RGB:
++ case PHOTOMETRIC_CIELAB:
++ return 3;
++ case PHOTOMETRIC_SEPARATED:
++ case PHOTOMETRIC_MASK:
++ return 4;
++ case PHOTOMETRIC_LOGL:
++ case PHOTOMETRIC_LOGLUV:
++ case PHOTOMETRIC_CFA:
++ case PHOTOMETRIC_ITULAB:
++ case PHOTOMETRIC_ICCLAB:
++ default:
++ return 0;
++ }
++}
++
+ /*
+ * Read the next TIFF directory from a file and convert it to the internal
+ * format. We read directories sequentially.
+@@ -3522,6 +3552,7 @@ TIFFReadDirectory(TIFF* tif)
+ uint32 fii=FAILED_FII;
+ toff_t nextdiroff;
+ int bitspersample_read = FALSE;
++ int color_channels;
+
+ tif->tif_diroff=tif->tif_nextdiroff;
+ if (!TIFFCheckDirOffset(tif,tif->tif_nextdiroff))
+@@ -4026,6 +4057,37 @@ TIFFReadDirectory(TIFF* tif)
+ }
+ }
+ }
++
++ /*
++ * Make sure all non-color channels are extrasamples.
++ * If it's not the case, define them as such.
++ */
++ color_channels = _TIFFGetMaxColorChannels(tif->tif_dir.td_photometric);
++ if (color_channels && tif->tif_dir.td_samplesperpixel - tif->tif_dir.td_extrasamples > color_channels) {
++ uint16 old_extrasamples;
++ uint16 *new_sampleinfo;
++
++ TIFFWarningExt(tif->tif_clientdata,module, "Sum of Photometric type-related "
++ "color channels and ExtraSamples doesn't match SamplesPerPixel. "
++ "Defining non-color channels as ExtraSamples.");
++
++ old_extrasamples = tif->tif_dir.td_extrasamples;
++ tif->tif_dir.td_extrasamples = (tif->tif_dir.td_samplesperpixel - color_channels);
++
++ // sampleinfo should contain information relative to these new extra samples
++ new_sampleinfo = (uint16*) _TIFFcalloc(tif->tif_dir.td_extrasamples, sizeof(uint16));
++ if (!new_sampleinfo) {
++ TIFFErrorExt(tif->tif_clientdata, module, "Failed to allocate memory for "
++ "temporary new sampleinfo array (%d 16 bit elements)",
++ tif->tif_dir.td_extrasamples);
++ goto bad;
++ }
++
++ memcpy(new_sampleinfo, tif->tif_dir.td_sampleinfo, old_extrasamples * sizeof(uint16));
++ _TIFFsetShortArray(&tif->tif_dir.td_sampleinfo, new_sampleinfo, tif->tif_dir.td_extrasamples);
++ _TIFFfree(new_sampleinfo);
++ }
++
+ /*
+ * Verify Palette image has a Colormap.
+ */
+diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c
+index 24d4b98..10a588e 100644
+--- a/libtiff/tif_print.c
++++ b/libtiff/tif_print.c
+@@ -546,7 +546,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
+ uint16 i;
+ fprintf(fd, " %2ld: %5u",
+ l, td->td_transferfunction[0][l]);
+- for (i = 1; i < td->td_samplesperpixel; i++)
++ for (i = 1; i < td->td_samplesperpixel - td->td_extrasamples && i < 3; i++)
+ fprintf(fd, " %5u",
+ td->td_transferfunction[i][l]);
+ fputc('\n', fd);
+--
+2.17.0
+
--- /dev/null
+From e1cd2d7ab032e7fe80b4c13e07895194c8bac85e Mon Sep 17 00:00:00 2001
+From: Brian May <brian@linuxpenguins.xyz>
+Date: Thu, 7 Dec 2017 07:46:47 +1100
+Subject: [PATCH 1/4] [PATCH] tiff2pdf: Fix CVE-2017-9935
+
+Fix for http://bugzilla.maptools.org/show_bug.cgi?id=2704
+
+This vulnerability - at least for the supplied test case - is because we
+assume that a tiff will only have one transfer function that is the same
+for all pages. This is not required by the TIFF standards.
+
+We than read the transfer function for every page. Depending on the
+transfer function, we allocate either 2 or 4 bytes to the XREF buffer.
+We allocate this memory after we read in the transfer function for the
+page.
+
+For the first exploit - POC1, this file has 3 pages. For the first page
+we allocate 2 extra extra XREF entries. Then for the next page 2 more
+entries. Then for the last page the transfer function changes and we
+allocate 4 more entries.
+
+When we read the file into memory, we assume we have 4 bytes extra for
+each and every page (as per the last transfer function we read). Which
+is not correct, we only have 2 bytes extra for the first 2 pages. As a
+result, we end up writing past the end of the buffer.
+
+There are also some related issues that this also fixes. For example,
+TIFFGetField can return uninitalized pointer values, and the logic to
+detect a N=3 vs N=1 transfer function seemed rather strange.
+
+It is also strange that we declare the transfer functions to be of type
+float, when the standard says they are unsigned 16 bit values. This is
+fixed in another patch.
+
+This patch will check to ensure that the N value for every transfer
+function is the same for every page. If this changes, we abort with an
+error. In theory, we should perhaps check that the transfer function
+itself is identical for every page, however we don't do that due to the
+confusion of the type of the data in the transfer function.
+---
+ libtiff/tif_dir.c | 3 +++
+ tools/tiff2pdf.c | 69 +++++++++++++++++++++++++++++++----------------
+ 2 files changed, 49 insertions(+), 23 deletions(-)
+
+diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c
+index f00f808..c36a5f3 100644
+--- a/libtiff/tif_dir.c
++++ b/libtiff/tif_dir.c
+@@ -1067,6 +1067,9 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
+ if (td->td_samplesperpixel - td->td_extrasamples > 1) {
+ *va_arg(ap, uint16**) = td->td_transferfunction[1];
+ *va_arg(ap, uint16**) = td->td_transferfunction[2];
++ } else {
++ *va_arg(ap, uint16**) = NULL;
++ *va_arg(ap, uint16**) = NULL;
+ }
+ break;
+ case TIFFTAG_REFERENCEBLACKWHITE:
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index bdb9126..bd23c9e 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -239,7 +239,7 @@ typedef struct {
+ float tiff_whitechromaticities[2];
+ float tiff_primarychromaticities[6];
+ float tiff_referenceblackwhite[2];
+- float* tiff_transferfunction[3];
++ uint16* tiff_transferfunction[3];
+ int pdf_image_interpolate; /* 0 (default) : do not interpolate,
+ 1 : interpolate */
+ uint16 tiff_transferfunctioncount;
+@@ -1049,6 +1049,8 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+ uint16 pagen=0;
+ uint16 paged=0;
+ uint16 xuint16=0;
++ uint16 tiff_transferfunctioncount=0;
++ uint16* tiff_transferfunction[3];
+
+ directorycount=TIFFNumberOfDirectories(input);
+ if(directorycount > TIFF_DIR_MAX) {
+@@ -1157,26 +1159,48 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
+ }
+ #endif
+ if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION,
+- &(t2p->tiff_transferfunction[0]),
+- &(t2p->tiff_transferfunction[1]),
+- &(t2p->tiff_transferfunction[2]))) {
+- if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[2] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[1] !=
+- t2p->tiff_transferfunction[0])) {
+- t2p->tiff_transferfunctioncount = 3;
+- t2p->tiff_pages[i].page_extra += 4;
+- t2p->pdf_xrefcount += 4;
+- } else {
+- t2p->tiff_transferfunctioncount = 1;
+- t2p->tiff_pages[i].page_extra += 2;
+- t2p->pdf_xrefcount += 2;
+- }
+- if(t2p->pdf_minorversion < 2)
+- t2p->pdf_minorversion = 2;
++ &(tiff_transferfunction[0]),
++ &(tiff_transferfunction[1]),
++ &(tiff_transferfunction[2]))) {
++
++ if((tiff_transferfunction[1] != (uint16*) NULL) &&
++ (tiff_transferfunction[2] != (uint16*) NULL)
++ ) {
++ tiff_transferfunctioncount=3;
++ } else {
++ tiff_transferfunctioncount=1;
++ }
+ } else {
+- t2p->tiff_transferfunctioncount=0;
++ tiff_transferfunctioncount=0;
+ }
++
++ if (i > 0){
++ if (tiff_transferfunctioncount != t2p->tiff_transferfunctioncount){
++ TIFFError(
++ TIFF2PDF_MODULE,
++ "Different transfer function on page %d",
++ i);
++ t2p->t2p_error = T2P_ERR_ERROR;
++ return;
++ }
++ }
++
++ t2p->tiff_transferfunctioncount = tiff_transferfunctioncount;
++ t2p->tiff_transferfunction[0] = tiff_transferfunction[0];
++ t2p->tiff_transferfunction[1] = tiff_transferfunction[1];
++ t2p->tiff_transferfunction[2] = tiff_transferfunction[2];
++ if(tiff_transferfunctioncount == 3){
++ t2p->tiff_pages[i].page_extra += 4;
++ t2p->pdf_xrefcount += 4;
++ if(t2p->pdf_minorversion < 2)
++ t2p->pdf_minorversion = 2;
++ } else if (tiff_transferfunctioncount == 1){
++ t2p->tiff_pages[i].page_extra += 2;
++ t2p->pdf_xrefcount += 2;
++ if(t2p->pdf_minorversion < 2)
++ t2p->pdf_minorversion = 2;
++ }
++
+ if( TIFFGetField(
+ input,
+ TIFFTAG_ICCPROFILE,
+@@ -1837,10 +1861,9 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
+ &(t2p->tiff_transferfunction[0]),
+ &(t2p->tiff_transferfunction[1]),
+ &(t2p->tiff_transferfunction[2]))) {
+- if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[2] != (float*) NULL) &&
+- (t2p->tiff_transferfunction[1] !=
+- t2p->tiff_transferfunction[0])) {
++ if((t2p->tiff_transferfunction[1] != (uint16*) NULL) &&
++ (t2p->tiff_transferfunction[2] != (uint16*) NULL)
++ ) {
+ t2p->tiff_transferfunctioncount=3;
+ } else {
+ t2p->tiff_transferfunctioncount=1;
+--
+2.17.0
+
--- /dev/null
+From b1997b9c3ac0d6bac5effd7558141986487217a9 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sun, 31 Dec 2017 15:09:41 +0100
+Subject: [PATCH 2/4] libtiff/tif_print.c: TIFFPrintDirectory(): fix null
+ pointer dereference on corrupted file. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2770 / CVE-2017-18013
+
+---
+ libtiff/tif_print.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c
+index 10a588e..b9b53a0 100644
+--- a/libtiff/tif_print.c
++++ b/libtiff/tif_print.c
+@@ -667,13 +667,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+ fprintf(fd, " %3lu: [%8I64u, %8I64u]\n",
+ (unsigned long) s,
+- (unsigned __int64) td->td_stripoffset[s],
+- (unsigned __int64) td->td_stripbytecount[s]);
++ td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0,
++ td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0);
+ #else
+ fprintf(fd, " %3lu: [%8llu, %8llu]\n",
+ (unsigned long) s,
+- (unsigned long long) td->td_stripoffset[s],
+- (unsigned long long) td->td_stripbytecount[s]);
++ td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0,
++ td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0);
+ #endif
+ }
+ }
+--
+2.17.0
+
--- /dev/null
+From 1c127eb3cb7653bd61b61f9c3cfeb36fd10edab1 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sat, 12 May 2018 15:32:31 +0200
+Subject: [PATCH 3/4] LZWDecodeCompat(): fix potential index-out-of-bounds
+ write. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2780 /
+ CVE-2018-8905
+
+The fix consists in using the similar code LZWDecode() to validate we
+don't write outside of the output buffer.
+---
+ libtiff/tif_lzw.c | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/libtiff/tif_lzw.c b/libtiff/tif_lzw.c
+index bc8f9c8..186ea3c 100644
+--- a/libtiff/tif_lzw.c
++++ b/libtiff/tif_lzw.c
+@@ -604,6 +604,7 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
+ char *tp;
+ unsigned char *bp;
+ int code, nbits;
++ int len;
+ long nextbits, nextdata, nbitsmask;
+ code_t *codep, *free_entp, *maxcodep, *oldcodep;
+
+@@ -755,13 +756,18 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
+ } while (--occ);
+ break;
+ }
+- assert(occ >= codep->length);
+- op += codep->length;
+- occ -= codep->length;
+- tp = op;
++ len = codep->length;
++ tp = op + len;
+ do {
+- *--tp = codep->value;
+- } while( (codep = codep->next) != NULL );
++ int t;
++ --tp;
++ t = codep->value;
++ codep = codep->next;
++ *tp = (char)t;
++ } while (codep && tp > op);
++ assert(occ >= len);
++ op += len;
++ occ -= len;
+ } else {
+ *op++ = (char)code;
+ occ--;
+--
+2.17.0
+
--- /dev/null
+From 98ed6179dec22db48f6e235d8ca9e2708bf4e71a Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sat, 12 May 2018 14:24:15 +0200
+Subject: [PATCH 4/4] TIFFWriteDirectorySec: avoid assertion. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
+
+---
+ libtiff/tif_dirwrite.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
+index c68d6d2..5d0a669 100644
+--- a/libtiff/tif_dirwrite.c
++++ b/libtiff/tif_dirwrite.c
+@@ -697,8 +697,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
+ }
+ break;
+ default:
+- assert(0); /* we should never get here */
+- break;
++ TIFFErrorExt(tif->tif_clientdata,module,
++ "Cannot write tag %d (%s)",
++ TIFFFieldTag(o),
++ o->field_name ? o->field_name : "unknown");
++ goto bad;
+ }
+ }
+ }
+--
+2.17.0
+
--- /dev/null
+From 5c3bc1c78dfe05eb5f4224650ad606b75e1f7034 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sun, 11 Mar 2018 11:14:01 +0100
+Subject: [PATCH] ChopUpSingleUncompressedStrip: avoid memory exhaustion
+ (CVE-2017-11613)
+
+In ChopUpSingleUncompressedStrip(), if the computed number of strips is big
+enough and we are in read only mode, validate that the file size is consistent
+with that number of strips to avoid useless attempts at allocating a lot of
+memory for the td_stripbytecount and td_stripoffset arrays.
+
+Rework fix done in 3719385a3fac5cfb20b487619a5f08abbf967cf8 to work in more
+cases like https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6979.
+Credit to OSS Fuzz
+
+Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2724
+---
+ libtiff/tif_dirread.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c
+index 80aaf8d..5896a78 100644
+--- a/libtiff/tif_dirread.c
++++ b/libtiff/tif_dirread.c
+@@ -5760,6 +5760,16 @@ ChopUpSingleUncompressedStrip(TIFF* tif)
+ if( nstrips == 0 )
+ return;
+
++ /* If we are going to allocate a lot of memory, make sure that the */
++ /* file is as big as needed */
++ if( tif->tif_mode == O_RDONLY &&
++ nstrips > 1000000 &&
++ (offset >= TIFFGetFileSize(tif) ||
++ stripbytes > (TIFFGetFileSize(tif) - offset) / (nstrips - 1)) )
++ {
++ return;
++ }
++
+ newcounts = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64),
+ "for chopped \"StripByteCounts\" array");
+ newoffsets = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64),
+--
+2.17.1
+
--- /dev/null
+From 9171da596c88e6a2dadcab4a3a89dddd6e1b4655 Mon Sep 17 00:00:00 2001
+From: Nathan Baker <elitebadger@gmail.com>
+Date: Thu, 25 Jan 2018 21:28:15 +0000
+Subject: [PATCH] Add workaround to pal2rgb buffer overflow.
+
+---
+ tools/pal2rgb.c | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c
+index 0423598..01fcf94 100644
+--- a/tools/pal2rgb.c
++++ b/tools/pal2rgb.c
+@@ -184,8 +184,21 @@ main(int argc, char* argv[])
+ { unsigned char *ibuf, *obuf;
+ register unsigned char* pp;
+ register uint32 x;
+- ibuf = (unsigned char*)_TIFFmalloc(TIFFScanlineSize(in));
+- obuf = (unsigned char*)_TIFFmalloc(TIFFScanlineSize(out));
++ tmsize_t tss_in = TIFFScanlineSize(in);
++ tmsize_t tss_out = TIFFScanlineSize(out);
++ if (tss_out / tss_in < 3) {
++ /*
++ * BUG 2750: The following code does not know about chroma
++ * subsampling of JPEG data. It assumes that the output buffer is 3x
++ * the length of the input buffer due to exploding the palette into
++ * RGB tuples. If this assumption is incorrect, it could lead to a
++ * buffer overflow. Go ahead and fail now to prevent that.
++ */
++ fprintf(stderr, "Could not determine correct image size for output. Exiting.\n");
++ return -1;
++ }
++ ibuf = (unsigned char*)_TIFFmalloc(tss_in);
++ obuf = (unsigned char*)_TIFFmalloc(tss_out);
+ switch (config) {
+ case PLANARCONFIG_CONTIG:
+ for (row = 0; row < imagelength; row++) {
+--
+libgit2 0.27.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=unixodbc
-PKG_VERSION:=2.3.4
-PKG_RELEASE:=5
+PKG_VERSION:=2.3.7
+PKG_RELEASE:=1
-PKG_SOURCE_URL:=ftp://ftp.unixodbc.org/pub/unixODBC/
PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz
-PKG_HASH:=2e1509a96bb18d248bf08ead0d74804957304ff7c6f8b2e5965309c632421e39
-PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION)
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/unixODBC-$(PKG_VERSION)
+PKG_SOURCE_URL:=http://www.unixodbc.org
+PKG_HASH:=45f169ba1f454a72b8fcbb82abd832630a3bf93baa84731cf2949f449e1e3e77
+
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=prog GPL libs LGPL
+PKG_CPE_ID:=cpe:/a:unixodbc:unixodbc
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/unixODBC-$(PKG_VERSION)
HOST_BUILD_DEPENDS:=unixodbc
# if your other package depends on unixodbc and needs
define Package/unixodbc/Default
SUBMENU:=database
TITLE:=unixODBC
- URL:=http://www.unixodbc.org/
+ URL:=http://www.unixodbc.org
endef
define Package/unixodbc
PKG_NAME:=uw-imap
PKG_VERSION:=2007f
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=imap-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \
--- /dev/null
+From c3f68d987c00284d91ad6599a013b7111662545b Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
+Date: Fri, 2 Sep 2016 21:33:33 +0000
+Subject: [PATCH] uw-imap: compile against openssl 1.1.0
+
+I *think* I replaced access to cert->name with certificate's subject name. I
+assume that the re-aranged C-code is doing the same thing. A double check
+wouldn't hurt :)
+
+Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
+---
+ src/osdep/unix/ssl_unix.c | 28 +++++++++++++++++-----------
+ 1 file changed, 17 insertions(+), 11 deletions(-)
+
+diff --git a/src/osdep/unix/ssl_unix.c b/src/osdep/unix/ssl_unix.c
+index 3bfdff3..836e9fa 100644
+--- a/src/osdep/unix/ssl_unix.c
++++ b/src/osdep/unix/ssl_unix.c
+@@ -59,7 +59,7 @@ typedef struct ssl_stream {
+ static SSLSTREAM *ssl_start(TCPSTREAM *tstream,char *host,unsigned long flags);
+ static char *ssl_start_work (SSLSTREAM *stream,char *host,unsigned long flags);
+ static int ssl_open_verify (int ok,X509_STORE_CTX *ctx);
+-static char *ssl_validate_cert (X509 *cert,char *host);
++static char *ssl_validate_cert (X509 *cert,char *host, char *cert_subj);
+ static long ssl_compare_hostnames (unsigned char *s,unsigned char *pat);
+ static char *ssl_getline_work (SSLSTREAM *stream,unsigned long *size,
+ long *contd);
+@@ -210,6 +210,7 @@ static char *ssl_start_work (SSLSTREAM *stream,char *host,unsigned long flags)
+ BIO *bio;
+ X509 *cert;
+ unsigned long sl,tl;
++ char cert_subj[250];
+ char *s,*t,*err,tmp[MAILTMPLEN];
+ sslcertificatequery_t scq =
+ (sslcertificatequery_t) mail_parameters (NIL,GET_SSLCERTIFICATEQUERY,NIL);
+@@ -266,14 +267,19 @@ static char *ssl_start_work (SSLSTREAM *stream,char *host,unsigned long flags)
+ if (SSL_write (stream->con,"",0) < 0)
+ return ssl_last_error ? ssl_last_error : "SSL negotiation failed";
+ /* need to validate host names? */
+- if (!(flags & NET_NOVALIDATECERT) &&
+- (err = ssl_validate_cert (cert = SSL_get_peer_certificate (stream->con),
+- host))) {
+- /* application callback */
+- if (scq) return (*scq) (err,host,cert ? cert->name : "???") ? NIL : "";
++ if (!(flags & NET_NOVALIDATECERT)) {
++
++ cert_subj[0] = '\0';
++ cert = SSL_get_peer_certificate(stream->con);
++ if (cert)
++ X509_NAME_oneline(X509_get_subject_name(cert), cert_subj, sizeof(cert_subj));
++ err = ssl_validate_cert (cert, host, cert_subj);
++ if (err)
++ /* application callback */
++ if (scq) return (*scq) (err,host,cert ? cert_subj : "???") ? NIL : "";
+ /* error message to return via mm_log() */
+- sprintf (tmp,"*%.128s: %.255s",err,cert ? cert->name : "???");
+- return ssl_last_error = cpystr (tmp);
++ sprintf (tmp,"*%.128s: %.255s",err,cert ? cert_subj : "???");
++ return ssl_last_error = cpystr (tmp);
+ }
+ return NIL;
+ }
+@@ -313,7 +319,7 @@ static int ssl_open_verify (int ok,X509_STORE_CTX *ctx)
+ * Returns: NIL if validated, else string of error message
+ */
+
+-static char *ssl_validate_cert (X509 *cert,char *host)
++static char *ssl_validate_cert (X509 *cert,char *host, char *cert_subj)
+ {
+ int i,n;
+ char *s,*t,*ret;
+@@ -322,9 +328,9 @@ static char *ssl_validate_cert (X509 *cert,char *host)
+ /* make sure have a certificate */
+ if (!cert) ret = "No certificate from server";
+ /* and that it has a name */
+- else if (!cert->name) ret = "No name in certificate";
++ else if (cert_subj[0] == '\0') ret = "No name in certificate";
+ /* locate CN */
+- else if (s = strstr (cert->name,"/CN=")) {
++ else if (s = strstr (cert_subj,"/CN=")) {
+ if (t = strchr (s += 4,'/')) *t = '\0';
+ /* host name matches pattern? */
+ ret = ssl_compare_hostnames (host,s) ? NIL :
+--
+2.9.3
+
include $(TOPDIR)/rules.mk
PKG_NAME:=vips
-PKG_VERSION:=8.6.1
-PKG_RELEASE:=2
+PKG_VERSION:=8.6.5
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/jcupitt/libvips/releases/download/v8.6.1/
-PKG_HASH:=f9ba6235ebc3e4d20af5f1604436bcd9686a3fecbe40838325d542f0c21a9270
+PKG_SOURCE_URL:=https://github.com/jcupitt/libvips/releases/download/v8.6.5/
+PKG_HASH:=8702af0e340e220e0c08f8ded6c8248b18e7043938d9e8a2426631fd37a9d5db
PKG_FIXUP:=autoreconf
PKG_CHECK_FORMAT_SECURITY:=0
include $(TOPDIR)/rules.mk
PKG_NAME:=xmlrpc-c
-PKG_VERSION:=1.39.12
+PKG_VERSION:=1.43.08
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=@SF/xmlrpc-c/Xmlrpc-c%20Super%20Stable/$(PKG_VERSION)
-PKG_HASH:=d830f3264a832dfe09f629cc64036acfd08121692526d0fabe090f7ff881ce08
+PKG_HASH:=c9f5b584a42493877ae0f09ed680d94e035ab389e8fa1873b1ec42118d5cfca3
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=VARIOUS
--disable-wininet-client \
--disable-libwww-client \
--disable-abyss-server \
+ --disable-cgi-server \
--disable-cplusplus \
--disable-abyss-threads \
- --disable-cgi-server
+ --without-libwww-ssl
ifeq ($(BUILD_VARIANT),libxml2)
CONFIGURE_ARGS += \
--- a/config.mk.in
+++ b/config.mk.in
-@@ -175,7 +175,7 @@ ifeq ($(patsubst linux-gnu%,linux-gnu,$(
+@@ -176,7 +176,7 @@ ifeq ($(patsubst linux-gnu%,linux-gnu,$(
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
# SHLIB_CLIB = -lc
--- a/configure.in
+++ b/configure.in
-@@ -224,9 +224,7 @@ dnl Checks for programs.
+@@ -223,9 +223,7 @@ dnl Checks for programs.
dnl =======================================================================
AC_PROG_CC
include $(TOPDIR)/rules.mk
PKG_NAME:=yaml
-PKG_VERSION:=0.1.6
+PKG_VERSION:=0.2.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://pyyaml.org/download/libyaml/
-PKG_HASH:=7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749
+PKG_SOURCE_URL:=https://pyyaml.org/download/libyaml/
+PKG_HASH:=78281145641a080fb32d6e7a87b9c0664d611dcb4d542e90baf731f51cbb59cd
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Fast YAML 1.1 parser and emitter library
- URL:=http://pyyaml.org/wiki/LibYAML
+ URL:=https://pyyaml.org/wiki/LibYAML
endef
TARGET_CFLAGS += $(FPIC)
include $(TOPDIR)/rules.mk
PKG_NAME:=zeromq
-PKG_VERSION:=4.1.4
+PKG_VERSION:=4.1.6
PKG_RELEASE:=1
PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=LICENCE.txt
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:= https://github.com/zeromq/zeromq4-1/releases/download/v$(PKG_VERSION)/
-PKG_HASH:=e99f44fde25c2e4cb84ce440f87ca7d3fe3271c2b8cfbc67d55e4de25e6fe378
+PKG_SOURCE_URL:=https://github.com/zeromq/zeromq4-1/releases/download/v$(PKG_VERSION)
+PKG_HASH:=02ebf60a43011e770799336365bcbce2eb85569e9b5f52aa0d8cc04672438a0a
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
$(call Package/libzmq/default)
VARIANT:=curve
TITLE+= (CurveZMQ)
- DEPENDS+=+libsodium
+ DEPENDS+=+libsodium
endef
define Package/libzmq-nc/description
--- a/configure.ac
+++ b/configure.ac
-@@ -148,8 +148,10 @@ case "${host_os}" in
+@@ -150,8 +150,10 @@ case "${host_os}" in
*linux*)
# Define on Linux to enable all library features. Define if using a gnu compiler
if test "x$GXX" = "xyes"; then
--- a/src/stream_engine.cpp
+++ b/src/stream_engine.cpp
-@@ -208,7 +208,7 @@ void zmq::stream_engine_t::plug (io_thre
+@@ -208,7 +208,7 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
// Compile metadata.
typedef metadata_t::dict_t properties_t;
properties_t properties;
zmq_assert (metadata == NULL);
metadata = new (std::nothrow) metadata_t (properties);
}
-@@ -815,7 +815,7 @@ void zmq::stream_engine_t::mechanism_rea
+@@ -815,7 +815,7 @@ void zmq::stream_engine_t::mechanism_ready ()
// If we have a peer_address, add it to metadata
if (!peer_address.empty()) {
include $(TOPDIR)/rules.mk
PKG_NAME:=alpine
-PKG_VERSION:=2.20
-PKG_RELEASE:=2
+PKG_VERSION:=2.21.9999
+PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://patches.freeiz.com/alpine/release/src/
+PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=ed639b6e5bb97e6b0645c85262ca6a784316195d461ce8d8411999bf80449227
+PKG_SOURCE_URL:=http://repo.or.cz/alpine.git
+PKG_SOURCE_VERSION:=d3e6f3932f2af9deca8eed09e30a55e9bd524362
+PKG_MIRROR_HASH:=72f9e8c4c3ecbd5f73f527af98ad23f716fcede3af0ab0400c6e0bc9b1288e30
PKG_MAINTAINER:=Antti Seppälä <a.seppala@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
+PKG_FIXUP:=autoreconf
+
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
CATEGORY:=Mail
DEPENDS:=+libopenssl +libncurses +libpthread +libpam $(ICONV_DEPENDS) $(INTL_DEPENDS)
TITLE:=Alternatively Licensed Program for Internet News and Email
- URL:=http://www.washington.edu/alpine
+ URL:=http://alpine.x10host.com/alpine/
endef
define Package/alpine/Default/description
+++ /dev/null
-diff -Nru alpine-2.20-orig/configure alpine-2.20/configure
---- alpine-2.20-orig/configure 2015-01-18 09:00:42.100645053 +0200
-+++ alpine-2.20/configure 2015-01-25 12:01:11.831015443 +0200
-@@ -17643,10 +17643,8 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking Openssl library version >= 1.0.1c" >&5
- $as_echo_n "checking Openssl library version >= 1.0.1c... " >&6; }
- if test "$cross_compiling" = yes; then :
-- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
-+$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-diff -Nru alpine-2.20-orig/configure.ac alpine-2.20/configure.ac
---- alpine-2.20-orig/configure.ac 2015-01-18 08:38:08.893495949 +0200
-+++ alpine-2.20/configure.ac 2015-01-25 12:01:02.773015236 +0200
-@@ -1370,7 +1370,8 @@
- }
- ]])],
- [ AC_MSG_RESULT(yes) ],
-- [ alpine_SSLTYPE="none" ])
-+ [ alpine_SSLTYPE="none" ],
-+ [ AC_MSG_WARN([cross compiling: not checking])])
-
- if test "x$alpine_SSLTYPE" = "xnone" ; then
- AC_MSG_ERROR(Install openssl version >= 1.0.1c)
PKG_NAME:=clamsmtp
PKG_VERSION:=1.10
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://thewalter.net/stef/software/clamsmtp/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
--- /dev/null
+diff --git a/common/sock_any.h b/common/sock_any.h
+index 77c3841..1e30974 100644
+--- a/common/sock_any.h
++++ b/common/sock_any.h
+@@ -39,7 +39,6 @@
+ #ifndef __SOCK_ANY_H__
+ #define __SOCK_ANY_H__
+
+-#include <sys/socket.h>
+ #include <sys/un.h>
+ #include <netinet/in.h>
+
#
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=dovecot
-PKG_VERSION:=2.2.35
-PKG_RELEASE:=1
+PKG_VERSION:=2.3.2.1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2
-PKG_HASH:=cce15db2fc5233386b63a3cf21c465c09e6e55014ed66c4f184b7d221a47180c
+PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
+PKG_HASH:=4a65118508dc7a562e5f90dd7c3f56219fff22367c496f17d77cd0c7e2724e34
PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
PKG_BUILD_DEPENDS:=libiconv
PKG_CONFIG_DEPENDS:= \
+ CONFIG_DOVECOT_GSSAPI \
CONFIG_DOVECOT_LDAP \
CONFIG_DOVECOT_MYSQL \
CONFIG_DOVECOT_PGSQL \
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+# iconv is needed when compiling with MySQL support. iconv will also be used by
+# dovecot itself.
+include $(INCLUDE_DIR)/nls.mk
define Package/dovecot
SECTION:=mail
CATEGORY:=Mail
- DEPENDS:=+DOVECOT_LDAP:libopenldap +DOVECOT_MYSQL:libmysqlclient +DOVECOT_PGSQL:libpq +DOVECOT_SQLITE:libsqlite3 +libopenssl +librt +zlib +libbz2 +libcap +DOVECOT_ICU:icu
+ DEPENDS:=+DOVECOT_GSSAPI:krb5-libs +DOVECOT_LDAP:libopenldap +DOVECOT_MYSQL:libmysqlclient +DOVECOT_PGSQL:libpq +DOVECOT_SQLITE:libsqlite3 +libopenssl +librt +zlib +libbz2 +libcap +DOVECOT_ICU:icu $(ICONV_DEPENDS)
TITLE:=An IMAP and POP3 daemon
- URL:=http://www.dovecot.org/
+ URL:=https://www.dovecot.org/
USERID:=dovecot=59:dovecot=59
ABI_VERSION:=$(PKG_VERSION)
endef
define Package/dovecot/config
menu "Select dovecot build options"
depends on PACKAGE_dovecot
+ config DOVECOT_GSSAPI
+ bool "GSSAPI support"
+ default n
+ help
+ Implements GSSAPI support in dovecot.
config DOVECOT_LDAP
bool "LDAP support"
default n
endef
CONFIGURE_ARGS += \
- --without-gssapi \
+ --libexecdir=/usr/libexec \
--without-pam \
- --with-moduledir=/usr/lib/dovecot/modules \
--with-notify=dnotify \
--without-lzma \
--without-lz4 \
+ --without-sodium \
+ $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
$(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
$(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
$(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \
$(1)/etc/dovecot \
$(1)/usr/share/doc/dovecot \
$(1)/usr/lib/dovecot \
+ $(1)/usr/libexec/dovecot \
$(1)/usr/bin \
$(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
+ $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
$(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
---- a/configure.ac
-+++ b/configure.ac
-@@ -488,9 +488,9 @@ have_ioloop=no
-
- if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
- AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
+diff -u --recursive dovecot-2.3.1-vanilla/m4/fd_passing.m4 dovecot-2.3.1/m4/fd_passing.m4
+--- dovecot-2.3.1-vanilla/m4/fd_passing.m4 2018-06-08 20:02:15.849850956 -0400
++++ dovecot-2.3.1/m4/fd_passing.m4 2018-06-08 20:04:28.947016370 -0400
+@@ -8,7 +8,7 @@
+ CFLAGS="$CFLAGS -DBUGGY_CMSG_MACROS"
+ fi
+
+- AC_TRY_RUN([
++ AC_TRY_LINK([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/wait.h>
+@@ -16,7 +16,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include "fdpass.h"
+-
++ ], [
+ static
+ int nopen(void)
+ {
+diff -u --recursive dovecot-2.3.1-vanilla/m4/glibc.m4 dovecot-2.3.1/m4/glibc.m4
+--- dovecot-2.3.1-vanilla/m4/glibc.m4 2018-06-08 20:02:15.850850957 -0400
++++ dovecot-2.3.1/m4/glibc.m4 2018-06-08 20:04:00.780981363 -0400
+@@ -17,7 +17,7 @@
+ dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
+ dnl * It may also be broken in AIX.
+ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
- AC_TRY_RUN([
+ AC_TRY_LINK([
- #include <sys/epoll.h>
--
+ #define _XOPEN_SOURCE 600
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -26,6 +26,7 @@
+ #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
+ possibly broken posix_fallocate
+ #endif
+ ], [
- int main()
- {
- return epoll_create(5) < 1;
-@@ -594,7 +594,7 @@ fi
- dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
- dnl * It may also be broken in AIX.
- AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
-- AC_TRY_RUN([
-+ AC_TRY_LINK([
- #define _XOPEN_SOURCE 600
- #include <stdio.h>
- #include <stdlib.h>
-@@ -603,6 +603,7 @@ AC_CACHE_CHECK([whether posix_fallocate(
- #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
- possibly broken posix_fallocate
- #endif
-+ ], [
- int main() {
- int fd = creat("conftest.temp", 0600);
- int ret;
+ int main() {
+ int fd = creat("conftest.temp", 0600);
+ int ret;
+diff -u --recursive dovecot-2.3.1-vanilla/m4/ioloop.m4 dovecot-2.3.1/m4/ioloop.m4
+--- dovecot-2.3.1-vanilla/m4/ioloop.m4 2018-06-08 20:02:15.850850957 -0400
++++ dovecot-2.3.1/m4/ioloop.m4 2018-06-08 20:03:31.666945181 -0400
+@@ -4,9 +4,9 @@
+
+ if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
+ AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
+- AC_TRY_RUN([
++ AC_TRY_LINK([
+ #include <sys/epoll.h>
+-
++ ], [
+ int main()
+ {
+ return epoll_create(5) < 1;
+diff -u --recursive dovecot-2.3.1-vanilla/m4/mmap_write.m4 dovecot-2.3.1/m4/mmap_write.m4
+--- dovecot-2.3.1-vanilla/m4/mmap_write.m4 2018-06-08 20:02:15.850850957 -0400
++++ dovecot-2.3.1/m4/mmap_write.m4 2018-06-08 20:03:27.369939841 -0400
+@@ -1,7 +1,7 @@
+ dnl * If mmap() plays nicely with write()
+ AC_DEFUN([DOVECOT_MMAP_WRITE], [
+ AC_CACHE_CHECK([whether shared mmaps get updated by write()s],i_cv_mmap_plays_with_write,[
+- AC_TRY_RUN([
++ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -9,6 +9,7 @@
+ #include <fcntl.h>
+ #include <sys/mman.h>
+ #include <string.h>
++ ], [
+ int main() {
+ /* return 0 if we're signed */
+ int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC, 0600);
+diff -u --recursive dovecot-2.3.1-vanilla/m4/want_gssapi.m4 dovecot-2.3.1/m4/want_gssapi.m4
+--- dovecot-2.3.1-vanilla/m4/want_gssapi.m4 2018-06-08 20:02:15.850850957 -0400
++++ dovecot-2.3.1/m4/want_gssapi.m4 2018-06-08 20:04:13.204996804 -0400
+@@ -54,7 +54,7 @@
+
+ # does the kerberos library support SPNEGO?
+ AC_CACHE_CHECK([whether GSSAPI supports SPNEGO],i_cv_gssapi_spnego,[
+- AC_TRY_RUN([
++ AC_TRY_LINK([
+ #ifdef HAVE_GSSAPI_H
+ # include <gssapi.h>
+ #else
+@@ -62,6 +62,7 @@
+ #endif
+ #include <krb5.h>
+ #include <string.h>
++ ], [
+ int main(void) {
+ OM_uint32 minor_status;
+ gss_OID_set mech_set;
--- /dev/null
+pigeonhole: Fix managesieve-login needs libdovecot-login
+
+When trying to use managesieve my MUA complained sieve wasn't supported.
+On investigation dovecot logs the following could be seen:
+
+ Aug 16 00:28:44 managesieve-login: Fatal: master:
+ service(managesieve-login): child 1430 returned error 127
+ Aug 16 00:31:32 managesieve-login: Error: Error loading shared
+ library libdovecot-login.so.0: No such file or directory
+ (needed by /usr/lib/dovecot/managesieve-login)
+ Aug 16 00:31:32 managesieve-login: Error: Error loading
+ shared library libdovecot.so.0: No such file or directory
+ (needed by /usr/lib/dovecot/managesieve-login)
+ Aug 16 00:31:32 managesieve-login: Error: Error relocating
+ /usr/lib/dovecot/managesieve-login: net_ip2addr: symbol not found
+
+The issue (verified with readelf on non-working build and build with my fix)
+is that there is no RPATH information in the pigeonhole binaries (like
+managesieve-login).
+
+The dovecot-config that is 'installed' in the staging dir
+assumes that plugins will be built on the same host as the installed files.
+The 'installed' dovecot-config (partial) looks like:
+
+LIBDOVECOT='-L/usr/lib/dovecot -ldovecot'
+LIBDOVECOT_LOGIN='-ldovecot-login -L/home/user/Build/openwrt/openwrt-ath79/staging_dir/target-mips_24kc_musl/usr/lib -lssl -lcrypto'
+LIBDOVECOT_SQL=-ldovecot-sql
+LIBDOVECOT_COMPRESS=-ldovecot-compression
+LIBDOVECOT_LDA=-ldovecot-lda
+LIBDOVECOT_STORAGE='-ldovecot-storage '
+LIBDOVECOT_DSYNC=-ldovecot-dsync
+LIBDOVECOT_LIBFTS=-ldovecot-fts
+
+This patch modifed dovecot-config that gets installed on the assumption
+that users of libdovecot will also be cross-compiled (a safe bet).
+Index: dovecot-2.3.2.1/Makefile.am
+===================================================================
+--- dovecot-2.3.2.1.orig/Makefile.am
++++ dovecot-2.3.2.1/Makefile.am
+@@ -73,7 +73,7 @@ install-exec-hook:
+ grep -v '^LIBDOVECOT_.*_INCLUDE' dovecot-config | \
+ grep -v '^LIBDOVECOT.*_DEPS' | sed \
+ -e "s|^\(DOVECOT_INSTALLED\)=.*$$|\1=yes|" \
+- -e "s|^\(LIBDOVECOT\)=.*$$|\1='-L$(pkglibdir) -ldovecot'|" \
++ -e "s|^\(LIBDOVECOT\)=.*$$|\1='-L$(STAGING_DIR)$(pkglibdir) -ldovecot'|" \
+ -e "s|^\(LIBDOVECOT_LOGIN\)=.*$$|\1='-ldovecot-login $(SSL_LIBS)'|" \
+ -e "s|^\(LIBDOVECOT_SQL\)=.*$$|\1=-ldovecot-sql|" \
+ -e "s|^\(LIBDOVECOT_COMPRESS\)=.*$$|\1=-ldovecot-compression|" \
+@@ -81,7 +81,8 @@ install-exec-hook:
+ -e "s|^\(LIBDOVECOT_LDA\)=.*$$|\1=-ldovecot-lda|" \
+ -e "s|^\(LIBDOVECOT_LIBFTS\)=.*$$|\1=-ldovecot-fts|" \
+ -e "s|^\(LIBDOVECOT_STORAGE\)=.*$$|\1='-ldovecot-storage $(LINKED_STORAGE_LDADD)'|" \
+- -e "s|^\(LIBDOVECOT_INCLUDE\)=.*$$|\1=-I$(pkgincludedir)|" \
++ -e "s|^\(LIBDOVECOT_INCLUDE\)=.*$$|\1=-I$(STAGING_DIR)$(pkgincludedir)|" \
++ -e "s|^\(DOVECOT_BINARY_LDFLAGS=\".*\)\"$$|\1 -Wl,-rpath -Wl,$(pkglibdir)\"|" \
+ > $(DESTDIR)$(pkglibdir)/dovecot-config
+
+ uninstall-hook:
include $(TOPDIR)/rules.mk
PKG_NAME:=emailrelay
-PKG_VERSION:=1.9
-PKG_RELEASE:=5
+PKG_VERSION:=2.0
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
-PKG_HASH:=869a3e2d053237d7f63784acc25e748af2dbf2d9b9c5c48e4a5269d4e4b5bda0
+PKG_HASH:=0b3a98edfdc8deaf2b3d14e2d2a7fa8402f6703d83ac7458653994124de6a587
PKG_MAINTAINER:=Federico Di Marco <fededim@gmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
CONFIGURE_ARGS += \
- --with-pam=no \
- --enable-testing=no
-
+ --without-doxygen \
+ --without-man2html \
+ --without-mbedtls \
+ --without-pam \
+ --disable-bsd \
+ --disable-gui \
+ --disable-mac \
+ --disable-testing \
+ --disable-windows
+
+# Workaround for https://sourceforge.net/p/emailrelay/bugs/38/
+# This should be fixed in the next release.
CONFIGURE_VARS += \
- CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
-
+ ac_cv_search_pam_end=no
ifeq ($(CONFIG_EMAILRELAY_SSL),y)
CONFIGURE_ARGS += \
--with-openssl
else
CONFIGURE_ARGS += \
- --with-openssl=no
+ --without-openssl
endif
-
ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y)
CONFIGURE_ARGS += \
--enable-debug=yes
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-filter-copy $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-passwd $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-poke $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-submit $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) files/$(PKG_NAME).auth $(1)/etc/
option mode 'server'
option port '25'
option remote_clients '0'
+# option address_verifier '/usr/local/bin/address-verifier.sh'
+# option domain 'my.example.com'
+# option anonymous '1'
# option server_tls '/etc/path/to/certificate'
# option server_auth '/etc/emailrelay.auth'
# option extra_cmdline ''
option smarthost '192.0.2.1:25'
option port '25'
option remote_clients '0'
+# option address_verifier '/usr/local/bin/address-verifier.sh'
+# option domain 'my.example.com'
+# option anonymous '1'
# option server_tls '/etc/path/to/certificate'
# option server_auth '/etc/emailrelay.auth'
# option client_tls '1'
emailrelay_instance()
{
- local enabled mode port remote_clients server_tls server_auth extra_cmdline smarthost client_tls client_auth
+ local enabled mode port remote_clients server_tls server_auth extra_cmdline smarthost client_tls client_auth address_verifier domain anonymous
config_get_bool enabled "$1" enabled
config_get mode "$1" mode
config_get smarthost "$1" smarthost
config_get_bool client_tls "$1" client_tls
config_get client_auth "$1" client_auth
-
+ config_get address_verifier "$1" address_verifier
+ config_get domain "$1" domain
+ config_get_bool anonymous "$1" anonymous
[ "$enabled" = 0 ] && return 1
[ -n "$server_auth" ] && procd_append_param command --server-auth "$server_auth"
[ "$client_tls" = 1 ] && procd_append_param command --client-tls
[ -n "$client_auth" ] && procd_append_param command --client-auth "$client_auth"
+ [ -n "$address_verifier" ] && procd_append_param command --address-verifier "$address_verifier"
+ [ -n "$domain" ] && procd_append_param command --domain "$domain"
+ [ "$anonymous" = 1 ] && procd_append_param command --anonymous
;;
"cmdline")
# empty by intention (just append extra_cmdline)
--- /dev/null
+diff --git a/src/gssl/gssl_openssl.cpp b/src/gssl/gssl_openssl.cpp
+index 0e9b73b..49927db 100644
+--- a/src/gssl/gssl_openssl.cpp
++++ b/src/gssl/gssl_openssl.cpp
+@@ -52,10 +52,14 @@ GSsl::OpenSSL::LibraryImp::LibraryImp( G::StringArray & library_config , Library
+ m_verbose(verbose) ,
+ m_config(library_config)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_load_error_strings() ;
+ SSL_library_init() ;
+- int rc = RAND_status() ; G_IGNORE_VARIABLE(rc) ;
+ OpenSSL_add_all_digests() ;
++#else
++ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL) ;
++#endif
++ int rc = RAND_status() ; G_IGNORE_VARIABLE(rc) ;
+
+ // allocate a slot for a pointer from SSL to ProtocolImp
+ m_index = SSL_get_ex_new_index( 0 , nullptr , nullptr , nullptr , nullptr ) ;
+@@ -73,15 +77,21 @@ GSsl::OpenSSL::LibraryImp::~LibraryImp()
+
+ void GSsl::OpenSSL::LibraryImp::cleanup()
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ // ffs...
+ ERR_free_strings() ;
+ RAND_cleanup() ;
+- CRYPTO_cleanup_all_ex_data();
++ CRYPTO_cleanup_all_ex_data() ;
++#endif
+ }
+
+ std::string GSsl::OpenSSL::LibraryImp::sid()
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ return G::Str::printable( SSLeay_version(SSLEAY_VERSION) ) ;
++#else
++ return G::Str::printable( OpenSSL_version(OPENSSL_VERSION) ) ;
++#endif
+ }
+
+ std::string GSsl::OpenSSL::LibraryImp::id() const
+++ /dev/null
---- a/src/gssl/gssl_openssl.cpp
-+++ b/src/gssl/gssl_openssl.cpp
-@@ -292,8 +292,10 @@ GSsl::Context::Context( const std::strin
- {
- if( (flags&3U) == 2U )
- m_ssl_ctx = SSL_CTX_new(SSLv23_method()) ;
-+#ifdef SSL3_SUPPORT
- else if( (flags&3U) == 3U )
- m_ssl_ctx = SSL_CTX_new(SSLv3_method()) ;
-+#endif
- else
- m_ssl_ctx = SSL_CTX_new(TLSv1_method()) ;
-
PKG_NAME:=fdm
PKG_VERSION:=1.9
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_LICENSE:=BSD-2-Clause
-PKG_SOURCE:=$(PKG_VERSION).zip
-PKG_SOURCE_URL:=https://github.com/nicm/fdm/archive
-PKG_HASH:=ee08f9133657c8c959b738079c2e4f556cf5cca2daa8343feaf4f07698ad6086
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/nicm/fdm/releases/download/$(PKG_VERSION)
+PKG_HASH:=16416c38a9a7e32d187220cc5ae61a51463d5e4e47419c5c513f422523d39914
+PKG_FIXUP:=autoreconf
+
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=mail
CATEGORY:=Mail
TITLE:=fetch mail and deliver
- URL:=http://fdm.sourceforge.net/
+ URL:=https://github.com/nicm/fdm
MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
MENU:=1
DEPENDS:=+tdb +zlib +libopenssl +FDM_WITH_PCRE:libpcre
PREFIX="/usr" \
$(if $(CONFIG_FDM_WITH_PCRE),PCRE=1)
-define Build/Prepare
- $(call Build/Prepare/Default)
- $(CP) ./src/compat/* $(PKG_BUILD_DIR)/
-endef
-
-define Build/Configure
- ( cd $(PKG_BUILD_DIR); ./autogen.sh )
- $(call Build/Configure/Default)
-endef
-
define Package/fdm/config
source "$(SOURCE)/Config.in"
endef
+++ /dev/null
---- a/fdm.h 2011-10-10 17:36:29.000000000 +0400
-+++ b/fdm.h 2014-11-13 12:56:59.217083683 +0300
-@@ -719,6 +719,11 @@
- size_t strlcat(char *, const char *, size_t);
- #endif
-
-+int local_b64_ntop(uint8_t const *src, size_t srclength, char *target,
-+ size_t targsize);
-+
-+int local_b64_pton(char const *src, uint8_t *target, size_t targsize);
-+
- /* shm.c */
- char *shm_path(struct shm *);
- void *shm_create(struct shm *, size_t);
+++ /dev/null
---- a/imap-common.c 2011-12-20 00:19:03.000000000 +0400
-+++ b/imap-common.c 2014-11-13 12:56:06.930418446 +0300
-@@ -206,7 +206,7 @@
-
- size = (strlen(in) * 2) + 1;
- out = xcalloc(1, size);
-- if (b64_ntop(in, strlen(in), out, size) < 0) {
-+ if (local_b64_ntop(in, strlen(in), out, size) < 0) {
- xfree(out);
- return (NULL);
- }
-@@ -222,7 +222,7 @@
-
- size = (strlen(in) * 4) + 1;
- out = xcalloc(1, size);
-- if (b64_pton(in, out, size) < 0) {
-+ if (local_b64_pton(in, out, size) < 0) {
- xfree(out);
- return (NULL);
- }
+++ /dev/null
-Index: fdm-1.9/Makefile.am
-===================================================================
---- fdm-1.9.orig/Makefile.am
-+++ fdm-1.9/Makefile.am
-@@ -107,7 +107,9 @@ dist_fdm_SOURCES = \
- xmalloc.c \
- \
- parse.y \
-- lex.c
-+ lex.c \
-+ b64_ntop.c \
-+ b64_pton.c
-
- nodist_fdm_SOURCES =
- if NO_STRLCAT
--- /dev/null
+From eb7461e4ceab14020b3a129d826e4ee86f9da8c6 Mon Sep 17 00:00:00 2001
+From: Nicholas Marriott <nicholas.marriott@gmail.com>
+Date: Tue, 26 Jun 2018 12:19:25 +0100
+Subject: [PATCH] Compat fixes from Rosen Penev.
+
+---
+ Makefile.am | 6 +
+ compat/base64.c | 317 ++++++++++++++++++++++++++++++++++++++++++++++++
+ fdm.h | 18 +++
+ 3 files changed, 343 insertions(+), 2 deletions(-)
+ create mode 100644 compat/base64.c
+
+diff --git a/Makefile.am b/Makefile.am
+index a4ebbf3..fb25d33 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -110,6 +110,9 @@ dist_fdm_SOURCES = \
+ lex.c
+
+ nodist_fdm_SOURCES =
++if NO_B64_NTOP
++nodist_fdm_SOURCES += compat/base64.c
++endif
+ if NO_STRLCAT
+ nodist_fdm_SOURCES += compat/strlcat.c
+ endif
+diff --git a/compat/base64.c b/compat/base64.c
+new file mode 100644
+index 0000000..4e44d6a
+--- /dev/null
++++ b/compat/base64.c
+@@ -0,0 +1,317 @@
++/* $OpenBSD: base64.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
++
++/*
++ * Copyright (c) 1996 by Internet Software Consortium.
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
++ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
++ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++ * SOFTWARE.
++ */
++
++/*
++ * Portions Copyright (c) 1995 by International Business Machines, Inc.
++ *
++ * International Business Machines, Inc. (hereinafter called IBM) grants
++ * permission under its copyrights to use, copy, modify, and distribute this
++ * Software with or without fee, provided that the above copyright notice and
++ * all paragraphs of this notice appear in all copies, and that the name of IBM
++ * not be used in connection with the marketing of any product incorporating
++ * the Software or modifications thereof, without specific, written prior
++ * permission.
++ *
++ * To the extent it has a right to do so, IBM grants an immunity from suit
++ * under its patents, if any, for the use, sale or manufacture of products to
++ * the extent that such products are used for performing Domain Name System
++ * dynamic updates in TCP/IP networks by means of the Software. No immunity is
++ * granted for any product per se or for any other function of any product.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
++ * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
++ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
++ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
++ */
++
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <arpa/inet.h>
++#include <arpa/nameser.h>
++
++#include <ctype.h>
++#include <resolv.h>
++#include <stdio.h>
++
++#include <stdlib.h>
++#include <string.h>
++
++#include "fdm.h"
++
++static const char Base64[] =
++ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
++static const char Pad64 = '=';
++
++/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
++ The following encoding technique is taken from RFC 1521 by Borenstein
++ and Freed. It is reproduced here in a slightly edited form for
++ convenience.
++
++ A 65-character subset of US-ASCII is used, enabling 6 bits to be
++ represented per printable character. (The extra 65th character, "=",
++ is used to signify a special processing function.)
++
++ The encoding process represents 24-bit groups of input bits as output
++ strings of 4 encoded characters. Proceeding from left to right, a
++ 24-bit input group is formed by concatenating 3 8-bit input groups.
++ These 24 bits are then treated as 4 concatenated 6-bit groups, each
++ of which is translated into a single digit in the base64 alphabet.
++
++ Each 6-bit group is used as an index into an array of 64 printable
++ characters. The character referenced by the index is placed in the
++ output string.
++
++ Table 1: The Base64 Alphabet
++
++ Value Encoding Value Encoding Value Encoding Value Encoding
++ 0 A 17 R 34 i 51 z
++ 1 B 18 S 35 j 52 0
++ 2 C 19 T 36 k 53 1
++ 3 D 20 U 37 l 54 2
++ 4 E 21 V 38 m 55 3
++ 5 F 22 W 39 n 56 4
++ 6 G 23 X 40 o 57 5
++ 7 H 24 Y 41 p 58 6
++ 8 I 25 Z 42 q 59 7
++ 9 J 26 a 43 r 60 8
++ 10 K 27 b 44 s 61 9
++ 11 L 28 c 45 t 62 +
++ 12 M 29 d 46 u 63 /
++ 13 N 30 e 47 v
++ 14 O 31 f 48 w (pad) =
++ 15 P 32 g 49 x
++ 16 Q 33 h 50 y
++
++ Special processing is performed if fewer than 24 bits are available
++ at the end of the data being encoded. A full encoding quantum is
++ always completed at the end of a quantity. When fewer than 24 input
++ bits are available in an input group, zero bits are added (on the
++ right) to form an integral number of 6-bit groups. Padding at the
++ end of the data is performed using the '=' character.
++
++ Since all base64 input is an integral number of octets, only the
++ -------------------------------------------------
++ following cases can arise:
++
++ (1) the final quantum of encoding input is an integral
++ multiple of 24 bits; here, the final unit of encoded
++ output will be an integral multiple of 4 characters
++ with no "=" padding,
++ (2) the final quantum of encoding input is exactly 8 bits;
++ here, the final unit of encoded output will be two
++ characters followed by two "=" padding characters, or
++ (3) the final quantum of encoding input is exactly 16 bits;
++ here, the final unit of encoded output will be three
++ characters followed by one "=" padding character.
++ */
++
++int
++b64_ntop(src, srclength, target, targsize)
++ u_char const *src;
++ size_t srclength;
++ char *target;
++ size_t targsize;
++{
++ size_t datalength = 0;
++ u_char input[3];
++ u_char output[4];
++ int i;
++
++ while (2 < srclength) {
++ input[0] = *src++;
++ input[1] = *src++;
++ input[2] = *src++;
++ srclength -= 3;
++
++ output[0] = input[0] >> 2;
++ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
++ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
++ output[3] = input[2] & 0x3f;
++
++ if (datalength + 4 > targsize)
++ return (-1);
++ target[datalength++] = Base64[output[0]];
++ target[datalength++] = Base64[output[1]];
++ target[datalength++] = Base64[output[2]];
++ target[datalength++] = Base64[output[3]];
++ }
++
++ /* Now we worry about padding. */
++ if (0 != srclength) {
++ /* Get what's left. */
++ input[0] = input[1] = input[2] = '\0';
++ for (i = 0; i < srclength; i++)
++ input[i] = *src++;
++
++ output[0] = input[0] >> 2;
++ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
++ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
++
++ if (datalength + 4 > targsize)
++ return (-1);
++ target[datalength++] = Base64[output[0]];
++ target[datalength++] = Base64[output[1]];
++ if (srclength == 1)
++ target[datalength++] = Pad64;
++ else
++ target[datalength++] = Base64[output[2]];
++ target[datalength++] = Pad64;
++ }
++ if (datalength >= targsize)
++ return (-1);
++ target[datalength] = '\0'; /* Returned value doesn't count \0. */
++ return (datalength);
++}
++
++/* skips all whitespace anywhere.
++ converts characters, four at a time, starting at (or after)
++ src from base - 64 numbers into three 8 bit bytes in the target area.
++ it returns the number of data bytes stored at the target, or -1 on error.
++ */
++
++int
++b64_pton(src, target, targsize)
++ char const *src;
++ u_char *target;
++ size_t targsize;
++{
++ int tarindex, state, ch;
++ u_char nextbyte;
++ char *pos;
++
++ state = 0;
++ tarindex = 0;
++
++ while ((ch = (unsigned char)*src++) != '\0') {
++ if (isspace(ch)) /* Skip whitespace anywhere. */
++ continue;
++
++ if (ch == Pad64)
++ break;
++
++ pos = strchr(Base64, ch);
++ if (pos == 0) /* A non-base64 character. */
++ return (-1);
++
++ switch (state) {
++ case 0:
++ if (target) {
++ if (tarindex >= targsize)
++ return (-1);
++ target[tarindex] = (pos - Base64) << 2;
++ }
++ state = 1;
++ break;
++ case 1:
++ if (target) {
++ if (tarindex >= targsize)
++ return (-1);
++ target[tarindex] |= (pos - Base64) >> 4;
++ nextbyte = ((pos - Base64) & 0x0f) << 4;
++ if (tarindex + 1 < targsize)
++ target[tarindex+1] = nextbyte;
++ else if (nextbyte)
++ return (-1);
++ }
++ tarindex++;
++ state = 2;
++ break;
++ case 2:
++ if (target) {
++ if (tarindex >= targsize)
++ return (-1);
++ target[tarindex] |= (pos - Base64) >> 2;
++ nextbyte = ((pos - Base64) & 0x03) << 6;
++ if (tarindex + 1 < targsize)
++ target[tarindex+1] = nextbyte;
++ else if (nextbyte)
++ return (-1);
++ }
++ tarindex++;
++ state = 3;
++ break;
++ case 3:
++ if (target) {
++ if (tarindex >= targsize)
++ return (-1);
++ target[tarindex] |= (pos - Base64);
++ }
++ tarindex++;
++ state = 0;
++ break;
++ }
++ }
++
++ /*
++ * We are done decoding Base-64 chars. Let's see if we ended
++ * on a byte boundary, and/or with erroneous trailing characters.
++ */
++
++ if (ch == Pad64) { /* We got a pad char. */
++ ch = (unsigned char)*src++; /* Skip it, get next. */
++ switch (state) {
++ case 0: /* Invalid = in first position */
++ case 1: /* Invalid = in second position */
++ return (-1);
++
++ case 2: /* Valid, means one byte of info */
++ /* Skip any number of spaces. */
++ for (; ch != '\0'; ch = (unsigned char)*src++)
++ if (!isspace(ch))
++ break;
++ /* Make sure there is another trailing = sign. */
++ if (ch != Pad64)
++ return (-1);
++ ch = (unsigned char)*src++; /* Skip the = */
++ /* Fall through to "single trailing =" case. */
++ /* FALLTHROUGH */
++
++ case 3: /* Valid, means two bytes of info */
++ /*
++ * We know this char is an =. Is there anything but
++ * whitespace after it?
++ */
++ for (; ch != '\0'; ch = (unsigned char)*src++)
++ if (!isspace(ch))
++ return (-1);
++
++ /*
++ * Now make sure for cases 2 and 3 that the "extra"
++ * bits that slopped past the last full byte were
++ * zeros. If we don't check them, they become a
++ * subliminal channel.
++ */
++ if (target && tarindex < targsize &&
++ target[tarindex] != 0)
++ return (-1);
++ }
++ } else {
++ /*
++ * We ended by seeing the end of the string. Make sure we
++ * have no partial bytes lying around.
++ */
++ if (state != 0)
++ return (-1);
++ }
++
++ return (tarindex);
++}
+diff --git a/fdm.h b/fdm.h
+index 5de799c..abc52e0 100644
+--- a/fdm.h
++++ b/fdm.h
+@@ -84,6 +84,18 @@ extern char *__progname;
+ #define INFTIM -1
+ #endif
+
++#ifndef WAIT_ANY
++#define WAIT_ANY -1
++#endif
++
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
++#ifndef ACCESSPERMS
++#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
++#endif
++
+ #ifndef __dead
+ #define __dead __attribute__ ((__noreturn__))
+ #endif
+@@ -707,6 +719,12 @@ size_t strlcpy(char *, const char *, size_t);
+ size_t strlcat(char *, const char *, size_t);
+ #endif
+
++#ifndef HAVE_B64_NTOP
++/* base64.c */
++int b64_ntop(src, srclength, target, targsize);
++int b64_pton(src, target, targsize);
++#endif
++
+ /* shm.c */
+ char *shm_path(struct shm *);
+ void *shm_create(struct shm *, size_t);
+--
+2.17.1
+
+++ /dev/null
---- a/fdm.c
-+++ b/fdm.c
-@@ -22,6 +22,10 @@
- #include <sys/utsname.h>
- #include <sys/wait.h>
-
-+#ifndef WAIT_ANY
-+#define WAIT_ANY (-1)
-+#endif
-+
- #include <errno.h>
- #include <fcntl.h>
- #include <fnmatch.h>
--- /dev/null
+From f6c656c5c0368b2fb4284af0484c3bedfc7ae42c Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Tue, 26 Jun 2018 14:14:34 -0700
+Subject: [PATCH] Fix compile with OpenSSL 1.1.0
+
+OpenSSL 1.1.0 deprecared SSL_library_init and SSL_load_error_strings.
+They're part of OPENSSL_init_ssl now.
+---
+ fdm.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/fdm.c b/fdm.c
+index cdf8383..9355b91 100644
+--- a/fdm.c
++++ b/fdm.c
+@@ -717,8 +717,13 @@ retry:
+ }
+ conf.lock_file = lock;
+
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
+ SSL_load_error_strings();
++#else
++ OPENSSL_init_ssl(0, NULL);
++#endif
+
+ /* Filter account list. */
+ TAILQ_INIT(&actaq);
+--
+2.17.1
+
+++ /dev/null
---- a/fetch-maildir.c
-+++ b/fetch-maildir.c
-@@ -31,6 +31,8 @@
- #include "fdm.h"
- #include "fetch.h"
-
-+#define GLOB_BRACE 0
-+
- int fetch_maildir_commit(struct account *, struct mail *);
- void fetch_maildir_abort(struct account *);
- u_int fetch_maildir_total(struct account *);
---- a/fetch-mbox.c
-+++ b/fetch-mbox.c
-@@ -32,6 +32,8 @@
- #include "fdm.h"
- #include "fetch.h"
-
-+#define GLOB_BRACE 0
-+
- int fetch_mbox_commit(struct account *, struct mail *);
- void fetch_mbox_abort(struct account *);
- u_int fetch_mbox_total(struct account *);
+++ /dev/null
---- a/file.c
-+++ b/file.c
-@@ -26,6 +26,8 @@
-
- #include "fdm.h"
-
-+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
-+
- int mklock(u_int, const char *);
- void rmlock(u_int, const char *);
- int lockfd(u_int, int);
--- /dev/null
+From 070cee8d1efba1ca260777a204fba7cdfe676ca5 Mon Sep 17 00:00:00 2001
+From: Nicholas Marriott <nicholas.marriott@gmail.com>
+Date: Tue, 17 Jan 2017 23:14:03 +0000
+Subject: [PATCH] Look for OPENSSL_init_ssl, from Tomasz Miasko.
+
+---
+ configure.ac | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5793c2d..161040c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -93,11 +93,16 @@ if test "x$found_libcrypto" = xno; then
+ AC_MSG_ERROR("libcrypto not found")
+ fi
+ AC_SEARCH_LIBS(
+- SSL_library_init,
++ OPENSSL_init_ssl,
+ [ssl],
+ found_libssl=yes,
+ found_libssl=no
+ )
++AC_SEARCH_LIBS(
++ SSL_library_init,
++ [ssl],
++ found_libssl=yes
++)
+ if test "x$found_libssl" = xno; then
+ AC_MSG_ERROR("libssl not found")
+ fi
+++ /dev/null
-/*
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
- *
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
- *
- * To the extent it has a right to do so, IBM grants an immunity from suit
- * under its patents, if any, for the use, sale or manufacture of products to
- * the extent that such products are used for performing Domain Name System
- * dynamic updates in TCP/IP networks by means of the Software. No immunity is
- * granted for any product per se or for any other function of any product.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-//#include <config.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "fdm.h"
-
-#define Assert(Cond) if (!(Cond)) abort()
-
-static const char Base64[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-static const char Pad64 = '=';
-
-/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
- The following encoding technique is taken from RFC 1521 by Borenstein
- and Freed. It is reproduced here in a slightly edited form for
- convenience.
-
- A 65-character subset of US-ASCII is used, enabling 6 bits to be
- represented per printable character. (The extra 65th character, "=",
- is used to signify a special processing function.)
-
- The encoding process represents 24-bit groups of input bits as output
- strings of 4 encoded characters. Proceeding from left to right, a
- 24-bit input group is formed by concatenating 3 8-bit input groups.
- These 24 bits are then treated as 4 concatenated 6-bit groups, each
- of which is translated into a single digit in the base64 alphabet.
-
- Each 6-bit group is used as an index into an array of 64 printable
- characters. The character referenced by the index is placed in the
- output string.
-
- Table 1: The Base64 Alphabet
-
- Value Encoding Value Encoding Value Encoding Value Encoding
- 0 A 17 R 34 i 51 z
- 1 B 18 S 35 j 52 0
- 2 C 19 T 36 k 53 1
- 3 D 20 U 37 l 54 2
- 4 E 21 V 38 m 55 3
- 5 F 22 W 39 n 56 4
- 6 G 23 X 40 o 57 5
- 7 H 24 Y 41 p 58 6
- 8 I 25 Z 42 q 59 7
- 9 J 26 a 43 r 60 8
- 10 K 27 b 44 s 61 9
- 11 L 28 c 45 t 62 +
- 12 M 29 d 46 u 63 /
- 13 N 30 e 47 v
- 14 O 31 f 48 w (pad) =
- 15 P 32 g 49 x
- 16 Q 33 h 50 y
-
- Special processing is performed if fewer than 24 bits are available
- at the end of the data being encoded. A full encoding quantum is
- always completed at the end of a quantity. When fewer than 24 input
- bits are available in an input group, zero bits are added (on the
- right) to form an integral number of 6-bit groups. Padding at the
- end of the data is performed using the '=' character.
-
- Since all base64 input is an integral number of octets, only the
- following cases can arise:
-
- (1) the final quantum of encoding input is an integral
- multiple of 24 bits; here, the final unit of encoded
- output will be an integral multiple of 4 characters
- with no "=" padding,
- (2) the final quantum of encoding input is exactly 8 bits;
- here, the final unit of encoded output will be two
- characters followed by two "=" padding characters, or
- (3) the final quantum of encoding input is exactly 16 bits;
- here, the final unit of encoded output will be three
- characters followed by one "=" padding character.
- */
-
-int
-local_b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
- size_t datalength = 0;
- uint8_t input[3];
- uint8_t output[4];
- size_t i;
-
- while (2 < srclength) {
- input[0] = *src++;
- input[1] = *src++;
- input[2] = *src++;
- srclength -= 3;
-
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
- output[3] = input[2] & 0x3f;
- Assert(output[0] < 64);
- Assert(output[1] < 64);
- Assert(output[2] < 64);
- Assert(output[3] < 64);
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Base64[output[3]];
- }
-
- /* Now we worry about padding. */
- if (0 != srclength) {
- /* Get what's left. */
- input[0] = input[1] = input[2] = '\0';
- for (i = 0; i < srclength; i++)
- input[i] = *src++;
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
- Assert(output[0] < 64);
- Assert(output[1] < 64);
- Assert(output[2] < 64);
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- if (srclength == 1)
- target[datalength++] = Pad64;
- else
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Pad64;
- }
- if (datalength >= targsize)
- return (-1);
- target[datalength] = '\0'; /* Returned value doesn't count \0. */
- return (datalength);
-}
+++ /dev/null
-/*
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
- *
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
- *
- * To the extent it has a right to do so, IBM grants an immunity from suit
- * under its patents, if any, for the use, sale or manufacture of products to
- * the extent that such products are used for performing Domain Name System
- * dynamic updates in TCP/IP networks by means of the Software. No immunity is
- * granted for any product per se or for any other function of any product.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-//#include <config.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "fdm.h"
-
-#define Assert(Cond) if (!(Cond)) abort()
-
-static const char Base64[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-static const char Pad64 = '=';
-
-/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
- The following encoding technique is taken from RFC 1521 by Borenstein
- and Freed. It is reproduced here in a slightly edited form for
- convenience.
-
- A 65-character subset of US-ASCII is used, enabling 6 bits to be
- represented per printable character. (The extra 65th character, "=",
- is used to signify a special processing function.)
-
- The encoding process represents 24-bit groups of input bits as output
- strings of 4 encoded characters. Proceeding from left to right, a
- 24-bit input group is formed by concatenating 3 8-bit input groups.
- These 24 bits are then treated as 4 concatenated 6-bit groups, each
- of which is translated into a single digit in the base64 alphabet.
-
- Each 6-bit group is used as an index into an array of 64 printable
- characters. The character referenced by the index is placed in the
- output string.
-
- Table 1: The Base64 Alphabet
-
- Value Encoding Value Encoding Value Encoding Value Encoding
- 0 A 17 R 34 i 51 z
- 1 B 18 S 35 j 52 0
- 2 C 19 T 36 k 53 1
- 3 D 20 U 37 l 54 2
- 4 E 21 V 38 m 55 3
- 5 F 22 W 39 n 56 4
- 6 G 23 X 40 o 57 5
- 7 H 24 Y 41 p 58 6
- 8 I 25 Z 42 q 59 7
- 9 J 26 a 43 r 60 8
- 10 K 27 b 44 s 61 9
- 11 L 28 c 45 t 62 +
- 12 M 29 d 46 u 63 /
- 13 N 30 e 47 v
- 14 O 31 f 48 w (pad) =
- 15 P 32 g 49 x
- 16 Q 33 h 50 y
-
- Special processing is performed if fewer than 24 bits are available
- at the end of the data being encoded. A full encoding quantum is
- always completed at the end of a quantity. When fewer than 24 input
- bits are available in an input group, zero bits are added (on the
- right) to form an integral number of 6-bit groups. Padding at the
- end of the data is performed using the '=' character.
-
- Since all base64 input is an integral number of octets, only the
- following cases can arise:
-
- (1) the final quantum of encoding input is an integral
- multiple of 24 bits; here, the final unit of encoded
- output will be an integral multiple of 4 characters
- with no "=" padding,
- (2) the final quantum of encoding input is exactly 8 bits;
- here, the final unit of encoded output will be two
- characters followed by two "=" padding characters, or
- (3) the final quantum of encoding input is exactly 16 bits;
- here, the final unit of encoded output will be three
- characters followed by one "=" padding character.
- */
-
-/* skips all whitespace anywhere.
- converts characters, four at a time, starting at (or after)
- src from base - 64 numbers into three 8 bit bytes in the target area.
- it returns the number of data bytes stored at the target, or -1 on error.
- */
-
-static int b64rmap_initialized = 0;
-static uint8_t b64rmap[256];
-
-static const uint8_t b64rmap_special = 0xf0;
-static const uint8_t b64rmap_end = 0xfd;
-static const uint8_t b64rmap_space = 0xfe;
-static const uint8_t b64rmap_invalid = 0xff;
-
-/**
- * Initializing the reverse map is not thread safe.
- * Which is fine for NSD. For now...
- **/
-static void
-b64_initialize_rmap ()
-{
- int i;
- char ch;
-
- /* Null: end of string, stop parsing */
- b64rmap[0] = b64rmap_end;
-
- for (i = 1; i < 256; ++i) {
- ch = (char)i;
- /* Whitespaces */
- if (isspace(ch))
- b64rmap[i] = b64rmap_space;
- /* Padding: stop parsing */
- else if (ch == Pad64)
- b64rmap[i] = b64rmap_end;
- /* Non-base64 char */
- else
- b64rmap[i] = b64rmap_invalid;
- }
-
- /* Fill reverse mapping for base64 chars */
- for (i = 0; Base64[i] != '\0'; ++i)
- b64rmap[(uint8_t)Base64[i]] = i;
-
- b64rmap_initialized = 1;
-}
-
-static int
-b64_pton_do(char const *src, uint8_t *target, size_t targsize)
-{
- int tarindex, state, ch;
- uint8_t ofs;
-
- state = 0;
- tarindex = 0;
-
- while (1)
- {
- ch = *src++;
- ofs = b64rmap[ch];
-
- if (ofs >= b64rmap_special) {
- /* Ignore whitespaces */
- if (ofs == b64rmap_space)
- continue;
- /* End of base64 characters */
- if (ofs == b64rmap_end)
- break;
- /* A non-base64 character. */
- return (-1);
- }
-
- switch (state) {
- case 0:
- if ((size_t)tarindex >= targsize)
- return (-1);
- target[tarindex] = ofs << 2;
- state = 1;
- break;
- case 1:
- if ((size_t)tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= ofs >> 4;
- target[tarindex+1] = (ofs & 0x0f)
- << 4 ;
- tarindex++;
- state = 2;
- break;
- case 2:
- if ((size_t)tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= ofs >> 2;
- target[tarindex+1] = (ofs & 0x03)
- << 6;
- tarindex++;
- state = 3;
- break;
- case 3:
- if ((size_t)tarindex >= targsize)
- return (-1);
- target[tarindex] |= ofs;
- tarindex++;
- state = 0;
- break;
- default:
- abort();
- }
- }
-
- /*
- * We are done decoding Base-64 chars. Let's see if we ended
- * on a byte boundary, and/or with erroneous trailing characters.
- */
-
- if (ch == Pad64) { /* We got a pad char. */
- ch = *src++; /* Skip it, get next. */
- switch (state) {
- case 0: /* Invalid = in first position */
- case 1: /* Invalid = in second position */
- return (-1);
-
- case 2: /* Valid, means one byte of info */
- /* Skip any number of spaces. */
- for ((void)NULL; ch != '\0'; ch = *src++)
- if (b64rmap[ch] != b64rmap_space)
- break;
- /* Make sure there is another trailing = sign. */
- if (ch != Pad64)
- return (-1);
- ch = *src++; /* Skip the = */
- /* Fall through to "single trailing =" case. */
- /* FALLTHROUGH */
-
- case 3: /* Valid, means two bytes of info */
- /*
- * We know this char is an =. Is there anything but
- * whitespace after it?
- */
- for ((void)NULL; ch != '\0'; ch = *src++)
- if (b64rmap[ch] != b64rmap_space)
- return (-1);
-
- /*
- * Now make sure for cases 2 and 3 that the "extra"
- * bits that slopped past the last full byte were
- * zeros. If we don't check them, they become a
- * subliminal channel.
- */
- if (target[tarindex] != 0)
- return (-1);
- }
- } else {
- /*
- * We ended by seeing the end of the string. Make sure we
- * have no partial bytes lying around.
- */
- if (state != 0)
- return (-1);
- }
-
- return (tarindex);
-}
-
-
-static int
-b64_pton_len(char const *src)
-{
- int tarindex, state, ch;
- uint8_t ofs;
-
- state = 0;
- tarindex = 0;
-
- while (1)
- {
- ch = *src++;
- ofs = b64rmap[ch];
-
- if (ofs >= b64rmap_special) {
- /* Ignore whitespaces */
- if (ofs == b64rmap_space)
- continue;
- /* End of base64 characters */
- if (ofs == b64rmap_end)
- break;
- /* A non-base64 character. */
- return (-1);
- }
-
- switch (state) {
- case 0:
- state = 1;
- break;
- case 1:
- tarindex++;
- state = 2;
- break;
- case 2:
- tarindex++;
- state = 3;
- break;
- case 3:
- tarindex++;
- state = 0;
- break;
- default:
- abort();
- }
- }
-
- /*
- * We are done decoding Base-64 chars. Let's see if we ended
- * on a byte boundary, and/or with erroneous trailing characters.
- */
-
- if (ch == Pad64) { /* We got a pad char. */
- ch = *src++; /* Skip it, get next. */
- switch (state) {
- case 0: /* Invalid = in first position */
- case 1: /* Invalid = in second position */
- return (-1);
-
- case 2: /* Valid, means one byte of info */
- /* Skip any number of spaces. */
- for ((void)NULL; ch != '\0'; ch = *src++)
- if (b64rmap[ch] != b64rmap_space)
- break;
- /* Make sure there is another trailing = sign. */
- if (ch != Pad64)
- return (-1);
- ch = *src++; /* Skip the = */
- /* Fall through to "single trailing =" case. */
- /* FALLTHROUGH */
-
- case 3: /* Valid, means two bytes of info */
- /*
- * We know this char is an =. Is there anything but
- * whitespace after it?
- */
- for ((void)NULL; ch != '\0'; ch = *src++)
- if (b64rmap[ch] != b64rmap_space)
- return (-1);
-
- }
- } else {
- /*
- * We ended by seeing the end of the string. Make sure we
- * have no partial bytes lying around.
- */
- if (state != 0)
- return (-1);
- }
-
- return (tarindex);
-}
-
-
-int
-local_b64_pton(char const *src, uint8_t *target, size_t targsize)
-{
- if (!b64rmap_initialized)
- b64_initialize_rmap ();
-
- if (target)
- return b64_pton_do (src, target, targsize);
- else
- return b64_pton_len (src);
-}
-#
+#
# Copyright (C) 2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
include $(TOPDIR)/rules.mk
PKG_NAME:=mailman
+PKG_VERSION:=2.1.29
PKG_RELEASE:=1
-PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_VERSION:=2.1.23
-PKG_HASH:=b022ca6f8534621c9dbe50c983948688bc4623214773b580c2c78e4a7ae43e69
+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
+PKG_HASH:=838872713601e8a124146e550f53709482c1ef168f1e16d201465c651cbf0d2c
+
PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=gnu-COPYING-GPL
+PKG_CPE_ID:=cpe:2.3:a:gnu:mailman
include $(INCLUDE_DIR)/package.mk
SECTION:=mail
CATEGORY:=Mail
TITLE:=The GNU Mailing List Manager
- URL:=http://www.gnu.org/software/mailman/
+ URL:=https://www.gnu.org/software/mailman/
DEPENDS:=+postfix +python +uhttpd +python-dns
endef
-diff -rupN mailman-2.1.14-1/Mailman/Defaults.py.in mailman-2.1.14-1_patched/Mailman/Defaults.py.in
---- mailman-2.1.14-1/Mailman/Defaults.py.in 2011-03-01 23:35:57.000000000 +0300
-+++ mailman-2.1.14-1_patched/Mailman/Defaults.py.in 2011-03-09 12:26:10.000000000 +0300
-@@ -489,7 +489,7 @@ DELIVERY_MODULE = 'SMTPDirect'
+--- a/Mailman/Defaults.py.in
++++ b/Mailman/Defaults.py.in
+@@ -506,7 +506,7 @@ SMTPLIB_DEBUG_LEVEL = 0
# standard out (or send an email to the site list owner) for manual twiddling
# of an /etc/aliases style file. Use 'Postfix' if you are using the Postfix
# MTA -- but then also see POSTFIX_STYLE_VIRTUAL_DOMAINS.
-diff -Naur mailman-2.1.18-1/configure mailman-2.1.18-1_patched/configure
---- mailman-2.1.18-1/configure 2014-10-26 12:00:38.090360119 +0300
-+++ mailman-2.1.18-1_patched/configure 2014-10-26 12:00:21.323016430 +0300
-@@ -2236,35 +2236,35 @@
+--- a/configure
++++ b/configure
+@@ -2255,35 +2255,35 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $version" >&5
$as_echo "$version" >&6; }
-diff -Naur mailman-2.1.18-1/configure mailman-2.1.18-1_patched/configure
---- mailman-2.1.18-1/configure 2014-05-06 20:43:56.000000000 +0400
-+++ mailman-2.1.18-1_patched/configure 2014-11-04 15:02:32.892666331 +0300
-@@ -3927,6 +3927,8 @@
+--- a/configure
++++ b/configure
+@@ -3957,6 +3957,8 @@ fi
$as_echo "$URLHOST" >&6; }
rm -f conftest.out conftest.py
-diff -Naur mailman-2.1.18-1/Mailman/MailList.py mailman-2.1.18-1_patched/Mailman/MailList.py
---- mailman-2.1.18-1/Mailman/MailList.py 2014-05-06 20:43:56.000000000 +0400
-+++ mailman-2.1.18-1_patched/Mailman/MailList.py 2014-11-04 15:57:06.832636147 +0300
-@@ -30,7 +30,7 @@
+--- a/Mailman/MailList.py
++++ b/Mailman/MailList.py
+@@ -30,7 +30,7 @@ import re
import shutil
import socket
import urllib
from cStringIO import StringIO
from UserDict import UserDict
-diff -Naur mailman-2.1.18-1/misc/paths.py.in mailman-2.1.18-1_patched/misc/paths.py.in
---- mailman-2.1.18-1/misc/paths.py.in 2014-05-06 20:43:56.000000000 +0400
-+++ mailman-2.1.18-1_patched/misc/paths.py.in 2014-11-04 15:55:49.594941540 +0300
-@@ -66,14 +66,14 @@
+--- a/misc/paths.py.in
++++ b/misc/paths.py.in
+@@ -71,14 +71,14 @@ sys.path.append(distdir)
# In a normal interactive Python environment, the japanese.pth and korean.pth
# files would be imported automatically. But because we inhibit the importing
# of the site module, we need to be explicit about importing these codecs.
include $(TOPDIR)/rules.mk
PKG_NAME:=mailsend
-PKG_VERSION:=1.17b15
-PKG_RELEASE:=2
+PKG_VERSION:=1.19
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/muquit/mailsend/archive/$(PKG_VERSION)
-PKG_HASH:=73cb1b2455de95ab126e3682bf19c62e6baabee00f449da692be0bebd3ceb26b
+PKG_HASH:=565ef6be26c58ef75065c5519eae8dd55bae3142928619696b28d242b73493f7
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
--- /dev/null
+From 960df6d7a11eef90128dc2ae660866b27f0e4336 Mon Sep 17 00:00:00 2001
+From: muquit <muquit@gmail.com>
+Date: Wed, 21 Sep 2016 12:46:24 -0400
+Subject: [PATCH] OpenSSL 1.1 support for HMAC api
+
+---
+ utils.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/utils.c b/utils.c
+index b072138..abfb86e 100755
+--- a/utils.c
++++ b/utils.c
+@@ -791,8 +791,14 @@ char *encode_cram_md5(char *challenge,char *user,char *secret)
+ unsigned char
+ hmac_md5[16];
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ HMAC_CTX
+ ctx;
++#else
++ /* OpenSSL 1.1.x*/
++ HMAC_CTX
++ *ctx;
++#endif
+
+ const EVP_MD
+ *md5=NULL;
+@@ -831,11 +837,20 @@ char *encode_cram_md5(char *challenge,char *user,char *secret)
+ showVerbose("Challenge After decoding: %s\n",data);
+
+ /* take HMAC-MD5 of the challenge*/
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ md5=EVP_get_digestbyname("md5");
+ HMAC_CTX_init(&ctx);
+ HMAC_Init(&ctx,secret,strlen(secret),md5);
+ HMAC_Update(&ctx,data,data_len);
+ HMAC_Final(&ctx,hmac_md5,&hmac_len);
++#else
++ /* OpenSSL 1.1.x */
++ ctx = HMAC_CTX_new();
++ HMAC_Init_ex(ctx,secret,strlen(secret),EVP_md5(),NULL);
++ HMAC_Update(ctx,data,data_len);
++ HMAC_Final(ctx,hmac_md5,&hmac_len);
++#endif
+
+ /* convert the digest to hex */
+ memset(hex,0,sizeof(hex));
--- /dev/null
+From 2d585baa473314f79d492c0876b3bbf96758562c Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Fri, 8 Jun 2018 14:41:23 -0300
+Subject: [PATCH] Removed API deprecated by OpenSSL 1.1.0
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+---
+ main.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/main.c b/main.c
+index d275e6a..51bfb1d 100755
+--- a/main.c
++++ b/main.c
+@@ -91,7 +91,11 @@ static void usage(void)
+ (void) printf(" Copyright: %.1024s\n\n",NO_SPAM_STATEMENT);
+ #ifdef HAVE_OPENSSL
+ (void) fprintf(stdout," (Compiled with OpenSSL version: %s)\n",
++# if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSLeay_version(SSLEAY_VERSION));
++# else
++ OpenSSL_version(OPENSSL_VERSION));
++# endif
+ #else
+ (void) fprintf(stdout," (Not compiled with OpenSSL)\n");
+ #endif /* HAVE_OPENSSL */
+@@ -1056,9 +1060,13 @@ int main(int argc,char **argv)
+ (void) fprintf(stderr,"mailsend Version: %.1024s\n",MAILSEND_VERSION);
+ #ifdef HAVE_OPENSSL
+ (void) fprintf(stderr,"Compiled with OpenSSL: %s\n",
++# if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSLeay_version(SSLEAY_VERSION));
++# else
++ OpenSSL_version(OPENSSL_VERSION));
++# endif
+ #else
+- (void) fprintf(stderr,"Not Compiled OpenSSL, some auth methods will be unavailable\n");
++ (void) fprintf(stderr,"Not Compiled with OpenSSL, some auth methods will be unavailable\n");
+ #endif /* ! HAVE_OPENSSL */
+ rc = 0;
+ goto ExitProcessing;
+--
+2.16.4
+
#
# Copyright (C) 2009 David Cooper <dave@kupesoft.com>
# Copyright (C) 2009-2015 OpenWrt.org
-# Copyright (C) 2016 Daniel Dickinson <lede@daniel.thecshore.com>
+# Copyright (C) 2016 Daniel Dickinson <cshored@thecshore.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Daniel Dickinson <lede@daniel.thecshore.com>
include $(INCLUDE_DIR)/package.mk
define Package/msmtp-scripts/Default
SECTION:=mail
CATEGORY:=Mail
- TITLE:=Simple sendmail SMTP queueing and forwarding
+ TITLE:=DEPRECATED: Simple sendmail SMTP queueing and forwarding
URL:=http://msmtp-scripts.sourceforge.net/
endef
define Package/msmtp-scripts/Default/description
+ DEPRECATED: SourceForge project is abandonded; and upstream (on GitHub)
+ has deprecated this project. See:
+ https://github.com/cshore-history/msmtp-scripts#deprecation-notice
+
msmtp-scripts are scripts wrappers around the msmtp SMTP client that
add queueing, logging to syslog or file, a subset of sendmail/postfix
mailq/postsuper/postqueue commands implemented in a compatible fashion.
include $(TOPDIR)/rules.mk
PKG_NAME:=msmtp
-PKG_VERSION:=1.6.6
+PKG_VERSION:=1.6.8
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@SF/msmtp
-PKG_HASH:=da15db1f62bd0201fce5310adb89c86188be91cd745b7cb3b62b81a501e7fb5e
+PKG_SOURCE_URL:=https://marlam.de/msmtp/releases
+PKG_HASH:=55ff95a304d888b56d07d9c62327ab9bfe26532c9c2a2ed6aefc43bea1b659fb
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_MAINTAINER:=
-PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
CATEGORY:=Mail
DEPENDS:=$(INTL_DEPENDS)
TITLE:=Simple sendmail SMTP forwarding
- URL:=http://msmtp.sourceforge.net/
+ URL:=https://marlam.de/msmtp
endef
define Package/msmtp/Default/description
include $(TOPDIR)/rules.mk
PKG_NAME:=mutt
-PKG_VERSION:=1.9.4
+PKG_VERSION:=1.10.1
PKG_RELEASE:=1
PKG_SOURCE_URL:=ftp://ftp.mutt.org/pub/mutt/ \
https://bitbucket.org/mutt/mutt/downloads/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=f4d1bf26350c1ac81b551f98e5a4fd80d7fecd86919aa8165e69fde87de1b5df
+PKG_HASH:=734a3883158ec3d180cf6538d8bd7f685ce641d2cdef657aa0038f76e79a54a0
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=GPL
PKG_NAME:=nail
PKG_VERSION:=12.5
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-2-Clause
PKG_SOURCE:=heirloom-mailx_$(PKG_VERSION).orig.tar.gz
cp = ssl_method_string(uhp);
if (cp != NULL) {
-+#ifndef OPENSSL_NO_SSL2
++#if !defined(OPENSSL_NO_SSL2) && !OPENSSL_VERSION_NUMBER >= 0x10100000L
if (equal(cp, "ssl2"))
method = SSLv2_client_method();
- else if (equal(cp, "ssl3"))
--- /dev/null
+--- a/openssl.c
++++ b/openssl.c
+@@ -137,7 +137,11 @@ ssl_rand_init(void)
+
+ if ((cp = value("ssl-rand-egd")) != NULL) {
+ cp = expand(cp);
++#ifndef OPENSSL_NO_EGD
+ if (RAND_egd(cp) == -1) {
++#else
++ if (1) {
++#endif
+ fprintf(stderr, catgets(catd, CATSET, 245,
+ "entropy daemon at \"%s\" not available\n"),
+ cp);
PKG_NAME:=opendkim
PKG_VERSION:=2.10.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=openssl
+PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
--- /dev/null
+Description: Build and work with either openssl 1.0.2 or 1.1.0
+ * Add patch to build with either openssl 1.0.2 or 1.1.0 (Closes: #828466)
+ - Thanks to Sebastian Andrzej Siewior for the patch
+Author: Sebastian Andrzej Siewior
+Bug-Debian: http://bugs.debian.org/828466
+Origin: vendor
+Forwarded: no
+Reviewed-By: Scott Kitterman <scott@kitterman.com>
+Last-Update: <YYYY-MM-DD>
+
+--- opendkim-2.11.0~alpha.orig/configure.ac
++++ opendkim-2.11.0~alpha/configure.ac
+@@ -864,26 +864,28 @@ then
+ AC_SEARCH_LIBS([ERR_peek_error], [crypto], ,
+ AC_MSG_ERROR([libcrypto not found]))
+
+- AC_SEARCH_LIBS([SSL_library_init], [ssl], ,
+- [
+- if test x"$enable_shared" = x"yes"
+- then
+- AC_MSG_ERROR([Cannot build shared opendkim
+- against static openssl libraries.
+- Configure with --disable-shared
+- to get this working or obtain a
+- shared libssl library for
+- opendkim to use.])
+- fi
+
+- # avoid caching issue - last result of SSL_library_init
+- # shouldn't be cached for this next check
+- unset ac_cv_search_SSL_library_init
+- LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl"
+- AC_SEARCH_LIBS([SSL_library_init], [ssl], ,
+- AC_MSG_ERROR([libssl not found]), [-ldl])
+- ]
+- )
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[#include <openssl/ssl.h>]],
++ [[SSL_library_init();]])],
++ [od_have_ossl="yes";],
++ [od_have_ossl="no";])
++ if test x"$od_have_ossl" = x"no"
++ then
++ if test x"$enable_shared" = x"yes"
++ then
++ AC_MSG_ERROR([Cannot build shared opendkim
++ against static openssl libraries.
++ Configure with --disable-shared
++ to get this working or obtain a
++ shared libssl library for
++ opendkim to use.])
++ fi
++
++ LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl"
++ AC_SEARCH_LIBS([SSL_library_init], [ssl], ,
++ AC_MSG_ERROR([libssl not found]), [-ldl])
++ fi
+
+ AC_CHECK_DECL([SHA256_DIGEST_LENGTH],
+ AC_DEFINE([HAVE_SHA256], 1,
+--- opendkim-2.11.0~alpha.orig/opendkim/opendkim-crypto.c
++++ opendkim-2.11.0~alpha/opendkim/opendkim-crypto.c
+@@ -222,7 +222,11 @@ dkimf_crypto_free_id(void *ptr)
+ {
+ assert(pthread_setspecific(id_key, ptr) == 0);
+
++#if OPENSSL_VERSION_NUMBER >= 0x10100000
++ OPENSSL_thread_stop();
++#else
+ ERR_remove_state(0);
++#endif
+
+ free(ptr);
+
+@@ -392,11 +396,15 @@ dkimf_crypto_free(void)
+ {
+ if (crypto_init_done)
+ {
++#if OPENSSL_VERSION_NUMBER >= 0x10100000
++ OPENSSL_thread_stop();
++#else
+ CRYPTO_cleanup_all_ex_data();
+ CONF_modules_free();
+ EVP_cleanup();
+ ERR_free_strings();
+ ERR_remove_state(0);
++#endif
+
+ if (nmutexes > 0)
+ {
include $(TOPDIR)/rules.mk
PKG_NAME:=dovecot-pigeonhole
-PKG_VERSION_PLUGIN:=0.4.21
+PKG_VERSION_PLUGIN:=0.5.2
PKG_VERSION_DOVECOT:=$(shell make --no-print-directory -C ../dovecot/ val.PKG_VERSION V=s)
PKG_VERSION:=$(PKG_VERSION_DOVECOT)-$(PKG_VERSION_PLUGIN)
-PKG_RELEASE:=2
+PKG_RELEASE:=4
-DOVECOT_VERSION:=2.2
+DOVECOT_VERSION:=2.3
PKG_SOURCE:=dovecot-$(DOVECOT_VERSION)-pigeonhole-$(PKG_VERSION_PLUGIN).tar.gz
PKG_SOURCE_URL:=https://pigeonhole.dovecot.org/releases/$(DOVECOT_VERSION)
-PKG_HASH:=4ae09cb788c5334d167f5a89ee70b0616c3231e5904ad258ce408e4953cfdd6a
+PKG_HASH:=950e8e15c58e539761255e140dd3678dd2477fa432a5f2b804e53821bdc02535
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING COPYING.LGPL
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
define Package/dovecot-pigeonhole
SECTION:=mail
CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/dovecot/"
define Package/dovecot-pigeonhole/install
- $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/dovecot/
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/dovecot/ $(1)/usr/libexec/dovecot/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
+ $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=postfix
-PKG_RELEASE:=1
-PKG_VERSION:=3.2.4
+PKG_RELEASE:=2
+PKG_VERSION:=3.3.1
PKG_SOURCE_URL:= \
https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \
ftp://ftp.porcupine.org/mirrors/postfix-release/official/
-PKG_HASH:=ec55ebaa2aa464792af8d5ee103eb68b27a42dc2b36a02fee42dafbf9740c7f6
+PKG_HASH:=54f514dae42b5275cb4bc9c69283f16c06200b71813d0bb696568c4ba7ae7e3b
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
PKG_LICENSE:=IPL-1.0
CONFIG_POSTFIX_CDB \
CONFIG_POSTFIX_DB \
CONFIG_POSTFIX_SQLITE \
+ CONFIG_POSTFIX_MYSQL \
CONFIG_POSTFIX_PGSQL \
CONFIG_POSTFIX_PCRE \
CONFIG_POSTFIX_EAI \
postfix=25:postfix=25 \
postdrop=26:postdrop=26
URL:=http://www.postfix.org/
- DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_SQLITE:libsqlite3 +POSTFIX_PGSQL:libpq +POSTFIX_EAI:icu +POSTFIX_PCRE:libpcre
+ DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_SQLITE:libsqlite3 +POSTFIX_MYSQL:libmysqlclient +POSTFIX_PGSQL:libpq +POSTFIX_EAI:icu +POSTFIX_PCRE:libpcre
endef
define Package/postfix/description
default y
help
Implements support for SQLite3 DB
+ config POSTFIX_MYSQL
+ bool "MYSQL support"
+ default n
+ help
+ Implements support for MySQL
config POSTFIX_PGSQL
bool "PostgreSQL support"
default n
AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lsqlite3 -lpthread
endif
+ifdef CONFIG_POSTFIX_MYSQL
+ CCARGS+=-DHAS_MYSQL -I$(STAGING_DIR)/usr/include/mysql
+ AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lmysqlclient -lz -lm
+endif
+
ifdef CONFIG_POSTFIX_PGSQL
CCARGS+=-DHAS_PGSQL -I$(STAGING_DIR)/usr/include/
AUXLIBS+=-L$(STAGING_DIR)/usr/lib -lpq
#!/bin/sh /etc/rc.common
# Copyright (C) 2014 OpenWrt.org
-START=50
+START=72
STOP=50
EXTRA_COMMANDS="status abort flush postinst"
EXTRA_HELP=" status Display the service status
diff -rupN postfix-2.8.1/src/smtpd/smtpd_check.c postfix-2.8.1_patched/src/smtpd/smtpd_check.c
--- postfix-2.8.1/src/smtpd/smtpd_check.c 2011-01-04 22:03:50.000000000 +0300
+++ postfix-2.8.1_patched/src/smtpd/smtpd_check.c 2011-03-06 19:35:39.000000000 +0300
-@@ -5302,7 +5302,7 @@ char *smtpd_check_queue(SMTPD_STATE *s
+@@ -5322,7 +5322,7 @@ char *smtpd_check_queue(SMTPD_STATE *s
*/
#define BLOCKS(x) ((x) / fsbuf.block_size)
+++ /dev/null
-This patch fixes the runtime error when libmilter is used with Postfix:
-"unix_send_fd: your system has no support for file descriptor passing"
-
-The issue has been fixed upstream in 20170618 update to Postfix v.3.3:
-http://postfix.1071664.n5.nabble.com/Fix-check-for-file-descriptor-passing-td90983.html
-
-This patch must be removed before compiling Postfix v.3.3.*
-
---- a/src/util/sys_defs.h
-+++ b/src/util/sys_defs.h
-@@ -804,7 +804,7 @@ extern int initgroups(const char *, int)
- #define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1)
- #endif
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) \
-- || (__GLIBC__ < 2)
-+ || (defined(__GLIBC__) && __GLIBC__ < 2)
- #define CANT_USE_SEND_RECV_MSG
- #define DEF_SMTP_CACHE_DEMAND 0
- #else
diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-install
--- postfix-2.10.2/conf/post-install 2013-06-13 18:07:46.000000000 +0400
+++ postfix-2.10.2_patched/conf/post-install 2013-11-19 21:17:49.572820573 +0400
-@@ -361,10 +361,10 @@
+@@ -366,10 +366,10 @@
# Sanity checks
case $setgid_group in
no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2
-@@ -372,7 +372,7 @@
+@@ -377,7 +377,7 @@
esac
for path in "$daemon_directory" "$command_directory" "$queue_directory" \
"$meta_directory"
do
case "$path" in
-@@ -381,7 +381,7 @@
+@@ -386,7 +386,7 @@
esac
done
--- a/src/util/dict_db.c 2017-07-16 16:56:00.819659962 +0300
+++ b/src/util/dict_db.c 2017-07-16 16:58:31.011401358 +0300
-@@ -733,8 +733,8 @@
+@@ -740,8 +740,8 @@
msg_fatal("create DB database: %m");
if (db == 0)
msg_panic("db_create null result");
- msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM);
+// if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0)
+// msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM);
+ db_base_buf = vstring_alloc(100);
#if DB_VERSION_MAJOR == 6 || DB_VERSION_MAJOR == 5 || \
(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0)
- if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0)
--- a/makedefs 2016-01-28 12:30:14.444082390 -0500
+++ b/makedefs 2016-01-28 13:44:02.092006512 -0500
-@@ -210,7 +210,7 @@ error() {
+@@ -213,7 +213,7 @@ error() {
case $# in
# Officially supported usage.
RELEASE=`(uname -r) 2>/dev/null`
# No ${x%%y} support in Solaris 11 /bin/sh
RELEASE_MAJOR=`expr "$RELEASE" : '\([0-9]*\)'` || exit 1
-@@ -224,6 +224,15 @@ case $# in
+@@ -227,6 +227,15 @@ case $# in
esac
case "$SYSTEM.$RELEASE" in
diff -Naur postfix-2.11.1/conf/post-install postfix-2.11.1.patched/conf/post-install
--- postfix-2.11.1/conf/post-install 2014-10-05 20:43:58.597876946 +0400
+++ postfix-2.11.1.patched/conf/post-install 2014-10-11 16:28:01.258874097 +0400
-@@ -321,7 +321,7 @@
+@@ -326,7 +326,7 @@
case `uname -s` in
HP-UX*) FMT=cat;;
SunOS*) FMT=fake_fmt;;
diff -Naur a/conf/post-install b/conf/post-install
--- a/conf/post-install 2015-12-28 00:00:45.000000000 +0000
+++ b/conf/post-install 2017-08-01 22:42:30.476896711 +0000
-@@ -561,15 +561,16 @@
+@@ -566,15 +566,16 @@
then
set_permission=1
fi
PKG_NAME:=sendmail
PKG_VERSION:=8.15.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://artfiles.org/sendmail.org/pub/sendmail/ \
$(CP) $(PKG_BUILD_DIR)/cf/cf/generic-linux.mc $(PKG_BUILD_DIR)/cf/cf/sendmail.mc
$(SED) 's@TARGET_CC@$(TARGET_CC)@g' $(PKG_BUILD_DIR)/devtools/Site/$(SITECONFIG)
$(SED) 's@TARGET_CFLAGS@$(TARGET_CFLAGS)@g' $(PKG_BUILD_DIR)/devtools/Site/$(SITECONFIG)
+ $(SED) 's@STAGING_DIR@$(STAGING_DIR)@g' $(PKG_BUILD_DIR)/devtools/OS/$(TARGET_OS)
endef
define Build/Compile
define(`confLIBS', `-ldl')
define(`confEBINDIR', `/usr/sbin')
define(`confMKDIR', `mkdir')
-APPENDDEF(`confLIBSEARCH', `crypt nsl')
+define(`confLIBSEARCHPATH', `STAGING_DIR/lib STAGING_DIR/usr/lib')
+APPENDDEF(`confLIBSEARCH', `crypt')
define(`confMTCCOPTS', `-D_REENTRANT')
define(`confMTLDOPTS', `-lpthread')
PKG_NAME:=crtmpserver
PKG_REV:=b6fdcdb953d1e99c48a0c37a8c80f2cad2db443b
PKG_VERSION:=2012-07-18+git-$(PKG_REV)
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_BUILD_PARALLEL:=2
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=GPL-3.0
$(SED) 's,^TOOLCHAIN_BASE[[:space:]]*=.*,TOOLCHAIN_BASE=$(TS_BASE),' \
-e 's,^TOOLCHAIN_PREFIX[[:space:]]*=.*,TOOLCHAIN_PREFIX=$(TARGET_CROSS),' \
-e 's,^CCOMPILER[[:space:]]*=.*,CCOMPILER=$(TARGET_CC),' \
- -e 's,^CXXCOMPILER[[:space:]]*=.*,CXXCOMPILER=$(TARGET_CXX),' \
+ -e 's,^CXXCOMPILER[[:space:]]*=.*,CXXCOMPILER=$(TARGET_CXX) -std=gnu++03,' \
-e 's,^OPTIMIZATIONS[[:space:]]*=.*,OPTIMIZATIONS=-O2,' \
-e 's,^SSL_BASE[[:space:]]*=.*,SSL_BASE=$(STAGING_DIR)/usr,' \
linux-openwrt-uclibc.mk)
--- /dev/null
+--- a/sources/applications/applestreamingclient/include/protocols/aes/inboundaesprotocol.h
++++ b/sources/applications/applestreamingclient/include/protocols/aes/inboundaesprotocol.h
+@@ -30,7 +30,7 @@ namespace app_applestreamingclient {
+ private:
+ IOBuffer _tempBuffer;
+ IOBuffer _inputBuffer;
+- EVP_CIPHER_CTX _decContex;
++ EVP_CIPHER_CTX *_decContex;
+ bool _lastChunk;
+ uint8_t *_pIV;
+ uint8_t *_pKey;
+--- a/sources/applications/applestreamingclient/src/protocols/aes/inboundaesprotocol.cpp
++++ b/sources/applications/applestreamingclient/src/protocols/aes/inboundaesprotocol.cpp
+@@ -31,13 +31,12 @@ InboundAESProtocol::InboundAESProtocol()
+ memset(_pIV, 0, 16);
+ _pKey = new uint8_t[16];
+ memset(_pKey, 0, 16);
+- memset(&_decContex, 0, sizeof (EVP_CIPHER_CTX));
++ _decContex = EVP_CIPHER_CTX_new();
+ _totalDecrypted = 0;
+ }
+
+ InboundAESProtocol::~InboundAESProtocol() {
+- EVP_CIPHER_CTX_cleanup(&_decContex);
+- memset(&_decContex, 0, sizeof (EVP_CIPHER_CTX));
++ EVP_CIPHER_CTX_free(_decContex);
+ delete[] _pIV;
+ delete[] _pKey;
+ }
+@@ -60,11 +59,9 @@ bool InboundAESProtocol::Initialize(Vari
+ _inputBuffer.IgnoreAll();
+ _tempBuffer.IgnoreAll();
+
+- EVP_CIPHER_CTX_cleanup(&_decContex);
+- memset(&_decContex, 0, sizeof (EVP_CIPHER_CTX));
+- EVP_CIPHER_CTX_init(&_decContex);
+- EVP_DecryptInit_ex(&_decContex, EVP_aes_128_cbc(), NULL, _pKey, _pIV);
+- EVP_CIPHER_CTX_set_padding(&_decContex, 0);
++ EVP_CIPHER_CTX_reset(_decContex);
++ EVP_DecryptInit_ex(_decContex, EVP_aes_128_cbc(), NULL, _pKey, _pIV);
++ EVP_CIPHER_CTX_set_padding(_decContex, 0);
+
+ return true;
+ }
+@@ -105,14 +102,14 @@ bool InboundAESProtocol::SignalInputData
+ int decryptedFinalSize = 0;
+ uint32_t padding = 0;
+
+- EVP_DecryptUpdate(&_decContex, pTempData, &decryptedSize, GETIBPOINTER(buffer), safeSize);
++ EVP_DecryptUpdate(_decContex, pTempData, &decryptedSize, GETIBPOINTER(buffer), safeSize);
+ _totalDecrypted += decryptedSize;
+
+ //6. Decrypt leftovers
+ bool transferCompleted = false;
+ if (((HTTPBufferProtocol *) GetFarProtocol())->TransferCompleted()) {
+ transferCompleted = true;
+- EVP_DecryptFinal_ex(&_decContex,
++ EVP_DecryptFinal_ex(_decContex,
+ pTempData + decryptedSize,
+ &decryptedFinalSize);
+ _totalDecrypted += decryptedFinalSize;
+--- a/sources/common/include/utils/misc/crypto.h
++++ b/sources/common/include/utils/misc/crypto.h
+@@ -33,6 +33,7 @@
+ #include <openssl/aes.h>
+ #include <openssl/engine.h>
+ #include <openssl/conf.h>
++#include "utils/misc/libcrypto-compat.h"
+
+ /*!
+ @class DHWrapper
+@@ -83,7 +84,7 @@ public:
+ bool CopySharedKey(uint8_t *pDst, int32_t dstLength);
+ private:
+ void Cleanup();
+- bool CopyKey(BIGNUM *pNum, uint8_t *pDst, int32_t dstLength);
++ bool CopyKey(const BIGNUM *pNum, uint8_t *pDst, int32_t dstLength);
+ };
+
+ DLLEXP void InitRC4Encryption(uint8_t *secretKey, uint8_t *pubKeyIn, uint8_t *pubKeyOut,
+--- a/sources/common/src/utils/misc/crypto.cpp
++++ b/sources/common/src/utils/misc/crypto.cpp
+@@ -35,6 +35,7 @@ DHWrapper::~DHWrapper() {
+ }
+
+ bool DHWrapper::Initialize() {
++ BIGNUM *p = NULL, *g = NULL;
+ Cleanup();
+
+ //1. Create the DH
+@@ -46,42 +47,53 @@ bool DHWrapper::Initialize() {
+ }
+
+ //2. Create his internal p and g
+- _pDH->p = BN_new();
+- if (_pDH->p == NULL) {
++ p = BN_new();
++ if (p == NULL) {
+ FATAL("Unable to create p");
+- Cleanup();
+- return false;
++ goto return_error;
+ }
+- _pDH->g = BN_new();
+- if (_pDH->g == NULL) {
++ g = BN_new();
++ if (g == NULL) {
+ FATAL("Unable to create g");
+- Cleanup();
+- return false;
++ goto return_error;
+ }
+
+ //3. initialize p, g and key length
+- if (BN_hex2bn(&_pDH->p, P1024) == 0) {
++ if (BN_hex2bn(&p, P1024) == 0) {
+ FATAL("Unable to parse P1024");
+- Cleanup();
+- return false;
++ goto return_error;
+ }
+- if (BN_set_word(_pDH->g, 2) != 1) {
++ if (BN_set_word(g, 2) != 1) {
+ FATAL("Unable to set g");
+- Cleanup();
+- return false;
++ goto return_error;
+ }
+
+- //4. Set the key length
+- _pDH->length = _bitsCount;
++ //4. Set internal p and g
++ if (DH_set0_pqg(_pDH, p, NULL, g) != 1) {
++ FATAL("Unable to set internal p and g");
++ goto return_error;
++ }
++ p = g = NULL;
+
+- //5. Generate private and public key
++ //5. Set the key length
++ if (DH_set_length(_pDH, _bitsCount) != 1) {
++ FATAL("Unable to set length");
++ goto return_error;
++ }
++
++ //6. Generate private and public key
+ if (DH_generate_key(_pDH) != 1) {
+ FATAL("Unable to generate DH public/private keys");
+- Cleanup();
+- return false;
++ goto return_error;
+ }
+
+ return true;
++
++return_error:
++ if (p != NULL) BN_free(p);
++ if (g != NULL) BN_free(g);
++ Cleanup();
++ return false;
+ }
+
+ bool DHWrapper::CopyPublicKey(uint8_t *pDst, int32_t dstLength) {
+@@ -90,7 +102,9 @@ bool DHWrapper::CopyPublicKey(uint8_t *p
+ return false;
+ }
+
+- return CopyKey(_pDH->pub_key, pDst, dstLength);
++ const BIGNUM *pub_key;
++ DH_get0_key(_pDH, &pub_key, NULL);
++ return CopyKey(pub_key, pDst, dstLength);
+ }
+
+ bool DHWrapper::CopyPrivateKey(uint8_t *pDst, int32_t dstLength) {
+@@ -99,7 +113,9 @@ bool DHWrapper::CopyPrivateKey(uint8_t *
+ return false;
+ }
+
+- return CopyKey(_pDH->priv_key, pDst, dstLength);
++ const BIGNUM *priv_key;
++ DH_get0_key(_pDH, NULL, &priv_key);
++ return CopyKey(priv_key, pDst, dstLength);
+ }
+
+ bool DHWrapper::CreateSharedKey(uint8_t *pPeerPublicKey, int32_t length) {
+@@ -153,14 +169,6 @@ bool DHWrapper::CopySharedKey(uint8_t *p
+
+ void DHWrapper::Cleanup() {
+ if (_pDH != NULL) {
+- if (_pDH->p != NULL) {
+- BN_free(_pDH->p);
+- _pDH->p = NULL;
+- }
+- if (_pDH->g != NULL) {
+- BN_free(_pDH->g);
+- _pDH->g = NULL;
+- }
+ DH_free(_pDH);
+ _pDH = NULL;
+ }
+@@ -177,7 +185,7 @@ void DHWrapper::Cleanup() {
+ }
+ }
+
+-bool DHWrapper::CopyKey(BIGNUM *pNum, uint8_t *pDst, int32_t dstLength) {
++bool DHWrapper::CopyKey(const BIGNUM *pNum, uint8_t *pDst, int32_t dstLength) {
+ int32_t keySize = BN_num_bytes(pNum);
+ if ((keySize <= 0) || (dstLength <= 0) || (keySize > dstLength)) {
+ FATAL("CopyPublicKey failed due to either invalid DH state or invalid call");
+@@ -197,20 +205,21 @@ void InitRC4Encryption(uint8_t *secretKe
+ uint8_t digest[SHA256_DIGEST_LENGTH];
+ unsigned int digestLen = 0;
+
+- HMAC_CTX ctx;
+- HMAC_CTX_init(&ctx);
+- HMAC_Init_ex(&ctx, secretKey, 128, EVP_sha256(), 0);
+- HMAC_Update(&ctx, pubKeyIn, 128);
+- HMAC_Final(&ctx, digest, &digestLen);
+- HMAC_CTX_cleanup(&ctx);
++ HMAC_CTX *ctx;
++ ctx = HMAC_CTX_new();
++ if (ctx == NULL)
++ return;
++ HMAC_Init_ex(ctx, secretKey, 128, EVP_sha256(), 0);
++ HMAC_Update(ctx, pubKeyIn, 128);
++ HMAC_Final(ctx, digest, &digestLen);
++ HMAC_CTX_reset(ctx);
+
+ RC4_set_key(rc4keyOut, 16, digest);
+
+- HMAC_CTX_init(&ctx);
+- HMAC_Init_ex(&ctx, secretKey, 128, EVP_sha256(), 0);
+- HMAC_Update(&ctx, pubKeyOut, 128);
+- HMAC_Final(&ctx, digest, &digestLen);
+- HMAC_CTX_cleanup(&ctx);
++ HMAC_Init_ex(ctx, secretKey, 128, EVP_sha256(), 0);
++ HMAC_Update(ctx, pubKeyOut, 128);
++ HMAC_Final(ctx, digest, &digestLen);
++ HMAC_CTX_free(ctx);
+
+ RC4_set_key(rc4keyIn, 16, digest);
+ }
+@@ -220,14 +229,17 @@ string md5(string source, bool textResul
+ }
+
+ string md5(uint8_t *pBuffer, uint32_t length, bool textResult) {
+- EVP_MD_CTX mdctx;
++ EVP_MD_CTX *mdctx;
+ unsigned char md_value[EVP_MAX_MD_SIZE];
+ unsigned int md_len;
+
+- EVP_DigestInit(&mdctx, EVP_md5());
+- EVP_DigestUpdate(&mdctx, pBuffer, length);
+- EVP_DigestFinal_ex(&mdctx, md_value, &md_len);
+- EVP_MD_CTX_cleanup(&mdctx);
++ mdctx = EVP_MD_CTX_new();
++ if (mdctx == NULL)
++ return "";
++ EVP_DigestInit(mdctx, EVP_md5());
++ EVP_DigestUpdate(mdctx, pBuffer, length);
++ EVP_DigestFinal_ex(mdctx, md_value, &md_len);
++ EVP_MD_CTX_free(mdctx);
+
+ if (textResult) {
+ string result = "";
+@@ -244,12 +256,12 @@ void HMACsha256(const void *pData, uint3
+ const void *pKey, uint32_t keyLength, void *pResult) {
+ unsigned int digestLen;
+
+- HMAC_CTX ctx;
+- HMAC_CTX_init(&ctx);
+- HMAC_Init_ex(&ctx, (unsigned char*) pKey, keyLength, EVP_sha256(), NULL);
+- HMAC_Update(&ctx, (unsigned char *) pData, dataLength);
+- HMAC_Final(&ctx, (unsigned char *) pResult, &digestLen);
+- HMAC_CTX_cleanup(&ctx);
++ HMAC_CTX *ctx;
++ ctx = HMAC_CTX_new();
++ HMAC_Init_ex(ctx, (unsigned char*) pKey, keyLength, EVP_sha256(), NULL);
++ HMAC_Update(ctx, (unsigned char *) pData, dataLength);
++ HMAC_Final(ctx, (unsigned char *) pResult, &digestLen);
++ HMAC_CTX_free(ctx);
+
+ o_assert(digestLen == 32);
+ }
+--- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
++++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
+@@ -211,6 +211,7 @@ string BaseSSLProtocol::GetSSLErrors() {
+
+ string BaseSSLProtocol::DumpBIO(BIO *pBIO) {
+ string formatString;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ formatString = "method: %p\n";
+ formatString += "callback: %p\n";
+ formatString += "cb_arg: %p\n";
+@@ -240,6 +241,39 @@ string BaseSSLProtocol::DumpBIO(BIO *pBI
+ pBIO->references,
+ (int64_t) pBIO->num_read,
+ (int64_t) pBIO->num_write);
++#else
++// Some of these are problematic in openssl >= 1.1, since
++// the BIO struct is opaque.
++ formatString = "method: %s\n";
++ formatString += "callback: %p\n";
++ formatString += "cb_arg: %p\n";
++ formatString += "init: %d\n";
++ formatString += "shutdown: %d\n";
++ formatString += "flags: %d\n";
++ formatString += "retry_reason: %d\n";
++ formatString += "num: %d\n";
++ formatString += "ptr: %p\n";
++ formatString += "next_bio: %p\n";
++ formatString += "prev_bio: %s\n";
++ formatString += "references: %s\n";
++ formatString += "num_read: %"PRId64"\n";
++ formatString += "num_write: %"PRId64;
++ return format(formatString,
++ BIO_method_name(pBIO),
++ BIO_get_callback(pBIO),
++ BIO_get_callback_arg(pBIO),
++ BIO_get_init(pBIO),
++ BIO_get_shutdown(pBIO),
++ BIO_get_flags(pBIO),
++ BIO_get_retry_reason(pBIO),
++ BIO_get_fd(pBIO, NULL),
++ BIO_get_data(pBIO),
++ BIO_next(pBIO),
++ "unknown", //prev_bio
++ "unknown", //references
++ BIO_number_read(pBIO),
++ BIO_number_written(pBIO));
++#endif
+ }
+
+ void BaseSSLProtocol::InitRandGenerator() {
+--- /dev/null
++++ b/sources/common/include/utils/misc/libcrypto-compat.h
+@@ -0,0 +1,25 @@
++#ifndef LIBCRYPTO_COMPAT_H
++#define LIBCRYPTO_COMPAT_H
++
++#include <openssl/opensslv.h>
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
++#include <openssl/dh.h>
++#include <openssl/evp.h>
++#include <openssl/hmac.h>
++
++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);
++int DH_set_length(DH *dh, long length);
++
++EVP_MD_CTX *EVP_MD_CTX_new(void);
++void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
++#define EVP_MD_CTX_reset EVP_MD_CTX_cleanup
++
++HMAC_CTX *HMAC_CTX_new(void);
++void HMAC_CTX_free(HMAC_CTX *ctx);
++#define HMAC_CTX_reset HMAC_CTX_cleanup
++
++#endif /* OPENSSL_VERSION_NUMBER */
++
++#endif /* LIBCRYPTO_COMPAT_H */
+--- /dev/null
++++ b/sources/common/src/utils/misc/libcrypto-compat.cpp
+@@ -0,0 +1,90 @@
++/*
++ * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
++ *
++ * Licensed under the OpenSSL license (the "License"). You may not use
++ * this file except in compliance with the License. You can obtain a copy
++ * in the file LICENSE in the source distribution or at
++ * https://www.openssl.org/source/license.html
++ */
++
++#include "utils/misc/libcrypto-compat.h"
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
++#include <string.h>
++
++static void *OPENSSL_zalloc(size_t num)
++{
++ void *ret = OPENSSL_malloc(num);
++
++ if (ret != NULL)
++ memset(ret, 0, num);
++ return ret;
++}
++
++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
++{
++ /* If the fields p and g in d are NULL, the corresponding input
++ * parameters MUST be non-NULL. q may remain NULL.
++ */
++ if ((dh->p == NULL && p == NULL)
++ || (dh->g == NULL && g == NULL))
++ return 0;
++
++ if (p != NULL) {
++ BN_free(dh->p);
++ dh->p = p;
++ }
++ if (q != NULL) {
++ BN_free(dh->q);
++ dh->q = q;
++ }
++ if (g != NULL) {
++ BN_free(dh->g);
++ dh->g = g;
++ }
++
++ if (q != NULL) {
++ dh->length = BN_num_bits(q);
++ }
++
++ return 1;
++}
++
++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
++{
++ if (pub_key != NULL)
++ *pub_key = dh->pub_key;
++ if (priv_key != NULL)
++ *priv_key = dh->priv_key;
++}
++
++int DH_set_length(DH *dh, long length)
++{
++ dh->length = length;
++ return 1;
++}
++
++EVP_MD_CTX *EVP_MD_CTX_new(void)
++{
++ return (EVP_MD_CTX *)OPENSSL_zalloc(sizeof(EVP_MD_CTX));
++}
++
++void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
++{
++ EVP_MD_CTX_cleanup(ctx);
++ OPENSSL_free(ctx);
++}
++
++HMAC_CTX *HMAC_CTX_new(void)
++{
++ return (HMAC_CTX *)OPENSSL_zalloc(sizeof(HMAC_CTX));
++}
++
++void HMAC_CTX_free(HMAC_CTX *ctx)
++{
++ HMAC_CTX_cleanup(ctx);
++ OPENSSL_free(ctx);
++}
++
++#endif /* OPENSSL_VERSION_NUMBER */
include $(TOPDIR)/rules.mk
PKG_NAME:=ffmpeg
-PKG_VERSION:=3.2.10
+PKG_VERSION:=3.2.12
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://ffmpeg.org/releases/
-PKG_HASH:=3c1626220c7b68ff6be7312559f77f3c65ff6809daf645d4470ac0189926bdbc
+PKG_HASH:=8985cea7b1b3b2e0e2b2a8ac6187a7fb022fe8aa9d35101760a000205c59c412
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
Ian Leonard <antonlacon@gmail.com>
PKG_LICENSE:=LGPL-2.1+ GPL-2+ LGPL-3
PKG_LICENSE_FILES:=COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 COPYING.LGPLv3
+PKG_CPE_ID:=cpe:/a:ffmpeg:ffmpeg
FFMPEG_CUSTOM_ENCODERS:= \
ac3 \
define Package/libffmpeg-full
$(call Package/libffmpeg/Default)
TITLE+= (full)
- DEPENDS+= +alsa-lib +PACKAGE_libopus:libopus
- ifeq ($(CONFIG_SOFT_FLOAT),y)
- DEPENDS+= +PACKAGE_shine:shine
- else
- DEPENDS+= +PACKAGE_lame-lib:lame-lib +PACKAGE_libx264:libx264
- endif
+ DEPENDS+= +alsa-lib +PACKAGE_libopus:libopus \
+ $(if $$(CONFIG_SOFT_FLOAT),\
+ +PACKAGE_shine:shine,\
+ +PACKAGE_lame-lib:lame-lib +PACKAGE_libx264:libx264 +PACKAGE_fdk-aac:fdk-aac)
VARIANT:=full
endef
endef
+# Strip off FPU notation
+REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
+# Fixup cpu types recogized by ffmpeg configure
+REAL_CPU_TYPE:=$(subst octeonplus,octeon+,$(REAL_CPU_TYPE))
+
FFMPEG_CONFIGURE:= \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
--enable-cross-compile \
--cross-prefix="$(TARGET_CROSS)" \
--arch="$(ARCH)" \
+ $(if $(REAL_CPU_TYPE),--cpu=$(call qstrip,$(REAL_CPU_TYPE)),) \
--target-os=linux \
--prefix="/usr" \
--pkg-config="pkg-config" \
else ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
FFMPEG_CONFIGURE+= \
--disable-altivec
+# libavcode/mips/aacdec_mips.c build problem
+else ifneq ($(findstring 24kf,$(CONFIG_CPU_TYPE)),)
+FFMPEG_CONFIGURE+= \
+ --disable-inline-asm
endif
# selectively disable optimizations according to arch/cpu type
FFMPEG_CONFIGURE+= --enable-lto
endif
-ifneq ($(CONFIG_YASM),y)
-FFMPEG_CONFIGURE+= --disable-yasm
-
+ifneq ($(CONFIG_TARGET_x86),)
+ifeq ($(CONFIG_NASM),y)
+ # Set yasmexe to anything but YASM/NASM (ffmpeg configure will then find NASM correctly)
+ # Newer ffmpeg packages will use --enable-x86asm (with NASM default)
+ FFMPEG_CONFIGURE += --yasmexe=xyzzy
+else
+ FFMPEG_CONFIGURE += --disable-yasm
+endif
endif
ifeq ($(BUILD_VARIANT),full)
else
FFMPEG_CONFIGURE+= --enable-small
endif
- FFMPEG_CONFIGURE+= \
- --enable-gpl \
- $(if $(CONFIG_PACKAGE_lame-lib),--enable-libmp3lame) \
- $(if $(CONFIG_PACKAGE_libx264),--enable-libx264)
+ FFMPEG_CONFIGURE+= $(if $(CONFIG_PACKAGE_lame-lib),--enable-libmp3lame)
+ # x264 support and fdk-aac support can't coexist and be distributed.
+ # Prioritize x264 over fdk-aac in default builds (maintain status-quo).
+ ifneq ($(CONFIG_PACKAGE_libx264),)
+ FFMPEG_CONFIGURE+= \
+ --enable-gpl \
+ --enable-libx264
+ else
+ FFMPEG_CONFIGURE+= $(if $(CONFIG_PACKAGE_fdk-aac),--enable-libfdk-aac)
+ endif
endif
endif
--enable-libshine --enable-encoder=libshine
endif
-ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libx264),y)
+ifneq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libx264),)
FFMPEG_CONFIGURE+= \
--enable-libx264 --enable-encoder=libx264
endif
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/
endef
-# Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
+# Only ffmpeg with libx264 is GPL (yes libpostproc); all other builds are lgpl (no libpostproc)
define Build/InstallDev/full
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.pc $(1)/usr/lib/pkgconfig/
ifneq ($(CONFIG_SOFT_FLOAT),y)
+ifneq ($(CONFIG_PACKAGE_libx264),)
$(CP) $(PKG_INSTALL_DIR)/usr/include/libpostproc $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpostproc.pc $(1)/usr/lib/pkgconfig/
endif
+endif
endef
define Build/InstallDev/mini
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/
endef
-# Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
+# Only ffmpeg with libx264 is GPL (yes libpostproc); all other builds are lgpl (no libpostproc)
define Package/libffmpeg-full/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.so.* $(1)/usr/lib/
ifneq ($(CONFIG_SOFT_FLOAT),y)
+ifneq ($(CONFIG_PACKAGE_libx264),)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
endif
+endif
endef
define Package/libffmpeg-mini/install
include $(TOPDIR)/rules.mk
PKG_NAME:=gphoto2
-PKG_VERSION:=2.5.15
+PKG_VERSION:=2.5.17
PKG_RELEASE:=1
PKG_MAINTAINER:=Leonardo Medici <leonardo_medici@me.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/gphoto
-PKG_HASH:=ae571a227983dc9997876702a73af5431d41f287ea0f483cda897c57a6084a77
+PKG_HASH:=aa571039240c68a053be710ca41645aed0239fa2f0b737b8ec767fef29e3544f
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
-Index: gphoto2-2.5.15/Makefile.am
+Index: gphoto2-2.5.17/Makefile.am
===================================================================
---- gphoto2-2.5.15.orig/Makefile.am
-+++ gphoto2-2.5.15/Makefile.am
+--- gphoto2-2.5.17.orig/Makefile.am
++++ gphoto2-2.5.17/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging po tests
+SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging tests
ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4
EXTRA_DIST = README.md
-Index: gphoto2-2.5.15/Makefile.in
+Index: gphoto2-2.5.17/Makefile.in
===================================================================
---- gphoto2-2.5.15.orig/Makefile.in
-+++ gphoto2-2.5.15/Makefile.in
+--- gphoto2-2.5.17.orig/Makefile.in
++++ gphoto2-2.5.17/Makefile.in
@@ -389,7 +389,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4
EXTRA_DIST = README.md
all: config.h
-Index: gphoto2-2.5.15/configure.ac
+Index: gphoto2-2.5.17/configure.ac
===================================================================
---- gphoto2-2.5.15.orig/configure.ac
-+++ gphoto2-2.5.15/configure.ac
+--- gphoto2-2.5.17.orig/configure.ac
++++ gphoto2-2.5.17/configure.ac
@@ -58,10 +58,7 @@ dnl ------------------------------------
GP_GETTEXT_HACK([],[Lutz Müller and others],[${MAIL_GPHOTO_TRANSLATION}])
ALL_LINGUAS="az cs da de en_GB es eu fi fr hu id is it ja nl pa pl pt_BR ro ru rw sk sr sv uk vi zh_CN zh_TW"
-Index: gphoto2-2.5.15/Makefile.am
+Index: gphoto2-2.5.17/Makefile.am
===================================================================
---- gphoto2-2.5.15.orig/Makefile.am
-+++ gphoto2-2.5.15/Makefile.am
+--- gphoto2-2.5.17.orig/Makefile.am
++++ gphoto2-2.5.17/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging tests
+SUBDIRS = gphoto-m4 contrib gphoto2 packaging
ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4
EXTRA_DIST = README.md
-Index: gphoto2-2.5.15/Makefile.in
+Index: gphoto2-2.5.17/Makefile.in
===================================================================
---- gphoto2-2.5.15.orig/Makefile.in
-+++ gphoto2-2.5.15/Makefile.in
+--- gphoto2-2.5.17.orig/Makefile.in
++++ gphoto2-2.5.17/Makefile.in
@@ -389,7 +389,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4
EXTRA_DIST = README.md
all: config.h
-Index: gphoto2-2.5.15/configure.ac
+Index: gphoto2-2.5.17/configure.ac
===================================================================
---- gphoto2-2.5.15.orig/configure.ac
-+++ gphoto2-2.5.15/configure.ac
+--- gphoto2-2.5.17.orig/configure.ac
++++ gphoto2-2.5.17/configure.ac
@@ -407,16 +407,10 @@ AC_CONFIG_FILES([
Makefile
gphoto2/Makefile
include $(TOPDIR)/rules.mk
PKG_NAME:=grilo
-PKG_VERSION:=0.3.4
+PKG_VERSION:=0.3.6
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNOME/grilo/0.3/
-PKG_HASH:=7c6964053b42574c2f14715d2392a02ea5cbace955eb73e067c77aa3e43b066e
+PKG_HASH:=1e65ca82dd58020451417fde79310d4b940adc3f63ab59997419c52ed3bc9c91
PKG_BUILD_DEPENDS:=glib2 libsoup libxml2
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-libav
-PKG_VERSION:=1.12.4
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-libav
-PKG_HASH:=2a56aa5d2d8cd912f2bce17f174713d2c417ca298f1f9c28ee66d4aa1e1d9e62
+PKG_HASH:=8a351c39c5cfc2bbd31ca434ec4a290a730a26efbdea962fdd8306dce5c576de
PKG_LICENSE:=GPL-2.0 LGPL-2.0
PKG_LICENSE_FILES:=COPYING COPYING.LIB
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-bad
-PKG_VERSION:=1.12.4
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-bad-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-bad-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-bad/
-PKG_HASH:=0c7857be16686d5c1ba6e34bd338664d3d4599d32714a8eca5c8a41a101e2d08
+PKG_HASH:=34fab7da70994465a64468330b2168a4a0ed90a7de7e4c499b6d127c6c1b1eaf
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
$(eval $(call GstBuildLibrary,photography,photography,,))
$(eval $(call GstBuildLibrary,basecamerabinsrc,basecamerabinsrc,app,))
$(eval $(call GstBuildLibrary,uridownloader,uridownloader,,))
-$(eval $(call GstBuildLibrary,badbase,badbase,,))
# 1: short name
# 2: description
$(eval $(call GstBuildPlugin,mpegpsmux,mpegpsmux support,,,))
#$(eval $(call GstBuildPlugin,mpegtsdemux,mpegtsdemux support,mpegts pbutils,,))
#$(eval $(call GstBuildPlugin,mpegtsmux,mpegtsmux support,video,,))
-$(eval $(call GstBuildPlugin,mxf,mxf support,badbase audio video,,))
+$(eval $(call GstBuildPlugin,mxf,mxf support,audio video,,))
$(eval $(call GstBuildPlugin,opusparse,OPUS streams library,pbutils,,+libopus))
$(eval $(call GstBuildPlugin,pcapparse,pcapparse support,,,))
$(eval $(call GstBuildPlugin,pnm,pnm support,video,,))
-diff -u --recursive gst-plugins-bad-1.12.4-vanilla/configure.ac gst-plugins-bad-1.12.4/configure.ac
---- gst-plugins-bad-1.12.4-vanilla/configure.ac 2018-02-11 19:46:16.942758605 -0500
-+++ gst-plugins-bad-1.12.4/configure.ac 2018-02-11 19:46:38.356808019 -0500
-@@ -3619,38 +3619,6 @@
+diff -u --recursive gst-plugins-bad-1.14.1-vanilla/configure.ac gst-plugins-bad-1.14.1/configure.ac
+--- gst-plugins-bad-1.14.1-vanilla/configure.ac 2018-07-08 22:17:07.553492088 -0400
++++ gst-plugins-bad-1.14.1/configure.ac 2018-07-08 22:17:38.866597074 -0400
+@@ -2600,24 +2600,6 @@
sys/wasapi/Makefile
sys/winks/Makefile
sys/winscreencap/Makefile
-tests/examples/avsamplesink/Makefile
-tests/examples/camerabin2/Makefile
-tests/examples/codecparsers/Makefile
+-tests/examples/compositor/Makefile
-tests/examples/directfb/Makefile
-tests/examples/audiomixmatrix/Makefile
--tests/examples/gl/Makefile
--tests/examples/gl/cocoa/Makefile
--tests/examples/gl/clutter/Makefile
--tests/examples/gl/generic/Makefile
--tests/examples/gl/generic/cube/Makefile
--tests/examples/gl/generic/cubeyuv/Makefile
--tests/examples/gl/generic/doublecube/Makefile
--tests/examples/gl/generic/recordgraphic/Makefile
--tests/examples/gl/gtk/Makefile
--tests/examples/gl/gtk/3dvideo/Makefile
--tests/examples/gl/gtk/filternovideooverlay/Makefile
--tests/examples/gl/gtk/filtervideooverlay/Makefile
--tests/examples/gl/gtk/fxtest/Makefile
--tests/examples/gl/gtk/switchvideooverlay/Makefile
--tests/examples/gl/qt/Makefile
--tests/examples/gl/sdl/Makefile
--tests/examples/gtk/Makefile
+-tests/examples/ipcpipeline/Makefile
-tests/examples/mpegts/Makefile
-tests/examples/mxf/Makefile
-tests/examples/opencv/Makefile
-tests/examples/uvch264/Makefile
-tests/examples/waylandsink/Makefile
+-tests/examples/webrtc/Makefile
-tests/icles/Makefile
ext/voamrwbenc/Makefile
ext/voaacenc/Makefile
ext/assrender/Makefile
-diff -u --recursive gst-plugins-bad-1.12.4-vanilla/Makefile.am gst-plugins-bad-1.12.4/Makefile.am
---- gst-plugins-bad-1.12.4-vanilla/Makefile.am 2018-02-11 19:46:16.980758692 -0500
-+++ gst-plugins-bad-1.12.4/Makefile.am 2018-02-11 19:46:49.443833603 -0500
+diff -u --recursive gst-plugins-bad-1.14.1-vanilla/Makefile.am gst-plugins-bad-1.14.1/Makefile.am
+--- gst-plugins-bad-1.14.1-vanilla/Makefile.am 2018-07-08 22:17:07.553492088 -0400
++++ gst-plugins-bad-1.14.1/Makefile.am 2018-07-08 22:17:51.278638694 -0400
@@ -2,11 +2,11 @@
SUBDIRS = \
- m4 common docs tests tools
+ m4 common docs tools
- # include before EXTRA_DIST for win32 assignment
- include $(top_srcdir)/common/win32.mak
+ EXTRA_DIST = \
+ depcomp \
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-base
-PKG_VERSION:=1.12.4
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-base/
-PKG_HASH:=4c306b03df0212f1b8903784e29bb3493319ba19ebebf13b0c56a17870292282
+PKG_HASH:=a4b7e80ba869f599307449b17c9e00b5d1e94d3ba1d8a1a386b8770b2ef01c7c
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_gst1-mod-alsa \
-diff -u --recursive gst-plugins-base-1.12.4-vanilla/configure.ac gst-plugins-base-1.12.4/configure.ac
---- gst-plugins-base-1.12.4-vanilla/configure.ac 2018-02-11 09:54:25.065243893 -0500
-+++ gst-plugins-base-1.12.4/configure.ac 2018-02-11 09:55:12.112340832 -0500
-@@ -942,24 +942,6 @@
- pkgconfig/gstreamer-video-uninstalled.pc
+diff -u --recursive gst-plugins-base-1.14.1-vanilla/configure.ac gst-plugins-base-1.14.1/configure.ac
+--- gst-plugins-base-1.14.1-vanilla/configure.ac 2018-07-07 18:10:49.601305039 -0400
++++ gst-plugins-base-1.14.1/configure.ac 2018-07-07 18:11:03.465363471 -0400
+@@ -992,40 +992,6 @@
+ pkgconfig/gstreamer-gl-uninstalled.pc
pkgconfig/gstreamer-plugins-base.pc
pkgconfig/gstreamer-plugins-base-uninstalled.pc
-tests/Makefile
-tests/examples/encoding/Makefile
-tests/examples/fft/Makefile
-tests/examples/gio/Makefile
+-tests/examples/gl/Makefile
+-tests/examples/gl/generic/Makefile
+-tests/examples/gl/generic/cube/Makefile
+-tests/examples/gl/generic/doublecube/Makefile
+-tests/examples/gl/generic/recordgraphic/Makefile
+-tests/examples/gl/generic/cubeyuv/Makefile
+-tests/examples/gl/qt/Makefile
+-tests/examples/gl/gtk/Makefile
+-tests/examples/gl/gtk/fxtest/Makefile
+-tests/examples/gl/gtk/3dvideo/Makefile
+-tests/examples/gl/gtk/switchvideooverlay/Makefile
+-tests/examples/gl/gtk/filternovideooverlay/Makefile
+-tests/examples/gl/gtk/filtervideooverlay/Makefile
+-tests/examples/gl/cocoa/Makefile
+-tests/examples/gl/sdl/Makefile
+-tests/examples/gl/clutter/Makefile
-tests/examples/overlay/Makefile
-tests/examples/seek/Makefile
-tests/examples/snapshot/Makefile
docs/Makefile
docs/libs/Makefile
docs/plugins/Makefile
-diff -u --recursive gst-plugins-base-1.12.4-vanilla/Makefile.am gst-plugins-base-1.12.4/Makefile.am
---- gst-plugins-base-1.12.4-vanilla/Makefile.am 2018-02-11 09:54:25.091243946 -0500
-+++ gst-plugins-base-1.12.4/Makefile.am 2018-02-11 09:55:19.994357073 -0500
+diff -u --recursive gst-plugins-base-1.14.1-vanilla/Makefile.am gst-plugins-base-1.14.1/Makefile.am
+--- gst-plugins-base-1.14.1-vanilla/Makefile.am 2018-07-07 18:10:49.601305039 -0400
++++ gst-plugins-base-1.14.1/Makefile.am 2018-07-07 18:11:09.186387585 -0400
@@ -11,7 +11,6 @@
gst-libs \
gst sys $(SUBDIRS_EXT) \
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-good
-PKG_VERSION:=1.12.4
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-good-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-good-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-good/
-PKG_HASH:=649f49bec60892d47ee6731b92266974c723554da1c6649f21296097715eb957
+PKG_HASH:=c0575e2811860bfff59b865b8d125153859a01f0615fa41e279b64d88d25caad
+
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_PACKAGE_gst1-mod-lame \
+ CONFIG_PACKAGE_gst1-mod-mpg123 \
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
endef
+GST_COND_SELECT = $(patsubst %,$(if $(CONFIG_PACKAGE_gst1-mod-$(1)),--enable,--disable)-%,$(1))
+
GST_VERSION:=1.0
CONFIGURE_ARGS += \
+ $(call GST_COND_SELECT,lame) \
+ $(call GST_COND_SELECT,mpg123) \
+ \
--disable-debug \
--disable-examples \
\
$(eval $(call GstBuildPlugin,isomp4,isomp4 support,audio pbutils riff rtp tag video,,))
#$(eval $(call GstBuildPlugin,jack,jack support,audio,,))
$(eval $(call GstBuildPlugin,jpeg,jpeg support,video,,+libjpeg))
+$(eval $(call GstBuildPlugin,lame,MP3 encoder (using LAME),audio,,+lame-lib))
$(eval $(call GstBuildPlugin,level,audio level,audio,,))
$(eval $(call GstBuildPlugin,matroska,matroska support,audio pbutils riff tag video,,))
+$(eval $(call GstBuildPlugin,mpg123,MP3 decoder (using mpg123),audio tag,,+libid3tag +mpg123))
$(eval $(call GstBuildPlugin,mulaw,mulaw support,audio,,))
$(eval $(call GstBuildPlugin,multifile,multiple files access,video,,))
$(eval $(call GstBuildPlugin,multipart,multipart stream handling,,,))
-diff -u --recursive gst-plugins-good-1.12.4-vanilla/configure.ac gst-plugins-good-1.12.4/configure.ac
---- gst-plugins-good-1.12.4-vanilla/configure.ac 2018-02-11 10:36:40.335391048 -0500
-+++ gst-plugins-good-1.12.4/configure.ac 2018-02-11 10:37:22.304475546 -0500
-@@ -1061,20 +1061,6 @@
+diff -u --recursive gst-plugins-good-1.14.1-vanilla/configure.ac gst-plugins-good-1.14.1/configure.ac
+--- gst-plugins-good-1.14.1-vanilla/configure.ac 2018-07-07 18:56:53.008234372 -0400
++++ gst-plugins-good-1.14.1/configure.ac 2018-07-07 18:57:24.886355477 -0400
+@@ -1292,22 +1292,6 @@
sys/v4l2/Makefile
sys/waveform/Makefile
sys/ximage/Makefile
-tests/examples/audiofx/Makefile
-tests/examples/cairo/Makefile
-tests/examples/equalizer/Makefile
+-tests/examples/gtk/Makefile
-tests/examples/jack/Makefile
-tests/examples/level/Makefile
-tests/examples/rtp/Makefile
+-tests/examples/rtsp/Makefile
-tests/examples/shapewipe/Makefile
-tests/examples/spectrum/Makefile
-tests/examples/v4l2/Makefile
common/Makefile
common/m4/Makefile
m4/Makefile
-diff -u --recursive gst-plugins-good-1.12.4-vanilla/Makefile.am gst-plugins-good-1.12.4/Makefile.am
---- gst-plugins-good-1.12.4-vanilla/Makefile.am 2018-02-11 10:36:40.335391048 -0500
-+++ gst-plugins-good-1.12.4/Makefile.am 2018-02-11 10:37:37.242505621 -0500
+diff -u --recursive gst-plugins-good-1.14.1-vanilla/Makefile.am gst-plugins-good-1.14.1/Makefile.am
+--- gst-plugins-good-1.14.1-vanilla/Makefile.am 2018-07-07 18:56:53.008234372 -0400
++++ gst-plugins-good-1.14.1/Makefile.am 2018-07-07 18:57:30.015374957 -0400
@@ -2,7 +2,6 @@
ALWAYS_SUBDIRS = \
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-ugly
-PKG_VERSION:=1.12.4
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-ugly-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-ugly-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-ugly/
-PKG_HASH:=1c165b8d888ed350acd8e6ac9f6fe06508e6fcc0a3afc6ccc9fbeb30df9be522
+PKG_HASH:=55e097d9d93921fdcf7abb0ff92d23b21dd9098e632f1ba433603b3bd1cf3d69
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_gst1-mod-asf \
- CONFIG_PACKAGE_gst1-mod-lame \
- CONFIG_PACKAGE_gst1-mod-mpg123 \
CONFIG_PACKAGE_gst1-mod-mpeg2dec \
PKG_FIXUP:=autoreconf
--disable-dvdread \
--disable-dvdsub \
--disable-iec958 \
- $(call GST_COND_SELECT,lame) \
- $(call GST_COND_SELECT,mpg123) \
$(call GST_COND_SELECT,mpeg2dec) \
--disable-mpegaudioparse \
--disable-mpegstream \
endef
$(eval $(call GstBuildPlugin,asf,ASF demuxer,audio video riff rtp rtsp sdp tag,,))
-$(eval $(call GstBuildPlugin,lame,MP3 encoder (using LAME),audio,,+lame-lib))
-$(eval $(call GstBuildPlugin,mpg123,MP3 decoder (using mpg123),audio tag,,+libid3tag +mpg123))
$(eval $(call GstBuildPlugin,mpeg2dec,MPEG decoder,video,,+libmpeg2))
$(eval $(call BuildPackage,gstreamer1-plugins-ugly))
include $(TOPDIR)/rules.mk
PKG_NAME:=gstreamer1
-PKG_VERSION:=1.12.4
+PKG_VERSION:=1.14.2
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION)
PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gstreamer/
-PKG_HASH:=5a8704aa4c2eeb04da192c4a9942f94f860ac1a585de90d9f914bac26a970674
+PKG_HASH:=4bd6127299f3f29379046bbd58a526e6353b569e0e72f7b4df2ae70df6882e09
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
if PACKAGE_mjpg-streamer
config MJPG_STREAMER_V4L2
- bool "Compile input_uvc with libv4l2 (camera controls)"
+ bool "Build input_uvc with libv4l2 (camera controls)"
default n
select PACKAGE_libv4l
bool "Install input uvc plugin"
default y
-config MJPG_STREAMER_INPUT_TESTPICTURE
- bool "Install input testpicture plugin"
+config MJPG_STREAMER_INPUT_HTTP
+ bool "Install input HTTP plugin"
+ default n
+
+config MJPG_STREAMER_OUTPUT_RTSP
+ bool "Install output RTSP plugin"
+ default n
+
+config MJPG_STREAMER_OUTPUT_UDP
+ bool "Install output UDP plugin"
default n
config MJPG_STREAMER_OUTPUT_FILE
default n
config MJPG_STREAMER_OUTPUT_HTTP
- bool "Install output http plugin"
+ bool "Install output HTTP plugin"
default y
config MJPG_STREAMER_WWW
include $(TOPDIR)/rules.mk
PKG_NAME:=mjpg-streamer
-PKG_REV:=182
-PKG_VERSION:=r$(PKG_REV)
-PKG_RELEASE:=10
+PKG_VERSION:=2018-04-14
+PKG_RELEASE:=1
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>, \
Ted Hess <thess@kitschensync.net>
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).1.tar.xz
-PKG_SOURCE_URL:=https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer-experimental
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/jacksonliam/mjpg-streamer.git
+PKG_SOURCE_VERSION:=821c330ea6bbb5fbed98d48e00aac156e923161b
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_PROTO:=svn
-PKG_MIRROR_HASH:=ccff417d0a34f7cee12c7984f77788267b1da0f2a7d849bc1b2e3614e670078b
+PKG_MIRROR_HASH:=f95e54bc95c808b9867bbca364e58b6c7e08cb26613205f8d87450ab9c899942
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
PKG_BUILD_DEPENDS:=MJPG_STREAMER_V4L2:libv4l
CATEGORY:=Multimedia
TITLE:=MJPG-streamer
DEPENDS:=+libpthread +libjpeg +MJPG_STREAMER_V4L2:libv4l
- URL:=http://mjpg-streamer.wiki.sourceforge.net/
+ URL:=https://github.com/jacksonliam/mjpg-streamer
MENU:=1
endef
source "$(SOURCE)/Config.in"
endef
-EXTRA_CFLAGS += $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)
-
define Package/mjpg-streamer/conffiles
/etc/config/mjpg-streamer
endef
MD5SUM:=35c45188aa9635aef2b745c35c311396
endef
-# Fetch latest cambozola that works with latest Java(s)
-# Yes, I know this is ugly
+# redefine prepare to extract to our build dir
+# apply patches
define Build/Prepare
- $(call Build/Prepare/Default)
+ rm -rf $(PKG_BUILD_DIR)/
+ mkdir -p $(PKG_BUILD_DIR)/
+ $(TAR) -xJf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip=2
+ $(Build/Patch)
+ # Fetch latest cambozola that works with latest Java(s)
+ # Yes, I know this is ugly
ifeq ($(CONFIG_MJPG_STREAMER_WWW),y)
$(eval $(call Download,cambozola))
- $(TAR) -xvf $(DL_DIR)/$(CAMBOZOLA) --strip=2 --wildcards \
+ $(TAR) -xf $(DL_DIR)/$(CAMBOZOLA) --strip=2 --wildcards \
-C $(PKG_BUILD_DIR)/www */dist/cambozola.jar
endif
endef
$(RM) $(PKG_BUILD_DIR)/plugins/input_uvc/uvcvideo.h
endef
+ TARGET_LDFLAGS+= -ljpeg
+
ifeq ($(CONFIG_MJPG_STREAMER_V4L2),y)
TARGET_CFLAGS+= -DUSE_LIBV4L2
TARGET_LDFLAGS+= -lv4l2
ifeq ($(CONFIG_MJPG_STREAMER_INPUT_UVC),y)
$(CP) $(PKG_BUILD_DIR)/input_uvc.so $(1)/usr/lib
endif
-ifeq ($(CONFIG_MJPG_STREAMER_INPUT_TESTPICTURE),y)
- $(CP) $(PKG_BUILD_DIR)/input_testpicture.so $(1)/usr/lib
+ifeq ($(CONFIG_MJPG_STREAMER_INPUT_HTTP),y)
+ $(CP) $(PKG_BUILD_DIR)/input_http.so $(1)/usr/lib
+endif
+ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_RTSP),y)
+ $(CP) $(PKG_BUILD_DIR)/output_rtsp.so $(1)/usr/lib
+endif
+ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_UDP),y)
+ $(CP) $(PKG_BUILD_DIR)/output_udp.so $(1)/usr/lib
endif
ifeq ($(CONFIG_MJPG_STREAMER_OUTPUT_FILE),y)
$(CP) $(PKG_BUILD_DIR)/output_file.so $(1)/usr/lib
+
#include <linux/types.h> /* for videodev2.h */
#include <linux/videodev2.h>
-
+ #include <pthread.h>
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -33,12 +33,12 @@ APP_BINARY = mjpg_streamer
-
- # define the names and targets of the plugins
- PLUGINS = input_uvc.so
--#PLUGINS += output_file.so
-+PLUGINS += output_file.so
- #PLUGINS += output_udp.so
- PLUGINS += output_http.so
- PLUGINS += input_testpicture.so
- #PLUGINS += output_autofocus.so
--#PLUGINS += input_file.so
-+PLUGINS += input_file.so
- # PLUGINS += input_pylon.so
- # PLUGINS += input_megatec.so
- # PLUGINS += output_mars2020.so
--- /dev/null
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -58,9 +58,9 @@ find_library(JPEG_LIB jpeg)
+
+ add_subdirectory(plugins/input_file)
+ add_subdirectory(plugins/input_http)
+-add_subdirectory(plugins/input_opencv)
+-add_subdirectory(plugins/input_raspicam)
+-add_subdirectory(plugins/input_ptp2)
++#add_subdirectory(plugins/input_opencv)
++#add_subdirectory(plugins/input_raspicam)
++#add_subdirectory(plugins/input_ptp2)
+ add_subdirectory(plugins/input_uvc)
+
+ #
+@@ -71,7 +71,7 @@ add_subdirectory(plugins/output_file)
+ add_subdirectory(plugins/output_http)
+ add_subdirectory(plugins/output_rtsp)
+ add_subdirectory(plugins/output_udp)
+-add_subdirectory(plugins/output_viewer)
++#add_subdirectory(plugins/output_viewer)
+
+ #
+ # mjpg_streamer executable
--- /dev/null
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,8 +49,7 @@ set (MJPG_STREAMER_PLUGIN_INSTALL_PATH "
+ # Global dependencies
+ #
+
+-find_library(JPEG_LIB jpeg)
+-
++#find_library(JPEG_LIB jpeg)
+
+ #
+ # Input plugins
+--- a/plugins/input_uvc/CMakeLists.txt
++++ b/plugins/input_uvc/CMakeLists.txt
+@@ -8,27 +8,27 @@ if (PLUGIN_INPUT_UVC)
+
+ add_definitions(-DLINUX -D_GNU_SOURCE)
+
+- find_library(V4L2_LIB v4l2)
++# find_library(V4L2_LIB v4l2)
+
+- if (V4L2_LIB)
+- add_definitions(-DUSE_LIBV4L2)
+- endif (V4L2_LIB)
++# if (V4L2_LIB)
++# add_definitions(-DUSE_LIBV4L2)
++# endif (V4L2_LIB)
+
+- if (NOT JPEG_LIB)
+- add_definitions(-DNO_LIBJPEG)
+- endif (NOT JPEG_LIB)
++# if (NOT JPEG_LIB)
++# add_definitions(-DNO_LIBJPEG)
++# endif (NOT JPEG_LIB)
+
+ MJPG_STREAMER_PLUGIN_COMPILE(input_uvc dynctrl.c
+ input_uvc.c
+ jpeg_utils.c
+ v4l2uvc.c)
+
+- if (V4L2_LIB)
+- target_link_libraries(input_uvc ${V4L2_LIB})
+- endif (V4L2_LIB)
++# if (V4L2_LIB)
++# target_link_libraries(input_uvc ${V4L2_LIB})
++# endif (V4L2_LIB)
+
+- if (JPEG_LIB)
+- target_link_libraries(input_uvc ${JPEG_LIB})
+- endif (JPEG_LIB)
++# if (JPEG_LIB)
++# target_link_libraries(input_uvc ${JPEG_LIB})
++# endif (JPEG_LIB)
+
+ endif()
+++ /dev/null
---- a/plugins/input_uvc/Makefile
-+++ b/plugins/input_uvc/Makefile
-@@ -13,7 +13,7 @@ OTHER_HEADERS = ../../mjpg_streamer.h ..
-
- CFLAGS += -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC
-
--CFLAGS += -g -DDEBUG
-+#CFLAGS += -g -DDEBUG
-
- ifeq ($(USE_LIBV4L2),true)
- LFLAGS += -lv4l2
---- a/plugins/output_file/Makefile
-+++ b/plugins/output_file/Makefile
-@@ -12,7 +12,7 @@ CC = gcc
- OTHER_HEADERS = ../../mjpg_streamer.h ../../utils.h ../output.h ../input.h
-
- CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC
--CFLAGS += -DDEBUG -g
-+#CFLAGS += -DDEBUG -g
- LFLAGS += -lpthread -ldl
-
- all: output_file.so
---- a/plugins/output_udp/Makefile
-+++ b/plugins/output_udp/Makefile
-@@ -14,7 +14,7 @@ CC = gcc
- OTHER_HEADERS = ../../mjpg_streamer.h ../../utils.h ../output.h ../input.h
-
- CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC
--CFLAGS += -DDEBUG
-+#CFLAGS += -DDEBUG
- LFLAGS += -lpthread -ldl
-
- all: output_udp.so
+++ /dev/null
---- a/plugins/input_uvc/v4l2uvc.c
-+++ b/plugins/input_uvc/v4l2uvc.c
-@@ -69,7 +69,7 @@ int init_videoIn(struct vdIn *vd, char *
- vd->videodevice = (char *) calloc(1, 16 * sizeof(char));
- vd->status = (char *) calloc(1, 100 * sizeof(char));
- vd->pictName = (char *) calloc(1, 80 * sizeof(char));
-- snprintf(vd->videodevice, 12, "%s", device);
-+ snprintf(vd->videodevice, 16, "%s", device);
- vd->toggleAvi = 0;
- vd->getPict = 0;
- vd->signalquit = 1;
--- /dev/null
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,21 +18,6 @@ include(FeatureSummary)
+ include(mjpg_streamer_utils)
+
+ #
+-# Get the current git hash
+-#
+-execute_process(
+- COMMAND git rev-parse HEAD
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+- RESULT_VARIABLE GIT_RESULT
+- OUTPUT_VARIABLE GIT_HASH
+- OUTPUT_STRIP_TRAILING_WHITESPACE
+-)
+-
+-if(GIT_RESULT EQUAL 0)
+- add_definitions("-DGIT_HASH=\"${GIT_HASH}\"")
+-endif()
+-
+-#
+ # Options
+ #
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -15,8 +15,8 @@ DESTDIR = /usr/local
- # set the compiler to use
- CC = gcc
-
--SVNDEV := -D'SVN_REV="$(shell svnversion -c .)"'
--CFLAGS += $(SVNDEV)
-+#SVNDEV := -D'SVN_REV="$(shell svnversion -c .)"'
-+#CFLAGS += $(SVNDEV)
-
- # general compile flags, enable all warnings to make compile more verbose
- CFLAGS += -DLINUX -D_GNU_SOURCE -Wall
---- a/mjpg_streamer.c
-+++ b/mjpg_streamer.c
-@@ -253,15 +253,12 @@ int main(int argc, char *argv[])
- /* v, version */
- case 6:
- case 7:
-- printf("MJPG Streamer Version: %s\n" \
-- "Compilation Date.....: %s\n" \
-- "Compilation Time.....: %s\n",
-+ printf("MJPG Streamer Version: %s\n",
- #ifdef SVN_REV
-- SVN_REV,
-+ SVN_REV);
- #else
-- SOURCE_VERSION,
-+ SOURCE_VERSION);
- #endif
-- __DATE__, __TIME__);
- return 0;
- break;
-
+++ /dev/null
-From 19202b54698b343a0207d7e213448e32b8e58fc3 Mon Sep 17 00:00:00 2001
-From: Olliver Schinagl <o.schinagl@ultimaker.com>
-Date: Wed, 29 Oct 2014 09:34:41 +0100
-Subject: [PATCH 1/7] Buffer the bytesused variable from struct v4l2_buffer
-
-Starting with kernel versions 3.16, (DE)Queing of buffers has been fixed
-after it was leaking data for ages. in the struct v4l2_buffer is the
-bytesused element which indicates the size of the buffer. This however
-gets cleared whenever the buffer gets requeued and is thus no longer
-valid.
-
-This patch copies the bytesused variable so it is available until the
-next frame captured again.
-
-Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
----
- plugins/input_uvc/input_uvc.c | 6 +++---
- plugins/input_uvc/v4l2uvc.c | 2 ++
- plugins/input_uvc/v4l2uvc.h | 1 +
- 3 files changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/plugins/input_uvc/input_uvc.c b/plugins/input_uvc/input_uvc.c
-index e6c74fd..64f66cb 100644
---- a/plugins/input_uvc/input_uvc.c
-+++ b/plugins/input_uvc/input_uvc.c
-@@ -482,7 +482,7 @@ void *cam_thread(void *arg)
- exit(EXIT_FAILURE);
- }
-
-- //DBG("received frame of size: %d from plugin: %d\n", pcontext->videoIn->buf.bytesused, pcontext->id);
-+ //DBG("received frame of size: %d from plugin: %d\n", pcontext->videoIn->tmpbytesused, pcontext->id);
-
- /*
- * Workaround for broken, corrupted frames:
-@@ -491,7 +491,7 @@ void *cam_thread(void *arg)
- * For example a VGA (640x480) webcam picture is normally >= 8kByte large,
- * corrupted frames are smaller.
- */
-- if(pcontext->videoIn->buf.bytesused < minimum_size) {
-+ if(pcontext->videoIn->tmpbytesused < minimum_size) {
- DBG("dropping too small frame, assuming it as broken\n");
- continue;
- }
-@@ -529,7 +529,7 @@ void *cam_thread(void *arg)
- } else {
- #endif
- //DBG("copying frame from input: %d\n", (int)pcontext->id);
-- pglobal->in[pcontext->id].size = memcpy_picture(pglobal->in[pcontext->id].buf, pcontext->videoIn->tmpbuffer, pcontext->videoIn->buf.bytesused);
-+ pglobal->in[pcontext->id].size = memcpy_picture(pglobal->in[pcontext->id].buf, pcontext->videoIn->tmpbuffer, pcontext->videoIn->tmpbytesused);
- #ifndef NO_LIBJPEG
- }
- #endif
-diff --git a/plugins/input_uvc/v4l2uvc.c b/plugins/input_uvc/v4l2uvc.c
-index c5a5aa4..d11510c 100644
---- a/plugins/input_uvc/v4l2uvc.c
-+++ b/plugins/input_uvc/v4l2uvc.c
-@@ -532,6 +532,7 @@ int uvcGrab(struct vdIn *vd)
- */
-
- memcpy(vd->tmpbuffer, vd->mem[vd->buf.index], vd->buf.bytesused);
-+ vd->tmpbytesused = vd->buf.bytesused;
-
- if(debug)
- fprintf(stderr, "bytes in used %d \n", vd->buf.bytesused);
-@@ -570,6 +571,7 @@ int close_v4l2(struct vdIn *vd)
- if(vd->tmpbuffer)
- free(vd->tmpbuffer);
- vd->tmpbuffer = NULL;
-+ vd->tmpbytesused = 0;
- free(vd->framebuffer);
- vd->framebuffer = NULL;
- free(vd->videodevice);
-diff --git a/plugins/input_uvc/v4l2uvc.h b/plugins/input_uvc/v4l2uvc.h
-index 022c57e..2c7c8ba 100644
---- a/plugins/input_uvc/v4l2uvc.h
-+++ b/plugins/input_uvc/v4l2uvc.h
-@@ -83,6 +83,7 @@ struct vdIn {
- struct v4l2_requestbuffers rb;
- void *mem[NB_BUFFER];
- unsigned char *tmpbuffer;
-+ int tmpbytesused;
- unsigned char *framebuffer;
- streaming_state streamingState;
- int grabmethod;
---
-1.9.1
-
+++ /dev/null
-From 11b28b36a8711b53658e8bbc50435595522f91ba Mon Sep 17 00:00:00 2001
-From: Olliver Schinagl <o.schinagl@ultimaker.com>
-Date: Wed, 29 Oct 2014 11:21:16 +0100
-Subject: [PATCH 2/7] Stop leaking data via struct v4l2_buffer
-
-Before the 3.16 kernel, the v4l2_buffer was leaking data and violating
-its own spec. Since 3.16 this has been corrected and after calling the
-QBUF ioctl, the struct gets cleaned up.
-
-Right now, input_uvc assumes the buffer is valid at all times. This no
-longer being true, this patch removes the v4l2_buffer from the vdIn
-struct. Certain values are still needed outside of this buffer however,
-the length buffer in the buffer array 'mem' and the timestamp. These are
-now stored in the vdIn struct.
-
-All of this is still somewhat hackish, as a) the processing of the image
-should really be done inside the uvcGrab function between the queuing
-and dequeing of the buffers (or separate that into 3 functions, deq, q
-and process and call them from input_uvc). b) we are still copying the
-image using memcpy, which is something we don't really want and defeats
-the purpose of using a mmap in the first place. Changing this however
-requires some heavier re-architecting and in the end, may still not be avoided.
-
-More information about this bug and change can be found on the
-linux-media mailing list[0] with the title uvcvideo fails on 3.16 and
-3.17 kernels.
-
-[0] http://www.spinics.net/lists/linux-media/msg81515.html
-
-Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
----
- plugins/input_uvc/input_uvc.c | 6 ++--
- plugins/input_uvc/v4l2uvc.c | 64 +++++++++++++++++++++++--------------------
- plugins/input_uvc/v4l2uvc.h | 4 ++-
- 3 files changed, 41 insertions(+), 33 deletions(-)
-
-diff --git a/plugins/input_uvc/input_uvc.c b/plugins/input_uvc/input_uvc.c
-index 64f66cb..64ef56c 100644
---- a/plugins/input_uvc/input_uvc.c
-+++ b/plugins/input_uvc/input_uvc.c
-@@ -500,8 +500,8 @@ void *cam_thread(void *arg)
- if (pcontext->videoIn->soft_framedrop == 1) {
- unsigned long last = pglobal->in[pcontext->id].timestamp.tv_sec * 1000 +
- (pglobal->in[pcontext->id].timestamp.tv_usec/1000); // convert to ms
-- unsigned long current = pcontext->videoIn->buf.timestamp.tv_sec * 1000 +
-- pcontext->videoIn->buf.timestamp.tv_usec/1000; // convert to ms
-+ unsigned long current = pcontext->videoIn->tmptimestamp.tv_sec * 1000 +
-+ pcontext->videoIn->tmptimestamp.tv_usec/1000; // convert to ms
-
- // if the requested time did not esplashed skip the frame
- if ((current - last) < pcontext->videoIn->frame_period_time) {
-@@ -543,7 +543,7 @@ void *cam_thread(void *arg)
- #endif
-
- /* copy this frame's timestamp to user space */
-- pglobal->in[pcontext->id].timestamp = pcontext->videoIn->buf.timestamp;
-+ pglobal->in[pcontext->id].timestamp = pcontext->videoIn->tmptimestamp;
-
- /* signal fresh_frame */
- pthread_cond_broadcast(&pglobal->in[pcontext->id].db_update);
-diff --git a/plugins/input_uvc/v4l2uvc.c b/plugins/input_uvc/v4l2uvc.c
-index d11510c..7ec5eec 100644
---- a/plugins/input_uvc/v4l2uvc.c
-+++ b/plugins/input_uvc/v4l2uvc.c
-@@ -217,6 +217,9 @@ static int init_v4l2(struct vdIn *vd)
- {
- int i;
- int ret = 0;
-+ struct v4l2_buffer buf;
-+
-+
- if((vd->fd = OPEN_VIDEO(vd->videodevice, O_RDWR)) == -1) {
- perror("ERROR opening V4L interface");
- DBG("errno: %d", errno);
-@@ -375,26 +378,27 @@ static int init_v4l2(struct vdIn *vd)
- * map the buffers
- */
- for(i = 0; i < NB_BUFFER; i++) {
-- memset(&vd->buf, 0, sizeof(struct v4l2_buffer));
-- vd->buf.index = i;
-- vd->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- vd->buf.memory = V4L2_MEMORY_MMAP;
-- ret = xioctl(vd->fd, VIDIOC_QUERYBUF, &vd->buf);
-+ memset(&buf, 0, sizeof(struct v4l2_buffer));
-+ buf.index = i;
-+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-+ buf.memory = V4L2_MEMORY_MMAP;
-+ ret = xioctl(vd->fd, VIDIOC_QUERYBUF, &buf);
- if(ret < 0) {
- perror("Unable to query buffer");
- goto fatal;
- }
-
- if(debug)
-- fprintf(stderr, "length: %u offset: %u\n", vd->buf.length, vd->buf.m.offset);
-+ fprintf(stderr, "length: %u offset: %u\n", buf.length, buf.m.offset);
-
- vd->mem[i] = mmap(0 /* start anywhere */ ,
-- vd->buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, vd->fd,
-- vd->buf.m.offset);
-+ buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, vd->fd,
-+ buf.m.offset);
- if(vd->mem[i] == MAP_FAILED) {
- perror("Unable to map buffer");
- goto fatal;
- }
-+ vd->memlength[i] = buf.length;
- if(debug)
- fprintf(stderr, "Buffer mapped at address %p.\n", vd->mem[i]);
- }
-@@ -403,11 +407,11 @@ static int init_v4l2(struct vdIn *vd)
- * Queue the buffers.
- */
- for(i = 0; i < NB_BUFFER; ++i) {
-- memset(&vd->buf, 0, sizeof(struct v4l2_buffer));
-- vd->buf.index = i;
-- vd->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- vd->buf.memory = V4L2_MEMORY_MMAP;
-- ret = xioctl(vd->fd, VIDIOC_QBUF, &vd->buf);
-+ memset(&buf, 0, sizeof(struct v4l2_buffer));
-+ buf.index = i;
-+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-+ buf.memory = V4L2_MEMORY_MMAP;
-+ ret = xioctl(vd->fd, VIDIOC_QBUF, &buf);
- if(ret < 0) {
- perror("Unable to queue buffer");
- goto fatal;;
-@@ -499,17 +503,18 @@ int memcpy_picture(unsigned char *out, unsigned char *buf, int size)
- int uvcGrab(struct vdIn *vd)
- {
- #define HEADERFRAME1 0xaf
-+ struct v4l2_buffer buf;
- int ret;
-
- if(vd->streamingState == STREAMING_OFF) {
- if(video_enable(vd))
- goto err;
- }
-- memset(&vd->buf, 0, sizeof(struct v4l2_buffer));
-- vd->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- vd->buf.memory = V4L2_MEMORY_MMAP;
-+ memset(&buf, 0, sizeof(struct v4l2_buffer));
-+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-+ buf.memory = V4L2_MEMORY_MMAP;
-
-- ret = xioctl(vd->fd, VIDIOC_DQBUF, &vd->buf);
-+ ret = xioctl(vd->fd, VIDIOC_DQBUF, &buf);
- if(ret < 0) {
- perror("Unable to dequeue buffer");
- goto err;
-@@ -517,33 +522,34 @@ int uvcGrab(struct vdIn *vd)
-
- switch(vd->formatIn) {
- case V4L2_PIX_FMT_MJPEG:
-- if(vd->buf.bytesused <= HEADERFRAME1) {
-+ if(buf.bytesused <= HEADERFRAME1) {
- /* Prevent crash
- * on empty image */
- fprintf(stderr, "Ignoring empty buffer ...\n");
- return 0;
- }
-
-- /* memcpy(vd->tmpbuffer, vd->mem[vd->buf.index], vd->buf.bytesused);
-+ /* memcpy(vd->tmpbuffer, vd->mem[buf.index], buf.bytesused);
-
-- memcpy (vd->tmpbuffer, vd->mem[vd->buf.index], HEADERFRAME1);
-+ memcpy (vd->tmpbuffer, vd->mem[buf.index], HEADERFRAME1);
- memcpy (vd->tmpbuffer + HEADERFRAME1, dht_data, sizeof(dht_data));
-- memcpy (vd->tmpbuffer + HEADERFRAME1 + sizeof(dht_data), vd->mem[vd->buf.index] + HEADERFRAME1, (vd->buf.bytesused - HEADERFRAME1));
-+ memcpy (vd->tmpbuffer + HEADERFRAME1 + sizeof(dht_data), vd->mem[buf.index] + HEADERFRAME1, (buf.bytesused - HEADERFRAME1));
- */
-
-- memcpy(vd->tmpbuffer, vd->mem[vd->buf.index], vd->buf.bytesused);
-- vd->tmpbytesused = vd->buf.bytesused;
-+ memcpy(vd->tmpbuffer, vd->mem[buf.index], buf.bytesused);
-+ vd->tmpbytesused = buf.bytesused;
-+ vd->tmptimestamp = buf.timestamp;
-
- if(debug)
-- fprintf(stderr, "bytes in used %d \n", vd->buf.bytesused);
-+ fprintf(stderr, "bytes in used %d \n", buf.bytesused);
- break;
- case V4L2_PIX_FMT_RGB565:
- case V4L2_PIX_FMT_YUYV:
- case V4L2_PIX_FMT_RGB24:
-- if(vd->buf.bytesused > vd->framesizeIn)
-- memcpy(vd->framebuffer, vd->mem[vd->buf.index], (size_t) vd->framesizeIn);
-+ if(buf.bytesused > vd->framesizeIn)
-+ memcpy(vd->framebuffer, vd->mem[buf.index], (size_t) vd->framesizeIn);
- else
-- memcpy(vd->framebuffer, vd->mem[vd->buf.index], (size_t) vd->buf.bytesused);
-+ memcpy(vd->framebuffer, vd->mem[buf.index], (size_t) buf.bytesused);
- break;
-
- default:
-@@ -551,7 +557,7 @@ int uvcGrab(struct vdIn *vd)
- break;
- }
-
-- ret = xioctl(vd->fd, VIDIOC_QBUF, &vd->buf);
-+ ret = xioctl(vd->fd, VIDIOC_QBUF, &buf);
- if(ret < 0) {
- perror("Unable to requeue buffer");
- goto err;
-@@ -947,7 +953,7 @@ int setResolution(struct vdIn *vd, int width, int height)
- DBG("Unmap buffers\n");
- int i;
- for(i = 0; i < NB_BUFFER; i++)
-- munmap(vd->mem[i], vd->buf.length);
-+ munmap(vd->mem[i], vd->memlength[i]);
-
- if(CLOSE_VIDEO(vd->fd) == 0) {
- DBG("Device closed successfully\n");
-diff --git a/plugins/input_uvc/v4l2uvc.h b/plugins/input_uvc/v4l2uvc.h
-index 2c7c8ba..e625957 100644
---- a/plugins/input_uvc/v4l2uvc.h
-+++ b/plugins/input_uvc/v4l2uvc.h
-@@ -35,6 +35,7 @@
- #include <sys/ioctl.h>
- #include <sys/mman.h>
- #include <sys/select.h>
-+#include <sys/time.h>
-
- #include <linux/types.h> /* for videodev2.h */
- #include <linux/videodev2.h>
-@@ -79,11 +80,12 @@ struct vdIn {
- char *pictName;
- struct v4l2_capability cap;
- struct v4l2_format fmt;
-- struct v4l2_buffer buf;
- struct v4l2_requestbuffers rb;
- void *mem[NB_BUFFER];
-+ int memlength[NB_BUFFER];
- unsigned char *tmpbuffer;
- int tmpbytesused;
-+ struct timeval tmptimestamp;
- unsigned char *framebuffer;
- streaming_state streamingState;
- int grabmethod;
---
-1.9.1
-
+++ /dev/null
-Binary files a/ipkg-ar71xx/mjpg-streamer/usr/lib/input_uvc.so and b/ipkg-ar71xx/mjpg-streamer/usr/lib/input_uvc.so differ
-diff -ur a/plugins/input_uvc/input_uvc.c b/plugins/input_uvc/input_uvc.c
---- a/plugins/input_uvc/input_uvc.c 2015-03-02 09:14:05.000000000 +0200
-+++ b/plugins/input_uvc/input_uvc.c 2015-03-02 09:18:22.000000000 +0200
-@@ -311,6 +311,10 @@
- }
- memset(cams[id].videoIn, 0, sizeof(struct vdIn));
-
-+ /* Non-MJPEG formats seem to fail with unlimited FPS */
-+ if (format != V4L2_PIX_FMT_MJPEG && fps == -1)
-+ fps = 15;
-+
- /* display the parsed values */
- IPRINT("Using V4L2 device.: %s\n", dev);
- IPRINT("Desired Resolution: %i x %i\n", width, height);
-diff -ur a/plugins/input_uvc/jpeg_utils.c b/plugins/input_uvc/jpeg_utils.c
---- a/plugins/input_uvc/jpeg_utils.c 2015-03-02 09:17:02.000000000 +0300
-+++ b/plugins/input_uvc/jpeg_utils.c 2015-03-02 09:25:18.000000000 +0200
-@@ -198,7 +198,7 @@
- }
-
- row_pointer = (JSAMPROW*)line_buffer;
-- jpeg_write_scanlines(&cinfo, row_pointer, 1);
-+ jpeg_write_scanlines(&cinfo, &row_pointer, 1);
- }
- } else if (vd->formatIn == V4L2_PIX_FMT_RGB565) {
- while(cinfo.next_scanline < vd->height) {
-@@ -220,7 +220,7 @@
- }
-
- row_pointer = (JSAMPROW*)line_buffer;
-- jpeg_write_scanlines(&cinfo, row_pointer, 1);
-+ jpeg_write_scanlines(&cinfo, &row_pointer, 1);
- }
- } else if (vd->formatIn == V4L2_PIX_FMT_RGB24) {
- jpeg_write_scanlines(&cinfo, (JSAMPROW*)vd->framebuffer, vd->height);
-diff -ur a/plugins/input_uvc/v4l2uvc.c b/plugins/input_uvc/v4l2uvc.c
---- a/plugins/input_uvc/v4l2uvc.c 2015-03-02 09:14:05.000000000 +0200
-+++ b/plugins/input_uvc/v4l2uvc.c 2015-03-02 09:22:09.000000000 +0200
-@@ -338,11 +338,15 @@
- vd->frame_period_time = 1000/vd->fps; // calcualate frame period time in ms
- IPRINT("Frame period time ......: %ld ms\n", vd->frame_period_time);
-
-- // set FPS to maximum in order to minimize the lagging
- memset(setfps, 0, sizeof(struct v4l2_streamparm));
- setfps->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- setfps->parm.capture.timeperframe.numerator = 1;
-- setfps->parm.capture.timeperframe.denominator = 255;
-+ if (vd->formatIn == V4L2_PIX_FMT_MJPEG)
-+ // set FPS to maximum in order to minimize the lagging
-+ setfps->parm.capture.timeperframe.denominator = 255;
-+ else
-+ setfps->parm.capture.timeperframe.denominator = vd->fps;
-+
- ret = xioctl(vd->fd, VIDIOC_S_PARM, setfps);
- if (ret) {
- perror("Unable to set the FPS\n");
-
+++ /dev/null
---- a/plugins/input_uvc/v4l2uvc.c
-+++ b/plugins/input_uvc/v4l2uvc.c
-@@ -130,7 +130,7 @@ int init_videoIn(struct vdIn *vd, char *
- return -1;
- }
-
-- memcpy(&pglobal->in[id].in_formats[pglobal->in[id].formatCount], &fmtdesc, sizeof(input_format));
-+ memcpy(&pglobal->in[id].in_formats[pglobal->in[id].formatCount], &fmtdesc, sizeof(struct v4l2_fmtdesc));
-
- if(fmtdesc.pixelformat == format)
- pglobal->in[id].currentFormat = pglobal->in[id].formatCount;
include $(TOPDIR)/rules.mk
PKG_NAME:=motion
-PKG_VERSION=3.4.0-20141018-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=3
+PKG_VERSION:=4.1.1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/Mr-Dave/motion.git
-PKG_SOURCE_VERSION:=9479d910f2149b5558788bb86f97f26522794212
+PKG_SOURCE:=$(PKG_NAME)-release-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/Motion-Project/motion/tar.gz/release-$(PKG_VERSION)?
+PKG_HASH:=2074b935bdfe28f84c2c3233274b06908336778f303bb13530d4299c3f8aa4e2
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
-PKG_MIRROR_HASH:=02602c775ec3829dac59aed16ea6b0d78f77a435b9c360db1a05cb27227da97e
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Multimedia
DEPENDS:=+libjpeg +libpthread
TITLE:=webcam motion sensing and logging
- URL:=http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
+ URL:=https://motion-project.github.io/
endef
define Package/motion/conffiles
--- /dev/null
+From 3c7cbd685017c1bf9ba2eaa811b63842bec28f64 Mon Sep 17 00:00:00 2001
+From: Mr-DaveDev <MotionMrDaveDev@gmail.com>
+Date: Mon, 1 Jan 2018 13:07:08 -0700
+Subject: [PATCH] Initialize the thread at start of main
+
+Closes #589
+---
+ logger.c | 5 -----
+ motion.c | 30 ++++++++++++++++--------------
+ 2 files changed, 16 insertions(+), 19 deletions(-)
+
+diff --git a/logger.c b/logger.c
+index c55044b..5ef2f85 100644
+--- a/logger.c
++++ b/logger.c
+@@ -193,11 +193,6 @@ void motion_log(int level, unsigned int type, int errno_flag, const char *fmt, .
+
+ //printf("log_type %d, type %d level %d\n", log_type, type, level);
+
+- /*
+- * If pthread_getspecific fails (e.g., because the thread's TLS doesn't
+- * contain anything for thread number, it returns NULL which casts to zero,
+- * which is nice because that's what we want in that case.
+- */
+ threadnr = (unsigned long)pthread_getspecific(tls_key_threadnr);
+
+ /*
+diff --git a/motion.c b/motion.c
+index 985d4b2..9fe58c1 100644
+--- a/motion.c
++++ b/motion.c
+@@ -2886,10 +2886,6 @@ static void motion_startup(int daemonize, int argc, char *argv[])
+ }
+
+
+- //set_log_level(cnt_list[0]->log_level);
+-
+- MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Motion "VERSION" Started");
+-
+ if ((cnt_list[0]->conf.log_file) && (strncmp(cnt_list[0]->conf.log_file, "syslog", 6))) {
+ set_log_mode(LOGMODE_FILE);
+ ptr_logfile = set_logfile(cnt_list[0]->conf.log_file);
+@@ -2908,6 +2904,8 @@ static void motion_startup(int daemonize, int argc, char *argv[])
+ MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Logging to syslog");
+ }
+
++ MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Motion "VERSION" Started");
++
+ if ((cnt_list[0]->conf.log_type_str == NULL) ||
+ !(cnt_list[0]->log_type = get_log_type(cnt_list[0]->conf.log_type_str))) {
+ cnt_list[0]->log_type = TYPE_DEFAULT;
+@@ -3053,8 +3051,22 @@ int main (int argc, char **argv)
+ */
+ struct sigaction sig_handler_action;
+ struct sigaction sigchild_action;
++
++
+ setup_signals(&sig_handler_action, &sigchild_action);
+
++ /*
++ * Create and a thread attribute for the threads we spawn later on.
++ * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
++ * their termination cannot be synchronized through 'pthread_join'.
++ */
++ pthread_attr_init(&thread_attr);
++ pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
++
++ /* Create the TLS key for thread number. */
++ pthread_key_create(&tls_key_threadnr, NULL);
++ pthread_setspecific(tls_key_threadnr, (void *)(0));
++
+ motion_startup(1, argc, argv);
+
+ ffmpeg_global_init();
+@@ -3102,16 +3114,6 @@ int main (int argc, char **argv)
+ if (cnt_list[0]->conf.setup_mode)
+ MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Motion running in setup mode.");
+
+- /*
+- * Create and a thread attribute for the threads we spawn later on.
+- * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
+- * their termination cannot be synchronized through 'pthread_join'.
+- */
+- pthread_attr_init(&thread_attr);
+- pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
+-
+- /* Create the TLS key for thread number. */
+- pthread_key_create(&tls_key_threadnr, NULL);
+
+ do {
+ if (restart) {
+--
+2.7.4
+
+++ /dev/null
---- a/motion.c
-+++ b/motion.c
-@@ -2630,6 +2630,17 @@ int main (int argc, char **argv)
- struct sigaction sigchild_action;
- setup_signals(&sig_handler_action, &sigchild_action);
-
-+ /*
-+ * Create and a thread attribute for the threads we spawn later on.
-+ * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
-+ * their termination cannot be synchronized through 'pthread_join'.
-+ */
-+ pthread_attr_init(&thread_attr);
-+ pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
-+
-+ /* Create the TLS key for thread number. */
-+ pthread_key_create(&tls_key_threadnr, NULL);
-+
- motion_startup(1, argc, argv);
-
- #ifdef HAVE_FFMPEG
-@@ -2648,17 +2659,6 @@ int main (int argc, char **argv)
- if (cnt_list[0]->conf.setup_mode)
- MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "%s: Motion running in setup mode.");
-
-- /*
-- * Create and a thread attribute for the threads we spawn later on.
-- * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
-- * their termination cannot be synchronized through 'pthread_join'.
-- */
-- pthread_attr_init(&thread_attr);
-- pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
--
-- /* Create the TLS key for thread number. */
-- pthread_key_create(&tls_key_threadnr, NULL);
--
- do {
- if (restart) {
- /*
---- a/motion.h
-+++ b/motion.h
-@@ -84,7 +84,7 @@
- #endif
-
- /* strerror_r() XSI vs GNU */
--#if (defined(BSD)) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE)
-+#if (defined(BSD)) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || (!defined(__GLIBC__))
- #define XSI_STRERROR_R
- #endif
-
include $(TOPDIR)/rules.mk
PKG_NAME:=tvheadend
-PKG_VERSION:=4.0.9
+PKG_VERSION:=4.0.10
PKG_RELEASE:=1
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=c18e3803d6e36348442ccf3b0ac4868948692491c7dd646d48576f5aec09cdd8
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_MIRROR_HASH:=afe42bcf683e8576ca8ccd4755ea308f79195e92f7c30fc5961973e238f49105
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/tvheadend/tvheadend.git
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
--disable-libav \
--enable-bundle
+TARGET_CFLAGS += -Wno-error=pointer-compare
+
define Build/Prepare
$(call Build/Prepare/Default)
echo 'Tvheadend $(shell echo $(PKG_SOURCE_VERSION) | sed "s/^v//")~openwrt$(PKG_RELEASE)' \
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mpromonet/v4l2rtspserver.git
-PKG_SOURCE_VERSION:=d7e8dd4d35a802219222642a2e3b28f2dc5069c1
-PKG_DATE:=2017-12-20
+PKG_MIRROR_HASH:=ccd2424b94feb7c52e53700b8613e16291463e3717aff598385d8439ad8c81af
+PKG_SOURCE_VERSION:=7ead7613fe6719b6004d229130f7d62aa0a149e7
+PKG_DATE:=2018-05-26
PKG_NAME:=v4l2rtspserver
PKG_VERSION:=$(PKG_DATE)-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_MAINTAINER:=Roger Dammit <rogerdammit@gmail.com>
-LIVE555_VERSION:=2017.10.28
-LIVE555_MD5SUM:=a5acd14c4fa7b50f7270304d3b4a70ae
+LIVE555_VERSION:=2018.04.25
+LIVE555_MD5SUM:=9b58a5d62659eb29b9bd85d1b29c3a75
LIVE555_FILE:=live.$(LIVE555_VERSION).tar.gz
CMAKE_INSTALL:=1
endef
define Package/v4l2rtspserver/conffiles
- /etc/config/v4l2rtspserver
+/etc/config/v4l2rtspserver
endef
define Download/live555
$(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/v4l2wrapper CFLAGS="$(TARGET_CFLAGS) -I $(PKG_BUILD_DIR)/v4l2wrapper/inc"
$(CP) $(PKG_BUILD_DIR)/v4l2wrapper/libv4l2wrapper.a $(PKG_BUILD_DIR)
- # patch cmake file
- $(SED) 's/DEBUG/RELEASE/' $(PKG_BUILD_DIR)/CMakeLists.txt
+ # cmake patches (these are very hacky and should be a lot cleaner)
+
+ # prevent root path override
+ $(SED) 's/SET(CMAKE_FIND_ROOT_PATH/#SET(CMAKE_FIND_ROOT_PATH/' $(PKG_BUILD_DIR)/CMakeLists.txt
+
+ # set search path for v4l2wrapper to current build dir
+ $(SED) 's/V4L2WRAPPER_LIBRARY libv4l2wrapper.a/V4L2WRAPPER_LIBRARY libv4l2wrapper.a PATHS "." NO_CMAKE_FIND_ROOT_PATH/' $(PKG_BUILD_DIR)/CMakeLists.txt
+
+ # disable ALSA
+ $(SED) 's/find_package(ALSA QUIET)//' $(PKG_BUILD_DIR)/CMakeLists.txt
endef
define Package/v4l2rtspserver/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v4l2rtspserver-$(PKG_VERSION) $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/v4l2rtspserver-$(PKG_VERSION) $(1)/usr/bin/
mv $(1)/usr/bin/v4l2rtspserver-$(PKG_VERSION) $(1)/usr/bin/v4l2rtspserver
$(INSTALL_DIR) $(1)/etc/init.d
-COMPILE_OPTS = $(INCLUDES) -I. -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1
+COMPILE_OPTS = $(INCLUDES) -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1
C = c
C_COMPILER = $(GCC)
CFLAGS += $(COMPILE_OPTS)
include $(TOPDIR)/rules.mk
PKG_NAME:=xupnpd
-PKG_REV:=7ff74b2d5288fbc35c4f6fcb94466d408b1f853c
-PKG_VERSION:=2017-10-31
+PKG_REV:=fe39cdc41c84d5b365e3da766167c7c9551e3b2f
+PKG_VERSION:=2018-09-24
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/clark15b/xupnpd.git
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
-PKG_MIRROR_HASH:=333e9938556c9a02b28732b5512626b991c65eaf0eb60d38e29f72ec513d312f
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/clark15b/xupnpd/tar.gz/$(PKG_REV)?
+PKG_HASH:=5ce2f3423b86e8de4dcd5c46da28a51707c21b234a4b356608902534c3160c84
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REV)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
include $(TOPDIR)/rules.mk
PKG_NAME:=youtube-dl
-PKG_VERSION:=2018.03.10
+PKG_VERSION:=2018.06.04
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://yt-dl.org/downloads/$(PKG_VERSION)/
-PKG_HASH:=4bfadccb19e379ce38f5601c72dacf0ac5e03881230afee6df2152ab42fa75c5
+PKG_HASH:=436ef69e59a1acf8091f5c294a563d6859ce6ec42543ea3abb501e2c09131301
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=Unlicense
--- /dev/null
+if PACKAGE_netopeer2-keystored
+
+config SSH_KEYS
+ bool "Generate default ssh keys"
+ default y
+
+endif
--- /dev/null
+#
+# Copyright (C) 2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# Warning by default OpenWrt does not have a root password which is necessery for NETCONF server.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=Netopeer2
+PKG_VERSION:=0.6-r1
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/CESNET/Netopeer2/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=5f38db43f6021e389cf1f3c5c70e432586d8ba7f2d64ed5bd2bea8c7ea6b39e6
+
+CMAKE_INSTALL:=1
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/netopeer2-keystored/config
+ source "$(SOURCE)/Config_keystored.in"
+endef
+
+define Package/netopeer2-server
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=NETCONF server
+ URL:=$(PKG_SOURCE_URL)
+ DEPENDS:=+libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl +sysrepo
+ MENU:=1
+endef
+
+define Package/netopeer2-cli
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Netopeer2 cli tool
+ URL:=$(PKG_SOURCE_URL)
+ DEPENDS:=+libpthread +libyang +libnetconf2 +libopenssl
+endef
+
+define Package/netopeer2-keystored
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Netopeer2 key store management
+ URL:=$(PKG_SOURCE_URL)
+ DEPENDS:=+libopenssl +libsysrepo +sysrepo +sysrepocfg +sysrepoctl +SSH_KEYS:openssh-keygen
+ MENU:=1
+endef
+
+define Package/netopeer2/description
+ Netopeer2 is a set of tools implementing network configuration tools based on the NETCONF
+ Protocol. This is the second generation of the toolset, originally available as the Netopeer
+ project. Netopeer2 is based on the new generation of the NETCONF and YANG libraries -
+ libyang and libnetconf2. The Netopeer server uses sysrepo as a NETCONF datastore implementation.
+endef
+
+CMAKE_OPTIONS += \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -DCMAKE_BUILD_TYPE:STRING=Release \
+ -DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys \
+ -DENABLE_CONFIGURATION:BOOL=OFF \
+ -DMODEL_INSTALL:BOOL=OFF \
+ -DSSH_KEY_INSTALL:BOOL=OFF
+
+define Package/netopeer2-server/install
+ $(INSTALL_DIR) $(1)/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/netopeer2-server $(1)/bin/
+
+ $(INSTALL_DIR) $(1)/etc/sysrepo/yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-ssh-server.yang $(1)/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-tls-server.yang $(1)/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/iana-crypt-hash.yang $(1)/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-x509-cert-to-name.yang $(1)/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-monitoring.yang $(1)/etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-with-defaults.yang $(1)/etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-system.yang $(1)/etc/sysrepo/yang/ietf-system@2014-08-06.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-datastores.yang $(1)/etc/sysrepo/yang/ietf-datastores@2017-08-17.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-yang-library.yang $(1)/etc/sysrepo/yang/ietf-yang-library@2018-01-17.yang
+
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files/netopeer2-server.default $(1)/etc/uci-defaults/98_netopeer2-server
+
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) ./files/netopeer2-server.init $(1)/etc/init.d/netopeer2-server
+
+ $(INSTALL_DIR) $(1)/usr/share/netopeer2-server
+ $(INSTALL_DATA) ./files/stock_config.xml $(1)/usr/share/netopeer2-server
+endef
+
+define Package/netopeer2-cli/install
+ $(INSTALL_DIR) $(1)/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cli/netopeer2-cli $(1)/bin/
+endef
+
+define Package/netopeer2-keystored/install
+ $(INSTALL_DIR) $(1)/usr/lib/sysrepo/plugins/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/keystored/libkeystored.so $(1)/usr/lib/sysrepo/plugins/
+
+ $(INSTALL_DIR) $(1)/etc/sysrepo/yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-keystore.yang $(1)/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang
+
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+
+ $(INSTALL_DIR) $(1)/etc/keystored/keys
+ifeq ($(CONFIG_SSH_KEYS),y)
+ $(INSTALL_BIN) ./files/netopeer2-keystored-keygen.default $(1)/etc/uci-defaults/97_netopeer2-keystored
+else
+ $(INSTALL_BIN) ./files/netopeer2-keystored.default $(1)/etc/uci-defaults/97_netopeer2-keystored
+ #ssh key name is specified in ./files/stock_config.xml file, you will need to provide the ssh keys yourself.
+ $(INSTALL_DATA) ./files/ssh_host_rsa_key.pem $(1)/etc/keystored/keys
+ $(INSTALL_DATA) ./files/ssh_host_rsa_key.pub.pem $(1)/etc/keystored/keys
+endif
+
+ $(INSTALL_DIR) $(1)/usr/share/netopeer2-keystored
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/keystored/stock_key_config.xml $(1)/usr/share/netopeer2-keystored
+endef
+
+$(eval $(call BuildPackage,netopeer2-server))
+$(eval $(call BuildPackage,netopeer2-cli))
+$(eval $(call BuildPackage,netopeer2-keystored))
--- /dev/null
+#!/bin/sh
+
+# Warning, problems can occur if the device restarts in the middle of this uci-default script
+
+if [ -x /bin/sysrepoctl ]; then
+ match=$(sysrepoctl -l | grep "ietf-keystore ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
+ if [ -x /bin/sysrepocfg ]; then
+ sysrepocfg -f xml -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
+ rm /usr/share/netopeer2-keystored/stock_key_config.xml
+ fi
+
+ #generate ssh keys
+ if [ ! -f "/etc/keystored/keys/ssh_host_rsa_key.pem" ]; then
+ ssh-keygen -m pem -t rsa -q -N "" -f /etc/keystored/keys/ssh_host_rsa_key.pem
+ chmod go-rw /etc/keystored/keys/ssh_host_rsa_key.pem
+ fi
+ fi
+fi
+
+exit 0
--- /dev/null
+#!/bin/sh
+
+# Warning, problems can occur if the device restarts in the middle of this uci-default script
+
+if [ -x /bin/sysrepoctl ]; then
+ match=$(sysrepoctl -l | grep "ietf-keystore ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
+ if [ -x /bin/sysrepocfg ]; then
+ sysrepocfg -f xml -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
+ rm /usr/share/netopeer2-keystored/stock_key_config.xml
+ fi
+ fi
+fi
+
+exit 0
--- /dev/null
+#!/bin/sh
+
+# Warning, problems can occur if the device restarts in the middle of this uci-default script
+
+if [ -x /bin/sysrepoctl ]; then
+ match=$(sysrepoctl -l | grep "ietf-ssh-server ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-tls-server ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "iana-crypt-hash ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-x509-cert-to-name ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-netconf-server ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang -o root:root -p 600
+ sysrepoctl -m ietf-netconf-server -e listen
+ sysrepoctl -m ietf-netconf-server -e ssh-listen
+ if [ -x /bin/sysrepocfg ]; then
+ sysrepocfg -f xml -d startup -i /usr/share/netopeer2-server/stock_config.xml ietf-netconf-server
+ rm /usr/share/netopeer2-server/stock_config.xml
+ fi
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-netconf-monitoring ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang -o root:root -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-netconf-with-defaults ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang -o root:root -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-system ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-system@2014-08-06.yang -o root:root -p 600
+ sysrepoctl -m ietf-system -e authentication
+ sysrepoctl -m ietf-system -e local-users
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-datastores ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-datastores@2017-08-17.yang -o root:root -p 600
+ fi
+
+ match=$(sysrepoctl -l | grep "ietf-yang-library ")
+ if [ ! "$match" ]; then
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-yang-library@2018-01-17.yang -o root:root -p 600
+ fi
+fi
+
+exit 0
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=11
+
+USE_PROCD=1
+PROG=/bin/netopeer2-server
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG
+ procd_append_param command -d -v 0
+ procd_set_param respawn
+ procd_close_instance
+}
+
+stop_service()
+{
+ service_stop ${PROG}
+ rm /var/run/netopeer2-server.pid
+}
--- /dev/null
+<netconf-server xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
+ <listen>
+ <endpoint>
+ <name>test_ssh_listen_endpt</name>
+ <ssh>
+ <address>::</address>
+ <port>830</port>
+ <host-keys>
+ <host-key>
+ <name>test_ssh_listen_key</name>
+ <public-key>ssh_host_rsa_key</public-key>
+ </host-key>
+ </host-keys>
+ </ssh>
+ </endpoint>
+ </listen>
+</netconf-server>
--- /dev/null
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
+===================================================================
+--- /dev/null
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
+@@ -0,0 +1,5 @@
++cmake_minimum_required(VERSION 2.6)
++
++add_subdirectory(server)
++add_subdirectory(cli)
++add_subdirectory(keystored)
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
+===================================================================
+--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/cli/CMakeLists.txt
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.6)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(netopeer2-cli C)
+ include(GNUInstallDirs)
+@@ -83,7 +83,7 @@ endif()
+ install(FILES ${PROJECT_SOURCE_DIR}/doc/${PROJECT_NAME}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+
+ # clean cmake cache
+-add_custom_target(cleancache
++add_custom_target(cleancache_cli
+ COMMAND make clean
+ COMMAND find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} +
+ COMMAND rm -rf Makefile Doxyfile
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
+===================================================================
+--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/keystored/CMakeLists.txt
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.6)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(keystored C)
+ include(GNUInstallDirs)
+@@ -140,7 +140,7 @@ if (SSH_KEY_INSTALL)
+ execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ssh-key-import.sh)")
+ endif()
+
+-add_custom_target(install-scripts-ide
++add_custom_target(install-scripts-ide-keystored
+ scripts/model-install.sh
+ scripts/ssh-key-import.sh
+ )
+Index: Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
+===================================================================
+--- Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/server/CMakeLists.txt
++++ Netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.8.9)
+
+ # include custom Modules
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
+
+ project(netopeer2-server C)
+ include(GNUInstallDirs)
+@@ -176,7 +176,7 @@ if (ENABLE_CONFIGURATION)
+ execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/model-install.sh)")
+ endif()
+
+-add_custom_target(install-scripts-ide
++add_custom_target(install-scripts-ide-server
+ scripts/model-install.sh
--- /dev/null
+Index: Netopeer2-0.6-r1/keystored/CMakeLists.txt
+===================================================================
+--- Netopeer2-0.6-r1.orig/keystored/CMakeLists.txt
++++ Netopeer2-0.6-r1/keystored/CMakeLists.txt
+@@ -69,6 +69,8 @@ find_package(SYSREPO REQUIRED)
+ target_link_libraries(keystored ${SYSREPO_LIBRARIES})
+ include_directories(${SYSREPO_INCLUDE_DIRS})
+
++# skip step because of cross compiling
++if (FALSE)
+ # get sysrepo plugins directory
+ if (NOT SR_PLUGINS_DIR)
+ if (PKG_CONFIG_FOUND)
+@@ -154,3 +156,4 @@ add_custom_target(install-scripts-ide-ke
+
+ # plugins should be installed into sysrepo plugins dir
+ install(TARGETS keystored DESTINATION ${SR_PLUGINS_DIR})
++endif()
include $(TOPDIR)/rules.mk
PKG_NAME:=acme
-PKG_SOURCE_VERSION:=db3264ab8c8ee1aee1a84407702db4375f67765b
-PKG_VERSION:=1.6
+PKG_VERSION:=2.7.9
PKG_RELEASE:=4
PKG_LICENSE:=GPLv3
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz
-PKG_MIRROR_HASH:=a881b86fef2b754739fc0024efdf061312fecaf613502434770b18191bda741d
-PKG_SOURCE_URL:=git://github.com/Neilpang/acme.sh.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/Neilpang/acme.sh/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=25f8eef1a53584e3ebc653e1ae7763362ca97c40bb476ab7fee01aa50fa3a101
+PKG_BUILD_DIR:=$(BUILD_DIR)/acme.sh-$(PKG_VERSION)
+PKG_MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
+
LUCI_DIR:=/usr/lib/lua/luci
include $(INCLUDE_DIR)/package.mk
define Package/acme
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+curl +ca-bundle +openssl-util +netcat
+ DEPENDS:=+curl +ca-bundle +openssl-util +socat
TITLE:=ACME (Letsencrypt) client
- PKGARCH:=all
- MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
endef
define Package/acme/description
$(INSTALL_BIN) $(PKG_BUILD_DIR)/acme.sh $(1)/usr/lib/acme/acme.sh
endef
+define Package/acme-dnsapi
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+acme
+ TITLE:=DNS API integration for ACME (Letsencrypt) client
+endef
+
+define Package/acme-dnsapi/description
+ This package provides DNS API integration for ACME (Letsencrypt) client.
+endef
+
+define Package/acme-dnsapi/install
+ $(INSTALL_DIR) $(1)/usr/lib/acme/dnsapi
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/dnsapi/*.sh $(1)/usr/lib/acme/dnsapi
+endef
+
define Package/luci-app-acme
SECTION:=luci
CATEGORY:=LuCI
TITLE:=ACME package - LuCI interface
- MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
- PKGARCH:=all
- DEPENDS:= lua luci-base +acme luci-app-uhttpd
+ DEPENDS:= lua luci-base +acme
SUBMENU:=3. Applications
endef
$(eval $(call BuildPackage,acme))
+$(eval $(call BuildPackage,acme-dnsapi))
$(eval $(call BuildPackage,luci-app-acme))
]]--
+local ipkg = require "luci.model.ipkg"
+
+local nginx_presence = ipkg.installed("nginx-all-module") or ipkg.installed("nginx-ssl") or false
+
+local uhttpd_presence = ipkg.installed("uhttpd") or false
+
m = Map("acme", translate("ACME certificates"),
translate("This configures ACME (Letsencrypt) automatic certificate installation. " ..
"Simply fill out this to have the router configured with Letsencrypt-issued " ..
kl.rmempty = false
kl.datatype = "and(uinteger,min(2048))"
+if uhttpd_presence then
u = cs:option(Flag, "update_uhttpd", translate("Use for uhttpd"),
translate("Update the uhttpd config with this certificate once issued " ..
- "(only select this for one certificate)."))
+ "(only select this for one certificate)." ..
+ "Is also available luci-app-uhttpd to configure uhttpd form the LuCI interface."))
u.rmempty = false
+end
+
+if nginx_presence then
+u = cs:option(Flag, "update_nginx", translate("Use for nginx"),
+ translate("Update the nginx config with this certificate once issued " ..
+ "(only select this for one certificate)." ..
+ "Nginx must support ssl, if not it won't start as it needs to be " ..
+ "compiled with ssl support to use cert options"))
+u.rmempty = false
+end
wr = cs:option(Value, "webroot", translate("Webroot directory"),
translate("Webserver root directory. Set this to the webserver " ..
"document root to run Acme in webroot mode. The web " ..
"server must be accessible from the internet on port 80."))
-wr.rmempty = false
+wr.optional = true
dom = cs:option(DynamicList, "domains", translate("Domain names"),
translate("Domain names to include in the certificate. " ..
"Note that all domain names must point at the router in the global DNS."))
dom.datatype = "list(string)"
+dns = cs:option(Value, "dns", translate("DNS API"),
+ translate("To use DNS mode to issue certificates, set this to the name of a DNS API supported by acme.sh. " ..
+ "See https://github.com/Neilpang/acme.sh/tree/master/dnsapi for the list of available APIs. " ..
+ "In DNS mode, the domain name does not have to resolve to the router IP. " ..
+ "DNS mode is also the only mode that supports wildcard certificates. " ..
+ "Using this mode requires the acme-dnsapi package to be installed."))
+dns.optional = true
+
+cred = cs:option(DynamicList, "credentials", translate("DNS API credentials"),
+ translate("The credentials for the DNS API mode selected above. " ..
+ "See https://github.com/Neilpang/acme.sh/tree/master/dnsapi#how-to-use-dns-api for the format of credentials required by each API. " ..
+ "Add multiple entries here in KEY=VAL shell variable format to supply multiple credential variables."))
+cred.datatype = "list(string)"
+
return m
option use_staging 1
option keylength 2048
option update_uhttpd 1
+ option update_nginx 1
option webroot ""
list domains example.org
}
boot() {
- $SCRIPT check_cron
+ touch "/var/run/acme_boot"
+ start
}
service_triggers()
STATE_DIR='/etc/acme'
ACCOUNT_EMAIL=
DEBUG=0
+NGINX_WEBSERVER=0
+UPDATE_NGINX=0
+UPDATE_UHTTPD=0
. /lib/functions.sh
[ "$DEBUG" -eq "1" ] && logger -t acme -s -p daemon.debug "$@"
}
-get_listeners()
-{
- netstat -nptl 2>/dev/null | awk 'match($4, /:80$/){split($7, parts, "/"); print parts[2];}' | uniq | tr "\n" " "
+get_listeners() {
+ local proto rq sq listen remote state program
+ netstat -nptl 2>/dev/null | while read proto rq sq listen remote state program; do
+ case "$proto#$listen#$program" in
+ tcp#*:80#[0-9]*/*) echo -n "${program%% *} " ;;
+ esac
+ done
}
pre_checks()
log "Running pre checks for $main_domain."
listeners="$(get_listeners)"
- debug "port80 listens: $listeners"
-
- case "$listeners" in
- "uhttpd")
- debug "Found uhttpd listening on port 80; trying to disable."
- UHTTPD_LISTEN_HTTP=$(uci get uhttpd.main.listen_http)
-
- if [ -z "$UHTTPD_LISTEN_HTTP" ]; then
- err "$main_domain: Unable to find uhttpd listen config."
- err "Manually disable uhttpd or set webroot to continue."
- return 1
- fi
+ debug "port80 listens: $listeners"
- uci set uhttpd.main.listen_http=''
- uci commit uhttpd || return 1
- if ! /etc/init.d/uhttpd reload ; then
- uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
- uci commit uhttpd
- return 1
- fi
+ for listener in $(get_listeners); do
+ pid="${listener%/*}"
+ cmd="${listener#*/}"
+
+ case "$cmd" in
+ uhttpd)
+ debug "Found uhttpd listening on port 80; trying to disable."
+
+ UHTTPD_LISTEN_HTTP=$(uci get uhttpd.main.listen_http)
+
+ if [ -z "$UHTTPD_LISTEN_HTTP" ]; then
+ err "$main_domain: Unable to find uhttpd listen config."
+ err "Manually disable uhttpd or set webroot to continue."
+ return 1
+ fi
+
+ uci set uhttpd.main.listen_http=''
+ uci commit uhttpd || return 1
+ if ! /etc/init.d/uhttpd reload ; then
+ uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
+ uci commit uhttpd
+ return 1
+ fi
;;
- "")
- debug "Nothing listening on port 80."
+ nginx*)
+ debug "Found nginx listening on port 80; trying to disable."
+ NGINX_WEBSERVER=1
+ local tries=0
+ while grep -sq "$cmd" "/proc/$pid/cmdline" && kill -0 "$pid"; do
+ /etc/init.d/nginx stop
+ if [ $tries -gt 10 ]; then
+ debug "Can't stop nginx. Terminating script."
+ return 1
+ fi
+ debug "Waiting for nginx to stop..."
+ tries=$((tries + 1))
+ sleep 1
+ done
;;
- *)
- err "$main_domain: Cannot run in standalone mode; another daemon is listening on port 80."
- err "Disable other daemon or set webroot to continue."
- return 1
+ "")
+ debug "Nothing listening on port 80."
+ ;;
+ *)
+ err "$main_domain: Cannot run in standalone mode; another daemon is listening on port 80."
+ err "Disable other daemon or set webroot to continue."
+ return 1
;;
- esac
+ esac
+ done
iptables -I input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" || return 1
ip6tables -I input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" || return 1
iptables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null
ip6tables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null
- if [ -e /etc/init.d/uhttpd ] && [ -n "$UHTTPD_LISTEN_HTTP" ]; then
- uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
- uci commit uhttpd
+ if [ -e /etc/init.d/uhttpd ] && ( [ -n "$UHTTPD_LISTEN_HTTP" ] || [ $UPDATE_UHTTPD -eq 1 ] ); then
+ if [ -n "$UHTTPD_LISTEN_HTTP" ]; then
+ uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
+ uci commit uhttpd
+ UHTTPD_LISTEN_HTTP=
+ fi
/etc/init.d/uhttpd reload
- UHTTPD_LISTEN_HTTP=
+ fi
+
+ if [ -e /etc/init.d/nginx ] && ( [ "$NGINX_WEBSERVER" -eq 1 ] || [ $UPDATE_NGINX -eq 1 ] ); then
+ NGINX_WEBSERVER=0
+ /etc/init.d/nginx restart
fi
}
local enabled
local use_staging
local update_uhttpd
+ local update_nginx
local keylength
local domains
local main_domain
local moved_staging=0
local failed_dir
local webroot
+ local dns
config_get_bool enabled "$section" enabled 0
config_get_bool use_staging "$section" use_staging
config_get_bool update_uhttpd "$section" update_uhttpd
+ config_get_bool update_nginx "$section" update_nginx
config_get domains "$section" domains
config_get keylength "$section" keylength
config_get webroot "$section" webroot
+ config_get dns "$section" dns
+
+ UPDATE_NGINX=$update_nginx
+ UPDATE_UHTTPD=$update_uhttpd
[ "$enabled" -eq "1" ] || return
set -- $domains
main_domain=$1
- [ -n "$webroot" ] || pre_checks "$main_domain" || return 1
+ [ -n "$webroot" ] || [ -n "$dns" ] || pre_checks "$main_domain" || return 1
log "Running ACME for $main_domain"
[ -n "$ACCOUNT_EMAIL" ] && acme_args="$acme_args --accountemail $ACCOUNT_EMAIL"
[ "$use_staging" -eq "1" ] && acme_args="$acme_args --staging"
- if [ -z "$webroot" ]; then
+ if [ -n "$dns" ]; then
+ log "Using dns mode"
+ acme_args="$acme_args --dns $dns"
+ elif [ -z "$webroot" ]; then
log "Using standalone mode"
- acme_args="$acme_args --standalone"
+ acme_args="$acme_args --standalone --listen-v6"
else
if [ ! -d "$webroot" ]; then
err "$main_domain: Webroot dir '$webroot' does not exist!"
acme_args="$acme_args --webroot $webroot"
fi
+ handle_credentials() {
+ local credential="$1"
+ eval export $credential
+ }
+ config_list_foreach "$section" credentials handle_credentials
+
if ! $ACME --home "$STATE_DIR" --issue $acme_args; then
failed_dir="$STATE_DIR/${main_domain}.failed-$(date +%s)"
err "Issuing cert for $main_domain failed. Moving state to $failed_dir"
err "Restoring staging certificate"
mv "$STATE_DIR/${main_domain}.staging" "$STATE_DIR/${main_domain}"
fi
+ post_checks
return 1
fi
- if [ "$update_uhttpd" -eq "1" ]; then
+ if [ -e /etc/init.d/uhttpd ] && [ "$update_uhttpd" -eq "1" ]; then
uci set uhttpd.main.key="$STATE_DIR/${main_domain}/${main_domain}.key"
uci set uhttpd.main.cert="$STATE_DIR/${main_domain}/fullchain.cer"
# commit and reload is in post_checks
fi
+ if [ -e /etc/init.d/nginx ] && [ "$update_nginx" -eq "1" ]; then
+ sed -i "s#ssl_certificate\ .*#ssl_certificate $STATE_DIR/${main_domain}/fullchain.cer;#g" /etc/nginx/nginx.conf
+ sed -i "s#ssl_certificate_key\ .*#ssl_certificate_key $STATE_DIR/${main_domain}/${main_domain}.key;#g" /etc/nginx/nginx.conf
+ # commit and reload is in post_checks
+ fi
+
post_checks
}
check_cron
[ -n "$CHECK_CRON" ] && exit 0
+[ -e "/var/run/acme_boot" ] && rm -f "/var/run/acme_boot" && exit 0
config_load acme
config_foreach load_vars acme
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
-PKG_VERSION:=3.5.1
-PKG_RELEASE:=1
+PKG_VERSION:=3.5.5
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
* [reg_ru](https://code.google.com/p/ruadlist)
* => regional blocklist for Russia, weekly updates, approx. 2.000 entries
* [shallalist](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default)
- * => daily updates, approx. 32.000 entries (a short description of all shallalist categories can be found [online](http://www.shallalist.de/categories.html))
+ * => daily updates, approx. 32.000 entries (a short description of all categories can be found [online](http://www.shallalist.de/categories.html))
* [spam404](http://www.spam404.com)
* => infrequent updates, approx. 5.000 entries
* [sysctl/cameleon](http://sysctl.org/cameleon)
* => weekly updates, approx. 21.000 entries
+ * [ut_capitole](https://dsi.ut-capitole.fr/blacklists) (categories "cryptojacking" "ddos" "malware" "phishing" "warez" enabled by default)
+ * => daily updates, approx. 64.000 entries (a short description of all categories can be found [online](https://dsi.ut-capitole.fr/blacklists/index_en.php))
+ * [urlhaus](https://urlhaus.abuse.ch)
+ * => numerous updates on the same day, approx. 3.500 entries
* [whocares](http://someonewhocares.org)
* => weekly updates, approx. 12.000 entries
* [winhelp](http://winhelp2002.mvps.org)
* => infrequent updates, approx. 15.000 entries
* [winspy](https://github.com/crazy-max/WindowsSpyBlocker)
* => infrequent updates, approx. 120 entries
+ * [youtube](https://api.hackertarget.com/hostsearch/?q=googlevideo.com)
+ * => dynamic request API to filter "random" youtube ad domains (experimental!), approx. 150 entries
* [yoyo](http://pgl.yoyo.org/adservers)
* => weekly updates, approx. 2.500 entries (enabled by default)
* [zeus tracker](https://zeustracker.abuse.ch)
* optional: add new adblock sources on your own, see example below
## Prerequisites
-* [OpenWrt](https://openwrt.org), tested with the stable release series (17.01.x) and with the latest OpenWrt snapshot
+* [OpenWrt](https://openwrt.org), tested with the stable release series (18.06) and with the latest snapshot
* a usual setup with an enabled dns backend at minimum - dump AP modes without a working dns backend are _not_ supported
* a download utility:
* to support all blocklist sources a full version (with ssl support) of 'wget', 'uclient-fetch' with one of the 'libustream-*' ssl libraries, 'aria2c' or 'curl' is required
## Installation & Usage
* install 'adblock' (_opkg install adblock_)
-* at minimum configure the appropriate dns backend ('dnsmasq' by default), the donwload utility and enable the adblock service in _/etc/config/adblock_
+* at minimum configure the appropriate dns backend ('dnsmasq' by default), the download utility and enable the adblock service in _/etc/config/adblock_
* control the adblock service manually with _/etc/init.d/adblock_ start/stop/restart/reload/suspend/resume/status or use the LuCI frontend
## LuCI adblock companion package
-* for easy management of the various blocklist sources and all other adblock options you should use the provided LuCI frontend
+* for easy management of the various blocklist sources and adblock runtime options you should use the provided LuCI frontend
* install 'luci-app-adblock' (_opkg install luci-app-adblock_)
* the application is located in LuCI under 'Services' menu
* adb\_forcedns => force dns requests to local resolver (bool/default: '0', disabled)
* adb\_forcesrt => force overall sort on low memory devices with less than 64 MB RAM (bool/default: '0', disabled)
* adb\_backup_mode => do not automatically update blocklists during startup, use backups instead (bool/default: '0', disabled)
- * adb\maxqueue => size of the download queue to handle downloads & list processing in parallel (int/default: '4')
+ * adb\_maxqueue => size of the download queue to handle downloads & list processing in parallel (int/default: '4')
* adb\_jail => builds an additional 'Jail' list (/tmp/adb_list.jail) to block access to all domains except those listed in the whitelist file (bool/default: '0', disabled)
* adb\_dnsflush => flush DNS cache after adblock processing, i.e. enable the old restart behavior (bool/default: '0', disabled)
* adb\_notify => send notification emails in case of a processing error or if the overall domain count is ≤ 0 (bool/default: '0', disabled)
/etc/init.d/adblock status
::: adblock runtime information
+ adblock_status : enabled
- + adblock_version : 3.5.0
- + overall_domains : 102324 (normal mode)
- + fetch_utility : /usr/bin/wget (built-in)
- + dns_backend : kresd (/etc/kresd)
- + last_rundate : 30.01.2018 21:24:11
- + system_release : Turris Omnia, OpenWrt omnia 15.05/3.9.4
+ + adblock_version : 3.5.5
+ + overall_domains : 97199 (backup mode)
+ + fetch_utility : /bin/uclient-fetch (libustream-ssl)
+ + dns_backend : unbound (/var/lib/unbound)
+ + last_rundate : 01.09.2018 07:09:16
+ + system_release : PC Engines APU, OpenWrt SNAPSHOT r7986-dc9388ac55
</code></pre>
**cronjob for a regular block list update (/etc/crontabs/root):**
config source 'adaway'
option adb_src 'https://adaway.org/hosts.txt'
- option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on mobile ads, infrequent updates, approx. 400 entries'
option enabled '1'
config source 'adguard'
option adb_src 'https://filters.adtidy.org/windows/filters/15.txt'
- option adb_src_rset 'BEGIN{FS=\"[/|^|\r]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([\/\^\r]|$)/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[/|^|\r]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+([\/\^\r]|$)/{print tolower(\$3)}'
option adb_src_desc 'combined adguard dns filter list, frequent updates, approx. 17.000 entries'
option enabled '0'
config source 'bitcoin'
option adb_src 'https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt'
- option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on malicious bitcoin mining sites, infrequent updates, approx. 80 entries'
option enabled '0'
config source 'blacklist'
option adb_src '/etc/adblock/adblock.blacklist'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'static local domain blacklist, always deny these domains'
option enabled '1'
config source 'disconnect'
option adb_src 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'mozilla driven blocklist, numerous updates on the same day, approx. 4.700 entries'
option enabled '1'
config source 'dshield'
option adb_src 'https://www.dshield.org/feeds/suspiciousdomains_Low.txt'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'generic blocklist, daily updates, approx. 3.500 entries'
option enabled '0'
config source 'feodo'
option adb_src 'https://feodotracker.abuse.ch/blocklist/?download=domainblocklist'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'focus on feodo botnet, daily updates, approx. 0-10 entries'
option enabled '0'
config source 'hphosts'
option adb_src 'https://hosts-file.net/ad_servers.txt'
- option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|\$)+/{print tolower(\$2)}'
+ option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|\$)+/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, monthly updates, approx. 19.200 entries'
option enabled '0'
config source 'malware'
option adb_src 'https://mirror.espoch.edu.ec/malwaredomains/justdomains'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'broad blocklist, daily updates, approx. 18.300 entries'
option enabled '0'
config source 'malwarelist'
option adb_src 'http://www.malwaredomainlist.com/hostslist/hosts.txt'
- option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on malware, daily updates, approx. 1.200 entries'
option enabled '0'
config source 'openphish'
option adb_src 'https://openphish.com/feed.txt'
- option adb_src_rset 'BEGIN{FS=\"/\"}/^http[s]?:\/\/([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+(\/|$)/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"/\"}/^http[s]?:\/\/([[:alnum:]_-]+\.)+[[:alpha:]]+(\/|$)/{print tolower(\$3)}'
option adb_src_desc 'focus on phishing, numerous updates on the same day, approx. 2.400 entries'
option enabled '0'
config source 'ransomware'
option adb_src 'https://ransomwaretracker.abuse.ch/downloads/RW_DOMBL.txt'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
- option adb_src_desc 'focus on ransomware, numerous updates on the same day, approx. 1900 entries'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_desc 'focus on ransomware by abuse.ch, numerous updates on the same day, approx. 1900 entries'
option enabled '0'
config source 'reg_cn'
option adb_src 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on chinese ads plus generic easylist additions, daily updates, approx. 11.700 entries'
option enabled '0'
config source 'reg_cz'
option adb_src 'https://raw.githubusercontent.com/qxstyles/turris-hole-czech-block-list/master/turris-hole-czech-block-list'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'focus on czech ads maintained by Turris Omnia Users, infrequent updates, approx. 100 entries'
option enabled '0'
config source 'reg_de'
option adb_src 'https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on german ads plus generic easylist additions, daily updates, approx. 9.200 entries'
option enabled '0'
config source 'reg_id'
option adb_src 'https://easylist-downloads.adblockplus.org/abpindo+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on indonesian ads plus generic easylist additions, weekly updates, approx. 9.600 entries'
option enabled '0'
config source 'reg_nl'
option adb_src 'https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on dutch ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
option enabled '0'
config source 'reg_pl'
option adb_src 'http://adblocklist.org/adblock-pxf-polish.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on polish ads, daily updates, approx. 90 entries'
option enabled '0'
config source 'reg_ro'
option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
option enabled '0'
config source 'reg_ru'
option adb_src 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt'
- option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
+ option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on russian ads plus generic easylist additions, weekly updates, approx. 14.500 entries'
option enabled '0'
config source 'shalla'
option adb_src 'http://www.shallalist.de/Downloads/shallalist.tar.gz'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
- option adb_src_desc 'broad blocklist subdivided in different categories, daily updates, approx. 31.700 entries'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_desc 'huge blocklist archive subdivided in different categories, daily updates. Check http://www.shallalist.de/categories.html for more categories'
list adb_src_cat 'adv'
list adb_src_cat 'costtraps'
list adb_src_cat 'spyware'
config source 'spam404'
option adb_src 'https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}'
option adb_src_desc 'generic blocklist, infrequent updates, approx. 6.000 entries'
option enabled '0'
-config source 'sysctl'
+config source 'sysctl'
option adb_src 'http://sysctl.org/cameleon/hosts'
- option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, weekly updates, approx. 16.500 entries'
option enabled '0'
+config source 'urlhaus'
+ option adb_src 'https://urlhaus.abuse.ch/downloads/rpz'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}'
+ option adb_src_desc 'urlhaus RPZ domains by abuse.ch, numerous updates on the same day, approx. 3.500 entries'
+ option enabled '0'
+
+config source 'ut_capitole'
+ option adb_src 'https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_desc 'huge blocklist archive subdivided in different categories, daily updates. Check https://dsi.ut-capitole.fr/blacklists/index_en.php for more categories'
+ list adb_src_cat 'publicite'
+ list adb_src_cat 'cryptojacking'
+ list adb_src_cat 'ddos'
+ list adb_src_cat 'malware'
+ list adb_src_cat 'phishing'
+ list adb_src_cat 'warez'
+ option enabled '0'
+
config source 'whocares'
option adb_src 'http://someonewhocares.org/hosts/hosts'
- option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, weekly updates, approx. 10.000 entries'
option enabled '0'
config source 'winspy'
- option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/win10/spy.txt'
- option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt'
+ option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on windows spy & telemetry domains, infrequent updates, approx. 300 entries'
option enabled '0'
config source 'winhelp'
option adb_src 'http://winhelp2002.mvps.org/hosts.txt'
- option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
+ option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, infrequent updates, approx. 13.000 entries'
option enabled '0'
+config source 'youtube'
+ option adb_src 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com'
+ option adb_src_rset 'BEGIN{FS=\",\"}/^(r[0-9]+\.){1,1}([[:alnum:]_-]+\.)+[[:alpha:]]+/{sub(/\./,\"---\");print tolower(\$1)}'
+ option adb_src_desc 'focus on youtube ad-related subdomains, dynamic request API, approx. 150 entries'
+ option enabled '0'
+
config source 'yoyo'
option adb_src 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'focus on ad related domains, weekly updates, approx. 2.400 entries'
option enabled '1'
config source 'zeus'
option adb_src 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist'
- option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
- option adb_src_desc 'focus on zeus botnet, daily updates, approx. 400 entries'
+ option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
+ option adb_src_desc 'focus on zeus botnet by abuse.ch, daily updates, approx. 400 entries'
option enabled '0'
boot()
{
- adb_boot=1
- rc_procd start_service
+ adb_boot=1
+ rc_procd start_service
}
start_service()
{
- if [ $("${adb_init}" enabled; printf "%u" ${?}) -eq 0 ]
- then
- if [ -n "${adb_boot}" ]
- then
- local trigger="$(uci_get adblock global adb_trigger)"
- if [ "${trigger}" != "timed" ]
- then
- return 0
- fi
- fi
- procd_open_instance "adblock"
- procd_set_param command "${adb_script}" "${@}"
- procd_set_param pidfile "${adb_pidfile}"
- procd_set_param stdout 1
- procd_set_param stderr 1
- procd_close_instance
- fi
+ if [ $("${adb_init}" enabled; printf "%u" ${?}) -eq 0 ]
+ then
+ if [ -n "${adb_boot}" ]
+ then
+ local trigger="$(uci_get adblock global adb_trigger)"
+ if [ "${trigger}" != "timed" ]
+ then
+ return 0
+ fi
+ fi
+ local nice="$(uci_get adblock extra adb_nice)"
+ procd_open_instance "adblock"
+ procd_set_param command "${adb_script}" "${@}"
+ procd_set_param pidfile "${adb_pidfile}"
+ procd_set_param nice ${nice:-0}
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+ fi
}
reload_service()
{
- rc_procd start_service reload
+ rc_procd start_service reload
}
stop_service()
{
- rc_procd "${adb_script}" stop
- rc_procd start_service
+ rc_procd "${adb_script}" stop
+ rc_procd start_service
}
restart()
{
- rc_procd start_service restart
+ rc_procd start_service restart
}
suspend()
{
- [ -s "${adb_pidfile}" ] && return 1
- rc_procd "${adb_script}" suspend
+ [ -s "${adb_pidfile}" ] && return 1
+ rc_procd "${adb_script}" suspend
}
resume()
{
- [ -s "${adb_pidfile}" ] && return 1
- rc_procd "${adb_script}" resume
+ [ -s "${adb_pidfile}" ] && return 1
+ rc_procd "${adb_script}" resume
}
query()
{
- [ -s "${adb_pidfile}" ] && return 1
- rc_procd "${adb_script}" query "${1}"
+ [ -s "${adb_pidfile}" ] && return 1
+ rc_procd "${adb_script}" query "${1}"
}
status()
{
- local key keylist value rtfile="$(uci_get adblock extra adb_rtfile)"
+ local key keylist value rtfile="$(uci_get adblock extra adb_rtfile)"
- rtfile="${rtfile:-"/tmp/adb_runtime.json"}"
- if [ -s "${rtfile}" ]
- then
- printf "%s\n" "::: adblock runtime information"
- json_load "$(cat "${rtfile}" 2>/dev/null)"
- json_select data
- json_get_keys keylist
- for key in ${keylist}
- do
- json_get_var value "${key}"
- printf " + %-15s : %s\n" "${key}" "${value}"
- done
- else
- printf "%s\n" "::: no adblock runtime information available"
- fi
+ rtfile="${rtfile:-"/tmp/adb_runtime.json"}"
+ if [ -s "${rtfile}" ]
+ then
+ printf "%s\n" "::: adblock runtime information"
+ json_load_file "${rtfile}"
+ json_select data
+ json_get_keys keylist
+ for key in ${keylist}
+ do
+ json_get_var value "${key}"
+ printf " + %-15s : %s\n" "${key}" "${value}"
+ done
+ else
+ printf "%s\n" "::: no adblock runtime information available"
+ fi
}
service_triggers()
{
- local trigger="$(uci_get adblock global adb_trigger)"
- local delay="$(uci_get adblock extra adb_triggerdelay)"
+ local trigger="$(uci_get adblock global adb_trigger)"
+ local delay="$(uci_get adblock extra adb_triggerdelay)"
- if [ "${trigger}" != "none" ] && [ "${trigger}" != "timed" ]
- then
- PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
- procd_add_interface_trigger "interface.*.up" "${trigger}" "${adb_init}" start
- fi
- procd_add_reload_trigger "adblock"
+ if [ "${trigger}" != "none" ] && [ "${trigger}" != "timed" ]
+ then
+ PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
+ procd_add_interface_trigger "interface.*.up" "${trigger}" "${adb_init}" start
+ fi
+ procd_add_reload_trigger "adblock"
}
#!/bin/sh
#
-# adblock send mail script for mstmp
+# adblock send mail script for msmtp
# written by Dirk Brenken (dev@brenken.org)
-# Please note: you have to install and configure the package 'mstmp' before using this script.
+# Please note: you have to install and configure the package 'msmtp' before using this script.
# This is free software, licensed under the GNU General Public License v3.
# You should have received a copy of the GNU General Public License
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-mail_ver="1.0.2"
+mail_ver="1.0.4"
mail_daemon="$(command -v msmtp)"
mail_profile="adb_notify"
#mail_debug="--debug"
mail_rc=1
+# mail header & mail receiver check
+#
+mail_receiver=""
+mail_sender="no-reply@adblock"
+mail_topic="${HOSTNAME}: adblock notification"
+mail_head="From: ${mail_sender}\nTo: ${mail_receiver}\nSubject: ${mail_topic}\nReply-to: ${mail_sender}\nMime-Version: 1.0\nContent-Type: text/html\nContent-Disposition: inline\n\n"
+
+if [ -z "${mail_receiver}" ]
+then
+ logger -p "err" -t "adblock-notify-${mail_ver}[${$}]" "please supply/customize the 'mail_receiver' in '/etc/adblock/adblock.notify'"
+ exit ${mail_rc}
+fi
+
# mail daemon check
#
if [ ! -x "${mail_daemon}" ]
then
- mail_daemon="$(command -v sendmail)"
+ mail_daemon="$(command -v sendmail)"
fi
# info preparation
adb_info="$(/etc/init.d/adblock status 2>/dev/null)"
if [ -f "/var/log/messages" ]
then
- log_info="$(awk '/adblock-/{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}' /var/log/messages)"
+ log_info="$(awk '/adblock-/{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}' /var/log/messages)"
else
- log_info="$(logread -e "adblock-" | awk '{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
+ log_info="$(logread -e "adblock-" | awk '{NR=1;max=79;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max),"↵"} else {print " ",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
fi
-# mail header
-#
-mail_sender="no-reply@adblock"
-mail_receiver="!!!ChangeMe!!!"
-mail_topic="adblock notification"
-mail_head="From: ${mail_sender}\nTo: ${mail_receiver}\nSubject: ${mail_topic}\nReply-to: ${mail_sender}\nMime-Version: 1.0\nContent-Type: text/html\nContent-Disposition: inline\n\n"
-
# mail body
#
mail_text="<html><body><pre style='display:block;font-family:monospace;font-size:1rem;padding:20;background-color:#f3eee5;white-space:pre'>"
#
if [ -x "${mail_daemon}" ]
then
- printf "%b" "${mail_head}${mail_text}" 2>/dev/null | "${mail_daemon}" ${mail_debug} -a "${mail_profile}" "${mail_receiver}" >/dev/null 2>&1
- mail_rc=${?}
- logger -p "info" -t "adblock-notify-[${mail_ver}]" "mail sent to '${mail_receiver}' with rc '${mail_rc}'"
+ printf "%b" "${mail_head}${mail_text}" 2>/dev/null | "${mail_daemon}" ${mail_debug} -a "${mail_profile}" "${mail_receiver}" >/dev/null 2>&1
+ mail_rc=${?}
+ logger -p "info" -t "adblock-notify-${mail_ver}[${$}]" "mail sent to '${mail_receiver}' with rc '${mail_rc}'"
else
- logger -p "err" -t "adblock-notify-[${mail_ver}]" "msmtp mail daemon not found"
+ logger -p "err" -t "adblock-notify-${mail_ver}[${$}]" "msmtp mail daemon not found"
fi
exit ${mail_rc}
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-adb_ver="3.5.1"
+adb_ver="3.5.5-2"
adb_sysver="unknown"
adb_enabled=0
adb_debug=0
adb_hashutil="$(command -v sha256sum)"
adb_hashold=""
adb_hashnew=""
-adb_cnt=0
+adb_cnt=""
adb_rc=0
adb_action="${1:-"start"}"
adb_pidfile="/var/run/adblock.pid"
#
f_envload()
{
- local dns_up sys_call sys_desc sys_model sys_ver cnt=0
-
- # get system information
- #
- sys_call="$(ubus -S call system board 2>/dev/null)"
- if [ -n "${sys_call}" ]
- then
- sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')"
- sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')"
- sys_ver="$(cat /etc/turris-version 2>/dev/null)"
- if [ -n "${sys_ver}" ]
- then
- sys_desc="${sys_desc}/${sys_ver}"
- fi
- adb_sysver="${sys_model}, ${sys_desc}"
- fi
-
- # check hash utility
- #
- if [ ! -x "${adb_hashutil}" ]
- then
- adb_hashutil="$(command -v md5sum)"
- fi
-
- # source in system libraries
- #
- if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]
- then
- . "/lib/functions.sh"
- . "/usr/share/libubox/jshn.sh"
- else
- f_log "err" "system libraries not found"
- fi
-
- # parse 'global' and 'extra' section by callback
- #
- config_cb()
- {
- local type="${1}"
- if [ "${type}" = "adblock" ]
- then
- option_cb()
- {
- local option="${1}"
- local value="${2}"
- eval "${option}=\"${value}\""
- }
- else
- reset_cb
- fi
- }
-
- # parse 'source' typed sections
- #
- parse_config()
- {
- local value opt section="${1}" options="enabled adb_src adb_src_rset adb_src_cat"
- eval "adb_sources=\"${adb_sources} ${section}\""
- for opt in ${options}
- do
- config_get value "${section}" "${opt}"
- if [ -n "${value}" ]
- then
- eval "${opt}_${section}=\"${value}\""
- fi
- done
- }
-
- # load adblock config
- #
- config_load adblock
- config_foreach parse_config source
-
- # check dns backend
- #
- case "${adb_dns}" in
- dnsmasq)
- adb_dnsinstance="${adb_dnsinstance:-"0"}"
- adb_dnsuser="${adb_dnsuser:-"dnsmasq"}"
- adb_dnsdir="${adb_dnsdir:-"/tmp"}"
- adb_dnsheader=""
- adb_dnsdeny="awk '{print \"server=/\"\$0\"/\"}'"
- if [ ${adb_jail} -eq 1 ]
- then
- adb_dnsallow="awk '{print \"server=/\"\$0\"/#\"}'"
- adb_dnshalt="server=/#/"
- fi
- ;;
- unbound)
- adb_dnsinstance="${adb_dnsinstance:-"0"}"
- adb_dnsuser="${adb_dnsuser:-"unbound"}"
- adb_dnsdir="${adb_dnsdir:-"/var/lib/unbound"}"
- adb_dnsheader=""
- adb_dnsdeny="awk '{print \"local-zone: \042\"\$0\"\042 static\"}'"
- if [ ${adb_jail} -eq 1 ]
- then
- adb_dnsallow="awk '{print \"local-zone: \042\"\$0\"\042 transparent\"}'"
- adb_dnshalt="local-zone: \".\" static"
- fi
- ;;
- named)
- adb_dnsinstance="${adb_dnsinstance:-"0"}"
- adb_dnsuser="${adb_dnsuser:-"bind"}"
- adb_dnsdir="${adb_dnsdir:-"/var/lib/bind"}"
- adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'" IN NS localhost."
- adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'"
- if [ ${adb_jail} -eq 1 ]
- then
- adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'"
- adb_dnshalt="* CNAME ."
- fi
- ;;
- kresd)
- adb_dnsinstance="${adb_dnsinstance:-"0"}"
- adb_dnsuser="${adb_dnsuser:-"root"}"
- adb_dnsdir="${adb_dnsdir:-"/etc/kresd"}"
- adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'" IN NS localhost."
- adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'"
- if [ ${adb_jail} -eq 1 ]
- then
- adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'"
- adb_dnshalt="* CNAME ."
- fi
- ;;
- dnscrypt-proxy)
- adb_dnsinstance="${adb_dnsinstance:-"0"}"
- adb_dnsuser="${adb_dnsuser:-"nobody"}"
- adb_dnsdir="${adb_dnsdir:-"/tmp"}"
- adb_dnsheader=""
- adb_dnsdeny="awk '{print \$0}'"
- ;;
- esac
-
- # check adblock status
- #
- if [ ${adb_enabled} -eq 0 ]
- then
- f_extconf
- f_temp
- f_rmdns
- f_jsnup
- f_log "info" "adblock is currently disabled, please set adb_enabled to '1' to use this service"
- exit 0
- fi
-
- if [ -d "${adb_dnsdir}" ] && [ ! -f "${adb_dnsdir}/${adb_dnsfile}" ]
- then
- printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
- fi
-
- if [ "${adb_action}" = "start" ] && [ "${adb_trigger}" = "timed" ]
- then
- sleep ${adb_triggerdelay}
- fi
-
- while [ ${cnt} -le 30 ]
- do
- dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" 2>/dev/null | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running" 2>/dev/null)"
- if [ "${dns_up}" = "true" ]
- then
- break
- fi
- sleep 1
- cnt=$((cnt+1))
- done
-
- if [ -z "${adb_dns}" ] || [ -z "${adb_dnsdeny}" ] || [ ! -x "$(command -v ${adb_dns})" ] || [ ! -d "${adb_dnsdir}" ]
- then
- f_log "err" "'${adb_dns}' not running, DNS backend not found"
- fi
+ local dns_up sys_call sys_desc sys_model sys_ver cnt=0
+
+ # get system information
+ #
+ sys_call="$(ubus -S call system board 2>/dev/null)"
+ if [ -n "${sys_call}" ]
+ then
+ sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')"
+ sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')"
+ sys_ver="$(cat /etc/turris-version 2>/dev/null)"
+ if [ -n "${sys_ver}" ]
+ then
+ sys_desc="${sys_desc}/${sys_ver}"
+ fi
+ adb_sysver="${sys_model}, ${sys_desc}"
+ fi
+
+ # check hash utility
+ #
+ if [ ! -x "${adb_hashutil}" ]
+ then
+ adb_hashutil="$(command -v md5sum)"
+ fi
+
+ # parse 'global' and 'extra' section by callback
+ #
+ config_cb()
+ {
+ local type="${1}"
+ if [ "${type}" = "adblock" ]
+ then
+ option_cb()
+ {
+ local option="${1}"
+ local value="${2}"
+ eval "${option}=\"${value}\""
+ }
+ else
+ reset_cb
+ fi
+ }
+
+ # parse 'source' typed sections
+ #
+ parse_config()
+ {
+ local value opt section="${1}" options="enabled adb_src adb_src_rset adb_src_cat"
+ eval "adb_sources=\"${adb_sources} ${section}\""
+ for opt in ${options}
+ do
+ config_get value "${section}" "${opt}"
+ if [ -n "${value}" ]
+ then
+ eval "${opt}_${section}=\"${value}\""
+ fi
+ done
+ }
+
+ # load adblock config
+ #
+ config_load adblock
+ config_foreach parse_config source
+
+ # check dns backend
+ #
+ case "${adb_dns}" in
+ dnsmasq)
+ adb_dnsinstance="${adb_dnsinstance:-"0"}"
+ adb_dnsuser="${adb_dnsuser:-"dnsmasq"}"
+ adb_dnsdir="${adb_dnsdir:-"/tmp"}"
+ adb_dnsheader=""
+ adb_dnsdeny="awk '{print \"server=/\"\$0\"/\"}'"
+ adb_dnsallow="awk '{print \"server=/\"\$0\"/#\"}'"
+ adb_dnshalt="server=/#/"
+ ;;
+ unbound)
+ adb_dnsinstance="${adb_dnsinstance:-"0"}"
+ adb_dnsuser="${adb_dnsuser:-"unbound"}"
+ adb_dnsdir="${adb_dnsdir:-"/var/lib/unbound"}"
+ adb_dnsheader=""
+ adb_dnsdeny="awk '{print \"local-zone: \042\"\$0\"\042 static\"}'"
+ adb_dnsallow="awk '{print \"local-zone: \042\"\$0\"\042 transparent\"}'"
+ adb_dnshalt="local-zone: \".\" static"
+ ;;
+ named)
+ adb_dnsinstance="${adb_dnsinstance:-"0"}"
+ adb_dnsuser="${adb_dnsuser:-"bind"}"
+ adb_dnsdir="${adb_dnsdir:-"/var/lib/bind"}"
+ adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'" IN NS localhost."
+ adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'"
+ adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'"
+ adb_dnshalt="* CNAME ."
+ ;;
+ kresd)
+ adb_dnsinstance="${adb_dnsinstance:-"0"}"
+ adb_dnsuser="${adb_dnsuser:-"root"}"
+ adb_dnsdir="${adb_dnsdir:-"/etc/kresd"}"
+ adb_dnsheader="\$TTL 2h"$'\n'"@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)"$'\n'" IN NS localhost."
+ adb_dnsdeny="awk '{print \"\"\$0\" CNAME .\n*.\"\$0\" CNAME .\"}'"
+ adb_dnsallow="awk '{print \"\"\$0\" CNAME rpz-passthru.\n*.\"\$0\" CNAME rpz-passthru.\"}'"
+ adb_dnshalt="* CNAME ."
+ ;;
+ dnscrypt-proxy)
+ adb_dnsinstance="${adb_dnsinstance:-"0"}"
+ adb_dnsuser="${adb_dnsuser:-"nobody"}"
+ adb_dnsdir="${adb_dnsdir:-"/tmp"}"
+ adb_dnsheader=""
+ adb_dnsdeny="awk '{print \$0}'"
+ adb_dnsallow=""
+ adb_dnshalt=""
+ ;;
+ esac
+
+ # check adblock status
+ #
+ if [ ${adb_enabled} -eq 0 ]
+ then
+ f_extconf
+ f_temp
+ f_rmdns
+ f_jsnup "disabled"
+ f_log "info" "adblock is currently disabled, please set adb_enabled to '1' to use this service"
+ exit 0
+ fi
+
+ if [ -d "${adb_dnsdir}" ] && [ ! -f "${adb_dnsdir}/${adb_dnsfile}" ]
+ then
+ printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+ fi
+
+ if [ "${adb_action}" = "start" ] && [ "${adb_trigger}" = "timed" ]
+ then
+ sleep ${adb_triggerdelay}
+ fi
+
+ while [ ${cnt} -le 30 ]
+ do
+ dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" 2>/dev/null | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running" 2>/dev/null)"
+ if [ "${dns_up}" = "true" ]
+ then
+ break
+ fi
+ sleep 1
+ cnt=$((cnt+1))
+ done
+
+ if [ "${dns_up}" != "true" ] || [ -z "${adb_dns}" ] || [ ! -x "$(command -v ${adb_dns})" ]
+ then
+ f_log "err" "'${adb_dns}' not running or not executable"
+ elif [ ! -d "${adb_dnsdir}" ]
+ then
+ f_log "err" "'${adb_dnsdir}' backend directory not found"
+ fi
}
# check environment
#
f_envcheck()
{
- local ssl_lib
-
- # check external uci config files
- #
- f_extconf
-
- # check fetch utility
- #
- case "${adb_fetchutil}" in
- uclient-fetch)
- if [ -f "/lib/libustream-ssl.so" ]
- then
- adb_fetchparm="${adb_fetchparm:-"--timeout=10 --no-check-certificate -O"}"
- ssl_lib="libustream-ssl"
- else
- adb_fetchparm="${adb_fetchparm:-"--timeout=10 -O"}"
- fi
- ;;
- wget)
- adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O"}"
- ssl_lib="built-in"
- ;;
- wget-nossl)
- adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 -O"}"
- ;;
- busybox)
- adb_fetchparm="${adb_fetchparm:-"-O"}"
- ;;
- curl)
- adb_fetchparm="${adb_fetchparm:-"--connect-timeout 10 --insecure -o"}"
- ssl_lib="built-in"
- ;;
- aria2c)
- adb_fetchparm="${adb_fetchparm:-"--timeout=10 --allow-overwrite=true --auto-file-renaming=false --check-certificate=false -o"}"
- ssl_lib="built-in"
- ;;
- esac
- adb_fetchutil="$(command -v "${adb_fetchutil}")"
-
- if [ ! -x "${adb_fetchutil}" ] || [ -z "${adb_fetchutil}" ] || [ -z "${adb_fetchparm}" ]
- then
- f_log "err" "download utility not found, please install 'uclient-fetch' with 'libustream-mbedtls' or the full 'wget' package"
- fi
- adb_fetchinfo="${adb_fetchutil} (${ssl_lib:-"-"})"
-
- f_temp
- f_jsnup "running"
- f_log "info" "start adblock processing (${adb_action})"
+ local ssl_lib
+
+ # startup message
+ #
+ f_log "info" "adblock instance started ::: action: ${adb_action}, priority: ${adb_nice:-"0"}, pid: ${$}"
+ f_jsnup "running"
+
+ # check external uci config files
+ #
+ f_extconf
+
+ # check fetch utility
+ #
+ case "${adb_fetchutil}" in
+ uclient-fetch)
+ if [ -f "/lib/libustream-ssl.so" ]
+ then
+ adb_fetchparm="${adb_fetchparm:-"--timeout=10 --no-check-certificate -O"}"
+ ssl_lib="libustream-ssl"
+ else
+ adb_fetchparm="${adb_fetchparm:-"--timeout=10 -O"}"
+ fi
+ ;;
+ wget)
+ adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 --no-check-certificate -O"}"
+ ssl_lib="built-in"
+ ;;
+ wget-nossl)
+ adb_fetchparm="${adb_fetchparm:-"--no-cache --no-cookies --max-redirect=0 --timeout=10 -O"}"
+ ;;
+ busybox)
+ adb_fetchparm="${adb_fetchparm:-"-O"}"
+ ;;
+ curl)
+ adb_fetchparm="${adb_fetchparm:-"--connect-timeout 10 --insecure -o"}"
+ ssl_lib="built-in"
+ ;;
+ aria2c)
+ adb_fetchparm="${adb_fetchparm:-"--timeout=10 --allow-overwrite=true --auto-file-renaming=false --check-certificate=false -o"}"
+ ssl_lib="built-in"
+ ;;
+ esac
+ adb_fetchutil="$(command -v "${adb_fetchutil}")"
+
+ if [ ! -x "${adb_fetchutil}" ] || [ -z "${adb_fetchutil}" ] || [ -z "${adb_fetchparm}" ]
+ then
+ f_log "err" "download utility not found, please install 'uclient-fetch' with 'libustream-mbedtls' or the full 'wget' package"
+ fi
+ adb_fetchinfo="${adb_fetchutil} (${ssl_lib:-"-"})"
+ f_temp
}
-# create temporay files and directories
+# create temporary files and directories
#
f_temp()
{
- if [ -z "${adb_tmpdir}" ]
- then
- adb_tmpdir="$(mktemp -p /tmp -d)"
- adb_tmpload="$(mktemp -p ${adb_tmpdir} -tu)"
- adb_tmpfile="$(mktemp -p ${adb_tmpdir} -tu)"
- fi
- if [ ! -s "${adb_pidfile}" ]
- then
- printf '%s' "${$}" > "${adb_pidfile}"
- fi
+ if [ -z "${adb_tmpdir}" ]
+ then
+ adb_tmpdir="$(mktemp -p /tmp -d)"
+ adb_tmpload="$(mktemp -p ${adb_tmpdir} -tu)"
+ adb_tmpfile="$(mktemp -p ${adb_tmpdir} -tu)"
+ fi
+ if [ ! -s "${adb_pidfile}" ]
+ then
+ printf '%s' "${$}" > "${adb_pidfile}"
+ fi
}
-# remove temporay files and directories
+# remove temporary files and directories
#
f_rmtemp()
{
- if [ -d "${adb_tmpdir}" ]
- then
- rm -rf "${adb_tmpdir}"
- fi
- > "${adb_pidfile}"
+ if [ -d "${adb_tmpdir}" ]
+ then
+ rm -rf "${adb_tmpdir}"
+ fi
+ > "${adb_pidfile}"
}
# remove dns related files and directories
#
f_rmdns()
{
- if [ -n "${adb_dns}" ]
- then
- f_hash
- printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
- > "${adb_dnsdir}/.${adb_dnsfile}"
- > "${adb_rtfile}"
- rm -f "${adb_backupdir}/${adb_dnsprefix}"*.gz
- f_hash
- if [ ${?} -eq 1 ]
- then
- f_dnsup
- fi
- f_rmtemp
- fi
- f_log "debug" "f_rmdns::: dns: ${adb_dns}, dns_dir: ${adb_dnsdir}, dns_prefix: ${adb_dnsprefix}, dns_file: ${adb_dnsfile}, rt_file: ${adb_rtfile}, backup_dir: ${adb_backupdir}"
+ if [ -n "${adb_dns}" ]
+ then
+ f_hash
+ printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+ > "${adb_dnsdir}/.${adb_dnsfile}"
+ > "${adb_rtfile}"
+ rm -f "${adb_backupdir}/${adb_dnsprefix}"*.gz
+ f_hash
+ if [ ${?} -eq 1 ]
+ then
+ f_dnsup
+ fi
+ f_rmtemp
+ fi
+ f_log "debug" "f_rmdns::: dns: ${adb_dns}, dns_dir: ${adb_dnsdir}, dns_prefix: ${adb_dnsprefix}, dns_file: ${adb_dnsfile}, rt_file: ${adb_rtfile}, backup_dir: ${adb_backupdir}"
}
# commit uci changes
#
f_uci()
{
- local change config="${1}"
-
- if [ -n "${config}" ]
- then
- change="$(uci -q changes "${config}" | awk '{ORS=" "; print $0}')"
- if [ -n "${change}" ]
- then
- uci -q commit "${config}"
- case "${config}" in
- firewall)
- /etc/init.d/firewall reload >/dev/null 2>&1
- ;;
- *)
- /etc/init.d/"${adb_dns}" reload >/dev/null 2>&1
- ;;
- esac
- fi
- fi
- f_log "debug" "f_uci ::: config: ${config}, change: ${change}"
+ local change config="${1}"
+
+ if [ -n "${config}" ]
+ then
+ change="$(uci -q changes "${config}" | awk '{ORS=" "; print $0}')"
+ if [ -n "${change}" ]
+ then
+ uci_commit "${config}"
+ case "${config}" in
+ firewall)
+ /etc/init.d/firewall reload >/dev/null 2>&1
+ ;;
+ *)
+ /etc/init.d/"${adb_dns}" reload >/dev/null 2>&1
+ ;;
+ esac
+ fi
+ fi
+ f_log "debug" "f_uci ::: config: ${config}, change: ${change}"
}
# list/overall count
#
f_count()
{
- local mode="${1}"
-
- adb_cnt=0
- if [ -s "${adb_dnsdir}/${adb_dnsfile}" ] && ([ -z "${mode}" ] || [ "${mode}" = "final" ])
- then
- if [ "${adb_dns}" = "named" ] || [ "${adb_dns}" = "kresd" ]
- then
- adb_cnt="$(( ($(wc -l 2>/dev/null < "${adb_dnsdir}/${adb_dnsfile}") - $(printf "%s" "${adb_dnsheader}" | grep -c "^")) / 2 ))"
- else
- adb_cnt="$(wc -l 2>/dev/null < "${adb_dnsdir}/${adb_dnsfile}")"
- fi
- elif [ "${mode}" = "whitelist" ] && [ -s "${adb_tmpdir}/tmp.whitelist" ]
- then
- adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.whitelist")"
- elif [ -s "${adb_tmpfile}" ]
- then
- adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpfile}")"
- fi
+ local mode="${1}"
+
+ adb_cnt=0
+ if [ -s "${adb_dnsdir}/${adb_dnsfile}" ] && ([ -z "${mode}" ] || [ "${mode}" = "final" ])
+ then
+ adb_cnt="$(( $(wc -l 2>/dev/null < "${adb_dnsdir}/${adb_dnsfile}") - $(wc -l 2>/dev/null < "${adb_tmpdir}/tmp.add_whitelist") ))"
+ if [ "${adb_dns}" = "named" ] || [ "${adb_dns}" = "kresd" ]
+ then
+ adb_cnt="$(( (${adb_cnt} - $(printf '%s' "${adb_dnsheader}" | grep -c "^")) / 2 ))"
+ fi
+ elif [ -s "${adb_tmpfile}" ]
+ then
+ adb_cnt="$(wc -l 2>/dev/null < "${adb_tmpfile}")"
+ fi
}
# set external config options
#
f_extconf()
{
- local uci_config
-
- case "${adb_dns}" in
- dnsmasq)
- uci_config="dhcp"
- if [ ${adb_enabled} -eq 1 ] && [ -z "$(uci -q get dhcp.@dnsmasq[${adb_dnsinstance}].serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
- then
- uci -q set dhcp.@dnsmasq[${adb_dnsinstance}].serversfile="${adb_dnsdir}/${adb_dnsfile}"
- elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci -q get dhcp.@dnsmasq[${adb_dnsinstance}].serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
- then
- uci -q delete dhcp.@dnsmasq[${adb_dnsinstance}].serversfile
- fi
- ;;
- kresd)
- uci_config="resolver"
- if [ ${adb_enabled} -eq 1 ] && [ -z "$(uci -q get resolver.kresd.rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
- then
- uci -q add_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}"
- elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci -q get resolver.kresd.rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
- then
- uci -q del_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}"
- fi
- if [ ${adb_enabled} -eq 1 ] && [ ${adb_dnsflush} -eq 0 ] && [ "$(uci -q get resolver.kresd.keep_cache)" != "1" ]
- then
- uci -q set resolver.kresd.keep_cache="1"
- elif [ ${adb_enabled} -eq 0 ] || ([ ${adb_dnsflush} -eq 1 ] && [ "$(uci -q get resolver.kresd.keep_cache)" = "1" ])
- then
- uci -q set resolver.kresd.keep_cache="0"
- fi
- ;;
- esac
- f_uci "${uci_config}"
-
- uci_config="firewall"
- if [ ${adb_enabled} -eq 1 ] && [ ${adb_forcedns} -eq 1 ] && \
- [ -z "$(uci -q get firewall.adblock_dns)" ] && [ $(/etc/init.d/firewall enabled; printf "%u" ${?}) -eq 0 ]
- then
- uci -q set firewall.adblock_dns="redirect"
- uci -q set firewall.adblock_dns.name="Adblock DNS"
- uci -q set firewall.adblock_dns.src="lan"
- uci -q set firewall.adblock_dns.proto="tcp udp"
- uci -q set firewall.adblock_dns.src_dport="53"
- uci -q set firewall.adblock_dns.dest_port="53"
- uci -q set firewall.adblock_dns.target="DNAT"
- elif [ -n "$(uci -q get firewall.adblock_dns)" ] && ([ ${adb_enabled} -eq 0 ] || [ ${adb_forcedns} -eq 0 ])
- then
- uci -q delete firewall.adblock_dns
- fi
- f_uci "${uci_config}"
+ local uci_config port port_list="53 853 5353"
+
+ case "${adb_dns}" in
+ dnsmasq)
+ uci_config="dhcp"
+ if [ ${adb_enabled} -eq 1 ] && [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+ then
+ uci_set dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile "${adb_dnsdir}/${adb_dnsfile}"
+ elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+ then
+ uci_remove dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile
+ fi
+ ;;
+ kresd)
+ uci_config="resolver"
+ if [ ${adb_enabled} -eq 1 ] && [ -z "$(uci_get resolver kresd rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+ then
+ uci -q add_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}"
+ elif [ ${adb_enabled} -eq 0 ] && [ -n "$(uci_get resolver kresd rpz_file | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ]
+ then
+ uci -q del_list resolver.kresd.rpz_file="${adb_dnsdir}/${adb_dnsfile}"
+ fi
+ if [ ${adb_enabled} -eq 1 ] && [ ${adb_dnsflush} -eq 0 ] && [ "$(uci_get resolver kresd keep_cache)" != "1" ]
+ then
+ uci_set resolver kresd keep_cache "1"
+ elif [ ${adb_enabled} -eq 0 ] || ([ ${adb_dnsflush} -eq 1 ] && [ "$(uci_get resolver kresd keep_cache)" = "1" ])
+ then
+ uci_set resolver kresd keep_cache "0"
+ fi
+ ;;
+ esac
+ f_uci "${uci_config}"
+
+ uci_config="firewall"
+ if [ ${adb_enabled} -eq 1 ] && [ ${adb_forcedns} -eq 1 ] && \
+ [ -z "$(uci_get firewall adblock_dns_53)" ] && [ $(/etc/init.d/firewall enabled; printf '%u' ${?}) -eq 0 ]
+ then
+ for port in ${port_list}
+ do
+ uci_add firewall "redirect" "adblock_dns_${port}"
+ uci_set firewall "adblock_dns_${port}" "name" "Adblock DNS, port ${port}"
+ uci_set firewall "adblock_dns_${port}" "src" "lan"
+ uci_set firewall "adblock_dns_${port}" "proto" "tcp udp"
+ uci_set firewall "adblock_dns_${port}" "src_dport" "${port}"
+ uci_set firewall "adblock_dns_${port}" "dest_port" "${port}"
+ uci_set firewall "adblock_dns_${port}" "target" "DNAT"
+ done
+ elif [ -n "$(uci_get firewall adblock_dns_53)" ] && ([ ${adb_enabled} -eq 0 ] || [ ${adb_forcedns} -eq 0 ])
+ then
+ for port in ${port_list}
+ do
+ uci_remove firewall "adblock_dns_${port}"
+ done
+ fi
+ f_uci "${uci_config}"
}
# restart of the dns backend
#
f_dnsup()
{
- local dns_up cache_util cache_rc cnt=0
-
- if [ ${adb_dnsflush} -eq 0 ] && [ ${adb_enabled} -eq 1 ] && [ "${adb_rc}" -eq 0 ]
- then
- case "${adb_dns}" in
- dnsmasq)
- killall -q -HUP "${adb_dns}"
- cache_rc=${?}
- ;;
- unbound)
- cache_util="$(command -v unbound-control)"
- if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -f "${adb_dnsdir}"/unbound.conf ]
- then
- "${cache_util}" -c "${adb_dnsdir}"/unbound.conf dump_cache > "${adb_tmpdir}"/adb_cache.dump 2>/dev/null
- fi
- "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
- ;;
- kresd)
- cache_util="keep_cache"
- "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
- cache_rc=${?}
- ;;
- named)
- cache_util="$(command -v rndc)"
- if [ -x "${cache_util}" ] && [ -f /etc/bind/rndc.conf ]
- then
- "${cache_util}" -c /etc/bind/rndc.conf reload >/dev/null 2>&1
- cache_rc=${?}
- else
- "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
- fi
- ;;
- *)
- "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
- ;;
- esac
- else
- "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
- fi
-
- adb_rc=1
- while [ ${cnt} -le 10 ]
- do
- dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running")"
- if [ "${dns_up}" = "true" ]
- then
- case "${adb_dns}" in
- unbound)
- cache_util="$(command -v unbound-control)"
- if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -s "${adb_tmpdir}"/adb_cache.dump ]
- then
- while [ ${cnt} -le 10 ]
- do
- "${cache_util}" -c "${adb_dnsdir}"/unbound.conf load_cache < "${adb_tmpdir}"/adb_cache.dump >/dev/null 2>&1
- cache_rc=${?}
- if [ ${cache_rc} -eq 0 ]
- then
- break
- fi
- cnt=$((cnt+1))
- sleep 1
- done
- fi
- ;;
- esac
- adb_rc=0
- break
- fi
- cnt=$((cnt+1))
- sleep 1
- done
- f_log "debug" "f_dnsup::: cache_util: ${cache_util:-"-"}, cache_rc: ${cache_rc:-"-"}, cache_flush: ${adb_dnsflush}, cache_cnt: ${cnt}, rc: ${adb_rc}"
- return ${adb_rc}
+ local dns_up cache_util cache_rc cnt=0
+
+ if [ ${adb_dnsflush} -eq 0 ] && [ ${adb_enabled} -eq 1 ] && [ "${adb_rc}" -eq 0 ]
+ then
+ case "${adb_dns}" in
+ dnsmasq)
+ killall -q -HUP "${adb_dns}"
+ cache_rc=${?}
+ ;;
+ unbound)
+ cache_util="$(command -v unbound-control)"
+ if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -f "${adb_dnsdir}"/unbound.conf ]
+ then
+ "${cache_util}" -c "${adb_dnsdir}"/unbound.conf dump_cache > "${adb_tmpdir}"/adb_cache.dump 2>/dev/null
+ fi
+ "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+ ;;
+ kresd)
+ cache_util="keep_cache"
+ "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+ cache_rc=${?}
+ ;;
+ named)
+ cache_util="$(command -v rndc)"
+ if [ -x "${cache_util}" ] && [ -f /etc/bind/rndc.conf ]
+ then
+ "${cache_util}" -c /etc/bind/rndc.conf reload >/dev/null 2>&1
+ cache_rc=${?}
+ else
+ "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+ fi
+ ;;
+ *)
+ "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+ ;;
+ esac
+ else
+ "/etc/init.d/${adb_dns}" restart >/dev/null 2>&1
+ fi
+
+ adb_rc=1
+ while [ ${cnt} -le 10 ]
+ do
+ dns_up="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running")"
+ if [ "${dns_up}" = "true" ]
+ then
+ case "${adb_dns}" in
+ unbound)
+ cache_util="$(command -v unbound-control)"
+ if [ -x "${cache_util}" ] && [ -d "${adb_tmpdir}" ] && [ -s "${adb_tmpdir}"/adb_cache.dump ]
+ then
+ while [ ${cnt} -le 10 ]
+ do
+ "${cache_util}" -c "${adb_dnsdir}"/unbound.conf load_cache < "${adb_tmpdir}"/adb_cache.dump >/dev/null 2>&1
+ cache_rc=${?}
+ if [ ${cache_rc} -eq 0 ]
+ then
+ break
+ fi
+ cnt=$((cnt+1))
+ sleep 1
+ done
+ fi
+ ;;
+ esac
+ adb_rc=0
+ break
+ fi
+ cnt=$((cnt+1))
+ sleep 1
+ done
+ f_log "debug" "f_dnsup::: cache_util: ${cache_util:-"-"}, cache_rc: ${cache_rc:-"-"}, cache_flush: ${adb_dnsflush}, cache_cnt: ${cnt}, rc: ${adb_rc}"
+ return ${adb_rc}
}
# backup/restore/remove blocklists
#
f_list()
{
- local file mode="${1}" in_rc="${adb_rc}"
-
- case "${mode}" in
- backup)
- if [ -d "${adb_backupdir}" ]
- then
- gzip -cf "${adb_tmpfile}" 2>/dev/null > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
- adb_rc=${?}
- fi
- ;;
- restore)
- if [ -d "${adb_backupdir}" ] && [ -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ]
- then
- gunzip -cf "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" 2>/dev/null > "${adb_tmpfile}"
- adb_rc=${?}
- fi
- ;;
- remove)
- if [ -d "${adb_backupdir}" ]
- then
- rm -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
- fi
- adb_rc=${?}
- ;;
- merge)
- for file in "${adb_tmpfile}".*
- do
- cat "${file}" 2>/dev/null >> "${adb_tmpdir}/${adb_dnsfile}"
- if [ ${?} -ne 0 ]
- then
- adb_rc=${?}
- break
- fi
- rm -f "${file}"
- done
- adb_tmpfile="${adb_tmpdir}/${adb_dnsfile}"
- ;;
- final)
- if [ -s "${adb_tmpdir}/tmp.whitelist" ]
- then
- grep -vf "${adb_tmpdir}/tmp.whitelist" "${adb_tmpdir}/${adb_dnsfile}" | eval "${adb_dnsdeny}" > "${adb_dnsdir}/${adb_dnsfile}"
- else
- eval "${adb_dnsdeny}" "${adb_tmpdir}/${adb_dnsfile}" > "${adb_dnsdir}/${adb_dnsfile}"
- fi
- if [ ${?} -eq 0 ] && [ -n "${adb_dnsheader}" ]
- then
- printf '%s\n' "${adb_dnsheader}" | cat - "${adb_dnsdir}/${adb_dnsfile}" > "${adb_tmpdir}/${adb_dnsfile}"
- cat "${adb_tmpdir}/${adb_dnsfile}" > "${adb_dnsdir}/${adb_dnsfile}"
- fi
- adb_rc=${?}
- ;;
- esac
- f_count "${mode}"
- f_log "debug" "f_list ::: name: ${src_name:-"-"}, mode: ${mode}, cnt: ${adb_cnt}, in_rc: ${in_rc}, out_rc: ${adb_rc}"
+ local file mode="${1}" in_rc="${adb_rc}"
+
+ case "${mode}" in
+ backup)
+ if [ -d "${adb_backupdir}" ]
+ then
+ gzip -cf "${adb_tmpfile}" 2>/dev/null > "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
+ adb_rc=${?}
+ fi
+ ;;
+ restore)
+ if [ -d "${adb_backupdir}" ] && [ -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" ]
+ then
+ gunzip -cf "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz" 2>/dev/null > "${adb_tmpfile}"
+ adb_rc=${?}
+ fi
+ ;;
+ remove)
+ if [ -d "${adb_backupdir}" ]
+ then
+ rm -f "${adb_backupdir}/${adb_dnsprefix}.${src_name}.gz"
+ fi
+ adb_rc=${?}
+ ;;
+ merge)
+ for file in "${adb_tmpfile}".*
+ do
+ cat "${file}" 2>/dev/null >> "${adb_tmpdir}/${adb_dnsfile}"
+ if [ ${?} -ne 0 ]
+ then
+ adb_rc=${?}
+ break
+ fi
+ rm -f "${file}"
+ done
+ adb_tmpfile="${adb_tmpdir}/${adb_dnsfile}"
+ ;;
+ final)
+ > "${adb_dnsdir}/${adb_dnsfile}"
+
+ if [ -s "${adb_tmpdir}/tmp.add_whitelist" ]
+ then
+ cat "${adb_tmpdir}/tmp.add_whitelist" >> "${adb_dnsdir}/${adb_dnsfile}"
+ fi
+
+ if [ -s "${adb_tmpdir}/tmp.rem_whitelist" ]
+ then
+ grep -vf "${adb_tmpdir}/tmp.rem_whitelist" "${adb_tmpdir}/${adb_dnsfile}" | eval "${adb_dnsdeny}" >> "${adb_dnsdir}/${adb_dnsfile}"
+ else
+ eval "${adb_dnsdeny}" "${adb_tmpdir}/${adb_dnsfile}" >> "${adb_dnsdir}/${adb_dnsfile}"
+ fi
+
+ if [ ${?} -eq 0 ] && [ -n "${adb_dnsheader}" ]
+ then
+ printf '%s\n' "${adb_dnsheader}" | cat - "${adb_dnsdir}/${adb_dnsfile}" > "${adb_tmpdir}/${adb_dnsfile}"
+ mv -f "${adb_tmpdir}/${adb_dnsfile}" "${adb_dnsdir}/${adb_dnsfile}"
+ fi
+ adb_rc=${?}
+ ;;
+ esac
+ f_count "${mode}"
+ f_log "debug" "f_list ::: name: ${src_name:-"-"}, mode: ${mode}, cnt: ${adb_cnt}, in_rc: ${in_rc}, out_rc: ${adb_rc}"
}
# top level domain compression
#
f_tld()
{
- local cnt cnt_srt cnt_tld source="${1}" temp="${1}.tld"
-
- cnt="$(wc -l 2>/dev/null < "${source}")"
- sort -u "${source}" > "${temp}"
- if [ ${?} -eq 0 ]
- then
- cnt_srt="$(wc -l 2>/dev/null < "${temp}")"
- awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${temp}" > "${source}"
- if [ ${?} -eq 0 ]
- then
- sort "${source}" > "${temp}"
- if [ ${?} -eq 0 ]
- then
- awk '{if(NR==1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "${temp}" > "${source}"
- if [ ${?} -eq 0 ]
- then
- awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${source}" > "${temp}"
- if [ ${?} -eq 0 ]
- then
- sort "${temp}" > "${source}"
- if [ ${?} -eq 0 ]
- then
- cnt_tld="$(wc -l 2>/dev/null < "${source}")"
- else
- cat "${temp}" > "${source}"
- fi
- fi
- else
- cat "${temp}" > "${source}"
- fi
- fi
- else
- cat "${temp}" > "${source}"
- fi
- fi
- rm -f "${temp}"
- f_log "debug" "f_tld ::: source: ${source}, cnt: ${cnt:-"-"}, cnt_srt: ${cnt_srt:-"-"}, cnt_tld: ${cnt_tld:-"-"}"
+ local cnt cnt_srt cnt_tld source="${1}" temp="${1}.tld"
+
+ cnt="$(wc -l 2>/dev/null < "${source}")"
+ awk 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${source}" > "${temp}"
+ if [ ${?} -eq 0 ]
+ then
+ sort -u "${temp}" > "${source}"
+ if [ ${?} -eq 0 ]
+ then
+ cnt_srt="$(wc -l 2>/dev/null < "${source}")"
+ awk '{if(NR==1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "${source}" > "${temp}"
+ if [ ${?} -eq 0 ]
+ then
+ awk 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${temp}" > "${source}"
+ if [ ${?} -eq 0 ]
+ then
+ cnt_tld="$(wc -l 2>/dev/null < "${source}")"
+ else
+ mv -f "${temp}" > "${source}"
+ fi
+ fi
+ else
+ mv -f "${temp}" "${source}"
+ fi
+ fi
+ f_log "debug" "f_tld ::: source: ${source}, cnt: ${cnt:-"-"}, cnt_srt: ${cnt_srt:-"-"}, cnt_tld: ${cnt_tld:-"-"}"
}
# blocklist hash compare
#
f_hash()
{
- local hash hash_rc=1
-
- if [ -x "${adb_hashutil}" ] && [ -f "${adb_dnsdir}/${adb_dnsfile}" ]
- then
- hash="$(${adb_hashutil} "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null | awk '{print $1}')"
- if [ -z "${adb_hashold}" ] && [ -n "${hash}" ]
- then
- adb_hashold="${hash}"
- elif [ -z "${adb_hashnew}" ] && [ -n "${hash}" ]
- then
- adb_hashnew="${hash}"
- fi
- if [ -n "${adb_hashold}" ] && [ -n "${adb_hashnew}" ]
- then
- if [ "${adb_hashold}" = "${adb_hashnew}" ]
- then
- hash_rc=0
- fi
- adb_hashold=""
- adb_hashnew=""
- fi
- fi
- f_log "debug" "f_hash ::: hash_util: ${adb_hashutil}, hash: ${hash}, out_rc: ${hash_rc}"
- return ${hash_rc}
+ local hash hash_rc=1
+
+ if [ -x "${adb_hashutil}" ] && [ -f "${adb_dnsdir}/${adb_dnsfile}" ]
+ then
+ hash="$(${adb_hashutil} "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null | awk '{print $1}')"
+ if [ -z "${adb_hashold}" ] && [ -n "${hash}" ]
+ then
+ adb_hashold="${hash}"
+ elif [ -z "${adb_hashnew}" ] && [ -n "${hash}" ]
+ then
+ adb_hashnew="${hash}"
+ fi
+ if [ -n "${adb_hashold}" ] && [ -n "${adb_hashnew}" ]
+ then
+ if [ "${adb_hashold}" = "${adb_hashnew}" ]
+ then
+ hash_rc=0
+ fi
+ adb_hashold=""
+ adb_hashnew=""
+ fi
+ fi
+ f_log "debug" "f_hash ::: hash_util: ${adb_hashutil}, hash: ${hash}, out_rc: ${hash_rc}"
+ return ${hash_rc}
}
# suspend/resume adblock processing
#
f_switch()
{
- local mode="${1}"
-
- if [ ! -s "${adb_dnsdir}/.${adb_dnsfile}" ] && [ "${mode}" = "suspend" ]
- then
- f_hash
- cat "${adb_dnsdir}/${adb_dnsfile}" > "${adb_dnsdir}/.${adb_dnsfile}"
- printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
- f_hash
- elif [ -s "${adb_dnsdir}/.${adb_dnsfile}" ] && [ "${mode}" = "resume" ]
- then
- f_hash
- cat "${adb_dnsdir}/.${adb_dnsfile}" > "${adb_dnsdir}/${adb_dnsfile}"
- > "${adb_dnsdir}/.${adb_dnsfile}"
- f_hash
- fi
- if [ ${?} -eq 1 ]
- then
- f_temp
- f_dnsup
- f_jsnup "${mode}"
- f_log "info" "${mode} adblock processing"
- f_rmtemp
- exit 0
- fi
+ local mode="${1}"
+
+ if [ ! -s "${adb_dnsdir}/.${adb_dnsfile}" ] && [ "${mode}" = "suspend" ]
+ then
+ f_hash
+ cat "${adb_dnsdir}/${adb_dnsfile}" > "${adb_dnsdir}/.${adb_dnsfile}"
+ printf '%s\n' "${adb_dnsheader}" > "${adb_dnsdir}/${adb_dnsfile}"
+ f_hash
+ elif [ -s "${adb_dnsdir}/.${adb_dnsfile}" ] && [ "${mode}" = "resume" ]
+ then
+ f_hash
+ cat "${adb_dnsdir}/.${adb_dnsfile}" > "${adb_dnsdir}/${adb_dnsfile}"
+ > "${adb_dnsdir}/.${adb_dnsfile}"
+ f_hash
+ fi
+ if [ ${?} -eq 1 ]
+ then
+ f_temp
+ f_dnsup
+ f_jsnup "${mode}"
+ f_log "info" "${mode} adblock processing"
+ f_rmtemp
+ exit 0
+ fi
}
# query blocklist for certain (sub-)domains
#
f_query()
{
- local search result field=1 domain="${1}" tld="${1#*.}"
-
- if [ -z "${domain}" ] || [ "${domain}" = "${tld}" ]
- then
- printf "%s\n" "::: invalid domain input, please submit a single domain, e.g. 'doubleclick.net'"
- else
- case "${adb_dns}" in
- dnsmasq)
- field=2
- ;;
- unbound)
- field=3
- ;;
- esac
- while [ "${domain}" != "${tld}" ]
- do
- search="${domain//./\.}"
- result="$(awk -F '/|\"| ' "/^($search|[^\*].*[\/\"\. ]+${search})/{i++;{printf(\" + %s\n\",\$${field})};if(i>9){printf(\" + %s\n\",\"[...]\");exit}}" "${adb_dnsdir}/${adb_dnsfile}")"
- printf "%s\n" "::: results for domain '${domain}'"
- printf "%s\n" "${result:-" - no match"}"
- domain="${tld}"
- tld="${domain#*.}"
- done
- fi
+ local search result prefix suffix field domain="${1}" tld="${1#*.}"
+
+ if [ -z "${domain}" ] || [ "${domain}" = "${tld}" ]
+ then
+ printf '%s\n' "::: invalid domain input, please submit a single domain, e.g. 'doubleclick.net'"
+ else
+ case "${adb_dns}" in
+ dnsmasq)
+ prefix=".*[\/\.]"
+ suffix="(\/)"
+ field=2
+ ;;
+ unbound)
+ prefix=".*[\"\.]"
+ suffix="(static)"
+ field=3
+ ;;
+ named)
+ prefix="[^\*].*[\.]"
+ suffix="( \.)"
+ field=1
+ ;;
+ kresd)
+ prefix="[^\*].*[\.]"
+ suffix="( \.)"
+ field=1
+ ;;
+ dnscrypt-proxy)
+ prefix=".*[\.]"
+ suffix=""
+ field=1
+ ;;
+ esac
+ while [ "${domain}" != "${tld}" ]
+ do
+ search="${domain//./\.}"
+ result="$(awk -F '/|\"| ' "/^($search|${prefix}+${search}.*${suffix}$)/{i++;{printf(\" + %s\n\",\$${field})};if(i>9){printf(\" + %s\n\",\"[...]\");exit}}" "${adb_dnsdir}/${adb_dnsfile}")"
+ printf '%s\n' "::: results for domain '${domain}'"
+ printf '%s\n' "${result:-" - no match"}"
+ domain="${tld}"
+ tld="${domain#*.}"
+ done
+ fi
}
# update runtime information
#
f_jsnup()
{
- local bg_pid rundate="$(/bin/date "+%d.%m.%Y %H:%M:%S")" status="${1:-"enabled"}" mode="normal mode" no_mail=0
-
- if [ ${adb_rc} -gt 0 ]
- then
- status="error"
- fi
- if [ ${adb_enabled} -eq 0 ]
- then
- status="disabled"
- fi
- if [ "${status}" = "suspend" ]
- then
- status="paused"
- fi
- if [ "${status}" = "resume" ]
- then
- no_mail=1
- status="enabled"
- fi
- if [ "${status}" = "enabled" ]
- then
- f_count
- fi
-
- if [ ${adb_backup_mode} -eq 1 ]
- then
- mode="backup mode"
- fi
-
- if [ -z "${adb_fetchinfo}" ] && [ -s "${adb_rtfile}" ]
- then
- json_load "$(cat "${adb_rtfile}" 2>/dev/null)"
- json_select data
- json_get_var adb_fetchinfo "fetch_utility"
- fi
-
- json_init
- json_add_object "data"
- json_add_string "adblock_status" "${status}"
- json_add_string "adblock_version" "${adb_ver}"
- json_add_string "overall_domains" "${adb_cnt} (${mode})"
- json_add_string "fetch_utility" "${adb_fetchinfo:-"-"}"
- json_add_string "dns_backend" "${adb_dns} (${adb_dnsdir})"
- json_add_string "last_rundate" "${rundate:-"-"}"
- json_add_string "system_release" "${adb_sysver}"
- json_close_object
- json_dump > "${adb_rtfile}"
-
- if [ ${adb_notify} -eq 1 ] && [ ${no_mail} -eq 0 ] && [ -x /etc/adblock/adblock.notify ] && \
- ([ "${status}" = "error" ] || ([ "${status}" = "enabled" ] && [ ${adb_cnt} -le ${adb_notifycnt} ]))
- then
- (/etc/adblock/adblock.notify >/dev/null 2>&1) &
- bg_pid=${!}
- fi
- f_log "debug" "f_jsnup::: status: ${status}, mode: ${mode}, cnt: ${adb_cnt}, notify: ${adb_notify}, notify_cnt: ${adb_notifycnt}, notify_pid: ${bg_pid:-"-"}"
+ local run_time bg_pid status="${1:-"enabled"}" mode="normal mode" no_mail=0
+
+ if [ ${adb_rc} -gt 0 ]
+ then
+ status="error"
+ run_time="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+ fi
+ if [ "${status}" = "enabled" ]
+ then
+ run_time="$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+ fi
+ if [ "${status}" = "suspend" ]
+ then
+ status="paused"
+ fi
+ if [ "${status}" = "resume" ]
+ then
+ no_mail=1
+ status="enabled"
+ fi
+ if [ ${adb_backup_mode} -eq 1 ]
+ then
+ mode="backup mode"
+ fi
+
+ if [ -z "${adb_fetchinfo}" ]
+ then
+ json_get_var adb_fetchinfo "fetch_utility"
+ fi
+ if [ -z "${adb_cnt}" ]
+ then
+ json_get_var adb_cnt "overall_domains"
+ adb_cnt="${adb_cnt%% *}"
+ fi
+ if [ -z "${run_time}" ]
+ then
+ json_get_var run_time "last_rundate"
+ fi
+ json_add_string "adblock_status" "${status}"
+ json_add_string "adblock_version" "${adb_ver}"
+ json_add_string "overall_domains" "${adb_cnt:-0} (${mode})"
+ json_add_string "fetch_utility" "${adb_fetchinfo:-"-"}"
+ json_add_string "dns_backend" "${adb_dns} (${adb_dnsdir})"
+ json_add_string "last_rundate" "${run_time:-"-"}"
+ json_add_string "system_release" "${adb_sysver}"
+ json_dump > "${adb_rtfile}"
+
+ if [ ${adb_notify} -eq 1 ] && [ ${no_mail} -eq 0 ] && [ -x /etc/adblock/adblock.notify ] && \
+ ([ "${status}" = "error" ] || ([ "${status}" = "enabled" ] && [ ${adb_cnt} -le ${adb_notifycnt} ]))
+ then
+ (/etc/adblock/adblock.notify >/dev/null 2>&1) &
+ bg_pid=${!}
+ fi
+ f_log "debug" "f_jsnup::: status: ${status}, mode: ${mode}, cnt: ${adb_cnt}, notify: ${adb_notify}, notify_cnt: ${adb_notifycnt}, notify_pid: ${bg_pid:-"-"}"
}
# write to syslog
#
f_log()
{
- local class="${1}" log_msg="${2}"
-
- if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${adb_debug} -eq 1 ])
- then
- logger -p "${class}" -t "adblock-[${adb_ver}]" "${log_msg}"
- if [ "${class}" = "err" ]
- then
- f_rmdns
- f_jsnup
- logger -p "${class}" -t "adblock-[${adb_ver}]" "Please also check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md' (${adb_sysver})"
- exit 1
- fi
- fi
+ local class="${1}" log_msg="${2}"
+
+ if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${adb_debug} -eq 1 ])
+ then
+ logger -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
+ if [ "${class}" = "err" ]
+ then
+ f_rmdns
+ f_jsnup
+ logger -p "${class}" -t "adblock-${adb_ver}[${$}]" "Please also check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'"
+ exit 1
+ fi
+ fi
}
# main function for blocklist processing
#
f_main()
{
- local tmp_load tmp_file src_name src_rset src_arc src_log mem_total mem_free enabled url cnt=1
-
- mem_total="$(awk '/^MemTotal/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
- mem_free="$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
- tmp_load="${adb_tmpload}"
- tmp_file="${adb_tmpfile}"
- > "${adb_dnsdir}/.${adb_dnsfile}"
- > "${adb_tmpdir}/tmp.whitelist"
- f_log "debug" "f_main ::: dns: ${adb_dns}, fetch_util: ${adb_fetchinfo}, backup: ${adb_backup}, backup_mode: ${adb_backup_mode}, dns_jail: ${adb_jail}, force_srt: ${adb_forcesrt}, force_dns: ${adb_forcedns}, mem_total: ${mem_total:-0}, mem_free: ${mem_free:-0}, max_queue: ${adb_maxqueue}"
-
- # prepare whitelist entries
- #
- if [ -s "${adb_whitelist}" ]
- then
- adb_whitelist_rset="/^([^([:space:]|\#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\.\",\"\\\.\",\$1);print tolower(\"^\"\$1\"\\\|\\\.\"\$1)}"
- awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.whitelist"
- f_list whitelist
- if [ ${adb_jail} -eq 1 ] && [ "${adb_dns}" != "dnscrypt-proxy" ]
- then
- adb_whitelist_rset="/^([^([:space:]|\#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
- awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.dnsjail"
- fi
- fi
-
- # build 'dnsjail' list
- #
- if [ ${adb_jail} -eq 1 ] && [ "${adb_dns}" != "dnscrypt-proxy" ]
- then
- f_tld "${adb_tmpdir}/tmp.dnsjail"
- eval "${adb_dnsallow}" "${adb_tmpdir}/tmp.dnsjail" > "/tmp/${adb_dnsjail}"
- printf '%s\n' "${adb_dnshalt}" >> "/tmp/${adb_dnsjail}"
- if [ -n "${adb_dnsheader}" ]
- then
- printf '%s\n' "${adb_dnsheader}" | cat - "/tmp/${adb_dnsjail}" > "${adb_tmpdir}/tmp.dnsjail"
- cat "${adb_tmpdir}/tmp.dnsjail" > "/tmp/${adb_dnsjail}"
- fi
- fi
-
- # main loop
- #
- for src_name in ${adb_sources}
- do
- eval "enabled=\"\${enabled_${src_name}}\""
- eval "url=\"\${adb_src_${src_name}}\""
- eval "src_rset=\"\${adb_src_rset_${src_name}}\""
- adb_tmpload="${tmp_load}.${src_name}"
- adb_tmpfile="${tmp_file}.${src_name}"
-
- # basic pre-checks
- #
- f_log "debug" "f_main ::: name: ${src_name}, enabled: ${enabled}"
- if [ "${enabled}" != "1" ] || [ -z "${url}" ] || [ -z "${src_rset}" ]
- then
- f_list remove
- continue
- fi
-
- # backup mode
- #
- if [ ${adb_backup_mode} -eq 1 ] && [ "${adb_action}" = "start" ] && [ "${src_name}" != "blacklist" ]
- then
- f_list restore
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
- then
- if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
- then
- f_tld "${adb_tmpfile}"
- fi
- continue
- fi
- fi
-
- # download queue processing
- #
- if [ "${src_name}" = "blacklist" ]
- then
- if [ -s "${url}" ]
- then
- (
- src_log="$(cat "${url}" > "${adb_tmpload}" 2>&1)"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
- then
- awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
- then
- rm -f "${adb_tmpload}"
- f_list download
- if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
- then
- f_tld "${adb_tmpfile}"
- fi
- fi
- else
- src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
- f_log "debug" "f_main ::: name: ${src_name}, url: ${url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
- fi
- ) &
- else
- continue
- fi
- elif [ "${src_name}" = "shalla" ]
- then
- (
- src_arc="${adb_tmpdir}"/shallalist.tar.gz
- src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${src_arc}" "${url}" 2>&1)"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${src_arc}" ]
- then
- for category in ${adb_src_cat_shalla}
- do
- tar -xOzf "${src_arc}" "BL/${category}/domains" >> "${adb_tmpload}"
- adb_rc=${?}
- if [ ${adb_rc} -ne 0 ]
- then
- break
- fi
- done
- else
- src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
- f_log "debug" "f_main ::: name: ${src_name}, url: ${url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
- fi
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
- then
- rm -f "${src_arc}"
- awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
- then
- rm -f "${adb_tmpload}"
- f_list download
- if [ ${adb_backup} -eq 1 ]
- then
- f_list backup
- fi
- if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
- then
- f_tld "${adb_tmpfile}"
- fi
- elif [ ${adb_backup} -eq 1 ]
- then
- f_list restore
- fi
- elif [ ${adb_backup} -eq 1 ]
- then
- f_list restore
- fi
- ) &
- else
- (
- src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${adb_tmpload}" "${url}" 2>&1)"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
- then
- awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
- adb_rc=${?}
- if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
- then
- rm -f "${adb_tmpload}"
- f_list download
- if [ ${adb_backup} -eq 1 ]
- then
- f_list backup
- fi
- if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
- then
- f_tld "${adb_tmpfile}"
- fi
- elif [ ${adb_backup} -eq 1 ]
- then
- f_list restore
- fi
- else
- src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
- f_log "debug" "f_main ::: name: ${src_name}, url: ${url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
- if [ ${adb_backup} -eq 1 ]
- then
- f_list restore
- fi
- fi
- ) &
- fi
- hold=$(( cnt % adb_maxqueue ))
- if [ ${hold} -eq 0 ]
- then
- wait
- fi
- cnt=$(( cnt + 1 ))
- done
-
- # list merge
- #
- wait
- src_name="overall"
- adb_tmpfile="${tmp_file}"
- f_list merge
-
- # overall sort and conditional dns restart
- #
- f_hash
- if [ -s "${adb_tmpdir}/${adb_dnsfile}" ]
- then
- if ([ ${mem_total} -ge 64 ] && [ ${mem_free} -ge 40 ]) || [ ${adb_forcesrt} -eq 1 ]
- then
- f_tld "${adb_tmpdir}/${adb_dnsfile}"
- fi
- f_list final
- else
- > "${adb_dnsdir}/${adb_dnsfile}"
- fi
- chown "${adb_dnsuser}" "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null
- f_hash
- if [ ${?} -eq 1 ]
- then
- f_dnsup
- fi
- f_jsnup
- if [ ${?} -eq 0 ]
- then
- f_log "info" "blocklist with overall ${adb_cnt} domains loaded successfully (${adb_sysver})"
- else
- f_log "err" "dns backend restart with active blocklist failed"
- fi
- f_rmtemp
- exit ${adb_rc}
+ local tmp_load tmp_file src_name src_rset src_url src_log src_arc src_cat cat list entry suffix mem_total mem_free enabled cnt=1
+
+ mem_total="$(awk '/^MemTotal/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
+ mem_free="$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
+ tmp_load="${adb_tmpload}"
+ tmp_file="${adb_tmpfile}"
+ > "${adb_dnsdir}/.${adb_dnsfile}"
+ > "${adb_tmpdir}/tmp.raw_whitelist"
+ > "${adb_tmpdir}/tmp.add_whitelist"
+ > "${adb_tmpdir}/tmp.rem_whitelist"
+ f_log "debug" "f_main ::: dns: ${adb_dns}, fetch_util: ${adb_fetchinfo}, backup: ${adb_backup}, backup_mode: ${adb_backup_mode}, dns_jail: ${adb_jail}, force_srt: ${adb_forcesrt}, force_dns: ${adb_forcedns}, mem_total: ${mem_total:-0}, mem_free: ${mem_free:-0}, max_queue: ${adb_maxqueue}"
+
+ # prepare whitelist entries
+ #
+ if [ -s "${adb_whitelist}" ]
+ then
+ adb_whitelist_rset="/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
+ awk "${adb_whitelist_rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.raw_whitelist"
+ f_tld "${adb_tmpdir}/tmp.raw_whitelist"
+
+ adb_whitelist_rset="/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\.\",\"\\\.\",\$1);print tolower(\"^\"\$1\"\\\|\\\.\"\$1)}"
+ awk "${adb_whitelist_rset}" "${adb_tmpdir}/tmp.raw_whitelist" > "${adb_tmpdir}/tmp.rem_whitelist"
+
+ if [ -n "${adb_dnsallow}" ]
+ then
+ eval "${adb_dnsallow}" "${adb_tmpdir}/tmp.raw_whitelist" > "${adb_tmpdir}/tmp.add_whitelist"
+ fi
+ fi
+
+ # build 'dnsjail' list
+ #
+ if [ ${adb_jail} -eq 1 ]
+ then
+ cat "${adb_tmpdir}/tmp.add_whitelist" > "/tmp/${adb_dnsjail}"
+ printf '%s\n' "${adb_dnshalt}" >> "/tmp/${adb_dnsjail}"
+ if [ -n "${adb_dnsheader}" ]
+ then
+ printf '%s\n' "${adb_dnsheader}" | cat - "/tmp/${adb_dnsjail}" > "${adb_tmpdir}/tmp.dnsjail"
+ cat "${adb_tmpdir}/tmp.dnsjail" > "/tmp/${adb_dnsjail}"
+ fi
+ fi
+
+ # main loop
+ #
+ for src_name in ${adb_sources}
+ do
+ enabled="$(eval printf '%s' \"\${enabled_${src_name}\}\")"
+ src_url="$(eval printf '%s' \"\${adb_src_${src_name}\}\")"
+ src_rset="$(eval printf '%s' \"\${adb_src_rset_${src_name}\}\")"
+ src_cat="$(eval printf '%s' \"\${adb_src_cat_${src_name}\}\")"
+ adb_tmpload="${tmp_load}.${src_name}"
+ adb_tmpfile="${tmp_file}.${src_name}"
+
+ # basic pre-checks
+ #
+ f_log "debug" "f_main ::: name: ${src_name}, enabled: ${enabled}"
+ if [ "${enabled}" != "1" ] || [ -z "${src_url}" ] || [ -z "${src_rset}" ]
+ then
+ f_list remove
+ continue
+ fi
+
+ # backup mode
+ #
+ if [ ${adb_backup_mode} -eq 1 ] && [ "${adb_action}" = "start" ] && [ "${src_name}" != "blacklist" ]
+ then
+ f_list restore
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
+ then
+ if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
+ then
+ f_tld "${adb_tmpfile}"
+ fi
+ continue
+ fi
+ fi
+
+ # download queue processing
+ #
+ if [ "${src_name}" = "blacklist" ]
+ then
+ if [ -s "${src_url}" ]
+ then
+ (
+ src_log="$(cat "${src_url}" > "${adb_tmpload}" 2>&1)"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
+ then
+ awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
+ then
+ rm -f "${adb_tmpload}"
+ f_list download
+ if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
+ then
+ f_tld "${adb_tmpfile}"
+ fi
+ fi
+ else
+ src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
+ f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
+ fi
+ ) &
+ else
+ continue
+ fi
+ elif [ -n "${src_cat}" ]
+ then
+ (
+ src_arc="${adb_tmpdir}/${src_url##*/}"
+ src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${src_arc}" "${src_url}" 2>&1)"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${src_arc}" ]
+ then
+ list="$(tar -tzf "${src_arc}")"
+ suffix="$(eval printf '%s' \"\${adb_src_suffix_${src_name}:-\"domains\"\}\")"
+ for cat in ${src_cat}
+ do
+ entry="$(printf '%s' "${list}" | grep -E "[\^/]+${cat}/${suffix}")"
+ if [ -n "${entry}" ]
+ then
+ tar -xOzf "${src_arc}" "${entry}" >> "${adb_tmpload}"
+ adb_rc=${?}
+ if [ ${adb_rc} -ne 0 ]
+ then
+ break
+ fi
+ fi
+ done
+ else
+ src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
+ f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
+ fi
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
+ then
+ rm -f "${src_arc}"
+ awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
+ then
+ rm -f "${adb_tmpload}"
+ f_list download
+ if [ ${adb_backup} -eq 1 ]
+ then
+ f_list backup
+ fi
+ if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
+ then
+ f_tld "${adb_tmpfile}"
+ fi
+ elif [ ${adb_backup} -eq 1 ]
+ then
+ f_list restore
+ fi
+ elif [ ${adb_backup} -eq 1 ]
+ then
+ f_list restore
+ fi
+ ) &
+ else
+ (
+ src_log="$("${adb_fetchutil}" ${adb_fetchparm} "${adb_tmpload}" "${src_url}" 2>&1)"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpload}" ]
+ then
+ awk "${src_rset}" "${adb_tmpload}" 2>/dev/null > "${adb_tmpfile}"
+ adb_rc=${?}
+ if [ ${adb_rc} -eq 0 ] && [ -s "${adb_tmpfile}" ]
+ then
+ rm -f "${adb_tmpload}"
+ f_list download
+ if [ ${adb_backup} -eq 1 ]
+ then
+ f_list backup
+ fi
+ if ([ ${mem_total} -lt 64 ] || [ ${mem_free} -lt 40 ]) && [ ${adb_forcesrt} -eq 0 ]
+ then
+ f_tld "${adb_tmpfile}"
+ fi
+ elif [ ${adb_backup} -eq 1 ]
+ then
+ f_list restore
+ fi
+ else
+ src_log="$(printf '%s' "${src_log}" | awk '{ORS=" ";print $0}')"
+ f_log "debug" "f_main ::: name: ${src_name}, url: ${src_url}, rc: ${adb_rc}, log: ${src_log:-"-"}"
+ if [ ${adb_backup} -eq 1 ]
+ then
+ f_list restore
+ fi
+ fi
+ ) &
+ fi
+ hold=$(( cnt % adb_maxqueue ))
+ if [ ${hold} -eq 0 ]
+ then
+ wait
+ fi
+ cnt=$(( cnt + 1 ))
+ done
+
+ # list merge
+ #
+ wait
+ src_name="overall"
+ adb_tmpfile="${tmp_file}"
+ f_list merge
+
+ # overall sort and conditional dns restart
+ #
+ f_hash
+ if [ -s "${adb_tmpdir}/${adb_dnsfile}" ]
+ then
+ if ([ ${mem_total} -ge 64 ] && [ ${mem_free} -ge 40 ]) || [ ${adb_forcesrt} -eq 1 ]
+ then
+ f_tld "${adb_tmpdir}/${adb_dnsfile}"
+ fi
+ f_list final
+ else
+ > "${adb_dnsdir}/${adb_dnsfile}"
+ fi
+ chown "${adb_dnsuser}" "${adb_dnsdir}/${adb_dnsfile}" 2>/dev/null
+ f_hash
+ if [ ${?} -eq 1 ]
+ then
+ f_dnsup
+ fi
+ f_jsnup
+ if [ ${?} -eq 0 ]
+ then
+ f_log "info" "blocklist with overall ${adb_cnt} domains loaded successfully (${adb_sysver})"
+ else
+ f_log "err" "dns backend restart with active blocklist failed"
+ fi
+ f_rmtemp
+ exit ${adb_rc}
}
+# source required system libraries
+#
+if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]
+then
+ . "/lib/functions.sh"
+ . "/usr/share/libubox/jshn.sh"
+else
+ f_log "err" "system libraries not found"
+fi
+
+# initialize json runtime file
+#
+json_load_file "${adb_rtfile}" >/dev/null 2>&1
+json_select data >/dev/null 2>&1
+if [ ${?} -ne 0 ]
+then
+ > "${adb_rtfile}"
+ json_init
+ json_add_object "data"
+fi
+
# handle different adblock actions
#
f_envload
case "${adb_action}" in
- stop)
- f_rmdns
- ;;
- restart)
- f_rmdns
- f_envcheck
- f_main
- ;;
- suspend)
- f_switch suspend
- ;;
- resume)
- f_switch resume
- ;;
- query)
- f_query "${2}"
- ;;
- start|reload)
- f_envcheck
- f_main
- ;;
+ stop)
+ f_rmdns
+ ;;
+ restart)
+ f_rmdns
+ f_envcheck
+ f_main
+ ;;
+ suspend)
+ f_switch suspend
+ ;;
+ resume)
+ f_switch resume
+ ;;
+ query)
+ f_query "${2}"
+ ;;
+ start|reload)
+ f_envcheck
+ f_main
+ ;;
esac
include $(TOPDIR)/rules.mk
PKG_NAME:=addrwatch
-PKG_VERSION:=0.8
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.1
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-master.tar.gz
-PKG_SOURCE_URL:=https://github.com/fln/addrwatch/releases/download/$(PKG_VERSION)/
-PKG_HASH:=0455bd8d2e18a793e1182712bf4df3e54a5b7575f82f5b79b60deef19ff93df8
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/fln/addrwatch/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=be70150a357558481de8488665da1d6efdfa5dc37666d9fa68e8e73a8b59ade6
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-master
PKG_FIXUP:=autoreconf
PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
endef
define Package/addrwatch/description
- This is a tool similar to arpwatch. It main purpose is to monitor network and
+ This is a tool similar to arpwatch. It main purpose is to monitor network and
log discovered ethernet/ip pairings. Addrwatch is extremely useful in networks
with IPv6 autoconfiguration (RFC4862) enabled. It allows to track IPv6
addresses of hosts using IPv6 privacy extensions (RFC4941).
+diff --git a/configure.ac b/configure.ac
+index e70edc2..5d8b716 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -56,9 +56,6 @@ AC_CHECK_HEADERS([arpa/inet.h netinet/in
+@@ -58,9 +58,6 @@ AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stdint.h stdlib.h syslog.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_UINT32_T
AC_TYPE_UINT16_T
AC_TYPE_UINT8_T
+diff --git a/src/addrwatch.c b/src/addrwatch.c
+index 7647e02..93e1f61 100644
--- a/src/addrwatch.c
+++ b/src/addrwatch.c
-@@ -339,7 +339,7 @@ void reload_cb(evutil_socket_t fd, short
+@@ -327,7 +327,7 @@ void reload_cb(evutil_socket_t fd, short events, void *arg)
void reload_cb(int fd, short events, void *arg)
#endif
{
log_msg(LOG_DEBUG, "Reopening output files");
output_flatfile_reload();
-@@ -353,7 +353,7 @@ void stop_cb(evutil_socket_t fd, short e
+@@ -341,7 +341,7 @@ void stop_cb(evutil_socket_t fd, short events, void *arg)
void stop_cb(int fd, short events, void *arg)
#endif
{
--- a/src/addrwatch.c
+++ b/src/addrwatch.c
-@@ -492,7 +492,7 @@ int main(int argc, char *argv[])
+@@ -485,7 +485,7 @@ int main(int argc, char *argv[])
argp_parse(&argp, argc, argv, 0, &optind, 0);
if (!cfg.hostname) {
--- /dev/null
+From 3852468f402bf9070eb1c9bab16cb1119db52f63 Mon Sep 17 00:00:00 2001
+From: Julius Kriukas <julius@kriukas.lt>
+Date: Sun, 4 Feb 2018 21:35:52 +0200
+Subject: [PATCH] Add experimental meson build support
+
+---
+ src/storage.c | 2 +-
+ 1 file changed, 1 insertions(+), 1 deletion(-)
+
+diff --git a/src/storage.c b/src/storage.c
+index c162496..8b7a77e 100644
+--- a/src/storage.c
++++ b/src/storage.c
+@@ -76,7 +76,7 @@ struct ip_node *blacklist_match(uint8_t *ip_addr, uint8_t addr_len)
+ return NULL;
+ }
+
+-inline uint16_t pkt_hash(uint8_t *l2_addr, uint8_t *ip_addr, uint8_t len, uint16_t vlan_tag)
++static inline uint16_t pkt_hash(uint8_t *l2_addr, uint8_t *ip_addr, uint8_t len, uint16_t vlan_tag)
+ {
+ int i;
+ uint16_t sum;
+--
+2.17.1
+
PKG_NAME:=aircrack-ng
PKG_VERSION:=1.2-rc1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
--- /dev/null
+From 9a1846507ff043c397257206ff21adae90a122f4 Mon Sep 17 00:00:00 2001
+From: Thomas d'Otreppe <tdotreppe@aircrack-ng.org>
+Date: Wed, 21 Dec 2016 00:18:46 +0000
+Subject: [PATCH] Fixed compilation with OpenSSL 1.1.0 (Closes: #1711).
+
+git-svn-id: http://svn.aircrack-ng.org/trunk@2882 28c6078b-6c39-48e3-add9-af49d547ecab
+---
+ src/crypto.c | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+diff --git a/src/crypto.c b/src/crypto.c
+index c3318753..46fa9c52 100644
+--- a/src/crypto.c
++++ b/src/crypto.c
+@@ -288,7 +288,15 @@ void calc_pmk( char *key, char *essid_pre, unsigned char pmk[40] )
+ void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80], unsigned char mic[20]) {
+ int i;
+ unsigned char pke[100];
++ #if defined(USE_GCRYPT) || OPENSSL_VERSION_NUMBER < 0x10100000L
++ #define HMAC_USE_NO_PTR
++ #endif
++
++ #ifdef HMAC_USE_NO_PTR
+ HMAC_CTX ctx;
++ #else
++ HMAC_CTX * ctx;
++ #endif
+
+ memcpy( pke, "Pairwise key expansion", 23 );
+
+@@ -314,6 +322,7 @@ void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80],
+ memcpy( pke + 67, ap->wpa.snonce, 32 );
+ }
+
++ #ifdef HMAC_USE_NO_PTR
+ HMAC_CTX_init(&ctx);
+ HMAC_Init_ex(&ctx, pmk, 32, EVP_sha1(), NULL);
+ for(i = 0; i < 4; i++ )
+@@ -325,6 +334,20 @@ void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80],
+ HMAC_Final(&ctx, ptk + i*20, NULL);
+ }
+ HMAC_CTX_cleanup(&ctx);
++ #else
++ ctx = HMAC_CTX_new();
++ HMAC_Init_ex(ctx, pmk, 32, EVP_sha1(), NULL);
++ for(i = 0; i < 4; i++ )
++ {
++ pke[99] = i;
++ //HMAC(EVP_sha1(), values[0], 32, pke, 100, ptk + i * 20, NULL);
++ HMAC_Init_ex(ctx, 0, 0, 0, 0);
++ HMAC_Update(ctx, pke, 100);
++ HMAC_Final(ctx, ptk + i*20, NULL);
++ }
++ HMAC_CTX_free(ctx);
++ #endif
++ #undef HMAC_USE_NO_PTR
+
+ if( ap->wpa.keyver == 1 )
+ {
#
-# Copyright (C) 2012-2017 OpenWrt.org
+# Copyright (C) 2012-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=aria2
-PKG_VERSION:=1.33.0
+PKG_VERSION:=1.34.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/
-PKG_HASH:=996e3fc2fd07ce2dd517e20a1f79b8b3dbaa5c7e27953b5fc19dae38f3874b8c
+PKG_HASH:=3a44a802631606e138a9e172a3e9f5bcbaac43ce2895c1d8e2b46f30487e77a3
PKG_INSTALL:=1
PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>, \
if [ ."$check_certificate" = ."true" ]; then
append_setting "check-certificate=true"
append_options "ca_certificate"
+ elif [ ."$check_certificate" = ."false" ]; then
+ append_setting "check-certificate=false"
fi
if [ ."$enable_dht" = ."true" ]; then
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mayswind/AriaNg-DailyBuild
-PKG_SOURCE_DATE:=2018-02-21
-PKG_SOURCE_VERSION:=f71a67cbb034aebcd076db3fadc1b9d8cdc470c7
-PKG_MIRROR_HASH:=13b07acbe29a68929295a82deb5a0122d8a56e328f783b6bc1efe9c72b99a702
+PKG_SOURCE_DATE:=2018-08-11
+PKG_SOURCE_VERSION:=237335fd0e14d3614729052d0a44571c6340367e
+PKG_MIRROR_HASH:=263131aadc3dd784af1b9f3136910989ed6cb8ad99a89f82f45e41fa0b97db8d
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
-define Package/ariang
+define Package/ariang/default
SECTION:=net
CATEGORY:=Network
SUBMENU:=Download Manager
- DEPENDS:=+uhttpd +aria2
- TITLE:=AriaNg is a web frontend making aria2 easier to use.
+ DEPENDS:=+aria2
+ TITLE:=AriaNg webui
URL:=https://github.com/mayswind/AriaNg
PKGARCH:=all
endef
AriaNg is a web frontend making aria2 easier to use. AriaNg is written in pure html & javascript, thus it does not need any compilers or runtime environment.
endef
+Package/ariang-nginx/description = $(Package/ariang/description)
+
+define Package/ariang
+ $(Package/ariang/default)
+ DEPENDS += +uhttpd
+ TITLE += for uhttpd webserver
+endef
+
+define Package/ariang-nginx
+ $(Package/ariang/default)
+ DEPENDS += +nginx
+ TITLE += for nginx webserver
+endef
+
define Build/Compile
endef
$(1)/www/ariang
endef
+define Package/ariang-nginx/install
+ $(Package/ariang/install)
+ $(INSTALL_DIR) $(1)/etc/nginx
+ $(INSTALL_BIN) ./files/ariang.conf $(1)/etc/nginx/ariang.conf
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files/80_ariang-nginx-support $(1)/etc/uci-defaults/80_ariang-nginx-support
+endef
+
$(eval $(call BuildPackage,ariang))
+$(eval $(call BuildPackage,ariang-nginx))
--- /dev/null
+#!/bin/sh
+
+
+if [ -f "/etc/nginx/nginx.conf" ] && [ -f "/etc/nginx/ariang.conf" ]; then
+ if [ "$( grep 'server_name localhost;' < /etc/nginx/nginx.conf)" ] &&
+ [ ! "$( grep 'include ariang.conf;' < /etc/nginx/nginx.conf)" ]; then
+ sed -i '/server_name localhost;/a \\t\tinclude ariang.conf;' /etc/nginx/nginx.conf
+ if [ -f /var/run/nginx.pid ]; then
+ /etc/init.d/nginx restart
+ fi
+ fi
+fi
+
+exit 0
+
--- /dev/null
+location /ariang {
+ index index.html;
+ alias /www/ariang/;
+}
\ No newline at end of file
include $(TOPDIR)/rules.mk
PKG_NAME:=arp-scan
-PKG_VERSION:=1.9-40-g69b2f70
+PKG_VERSION:=1.9.5
PKG_RELEASE:=1
-PKG_LICENSE:=GPL-3.0
-PKG_MAINTAINER:=Sergey Urushkin <urusha.v1.0@gmail.com>
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/royhills/arp-scan.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=69b2f70588565385f3a61d9b1f100f01747cd5e1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=1cfb670ddd1763dbf5c712aaefe4d6c4f825011969e36484e6c442794324f721
+PKG_SOURCE_URL:=https://codeload.github.com/royhills/arp-scan/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=aa9498af84158a315b7e0ea6c2cddfa746660ca3987cbe7e32c0c90f5382d9d2
+
+PKG_MAINTAINER:=Sergey Urushkin <urusha.v1.0@gmail.com>
+PKG_LICENSE:=GPL-3.0
PKG_FIXUP:=autoreconf
+++ /dev/null
---- a/acinclude.m4 2016-02-19 15:21:01.000000000 +0300
-+++ b/acinclude.m4 2016-02-19 17:18:50.480874343 +0300
-@@ -211,7 +211,6 @@
- LONG_LONG_INT_FORMAT=''
-
- case $pgac_cv_snprintf_long_long_int_format in
-- cross) AC_MSG_RESULT([cannot test (not on host machine)]);;
- ?*) AC_MSG_RESULT([$pgac_cv_snprintf_long_long_int_format])
- LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
- *) AC_MSG_RESULT(none);;
include $(TOPDIR)/rules.mk
PKG_NAME:=autossh
-PKG_VERSION:=1.4e
+PKG_VERSION:=1.4f
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://www.harding.motd.ca/autossh/
-PKG_HASH:=9e8e10a59d7619176f4b986e256f776097a364d1be012781ea52e08d04679156
+PKG_HASH:=0172e5e1bea40c642e0ef025334be3aadd4ff3b4d62c0b177ed88a8384e2f8f2
PKG_LICENSE:=0BSD
include $(INCLUDE_DIR)/package.mk
option gatetime '0'
option monitorport '20000'
option poll '600'
+ option enabled '0'
[ "$ACTION" = "ifdown" ] && {
/etc/init.d/autossh stop
}
-
+
}
config_get gatetime "$section" 'gatetime'
config_get monitorport "$section" 'monitorport'
config_get poll "$section" 'poll'
+ config_get_bool enabled "$section" 'enabled' '1'
+
+ [ "$enabled" = 1 ] || exit 0
export AUTOSSH_GATETIME="${gatetime:-30}"
export AUTOSSH_POLL="${poll:-600}"
PKG_NAME:=bcp38
PKG_VERSION:=5
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_LICENCE:=GPL-3.0+
include $(INCLUDE_DIR)/package.mk
$(INSTALL_BIN) ./files/run.sh $(1)/usr/lib/bcp38/run.sh
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/bcp38.defaults $(1)/etc/uci-defaults/bcp38
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/bcp38.init $(1)/etc/init.d/bcp38
endef
define Package/bcp38/postinst
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+
+USE_PROCD=1
+NAME=bcp38
+
+service_triggers()
+{
+ procd_add_config_trigger "config.change" "bcp38" /etc/init.d/firewall reload
+}
format. Building with libjson support will require the
libxml2 package to be installed as well.
+config BIND_ENABLE_EDDSA
+ bool
+ default n
+ prompt "Include Edwards Curve DNSSEC signature support"
+ help
+ Enable BIND support for Edwards Curve DNSSEC signing algorithms
+ described in RFC 8080.
+
+ Note that this requires OpenSSL 1.1, which is not currently
+ the available in OpenWRT, so it is disabled by default.
endif
include $(TOPDIR)/rules.mk
PKG_NAME:=bind
-PKG_VERSION:=9.11.2-P1
-PKG_RELEASE:=1
+PKG_VERSION:=9.11.3
+PKG_RELEASE:=2
USERID:=bind=57:bind=57
PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
-PKG_LICENSE := BSD-3-Clause
+PKG_LICENSE := MPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \
http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \
http://ftp.isc.org/isc/bind9/$(PKG_VERSION)
-PKG_HASH:=cec31548832fca3f85d95178d4019b7d702039e8595d4c93914feba337df1212
+PKG_HASH:=0d9dde14b2ec7f9cdc3b69f19540c7a2e4eee7b6c727965dfae48810965876f5
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
--with-gost=no \
--with-gssapi=no \
--with-ecdsa=$(if $(CONFIG_OPENSSL_WITH_EC),yes,no) \
+ --with-eddsa=$(if $(CONFIG_BIND_ENABLE_EDDSA),yes,no) \
--with-readline=no \
+ --enable-atomic=no \
--sysconfdir=/etc/bind
ifdef CONFIG_BIND_ENABLE_FILTER_AAAA
PKG_NAME:=bitlbee
PKG_VERSION:=3.5.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://get.bitlbee.org/src/ \
--- /dev/null
+--- a/lib/ssl_openssl.c
++++ b/lib/ssl_openssl.c
+@@ -64,11 +64,17 @@ void ssl_init(void)
+ {
+ const SSL_METHOD *meth;
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
+
+ meth = SSLv23_client_method();
+ ssl_ctx = SSL_CTX_new(meth);
+ SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
++#else
++ meth = TLS_client_method();
++ ssl_ctx = SSL_CTX_new(meth);
++ SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_VERSION);
++#endif
+
+ initialized = TRUE;
+ }
+@@ -300,20 +306,20 @@ size_t ssl_des3_encrypt(const unsigned c
+ const unsigned char *iv, unsigned char **res)
+ {
+ int output_length = 0;
+- EVP_CIPHER_CTX ctx;
++ EVP_CIPHER_CTX *ctx;
+
+ *res = g_new0(unsigned char, 72);
+
+ /* Don't set key or IV because we will modify the parameters */
+- EVP_CIPHER_CTX_init(&ctx);
+- EVP_CipherInit_ex(&ctx, EVP_des_ede3_cbc(), NULL, NULL, NULL, 1);
+- EVP_CIPHER_CTX_set_key_length(&ctx, key_len);
+- EVP_CIPHER_CTX_set_padding(&ctx, 0);
++ ctx = EVP_CIPHER_CTX_new();
++ EVP_CipherInit_ex(ctx, EVP_des_ede3_cbc(), NULL, NULL, NULL, 1);
++ EVP_CIPHER_CTX_set_key_length(ctx, key_len);
++ EVP_CIPHER_CTX_set_padding(ctx, 0);
+ /* We finished modifying parameters so now we can set key and IV */
+- EVP_CipherInit_ex(&ctx, NULL, NULL, key, iv, 1);
+- EVP_CipherUpdate(&ctx, *res, &output_length, input, input_len);
+- EVP_CipherFinal_ex(&ctx, *res, &output_length);
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, 1);
++ EVP_CipherUpdate(ctx, *res, &output_length, input, input_len);
++ EVP_CipherFinal_ex(ctx, *res, &output_length);
++ EVP_CIPHER_CTX_free(ctx);
+ //EVP_cleanup();
+
+ return output_length;
--- /dev/null
+#
+# Copyright (C) 2018 TDT AG <development@tdt.de>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See https://www.gnu.org/licenses/gpl-2.0.txt for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=proto-bonding
+PKG_VERSION:=2018-06-11
+PKG_RELEASE:=1
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=
+
+PKG_MAINTAINER:=Helge Mader <ma@dev.tdt.de>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/proto-bonding
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Link Aggregation (Channel Bonding) proto handler
+ DEPENDS:=+kmod-bonding
+endef
+
+define Package/proto-bonding/description
+ This package contains the channel bonding proto handler for netifd
+endef
+
+define Build/Compile
+endef
+
+define Package/proto-bonding/install
+ $(INSTALL_DIR) $(1)/lib/netifd/proto/
+ $(INSTALL_BIN) ./files/lib/netifd/proto/bonding.sh \
+ $(1)/lib/netifd/proto/
+endef
+
+$(eval $(call BuildPackage,proto-bonding))
--- /dev/null
+#!/bin/sh
+#
+# Copyright (C) 2018 TDT AG <development@tdt.de>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See https://www.gnu.org/licenses/gpl-2.0.txt for more information.
+#
+
+. /lib/functions.sh
+. ../netifd-proto.sh
+
+init_proto "$@"
+
+INCLUDE_ONLY=1
+
+BONDING_MASTERS="/sys/class/net/bonding_masters"
+
+set_driver_values() {
+ local varname
+
+ for varname in "$@"; do
+ local value
+ json_get_var value "$varname"
+
+ [ -n "$value" ] && echo "$value" > /sys/class/net/"$link"/bonding/"$varname"
+ done
+}
+
+proto_bonding_init_config() {
+ no_device=1
+ available=1
+
+ proto_config_add_string "ifname"
+
+ proto_config_add_string "ipaddr"
+ proto_config_add_string "netmask"
+
+ proto_config_add_string "bonding_policy"
+ proto_config_add_string "link_monitoring"
+ proto_config_add_string "slaves"
+ proto_config_add_string "all_slaves_active"
+
+ proto_config_add_string "min_links"
+ proto_config_add_string "ad_actor_sys_prio"
+ proto_config_add_string "ad_actor_system"
+ proto_config_add_string "ad_select"
+ proto_config_add_string "lacp_rate"
+ proto_config_add_string "packets_per_slave"
+ proto_config_add_string "xmit_hash_policy"
+ proto_config_add_string "primary"
+ proto_config_add_string "primary_reselect"
+ proto_config_add_string "lp_interval"
+ proto_config_add_string "tlb_dynamic_lb"
+ proto_config_add_string "resend_igmp"
+ proto_config_add_string "fail_over_mac"
+ proto_config_add_string "num_grat_arp__num_unsol_na"
+
+ proto_config_add_string "arp_interval"
+ proto_config_add_string "arp_ip_target"
+ proto_config_add_string "arp_all_targets"
+ proto_config_add_string "arp_validate"
+
+ proto_config_add_string "miimon"
+ proto_config_add_string "downdelay"
+ proto_config_add_string "updelay"
+ proto_config_add_string "use_carrier"
+}
+
+proto_bonding_setup() {
+ local cfg="$1"
+ local link="bonding-$cfg"
+
+ # Check for loaded kernel bonding driver (/sys/class/net/bonding_masters exists)
+ [ -f "$BONDING_MASTERS" ] || {
+ echo "$cfg" "setup: bonding_masters does not exist in sysfs (kernel module not loaded?)"
+ proto_notify_error "$cfg" "setup: bonding_masters does not exist in sysfs (kernel module not loaded?)"
+ proto_block_restart "$cfg"
+ return
+ }
+
+ # Add bonding interface to system
+ echo "+$link" > "$BONDING_MASTERS"
+
+ # Set bonding policy (with corresponding parameters)
+ local bonding_policy
+ json_get_vars bonding_policy
+
+ case "$bonding_policy" in
+
+ 802.3ad)
+ echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode
+ set_driver_values min_links ad_actor_sys_prio ad_actor_system ad_select lacp_rate
+ ;;
+
+ balance-rr)
+ echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode
+ set_driver_values packets_per_slave xmit_hash_policy
+ ;;
+
+ balance-tlb)
+ echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode
+ set_driver_values primary primary_reselect lp_interval tlb_dynamic_lb resend_igmp xmit_hash_policy
+ ;;
+
+ balance-alb)
+ echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode
+ set_driver_values primary primary_reselect lp_interval tlb_dynamic_lb resend_igmp xmit_hash_policy
+ ;;
+
+ active-backup)
+ echo "$bonding_policy" > /sys/class/net/"$link"/bonding/mode
+ set_driver_values primary primary_reselect fail_over_mac num_grat_arp__num_unsol_na xmit_hash_policy
+ ;;
+ esac
+
+ # Set link monitoring (with corresponding parameters)
+ local link_monitoring
+ json_get_vars link_monitoring
+
+ case "$link_monitoring" in
+
+ arp)
+ local arp_interval arp_ip_target arp_all_targets arp_validate
+ json_get_vars arp_interval arp_ip_target arp_all_targets arp_validate
+
+ [ -n "$arp_interval" -a "$arp_interval" != 0 ] && echo "$arp_interval" > /sys/class/net/"$link"/bonding/arp_interval
+
+ IFS=' '
+ for target in $arp_ip_target; do
+ echo "+$target" > /sys/class/net/"$link"/bonding/arp_ip_target
+ done
+
+ [ -n "$arp_all_targets" ] && echo "$arp_all_targets" > /sys/class/net/"$link"/bonding/arp_all_targets
+ [ -n "$arp_validate" ] && echo "$arp_validate" > /sys/class/net/"$link"/bonding/arp_validate
+ ;;
+
+ mii)
+ local miimon downdelay updelay use_carrier
+ json_get_vars miimon downdelay updelay use_carrier
+
+ [ -n "$miimon" -a "$miimon" != 0 ] && echo "$miimon" > /sys/class/net/"$link"/bonding/miimon
+ [ -n "$downdelay" ] && echo "$downdelay" > /sys/class/net/"$link"/bonding/downdelay
+ [ -n "$updelay" ] && echo "$updelay" > /sys/class/net/"$link"/bonding/updelay
+ [ -n "$use_carrier" ] && echo "$use_carrier" > /sys/class/net/"$link"/bonding/use_carrier
+ ;;
+ esac
+
+ # Add slaves to bonding interface
+ local slaves
+ json_get_vars slaves
+
+ for slave in $slaves; do
+
+ if [ "$(cat /proc/net/dev |grep "$slave")" == "" ]; then
+ echo "$cfg" "ERROR IN CONFIGURATION - $slave: No such device"
+ proto_notify_error "$cfg" "ERROR IN CONFIGURATION - $slave: No such device"
+ proto_block_restart "$cfg"
+ return
+ fi
+
+ ifconfig "$slave" down
+
+ sleep 1
+
+ echo "+$slave" > /sys/class/net/"$link"/bonding/slaves
+
+ ifconfig "$slave" up
+ done
+
+ [ -n "$all_slaves_active" ] && echo "$all_slaves_active" > /sys/class/net/"$link"/bonding/all_slaves_active
+
+ local ipaddr netmask
+ json_get_vars ipaddr netmask
+
+ # ATTENTION
+ #All json vars have to be read before the line below, as the
+ # json object will be overwritten by proto_init_update
+ # ATTENTION
+
+ proto_init_update "$link" 1
+
+ # For static configuration we _MUST_ have an IP address
+ [ -z "$ipaddr" ] && {
+ echo "$cfg" "INVALID LOCAL ADDRESS"
+ proto_notify_error "$cfg" "INVALID_LOCAL_ADDRESS"
+ proto_block_restart "$cfg"
+ return
+ }
+
+ proto_add_ipv4_address "$ipaddr" "$netmask"
+
+ proto_send_update "$cfg"
+}
+
+proto_bonding_teardown() {
+ local cfg="$1"
+ local link="bonding-$cfg"
+
+ # Check for loaded kernel bonding driver (/sys/class/net/bonding_masters exists)
+ [ -f "$BONDING_MASTERS" ] || {
+ echo "$cfg" "teardown: bonding_masters does not exist in sysfs (kernel module not loaded?)"
+ proto_notify_error "$cfg" "teardown: bonding_masters does not exist in sysfs (kernel module not loaded?)"
+ proto_block_restart "$cfg"
+ return
+ }
+
+ echo "-$link" > /sys/class/net/bonding_masters
+ logger "bonding_teardown($1): $2"
+}
+
+add_protocol bonding
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=bridge-utils
-PKG_VERSION:=1.5
-PKG_RELEASE:=5
+PKG_VERSION:=1.6
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git
-PKG_SOURCE_VERSION:=v${PKG_VERSION}
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=ce568c41f60987ed972c53fb8dab92bf45052849c4992e8ae931c1eb505630b7
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@KERNEL/linux/utils/net/$(PKG_NAME)
+PKG_HASH:=cc67efb5d5fb8928a6569b3fade2b4042ec17da04678dab127d96b46489e26c8
+PKG_MAINTAINER:=Nikolay Martynov <mar.kolya@gmail.com>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
SECTION:=net
CATEGORY:=Base system
TITLE:=Ethernet bridging configuration utility
- URL:=http://bridge.sourceforge.net/
- PKG_MAINTAINER:=Nikolay Martynov <mar.kolya@gmail.com>
+ URL:=http://www.linuxfromscratch.org/blfs/view/svn/basicnet/bridge-utils.html
endef
define Package/bridge/description
+++ /dev/null
---- a/libbridge/libbridge.h
-+++ b/libbridge/libbridge.h
-@@ -20,6 +20,7 @@
- #define _LIBBRIDGE_H
-
- #include <sys/socket.h>
-+#include <netinet/in.h>
- #include <linux/if.h>
- #include <linux/if_bridge.h>
-
+++ /dev/null
---- a/libbridge/libbridge.h
-+++ b/libbridge/libbridge.h
-@@ -19,6 +19,8 @@
- #ifndef _LIBBRIDGE_H
- #define _LIBBRIDGE_H
-
-+#include <sys/types.h>
-+#include <sys/select.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <linux/if.h>
PKG_NAME:=chaosvpn
-PKG_REV:=2eb24810b5aa0b2d56f21562e52927020dc3090a
-PKG_VERSION:=2014-01-24
+PKG_VERSION:=2.19
PKG_RELEASE=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/ryd/chaosvpn.git
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
-PKG_MIRROR_HASH:=da987a95cb33af730c2b08ceec3af29a61e523625479c7e8b978fad881abbb53
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ryd/chaosvpn/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=53625d131140529e88d8a14c34cc4d8d5d0134292d90f4ae55e9df29d3232828
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Norbert Summer <git@o-g.at>
$(INSTALL_BIN) $(PKG_BUILD_DIR)/chaosvpn $(1)/usr/sbin/
$(INSTALL_BIN) ./files/chaosvpn.init $(1)/etc/init.d/chaosvpn
$(INSTALL_BIN) ./files/chaosvpn.hotplug $(1)/etc/hotplug.d/iface/40-chaosvpn
- sed -i -e 's/"\/sbin\/ip /"\/usr\/sbin\/ip /' $(PKG_BUILD_DIR)/chaosvpn.conf
$(INSTALL_CONF) $(PKG_BUILD_DIR)/chaosvpn.conf $(1)/etc/tinc/chaosvpn.conf
endef
--- /dev/null
+From c842faae63b562acc7d989a9cdc815def9ee2ed6 Mon Sep 17 00:00:00 2001
+From: Sven-Haegar Koch <haegar@sdinet.de>
+Date: Wed, 2 Nov 2016 23:08:24 +0100
+Subject: [PATCH] OpenSSL 1.1.0 compile fix.
+
+---
+ crypto.c | 53 +++++++++++++++++++++++++++++++++++------------------
+ 1 file changed, 35 insertions(+), 18 deletions(-)
+
+diff --git a/crypto.c b/crypto.c
+index e476611..e8b72d3 100644
+--- a/crypto.c
++++ b/crypto.c
+@@ -46,6 +46,10 @@ openssl dgst \
+
+ */
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define EVP_PKEY_get0_RSA(a) ((a)->pkey.rsa)
++#endif
++
+ EVP_PKEY *
+ crypto_load_key(const char *key, const bool is_private)
+ {
+@@ -80,7 +84,7 @@ crypto_rsa_verify_signature(struct string *databuffer, struct string *signature,
+ {
+ int err;
+ bool retval;
+- EVP_MD_CTX md_ctx;
++ EVP_MD_CTX *md_ctx;
+ EVP_PKEY *pkey;
+
+ /* load public key into openssl structure */
+@@ -89,15 +93,22 @@ crypto_rsa_verify_signature(struct string *databuffer, struct string *signature,
+ log_err("crypto_verify_signature: key loading failed\n");
+ return false;
+ }
+-
++
++ md_ctx = EVP_MD_CTX_create();
++ if (!md_ctx) {
++ log_err("crypto_verify_signature: md_ctx alloc failed\n");
++ return false;
++ }
++
+ /* Verify the signature */
+- if (EVP_VerifyInit(&md_ctx, EVP_sha512()) != 1) {
++ if (EVP_VerifyInit(md_ctx, EVP_sha512()) != 1) {
+ log_err("crypto_verify_signature: libcrypto verify init failed\n");
++ EVP_MD_CTX_destroy(md_ctx);
+ EVP_PKEY_free(pkey);
+ return false;
+ }
+- EVP_VerifyUpdate(&md_ctx, string_get(databuffer), string_length(databuffer));
+- err = EVP_VerifyFinal(&md_ctx, (unsigned char*)string_get(signature), string_length(signature), pkey);
++ EVP_VerifyUpdate(md_ctx, string_get(databuffer), string_length(databuffer));
++ err = EVP_VerifyFinal(md_ctx, (unsigned char*)string_get(signature), string_length(signature), pkey);
+ EVP_PKEY_free(pkey);
+
+ if (err != 1) {
+@@ -110,7 +121,7 @@ crypto_rsa_verify_signature(struct string *databuffer, struct string *signature,
+ retval = true;
+
+ bailout_ctx_cleanup:
+- EVP_MD_CTX_cleanup(&md_ctx);
++ EVP_MD_CTX_destroy(md_ctx);
+
+ //log_info("Signature Verified Ok.\n");
+ return retval;
+@@ -146,7 +157,7 @@ crypto_rsa_decrypt(struct string *ciphertext, const char *privkey, struct string
+ len = RSA_private_decrypt(string_length(ciphertext),
+ (unsigned char*)string_get(ciphertext),
+ (unsigned char*)string_get(decrypted),
+- pkey->pkey.rsa,
++ EVP_PKEY_get0_RSA(pkey),
+ RSA_PKCS1_OAEP_PADDING);
+ if (len >= 0) {
+ /* TODO: need cleaner way: */
+@@ -167,28 +178,33 @@ bool
+ crypto_aes_decrypt(struct string *ciphertext, struct string *aes_key, struct string *aes_iv, struct string *decrypted)
+ {
+ bool retval = false;
+- EVP_CIPHER_CTX ctx;
++ EVP_CIPHER_CTX *ctx;
+ int decryptspace;
+ int decryptdone;
+
+- EVP_CIPHER_CTX_init(&ctx);
+- if (!EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL,
++ ctx = EVP_CIPHER_CTX_new();
++ if (!ctx) {
++ log_err("crypto_aes_decrypt: ctx alloc failed\n");
++ goto bail_out;
++ }
++
++ if (!EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL,
+ (unsigned char *)string_get(aes_key),
+ (unsigned char *)string_get(aes_iv))) {
+ log_err("crypto_aes_decrypt: init failed\n");
+ ERR_print_errors_fp(stderr);
+ goto bail_out;
+ }
+- EVP_CIPHER_CTX_set_padding(&ctx, 1);
++ EVP_CIPHER_CTX_set_padding(ctx, 1);
+
+- if (string_length(aes_key) != EVP_CIPHER_CTX_key_length(&ctx)) {
++ if (string_length(aes_key) != EVP_CIPHER_CTX_key_length(ctx)) {
+ log_err("crypto_aes_decrypt: invalid key size (%" PRIuPTR " vs expected %d)\n",
+- string_length(aes_key), EVP_CIPHER_CTX_key_length(&ctx));
++ string_length(aes_key), EVP_CIPHER_CTX_key_length(ctx));
+ goto bail_out;
+ }
+- if (string_length(aes_iv) != EVP_CIPHER_CTX_iv_length(&ctx)) {
++ if (string_length(aes_iv) != EVP_CIPHER_CTX_iv_length(ctx)) {
+ log_err("crypto_aes_decrypt: invalid iv size (%" PRIuPTR " vs expected %d)\n",
+- string_length(aes_iv), EVP_CIPHER_CTX_iv_length(&ctx));
++ string_length(aes_iv), EVP_CIPHER_CTX_iv_length(ctx));
+ goto bail_out;
+ }
+
+@@ -201,7 +217,7 @@ crypto_aes_decrypt(struct string *ciphertext, struct string *aes_key, struct str
+ goto bail_out;
+ }
+
+- if (EVP_DecryptUpdate(&ctx, (unsigned char*)string_get(decrypted),
++ if (EVP_DecryptUpdate(ctx, (unsigned char*)string_get(decrypted),
+ &decryptdone, (unsigned char*)string_get(ciphertext),
+ string_length(ciphertext))) {
+ /* TODO: need cleaner way: */
+@@ -212,7 +228,7 @@ crypto_aes_decrypt(struct string *ciphertext, struct string *aes_key, struct str
+ goto bail_out;
+ }
+
+- if (EVP_DecryptFinal_ex(&ctx,
++ if (EVP_DecryptFinal_ex(ctx,
+ (unsigned char*)string_get(decrypted)+string_length(decrypted),
+ &decryptdone)) {
+ /* TODO: need cleaner way: */
+@@ -226,7 +242,8 @@ crypto_aes_decrypt(struct string *ciphertext, struct string *aes_key, struct str
+ retval = true;
+
+ bail_out:
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ if (ctx)
++ EVP_CIPHER_CTX_free(ctx);
+ return retval;
+ }
+
include $(TOPDIR)/rules.mk
PKG_NAME:=chrony
-PKG_VERSION:=3.3
+PKG_VERSION:=3.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.tuxfamily.org/chrony/
-PKG_HASH:=0d1fb2d5875032f2d5a86f3770374c87ee4c941916f64171e81f7684f2a73128
+PKG_HASH:=af77e47c2610a7e55c8af5b89a8aeff52d9a867dd5983d848b52d374bc0e6b9f
PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
PKG_LICENSE:=GPL-2.0
--chronyrundir=/var/run/chrony \
--disable-readline \
--disable-rtc \
+ --disable-sechash \
--with-user=chrony
CONFIGURE_VARS+=CPPFLAGS=-DNDEBUG
elif [ "$wan6_iface" = "$iface" ]; then
echo allow ::/0
else
- network_get_subnets subnets $iface || \
- network_get_subnets subnets6 $iface || continue
+ network_get_subnets subnets $iface
+ network_get_subnets6 subnets6 $iface
for subnet in $subnets $subnets6; do
echo allow $subnet
done
--- /dev/null
+--- a/hash_intmd5.c
++++ b/hash_intmd5.c
+@@ -29,6 +29,7 @@
+ #include "sysincl.h"
+ #include "hash.h"
+ #include "memory.h"
++#include "util.h"
+
+ #include "md5.c"
+
include $(TOPDIR)/rules.mk
PKG_NAME:=cifs-utils
-PKG_VERSION:=6.7
+PKG_VERSION:=6.8
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://download.samba.org/pub/linux-cifs/cifs-utils/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=b2f21612474ab012e75accd167aab607a0614ff67efb56ea0f36789fa785cfab
+PKG_HASH:=e7d1f6050c43f21f82cd77e288eb756755effd22f0c310fc2c525df9d41dff79
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
PKG_LICENSE:=GPL-3.0
define Package/cifsmount
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+kmod-fs-cifs +libtalloc
+ DEPENDS:=+kmod-fs-cifs
TITLE:=CIFS mount utilities
URL:=http://wiki.samba.org/index.php/LinuxCIFS_utils
endef
CONFIGURE_ARGS += \
--exec-prefix=/usr \
--prefix=/ \
- --with-libcap-ng=no \
- --with-libcap=no
+ --with-libcap=no \
+ --disable-cifsupcall \
+ --disable-cifscreds \
+ --disable-cifsidmap \
+ --disable-cifsacl \
+ --disable-pam \
+ --disable-systemd \
+ --disable-man
define Package/cifsmount/install
$(INSTALL_DIR) $(1)/usr/sbin
--- /dev/null
+diff --git a/data_blob.h b/data_blob.h
+index 3d96147..c20749d 100644
+--- a/data_blob.h
++++ b/data_blob.h
+@@ -23,7 +23,7 @@
+ #ifndef _SAMBA_DATABLOB_H_
+ #define _SAMBA_DATABLOB_H_
+
+-#include <talloc.h>
++//#include <talloc.h>
+ #include <stdint.h>
+
+ /* used to hold an arbitrary blob of data */
include $(TOPDIR)/rules.mk
PKG_NAME:=clamav
-PKG_VERSION:=0.99.4
-PKG_RELEASE:=1
+PKG_VERSION:=0.100.1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
-PKG_HASH:=d72ac3273bde8d2e5e28ec9978373ee3ab4529fd868bc3fc4d2d2671228f2461
+PKG_HASH:=84e026655152247de7237184ee13003701c40be030dd68e0316111049f58a59f
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
define Package/clamav/Default
SECTION:=net
- DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libopenssl +libltdl +libpcre2 +USE_MUSL:musl-fts
+ DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libjson-c +libmilter-sendmail +libopenssl +libltdl +libpcre2 +USE_MUSL:musl-fts
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=ClamAV
--sysconfdir=/etc/clamav/ \
--prefix=/usr/ \
--exec-prefix=/usr/ \
+ --enable-milter \
--disable-xml \
--disable-bzip2 \
--with-user nobody \
define Package/clamav/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/clamd $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/clamav-milter $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamav-config $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clambc $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamconf $(1)/usr/sbin/
include $(TOPDIR)/rules.mk
PKG_NAME:=conserver
-PKG_VERSION:=8.2.1
+PKG_VERSION:=8.2.2
PKG_RELEASE:=1
PKG_MAINTAINER:=Bjørn Mork <bjorn@mork.no>
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/conserver/conserver.git
+PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.conserver.com/
-PKG_HASH:=251ae01997e8f3ee75106a5b84ec6f2a8eb5ff2f8092438eba34384a615153d0
+PKG_MIRROR_HASH:=27d92e6c04e97cd0884774eace0b44f30087695927bcce8addc11dba9c090d7c
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
#
-# Copyright (C) 2007-2014 OpenWrt.org
+# Copyright (C) 2007-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=coova-chilli
-PKG_VERSION:=1.3.0+20141128
-PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
+PKG_VERSION:=1.4
+PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
-PKG_RELEASE:=5
+PKG_RELEASE:=6
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/coova/coova-chilli
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=b93de20a288c01c2ba28e96e31ad6da01627f45f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=89c9b313881c658a0f6b91329a78bb1a0151878b19bc99b315976081c6355557
+PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=987647a4c8efe7b1e2d7108d56068e3bd7830d326680f0eaa2c705e4c59c46d9
PKG_INSTALL:=1
CATEGORY:=Network
DEPENDS:=+kmod-tun +librt +COOVACHILLI_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl
TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version)
- URL:=http://www.coova.org/CoovaChilli
+ URL:=https://coova.github.io/
MENU:=1
endef
#!/bin/sh /etc/rc.common
-START=30
-STOP=90
+START=90
+STOP=89
+USE_PROCD=1
+
+service_triggers() {
+ procd_add_reload_trigger "chilli"
+}
config_cb() {
- chilli_inst=$2
- if [ "$chilli_inst" != "" ]
- then
- rm -f /var/run/chilli_${chilli_inst}.*
- chilli_conf=/var/run/chilli_${chilli_inst}.conf
- eval "start_chilli_$chilli_inst=1"
- fi
+ local chilli_inst="$2"
+ if [ "$chilli_inst" != "" ]; then
+ chilli_conf="/var/run/chilli_${chilli_inst}.conf"
+ if [ -e "$chilli_conf" ]; then
+ rm -f "$chilli_conf"
+ fi
+ eval "start_chilli_$chilli_inst=1"
+ fi
}
option_cb() {
- case "$1" in
- # UCI settings
- network)
- . /lib/functions/network.sh
- local ifname
- network_get_device ifname $2
- echo "dhcpif=\"$ifname\"" >> $chilli_conf
- ;;
- disabled)
- eval "start_chilli_$chilli_inst=0"
- ;;
- # boolean settings
- dhcpbroadcast|nodynip|vlanlocation|locationstopstart|locationcopycalled|locationimmediateupdate|locationopt82|coanoipcheck|noradallow|proxymacaccept|proxyonacct|dhcpmacset|dhcpradius|noc2c|eapolenable|uamanydns|uamanyip|uamnatanyip|nouamsuccess|nowispr1|nowispr2|domaindnslocal|radsec|macauth|macreauth|macauthdeny|macallowlocal|strictmacauth|strictdhcp|ieee8021q|only8021q|radiusoriginalurl|swapoctets|statusfilesave|wpaguests|openidauth|papalwaysok|mschapv2|chillixml|acctupdate|dnsparanoia|seskeepalive|usetap|noarpentries|framedservice|scalewin|redir|injectwispr|redirurl|routeonetone|nousergardendata|uamgardendata|uamotherdata|withunixipc|uamallowpost|redirssl|uamuissl|layer3|patricia|redirdnsreq|dhcpnotidle|ipv6|ipv6only)
- [ "$2" = "true" -o "$2" = "1" ] && echo "$1" >> $chilli_conf
- ;;
- *)
- echo "$1=\"$2\"" >> $chilli_conf
- ;;
- esac
+ case "$1" in
+ # UCI settings
+ network)
+ . /lib/functions/network.sh
+ local ifname
+ network_get_device ifname "$2"
+ echo "dhcpif=\"$ifname\"" >> "$chilli_conf"
+ ;;
+ disabled)
+ [ "$(config_get_bool "$1")" = "1" ] && eval "start_chilli_$chilli_inst=0"
+ ;;
+ # boolean settings
+ debug|dhcpbroadcast|nodynip|vlanlocation|locationstopstart|locationcopycalled|locationimmediateupdate|locationopt82|coanoipcheck|noradallow|proxymacaccept|proxyonacct|dhcpmacset|dhcpradius|noc2c|eapolenable|uamanydns|uamanyip|uamnatanyip|nouamsuccess|nowispr1|nowispr2|domaindnslocal|radsec|macauth|macreauth|macauthdeny|macallowlocal|strictmacauth|strictdhcp|ieee8021q|only8021q|radiusoriginalurl|swapoctets|statusfilesave|wpaguests|openidauth|papalwaysok|mschapv2|chillixml|acctupdate|dnsparanoia|seskeepalive|usetap|noarpentries|framedservice|scalewin|redir|injectwispr|redirurl|routeonetone|nousergardendata|uamgardendata|uamotherdata|withunixipc|uamallowpost|redirssl|uamuissl|layer3|patricia|redirdnsreq|dhcpnotidle|ipv6|ipv6only)
+ [ "$2" = "true" -o "$2" = "1" ] && echo "$1" >> "$chilli_conf"
+ ;;
+ *)
+ echo "$1=\"$2\"" >> "$chilli_conf"
+ ;;
+ esac
}
start_chilli() {
- local cfg="$1"
- local start_chilli=$(eval "echo \$start_chilli_$cfg")
- [ "$start_chilli" = "0" ] && return
- local base=/var/run/chilli_${cfg}
- chilli -c ${base}.conf \
- --pidfile ${base}.pid \
- --cmdsocket ${base}.sock \
- --unixipc ${base}.ipc &
-}
-
-start() {
- config_load chilli
- config_foreach start_chilli chilli
-}
-
-stop() {
- ls /var/run/chilli*.pid 2>/dev/null && {
- kill $(cat /var/run/chilli*.pid)
- sleep 1
- killall -9 chilli
- rm -f /var/run/chilli*
- }
+ local cfg="$1"
+ local start_chilli=$(eval "echo \$start_chilli_$cfg")
+ [ "$start_chilli" = "0" ] && return
+ local base="/var/run/chilli_${cfg}"
+
+ procd_open_instance "$cfg"
+ procd_set_param command /usr/sbin/chilli
+ procd_set_param file "${base}.conf"
+ procd_append_param command --fg --conf "${base}.conf" --pidfile "${base}.pid" --cmdsocket "${base}.sock" --unixipc "${base}.ipc"
+ procd_set_param respawn
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+}
+
+start_service() {
+ config_load chilli
+ config_foreach start_chilli chilli
+}
+
+stop_service() {
+ rm -f /var/run/chilli_*
+}
+
+reload_chilli() {
+ local pid
+ local cfg="$1"
+ local base="/var/run/chilli_${cfg}"
+ if [ -f "${base}.pid" ]; then
+ pid="$(cat "${base}.pid")"
+ [ -f "/var/run/chilli.${pid}.cfg.bin" ] && rm -f "/var/run/chilli.${pid}.cfg.bin"
+ chilli_query -s "${base}.sock" reload
+ fi
+}
+
+reload_service() {
+ config_load chilli
+ config_foreach reload_chilli chilli
}
+++ /dev/null
---- a/src/system.h
-+++ b/src/system.h
-@@ -83,10 +83,6 @@
- #include <linux/sysinfo.h>
- #endif
-
--#ifdef HAVE_SYS_SYSINFO_H
--#include <sys/sysinfo.h>
--#endif
--
- #ifdef HAVE_TIME_H
- #include <time.h>
- #endif
-@@ -139,6 +135,10 @@
- #include <linux/un.h>
- #endif
-
-+#ifdef HAVE_SYS_SYSINFO_H
-+#include <sys/sysinfo.h>
-+#endif
-+
- #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
- #include <net/if.h>
- #include <net/bpf.h>
--- /dev/null
+--- a/src/linux/Makefile
++++ b/src/linux/Makefile
+@@ -25,8 +25,8 @@ lib%.o: lib%.c
+ $(CC) $(CFLAGS) -fPIC -O2 -Wall -D_INIT=lib$*_init -c -o $@ $<;
+
+ install: modules_install libxt_coova.so
+- mkdir -p $(DESTDIR)/lib/xtables/
+- cp libxt_coova.so $(DESTDIR)/lib/xtables/
++ mkdir -p $(DESTDIR)/usr/lib/iptables/
++ cp libxt_coova.so $(DESTDIR)/usr/lib/iptables/
+
+ distdir:
+
--- /dev/null
+--- a/src/system.h
++++ b/src/system.h
+@@ -112,6 +112,11 @@
+ #include <signal.h>
+ #endif
+
++#ifdef HAVE_SYS_SYSINFO_H
++#define _LINUX_SYSINFO_H
++#include <sys/sysinfo.h>
++#endif
++
+ #ifdef HAVE_INTTYPES_H
+ #define __STDC_FORMAT_MACROS
+ #include <inttypes.h>
+@@ -129,15 +134,6 @@
+ #include <linux/un.h>
+ #endif
+
+-#ifdef HAVE_SYS_SYSINFO_H
+-#include <sys/sysinfo.h>
+-#else
+-#ifdef HAVE_LINUX_SYSINFO_H
+-#define _LINUX_KERNEL_H
+-#include <linux/sysinfo.h>
+-#endif
+-#endif
+-
+ #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
+ #include <net/if.h>
+ #include <net/bpf.h>
+++ /dev/null
---- a/src/linux/Makefile
-+++ b/src/linux/Makefile
-@@ -21,11 +21,11 @@ lib%.so: lib%.o
- $(CC) $(CFLAGS) -shared -o $@ $^;
-
- lib%.o: lib%.c
-- $(CC) $(CFLAGS) -fPIC -O2 -Wall -I${KERNEL_DIR}/include -D_INIT=lib$*_init -c -o $@ $<;
-+ $(CC) $(CFLAGS) -D_INIT=lib$*_init -c -o $@ $<;
-
- install: modules_install libxt_coova.so
-- mkdir -p $(DESTDIR)/lib/xtables/
-- cp libxt_coova.so $(DESTDIR)/lib/xtables/
-+ mkdir -p $(DESTDIR)/usr/lib/iptables/
-+ cp libxt_coova.so $(DESTDIR)/usr/lib/iptables/
-
- distdir:
-
+++ /dev/null
---- a/src/linux/xt_coova.c
-+++ b/src/linux/xt_coova.c
-@@ -292,6 +292,8 @@ static int coova_mt_check(const struct x
- struct coova_table *t;
- #ifdef CONFIG_PROC_FS
- struct proc_dir_entry *pde;
-+ kuid_t uid;
-+ kgid_t gid;
- #endif
- unsigned i;
- int ret = 0;
-@@ -330,8 +332,9 @@ static int coova_mt_check(const struct x
- ret = -ENOMEM;
- goto out;
- }
-- pde->uid = ip_list_uid;
-- pde->gid = ip_list_gid;
-+ uid = make_kuid(&init_user_ns, ip_list_uid);
-+ gid = make_kgid(&init_user_ns, ip_list_gid);
-+ proc_set_user(pde, uid, gid);
- #endif
- spin_lock_bh(&coova_lock);
- list_add_tail(&t->list, &tables);
-@@ -445,14 +448,13 @@ static const struct seq_operations coova
-
- static int coova_seq_open(struct inode *inode, struct file *file)
- {
-- struct proc_dir_entry *pde = PDE(inode);
- struct coova_iter_state *st;
-
- st = __seq_open_private(file, &coova_seq_ops, sizeof(*st));
- if (st == NULL)
- return -ENOMEM;
-
-- st->table = pde->data;
-+ st->table = PDE_DATA(inode);
- return 0;
- }
-
-@@ -460,8 +462,7 @@ static ssize_t
- coova_mt_proc_write(struct file *file, const char __user *input,
- size_t size, loff_t *loff)
- {
-- const struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode);
-- struct coova_table *t = pde->data;
-+ struct coova_table *t = PDE_DATA(file->f_path.dentry->d_inode);
- struct coova_entry *e;
- char buf[sizeof("+b335:1d35:1e55:dead:c0de:1715:5afe:c0de")];
- const char *c = buf;
+++ /dev/null
---- a/src/md5.h
-+++ b/src/md5.h
-@@ -28,6 +28,14 @@
- #define MD5Update MD5_Update
- #define MD5Final MD5_Final
-
-+#elif HAVE_CYASSL
-+#include <cyassl/openssl/md5.h>
-+
-+#define MD5Init MD5_Init
-+#define MD5Update MD5_Update
-+#define MD5Final MD5_Final
-+
-+typedef struct CYASSL_MD5_CTX MD5_CTX;
- #else
-
- struct MD5Context {
---- a/src/md5.c
-+++ b/src/md5.c
-@@ -18,7 +18,7 @@
- #include <string.h> /* for memcpy() */
- #include "md5.h"
-
--#ifndef HAVE_OPENSSL
-+#if !defined(HAVE_OPENSSL) && !defined(HAVE_CYASSL)
-
- void byteReverse(unsigned char *buf, size_t longs);
-
+++ /dev/null
---- a/src/system.h
-+++ b/src/system.h
-@@ -78,11 +78,6 @@
- #include <sys/stat.h>
- #endif
-
--#ifdef HAVE_LINUX_SYSINFO_H
--#define _LINUX_KERNEL_H
--#include <linux/sysinfo.h>
--#endif
--
- #ifdef HAVE_TIME_H
- #include <time.h>
- #endif
-@@ -123,6 +118,11 @@
- #include <signal.h>
- #endif
-
-+#ifdef HAVE_SYS_SYSINFO_H
-+#define _LINUX_SYSINFO_H
-+#include <sys/sysinfo.h>
-+#endif
-+
- #if defined(__linux__)
- #include <asm/types.h>
- #include <linux/if.h>
-@@ -135,10 +135,6 @@
- #include <linux/un.h>
- #endif
-
--#ifdef HAVE_SYS_SYSINFO_H
--#include <sys/sysinfo.h>
--#endif
--
- #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
- #include <net/if.h>
- #include <net/bpf.h>
-@@ -170,10 +166,6 @@
- #include <net/if_tun.h>
- #endif
-
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
---- a/src/chilli_limits.h
-+++ b/src/chilli_limits.h
-@@ -18,8 +18,8 @@
- *
- */
-
--#ifndef _LIMITS_H
--#define _LIMITS_H
-+#ifndef _CHILLI_LIMITS_H
-+#define _CHILLI_LIMITS_H
-
- /*
- * extracted from various .h files, needs some cleanup.
+++ /dev/null
---- a/src/chilli.c
-+++ b/src/chilli.c
-@@ -4297,8 +4297,10 @@ static int chilliauth_cb(struct radius_t
- while (!differ && r1 > 0 && r2 > 0);
- }
-
-- if (newfd) safe_close(newfd); newfd=0;
-- if (oldfd) safe_close(oldfd); oldfd=0;
-+ if (newfd) safe_close(newfd);
-+ newfd=0;
-+ if (oldfd) safe_close(oldfd);
-+ oldfd=0;
-
- if (differ) {
- log_dbg("Writing out new hs.conf file with administraive-user settings");
---- a/src/redir.c
-+++ b/src/redir.c
-@@ -3176,9 +3176,11 @@ pid_t redir_fork(int in, int out) {
- }
-
- #if defined(F_DUPFD)
-- if (fcntl(in,F_GETFL,0) == -1) return -1; safe_close(0);
-+ if (fcntl(in,F_GETFL,0) == -1) return -1;
-+ safe_close(0);
- if (fcntl(in,F_DUPFD,0) == -1) return -1;
-- if (fcntl(out,F_GETFL,1) == -1) return -1; safe_close(1);
-+ if (fcntl(out,F_GETFL,1) == -1) return -1;
-+ safe_close(1);
- if (fcntl(out,F_DUPFD,1) == -1) return -1;
- #else
- if (dup2(in,0) == -1) return -1;
include $(TOPDIR)/rules.mk
PKG_NAME:=cshark
-PKG_VERSION=2015-11-24-$(PKG_SOURCE_VERSION)
-PKG_RELEASE=3
+PKG_VERSION=2018-08-20-$(PKG_SOURCE_VERSION)
+PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/cloudshark/cshark.git
PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=e575ab3d35d75a6f70488001fcba45690ebe9b3e
+PKG_SOURCE_VERSION:=7a7cf7f35074b85c6fb0c52067e640d2433ef73b
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=280d2711308a5b051a43788519ae6857394690d3155fe954388c43cd9035ec84
+PKG_MIRROR_HASH:=bc448bb4e910e771a5a8a39af7cfa09a79b59c595f15cdcae9d0103ce09be019
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=darkstat
PKG_VERSION:=3.0.719
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
define Package/darkstat
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libpcap +zlib +USE_GLIBC:libbsd
+ DEPENDS:=+libpcap +zlib
TITLE:=Network bandwidth monitor
URL:=http://unix4lyfe.org/darkstat/
endef
--disable-debug \
--with-chroot-dir=/var/empty
-TARGET_CFLAGS += -std=gnu99
+CONFIGURE_VARS += \
+ ac_cv_search_setproctitle=no \
+ ac_cv_search_strlcpy=no \
+ ac_cv_search_strlcat=no
define Build/Compile
$(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \
PKG_NAME:=ddns-scripts
# Version == major.minor.patch
# increase on new functionality (minor) or patches (patch)
-PKG_VERSION:=2.7.7
+PKG_VERSION:=2.7.8
# Release == build
# increase on changes of services files or tld_names.dat
-PKG_RELEASE:=3
+PKG_RELEASE:=5
PKG_LICENSE:=GPL-2.0
-PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
+PKG_MAINTAINER:=
include $(INCLUDE_DIR)/package.mk
endef
###### *************************************************************************
-define Package/ddns-scripts_cloudflare
+define Package/ddns-scripts_cloudflare.com-v4
$(call Package/ddns-scripts/Default)
- TITLE:=CloudFlare.com API v1 (deprecated)
- DEPENDS:=ddns-scripts
+ TITLE:=CloudFlare.com API v4 (requires cURL)
+ DEPENDS:=ddns-scripts +curl
endef
-define Package/ddns-scripts_cloudflare/description
- Dynamic DNS Client scripts extension for CloudFlare.com API-v1 (deprecated)
+define Package/ddns-scripts_cloudflare.com-v4/description
+ Dynamic DNS Client scripts extension for CloudFlare.com API-v4 (require/install cURL)
endef
###### *************************************************************************
-define Package/ddns-scripts_cloudflare.com-v4
+define Package/ddns-scripts_freedns_42_pl
$(call Package/ddns-scripts/Default)
- TITLE:=CloudFlare.com API v4 (require cURL)
+ TITLE:=DDNS extension for FreeDNS.42.pl (requires cURL)
DEPENDS:=ddns-scripts +curl
endef
-define Package/ddns-scripts_cloudflare.com-v4/description
- Dynamic DNS Client scripts extension for CloudFlare.com API-v4 (require/install cURL)
+define Package/ddns-scripts_freedns_42_pl/description
+ Dynamic DNS Client scripts extension for freedns.42.pl
endef
###### *************************************************************************
-e '/^\/\/[[:space:]]/d' \
-e '/^[[:space:]]*$$$$/d' $$$$FILE; \
done
- # compress public_suffix_list.dat
- gzip -nf9 $(PKG_BUILD_DIR)/files/public_suffix_list.dat
endef
define Package/ddns-scripts/conffiles
endef
###### *************************************************************************
-define Package/ddns-scripts_cloudflare/preinst
+define Package/ddns-scripts_cloudflare.com-v4/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
-define Package/ddns-scripts_cloudflare/install
- $(INSTALL_DIR) $(1)/etc/uci-defaults
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare
- $(INSTALL_DIR) $(1)/usr/share
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/public_suffix_list.dat.gz $(1)/usr/share
- $(INSTALL_DIR) $(1)/usr/lib/ddns
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v1.sh $(1)/usr/lib/ddns
+define Package/ddns-scripts_cloudflare.com-v4/install
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare.com-v4
+ $(INSTALL_DIR) $(1)/usr/lib/ddns
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v4.sh $(1)/usr/lib/ddns
endef
-define Package/ddns-scripts_cloudflare/postinst
+define Package/ddns-scripts_cloudflare.com-v4/postinst
#!/bin/sh
# remove old services file entries
- /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
- /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
+ /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
+ /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
# and create new
- printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
- printf "%s\\t%s\\n" '"cloudflare.com-v1"' '"update_cloudflare_com_v1.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
+ printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
+ printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
# on real system restart service if enabled
[ -z "$${IPKG_INSTROOT}" ] && {
- [ -x /etc/uci-defaults/ddns_cloudflare ] && \
- /etc/uci-defaults/ddns_cloudflare && \
- rm -f /etc/uci-defaults/ddns_cloudflare >/dev/null 2>&1
+ [ -x /etc/uci-defaults/ddns_cloudflare.com-v4 ] && \
+ /etc/uci-defaults/ddns_cloudflare.com-v4 && \
+ rm -f /etc/uci-defaults/ddns_cloudflare.com-v4 >/dev/null 2>&1
/etc/init.d/ddns enabled && \
/etc/init.d/ddns start >/dev/null 2>&1
}
exit 0 # suppress errors
endef
-define Package/ddns-scripts_cloudflare/prerm
+define Package/ddns-scripts_cloudflare.com-v4/prerm
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
# remove services file entries
- /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
- /bin/sed -i '/cloudflare\.com-v1/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
+ /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
+ /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
exit 0 # suppress errors
endef
###### *************************************************************************
-define Package/ddns-scripts_cloudflare.com-v4/preinst
+define Package/ddns-scripts_freedns_42_pl/preinst
#!/bin/sh
# if NOT run buildroot then stop service
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
-define Package/ddns-scripts_cloudflare.com-v4/install
+define Package/ddns-scripts_freedns_42_pl/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare.com-v4
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_freedns_42_pl
$(INSTALL_DIR) $(1)/usr/lib/ddns
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_cloudflare_com_v4.sh $(1)/usr/lib/ddns
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/update_freedns_42_pl.sh $(1)/usr/lib/ddns
endef
-define Package/ddns-scripts_cloudflare.com-v4/postinst
+define Package/ddns-scripts_freedns_42_pl/postinst
#!/bin/sh
# remove old services file entries
- /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
- /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
+ /bin/sed -i '/freedns\.42\.pl/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
# and create new
- printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
- printf "%s\\t%s\\n" '"cloudflare.com-v4"' '"update_cloudflare_com_v4.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services_ipv6
+ printf "%s\\t%s\\n" '"freedns.42.pl"' '"update_freedns_42_pl.sh"' >> $${IPKG_INSTROOT}/etc/ddns/services
# on real system restart service if enabled
[ -z "$${IPKG_INSTROOT}" ] && {
- [ -x /etc/uci-defaults/ddns_cloudflare.com-v4 ] && \
- /etc/uci-defaults/ddns_cloudflare.com-v4 && \
- rm -f /etc/uci-defaults/ddns_cloudflare.com-v4 >/dev/null 2>&1
+ [ -x /etc/uci-defaults/ddns_freedns_42_pl ] && \
+ /etc/uci-defaults/ddns_freedns_42_pl && \
+ rm -f /etc/uci-defaults/ddns_freedns_42_pl >/dev/null 2>&1
/etc/init.d/ddns enabled && \
/etc/init.d/ddns start >/dev/null 2>&1
}
exit 0 # suppress errors
endef
-define Package/ddns-scripts_cloudflare.com-v4/prerm
+define Package/ddns-scripts_freedns_42_pl/prerm
#!/bin/sh
# if NOT run buildroot then stop service
- [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
+ [ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
# remove services file entries
- /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
- /bin/sed -i '/cloudflare\.com-v4/d' $${IPKG_INSTROOT}/etc/ddns/services_ipv6 >/dev/null 2>&1
+ /bin/sed -i '/freedns\.42\.pl/d' $${IPKG_INSTROOT}/etc/ddns/services >/dev/null 2>&1
exit 0 # suppress errors
endef
###### *************************************************************************
$(eval $(call BuildPackage,ddns-scripts))
-$(eval $(call BuildPackage,ddns-scripts_cloudflare))
$(eval $(call BuildPackage,ddns-scripts_cloudflare.com-v4))
+$(eval $(call BuildPackage,ddns-scripts_freedns_42_pl))
$(eval $(call BuildPackage,ddns-scripts_godaddy.com-v1))
$(eval $(call BuildPackage,ddns-scripts_no-ip_com))
$(eval $(call BuildPackage,ddns-scripts_nsupdate))
g_pslerr=0
g_cfgfile="ddns"
-# modify "cloudflare.com-v1" domain to new syntax
-# returns "host[.subdom]@domain.TLD" of given FQDN #############################
-mod_cloudflare_v1_domain() {
- # $1 entry to validate/split
- [ -f "$g_pslfile" ] || return 1
-
- [ $# -ne 1 -o -z "$1" ] && \
- { printf "%s\\n" "mod_cloudflare_v1_domain() - Invalid number of parameters" >&2; return 1; }
-
- local mcd_fqdn=$1
- local mcd_fsub=""
- local mcd_fdom=""
- local mcd_ctld=""
- local mcd_ftld=""
-
- # check if already new syntax, "@" inside string
- if [ $( printf "%s" "$mcd_fqdn" | grep -cF "@" 2>/dev/null ) -gt 0 ]; then
- # already done
- printf "%s" "$mcd_fqdn"
- return 0
- fi
-
- # we need to do in one line because otherwise sh doesn't work correctly
- # to lower | replace "." to " " | awk invert word order
- set -- $(printf %s "$mcd_fqdn" | tr [A-Z] [a-z] | tr "." " " \
- | awk '{do printf "%s"(NF>1?OFS:ORS),$NF;while (--NF)}' )
-
- while [ -n "${1:-}" ] ; do # as long we have parameters
- if [ -z "$mcd_ctld" ]; then # first loop
- mcd_ctld="$1" # CURRENT TLD to look at
- shift
- else
- mcd_ctld="$1.$mcd_ctld" # Next TLD to look at
- shift
- fi
- # check if TLD exact match in public_suffix_name.dat, save TLD
- zcat $g_pslfile | grep -E "^$mcd_ctld$" >/dev/null 2>&1 && {
- mcd_ftld="$mcd_ctld" # save found
- mcd_fdom="${1:-}" # save domain next step might be invalid
- continue
- }
- # check if match any "*" in public_suffix_name.dat,
- zcat $g_pslfile | grep -E "^\*.$mcd_ctld$" >/dev/null 2>&1 && {
- [ -z "${1:-}" ] && break # no more data break
- # check if next level TLD match excludes "!" in tld_names.dat
- if zcat $g_pslfile | grep -E "^!$1.$mcd_ctld$" >/dev/null 2>&1 ; then
- mcd_ftld="$mcd_ctld" # Yes
- else
- mcd_ftld="$1.$mcd_ctld"
- shift
- fi
- mcd_fdom="$1"; shift
- }
- [ -n "$mcd_ftld" ] && break # we have something valid, break
- done
-
- # the leftover parameters are the HOST/SUBDOMAIN
- while [ -n "${1:-}" ]; do
- mcd_fsub="${1}${mcd_fsub:+.$mcd_fsub}" # remember we need to invert
- shift # and insert dot if mcd_fsub not empty
- done
-
- # now validate found data
- [ -z "$mcd_ftld" ] && { printf "%s\\n" "mod_cloudflare_v1_domain() - no TLD not found in '$mcd_fqdn'" >&1; return 1; }
- [ -z "$mcd_fdom" ] && { printf "%s\\n" "mod_cloudflare_v1_domain() - no registrable Domain not found in '$mcd_fqdn'" >&1; return 1; }
-
- # return data
- printf "%s" "${mcd_fsub:+${mcd_fsub}@}${mcd_fdom}.${mcd_ftld}"
- return 0
-}
-
# modify timer settings from interval and unit to dhms format
timer2dhms() {
# $1 Number and
$uc_uci set $g_cfgfile.$uc_name.$uc_var="afraid.org-keyauth";;
Bind-nsupdate)
$uc_uci set $g_cfgfile.$uc_name.$uc_var="bind-nsupdate";;
- CloudFlare|cloudflare\.com|cloudflare\.com-v1)
- # verify if lookup_host is set
- $uc_uci get $g_cfgfile.$uc_name.lookup_host >/dev/null 2>&1 || {
- ucv_domain=$($uc_uci get $g_cfgfile.$uc_name.domain 2>/dev/null)
- $uc_uci set $g_cfgfile.$uc_name.lookup_host="$ucv_domain"
- }
- if [ -f "$g_pslfile" ]; then
- # change value of domain/upd_object to new syntax
- # there is no sort order inside uci data so we need multiple checks
- ucv_domain=$($uc_uci get $g_cfgfile.$uc_name.domain 2>/dev/null)
- ucv_object=$($uc_uci get $g_cfgfile.$uc_name.upd_object 2>/dev/null)
- # still old option domain
- if [ -n "$ucv_domain" ]; then
- ucv_new=$(mod_cloudflare_v1_domain "$ucv_domain") || g_pslerr=1
- # no error save data save data
- [ $g_pslerr -eq 0 ] && \
- $uc_uci set $g_cfgfile.$uc_name.domain="$ucv_new"
- fi
- # already new option upd_object
- if [ -n "$ucv_object" ]; then
- ucv_new=$(mod_cloudflare_v1_domain "$ucv_object") || g_pslerr=1
- # no error save data save data
- [ $g_pslerr -eq 0 ] && \
- $uc_uci set $g_cfgfile.$uc_name.upd_object="$ucv_new"
- fi
- fi
- unset ucv_domain ucv_object ucv_new
- # set new option value
- $uc_uci set $g_cfgfile.$uc_name.$uc_var="cloudflare.com-v1"
- ;;
dyndns\.org|dyndns\.com)
$uc_uci set $g_cfgfile.$uc_name.$uc_var="dyn.com";;
free\.editdns\.net)
$uc_uci set $g_cfgfile.$uc_name.$uc_var="editdns.net";;
+ FreeDNS\.42\.pl)
+ $uc_uci set $g_cfgfile.$uc_name.$uc_var="freedns.42.pl";;
domains\.google\.com)
$uc_uci set $g_cfgfile.$uc_name.$uc_var="google.com";;
loopia\.com)
# there is no sort order inside uci data so we need multiple checks
uco_provider=$($uc_uci get $g_cfgfile.$uc_name.upd_provider 2>/dev/null) || \
uco_provider=$($uc_uci get $g_cfgfile.$uc_name.service_name 2>/dev/null)
- if [ "$uco_provider" = "CloudFlare" \
- -o "$uco_provider" = "cloudflare.com" \
- -o "$uco_provider" = "cloudflare.com-v1" ]; then
- ucv_new=$(mod_cloudflare_v1_domain "$uc_val") || g_pslerr=1
- # no error save data save data
- [ $g_pslerr -eq 0 ] && \
- $uc_uci set $g_cfgfile.$uc_name.$uc_var="$ucv_new"
- unset ucv_new
- fi
unset uco_provider
fi
# rename option domain to option upd_object
. /lib/functions/network.sh
# GLOBAL VARIABLES #
-VERSION="2.7.7-2"
+VERSION="2.7.8-5"
SECTION_ID="" # hold config's section name
VERBOSE=0 # default mode is log to console, but easily changed with parameter
MYPROG=$(basename $0) # my program call name
# IPv6 ( ( 0-9a-f 1-4char ":") min 1x) ( ( 0-9a-f 1-4char )optional) ( (":" 0-9a-f 1-4char ) min 1x)
IPV6_REGEX="\(\([0-9A-Fa-f]\{1,4\}:\)\{1,\}\)\(\([0-9A-Fa-f]\{1,4\}\)\{0,1\}\)\(\(:[0-9A-Fa-f]\{1,4\}\)\{1,\}\)"
+# characters that are dangerous to pass to a shell command line
+SHELL_ESCAPE="[\"\'\`\$\!();><{}?|\[\]\*\\\\]"
+
+# dns character set
+DNS_CHARSET="[@a-zA-Z0-9._-]"
+
# detect if called by ddns-lucihelper.sh script, disable retrys (empty variable == false)
LUCI_HELPER=$(printf %s "$MYPROG" | grep -i "luci")
DRILL=$(which drill)
HOSTIP=$(which hostip)
NSLOOKUP=$(which nslookup)
-NSLOOKUP_MUSL=$($(which nslookup) localhost 2>&1 | grep -F "(null)") # not empty busybox compiled with musl
# Transfer Programs
WGET=$(which wget)
CURL=$(which curl)
# CURL_SSL not empty then SSL support available
-CURL_SSL=$($(which curl) -V 2>/dev/null | grep "Protocols:" | grep -F "https")
+CURL_SSL=$($CURL -V 2>/dev/null | grep -F "https")
# CURL_PROXY not empty then Proxy support available
CURL_PROXY=$(find /lib /usr/lib -name libcurl.so* -exec strings {} 2>/dev/null \; | grep -im1 "all_proxy")
UCLIENT_FETCH=$(which uclient-fetch)
-# UCLIENT_FETCH_SSL not empty then SSL support available
-UCLIENT_FETCH_SSL=$(find /lib /usr/lib -name libustream-ssl.so* 2>/dev/null)
# Global configuration settings
# allow NON-public IP's
# value +10 will exit the scripts
# $2..n text to report
write_log() {
- local __LEVEL __EXIT __CMD __MSG
+ local __LEVEL __EXIT __CMD __MSG __MSE
local __TIME=$(date +%H%M%S)
[ $1 -ge 10 ] && {
__LEVEL=$(($1-10))
[ $VERBOSE -gt 0 -o $__EXIT -gt 0 ] && echo -e "$__MSG"
# write to logfile
if [ ${use_logfile:-1} -eq 1 -o $VERBOSE -gt 1 ]; then
- printf "%s\n" "$__MSG" | \
- sed -e "s/$password/*password*/g; \
- s/$URL_PASS/*URL_PASS*/g" >> $LOGFILE
+ if [ -n "$password" ]; then
+ # url encode __MSG, password already done
+ urlencode __MSE "$__MSG"
+ # replace encoded password inside encoded message
+ # and url decode (newline was encoded as %00)
+ __MSG=$( echo -e "$__MSE" \
+ | sed -e "s/$URL_PASS/***PW***/g" \
+ | sed -e "s/+/ /g; s/%00/\n/g; s/%/\\\\x/g" | xargs -0 printf "%b" )
+ fi
+ printf "%s\n" "$__MSG" >> $LOGFILE
# VERBOSE > 1 then NO loop so NO truncate log to $ddns_loglines lines
[ $VERBOSE -gt 1 ] || sed -i -e :a -e '$q;N;'$ddns_loglines',$D;ba' $LOGFILE
fi
[ $__LEVEL -eq 7 ] && return # no syslog for debug messages
__CMD=$(echo -e "$__CMD" | tr -d '\n' | tr '\t' ' ') # remove \n \t chars
[ $__EXIT -eq 1 ] && {
- $__CMD # force syslog before exit
+ eval "$__CMD" # force syslog before exit
exit 1
}
[ $use_syslog -eq 0 ] && return
- [ $((use_syslog + __LEVEL)) -le 7 ] && $__CMD
+ [ $((use_syslog + __LEVEL)) -le 7 ] && eval "$__CMD"
return
}
urlencode() {
# $1 Name of Variable to store encoded string to
# $2 string to encode
- local __STR __LEN __CHAR __OUT
- local __ENC=""
- local __POS=1
+ local __ENC
[ $# -ne 2 ] && write_log 12 "Error calling 'urlencode()' - wrong number of parameters"
- __STR="$2" # read string to encode
- __LEN=${#__STR} # get string length
-
- while [ $__POS -le $__LEN ]; do
- # read one chat of the string
- __CHAR=$(expr substr "$__STR" $__POS 1)
-
- case "$__CHAR" in
- [-_.~a-zA-Z0-9] )
- # standard char
- __OUT="${__CHAR}"
- ;;
- * )
- # special char get %hex code
- __OUT=$(printf '%%%02x' "'$__CHAR" )
- ;;
- esac
- __ENC="${__ENC}${__OUT}" # append to encoded string
- __POS=$(( $__POS + 1 )) # increment position
- done
+ __ENC="$(awk -v str="$2" 'BEGIN{ORS="";for(i=32;i<=127;i++)lookup[sprintf("%c",i)]=i
+ for(k=1;k<=length(str);++k){enc=substr(str,k,1);if(enc!~"[-_.~a-zA-Z0-9]")enc=sprintf("%%%02x", lookup[enc]);print enc}}')"
eval "$1=\"$__ENC\"" # transfer back to variable
return 0
return $status
}
+# sanitize a variable
+# $1 variable name
+# $2 allowed shell pattern
+# $3 disallowed shell pattern
+sanitize_variable() {
+ local __VAR=$1
+ eval __VALUE=\$$__VAR
+ local __ALLOWED=$2
+ local __REJECT=$3
+
+ # removing all allowed should give empty string
+ if [ -n "$__ALLOWED" ]; then
+ [ -z "${__VALUE//$__ALLOWED}" ] || write_log 12 "sanitize on $__VAR found characters outside allowed subset"
+ fi
+
+ # removing rejected pattern should give the same string as the input
+ if [ -n "$__REJECT" ]; then
+ [ "$__VALUE" = "${__VALUE//$__REJECT}" ] || write_log 12 "sanitize on $__VAR found rejected characters"
+ fi
+}
+
# verify given host and port is connectable
# $1 Host/IP to verify
# $2 Port to verify
# uclient-fetch possibly with ssl support if /lib/libustream-ssl.so installed
elif [ -n "$UCLIENT_FETCH" ]; then
+ # UCLIENT_FETCH_SSL not empty then SSL support available
+ UCLIENT_FETCH_SSL=$(find /lib /usr/lib -name libustream-ssl.so* 2>/dev/null)
__PROG="$UCLIENT_FETCH -q -O $DATFILE"
# force network/ip not supported
[ -n "$__BINDIP" ] && \
do_transfer "$__URL" || return 1
- write_log 7 "DDNS Provider answered:\n$(cat $DATFILE)"
+ write_log 7 "DDNS Provider answered:${N}$(cat $DATFILE)"
[ -z "$UPD_ANSWER" ] && return 0 # not set then ignore
write_log 7 "Detect local IP on '$ip_source'"
while : ; do
- if [ -n "$ip_network" ]; then
+ if [ -n "$ip_network" -a "$ip_source" = "network" ]; then
# set correct program
network_flush_cache # force re-read data from ubus
[ $use_ipv6 -eq 0 ] && __RUNPROG="network_get_ipaddr" \
eval "$__RUNPROG __DATA $ip_network" || \
write_log 13 "Can not detect local IP using $__RUNPROG '$ip_network' - Error: '$?'"
[ -n "$__DATA" ] && write_log 7 "Local IP '$__DATA' detected on network '$ip_network'"
- elif [ -n "$ip_interface" ]; then
+ elif [ -n "$ip_interface" -a "$ip_source" = "interface" ]; then
local __DATA4=""; local __DATA6=""
if [ -n "$(which ip)" ]; then # ip program installed
write_log 7 "#> ip -o addr show dev $ip_interface scope global >$DATFILE 2>$ERRFILE"
fi
[ $use_ipv6 -eq 0 ] && __DATA="$__DATA4" || __DATA="$__DATA6"
[ -n "$__DATA" ] && write_log 7 "Local IP '$__DATA' detected on interface '$ip_interface'"
- elif [ -n "$ip_script" ]; then
+ elif [ -n "$ip_script" -a "$ip_source" = "script" ]; then
write_log 7 "#> $ip_script >$DATFILE 2>$ERRFILE"
eval $ip_script >$DATFILE 2>$ERRFILE
__ERR=$?
write_log 3 "$ip_script Error: '$__ERR'"
write_log 7 "$(cat $ERRFILE)" # report error
fi
- elif [ -n "$ip_url" ]; then
+ elif [ -n "$ip_url" -a "$ip_source" = "web" ]; then
do_transfer "$ip_url"
# use correct regular expression
[ $use_ipv6 -eq 0 ] \
__RUNPROG="$__PROG $lookup_host >$DATFILE 2>$ERRFILE"
__PROG="hostip"
elif [ -n "$NSLOOKUP" ]; then # last use BusyBox nslookup
+ NSLOOKUP_MUSL=$($(which nslookup) localhost 2>&1 | grep -F "(null)") # not empty busybox compiled with musl
[ $force_dnstcp -ne 0 ] && \
write_log 14 "Busybox nslookup - no support for 'DNS over TCP'"
[ -n "$NSLOOKUP_MUSL" -a -n "$dns_server" ] && \
case $1 in
0) if [ $__ERR -eq 0 ]; then
- write_log 5 "PID '$$' exit normal at $(eval $DATE_PROG)\n"
+ write_log 5 "PID '$$' exit normal at $(eval $DATE_PROG)${N}"
else
- write_log 4 "PID '$$' exit WITH ERROR '$__ERR' at $(eval $DATE_PROG)\n"
+ write_log 4 "PID '$$' exit WITH ERROR '$__ERR' at $(eval $DATE_PROG)${N}"
fi ;;
1) write_log 6 "PID '$$' received 'SIGHUP' at $(eval $DATE_PROG)"
# reload config via starting the script again
/usr/lib/ddns/dynamic_dns_updater.sh -v "0" -S "$__SECTIONID" -- start || true
exit 0 ;; # and leave this one
- 2) write_log 5 "PID '$$' terminated by 'SIGINT' at $(eval $DATE_PROG)\n";;
- 3) write_log 5 "PID '$$' terminated by 'SIGQUIT' at $(eval $DATE_PROG)\n";;
- 15) write_log 5 "PID '$$' terminated by 'SIGTERM' at $(eval $DATE_PROG)\n";;
+ 2) write_log 5 "PID '$$' terminated by 'SIGINT' at $(eval $DATE_PROG)${N}";;
+ 3) write_log 5 "PID '$$' terminated by 'SIGQUIT' at $(eval $DATE_PROG)${N}";;
+ 15) write_log 5 "PID '$$' terminated by 'SIGTERM' at $(eval $DATE_PROG)${N}";;
*) write_log 13 "Unhandled signal '$1' in 'trap_handler()'";;
esac
[ "$ip_source" = "web" -a -z "$ip_url" -a $use_ipv6 -eq 1 ] && ip_url="http://checkipv6.dyndns.com"
[ "$ip_source" = "interface" -a -z "$ip_interface" ] && ip_interface="eth1"
+# url encode username (might be email or something like this)
+# and password (might have special chars for security reason)
+# and optional parameter "param_enc"
+[ -n "$username" ] && urlencode URL_USER "$username"
+[ -n "$password" ] && urlencode URL_PASS "$password"
+[ -n "$param_enc" ] && urlencode URL_PENC "$param_enc"
+
# SECTION_ID does not exists
[ $ERR_LAST -ne 0 ] && {
[ $VERBOSE -le 1 ] && VERBOSE=2 # force console out and logfile output
write_log 7 "************ ************** ************** **************"
write_log 5 "PID '$$' started at $(eval $DATE_PROG)"
write_log 7 "ddns version : $VERSION"
- write_log 7 "uci configuration:\n$(uci -q show ddns | grep '=service' | sort)"
+ write_log 7 "uci configuration:${N}$(uci -q show ddns | grep '=service' | sort)"
write_log 14 "Service section '$SECTION_ID' not defined"
}
write_log 7 "************ ************** ************** **************"
write_log 5 "PID '$$' started at $(eval $DATE_PROG)"
write_log 7 "ddns version : $VERSION"
-write_log 7 "uci configuration:\n$(uci -q show ddns.$SECTION_ID | sort)"
+write_log 7 "uci configuration:${N}$(uci -q show ddns.$SECTION_ID | sort)"
# write_log 7 "ddns version : $(opkg list-installed ddns-scripts | cut -d ' ' -f 3)"
case $VERBOSE in
0) write_log 7 "verbose mode : 0 - run normal, NO console output";;
# without lookup host and possibly other required options we can do nothing for you
[ -z "$lookup_host" ] && write_log 14 "Service section not configured correctly! Missing 'lookup_host'"
+# verify validity of variables
+[ -n "$lookup_host" ] && sanitize_variable lookup_host "$DNS_CHARSET" ""
+[ -n "$dns_server" ] && sanitize_variable dns_server "$DNS_CHARSET" ""
+[ -n "$domain" ] && sanitize_variable domain "$DNS_CHARSET" ""
+
+# Filter shell escape characters, if these are required in the URL, they
+# can still be passed url encoded
+[ -n "$param_opt" ] && sanitize_variable param_opt "" "$SHELL_ESCAPE"
+
[ -n "$update_url" ] && {
# only check if update_url is given, update_scripts have to check themselves
[ -z "$domain" ] && $(echo "$update_url" | grep "\[DOMAIN\]" >/dev/null 2>&1) && \
write_log 14 "Service section not configured correctly! Missing 'param_opt'"
}
-# url encode username (might be email or something like this)
-# and password (might have special chars for security reason)
-# and optional parameter "param_enc"
-[ -n "$username" ] && urlencode URL_USER "$username"
-[ -n "$password" ] && urlencode URL_PASS "$password"
-[ -n "$param_enc" ] && urlencode URL_PENC "$param_enc"
-
# verify ip_source 'script' if script is configured and executable
if [ "$ip_source" = "script" ]; then
set -- $ip_script #handling script with parameters, we need a trick
+++ /dev/null
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at https://mozilla.org/MPL/2.0/.
-
-// Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat,
-// rather than any other VCS sites. Pulling from any other URL is not guaranteed to be supported.
-
-// Instructions on pulling and using this list can be found at https://publicsuffix.org/list/.
-
-// ===BEGIN ICANN DOMAINS===
-
-// ac : https://en.wikipedia.org/wiki/.ac
-ac
-com.ac
-edu.ac
-gov.ac
-net.ac
-mil.ac
-org.ac
-
-// ad : https://en.wikipedia.org/wiki/.ad
-ad
-nom.ad
-
-// ae : https://en.wikipedia.org/wiki/.ae
-// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php
-ae
-co.ae
-net.ae
-org.ae
-sch.ae
-ac.ae
-gov.ae
-mil.ae
-
-// aero : see https://www.information.aero/index.php?id=66
-aero
-accident-investigation.aero
-accident-prevention.aero
-aerobatic.aero
-aeroclub.aero
-aerodrome.aero
-agents.aero
-aircraft.aero
-airline.aero
-airport.aero
-air-surveillance.aero
-airtraffic.aero
-air-traffic-control.aero
-ambulance.aero
-amusement.aero
-association.aero
-author.aero
-ballooning.aero
-broker.aero
-caa.aero
-cargo.aero
-catering.aero
-certification.aero
-championship.aero
-charter.aero
-civilaviation.aero
-club.aero
-conference.aero
-consultant.aero
-consulting.aero
-control.aero
-council.aero
-crew.aero
-design.aero
-dgca.aero
-educator.aero
-emergency.aero
-engine.aero
-engineer.aero
-entertainment.aero
-equipment.aero
-exchange.aero
-express.aero
-federation.aero
-flight.aero
-freight.aero
-fuel.aero
-gliding.aero
-government.aero
-groundhandling.aero
-group.aero
-hanggliding.aero
-homebuilt.aero
-insurance.aero
-journal.aero
-journalist.aero
-leasing.aero
-logistics.aero
-magazine.aero
-maintenance.aero
-media.aero
-microlight.aero
-modelling.aero
-navigation.aero
-parachuting.aero
-paragliding.aero
-passenger-association.aero
-pilot.aero
-press.aero
-production.aero
-recreation.aero
-repbody.aero
-res.aero
-research.aero
-rotorcraft.aero
-safety.aero
-scientist.aero
-services.aero
-show.aero
-skydiving.aero
-software.aero
-student.aero
-trader.aero
-trading.aero
-trainer.aero
-union.aero
-workinggroup.aero
-works.aero
-
-// af : http://www.nic.af/help.jsp
-af
-gov.af
-com.af
-org.af
-net.af
-edu.af
-
-// ag : http://www.nic.ag/prices.htm
-ag
-com.ag
-org.ag
-net.ag
-co.ag
-nom.ag
-
-// ai : http://nic.com.ai/
-ai
-off.ai
-com.ai
-net.ai
-org.ai
-
-// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31
-al
-com.al
-edu.al
-gov.al
-mil.al
-net.al
-org.al
-
-// am : https://en.wikipedia.org/wiki/.am
-am
-
-// ao : https://en.wikipedia.org/wiki/.ao
-// http://www.dns.ao/REGISTR.DOC
-ao
-ed.ao
-gv.ao
-og.ao
-co.ao
-pb.ao
-it.ao
-
-// aq : https://en.wikipedia.org/wiki/.aq
-aq
-
-// ar : https://nic.ar/normativa-vigente.xhtml
-ar
-com.ar
-edu.ar
-gob.ar
-gov.ar
-int.ar
-mil.ar
-net.ar
-org.ar
-tur.ar
-
-// arpa : https://en.wikipedia.org/wiki/.arpa
-// Confirmed by registry <iana-questions@icann.org> 2008-06-18
-arpa
-e164.arpa
-in-addr.arpa
-ip6.arpa
-iris.arpa
-uri.arpa
-urn.arpa
-
-// as : https://en.wikipedia.org/wiki/.as
-as
-gov.as
-
-// asia : https://en.wikipedia.org/wiki/.asia
-asia
-
-// at : https://en.wikipedia.org/wiki/.at
-// Confirmed by registry <it@nic.at> 2008-06-17
-at
-ac.at
-co.at
-gv.at
-or.at
-
-// au : https://en.wikipedia.org/wiki/.au
-// http://www.auda.org.au/
-au
-// 2LDs
-com.au
-net.au
-org.au
-edu.au
-gov.au
-asn.au
-id.au
-// Historic 2LDs (closed to new registration, but sites still exist)
-info.au
-conf.au
-oz.au
-// CGDNs - http://www.cgdn.org.au/
-act.au
-nsw.au
-nt.au
-qld.au
-sa.au
-tas.au
-vic.au
-wa.au
-// 3LDs
-act.edu.au
-nsw.edu.au
-nt.edu.au
-qld.edu.au
-sa.edu.au
-tas.edu.au
-vic.edu.au
-wa.edu.au
-// act.gov.au Bug 984824 - Removed at request of Greg Tankard
-// nsw.gov.au Bug 547985 - Removed at request of <Shae.Donelan@services.nsw.gov.au>
-// nt.gov.au Bug 940478 - Removed at request of Greg Connors <Greg.Connors@nt.gov.au>
-qld.gov.au
-sa.gov.au
-tas.gov.au
-vic.gov.au
-wa.gov.au
-
-// aw : https://en.wikipedia.org/wiki/.aw
-aw
-com.aw
-
-// ax : https://en.wikipedia.org/wiki/.ax
-ax
-
-// az : https://en.wikipedia.org/wiki/.az
-az
-com.az
-net.az
-int.az
-gov.az
-org.az
-edu.az
-info.az
-pp.az
-mil.az
-name.az
-pro.az
-biz.az
-
-// ba : http://nic.ba/users_data/files/pravilnik_o_registraciji.pdf
-ba
-com.ba
-edu.ba
-gov.ba
-mil.ba
-net.ba
-org.ba
-
-// bb : https://en.wikipedia.org/wiki/.bb
-bb
-biz.bb
-co.bb
-com.bb
-edu.bb
-gov.bb
-info.bb
-net.bb
-org.bb
-store.bb
-tv.bb
-
-// bd : https://en.wikipedia.org/wiki/.bd
-*.bd
-
-// be : https://en.wikipedia.org/wiki/.be
-// Confirmed by registry <tech@dns.be> 2008-06-08
-be
-ac.be
-
-// bf : https://en.wikipedia.org/wiki/.bf
-bf
-gov.bf
-
-// bg : https://en.wikipedia.org/wiki/.bg
-// https://www.register.bg/user/static/rules/en/index.html
-bg
-a.bg
-b.bg
-c.bg
-d.bg
-e.bg
-f.bg
-g.bg
-h.bg
-i.bg
-j.bg
-k.bg
-l.bg
-m.bg
-n.bg
-o.bg
-p.bg
-q.bg
-r.bg
-s.bg
-t.bg
-u.bg
-v.bg
-w.bg
-x.bg
-y.bg
-z.bg
-0.bg
-1.bg
-2.bg
-3.bg
-4.bg
-5.bg
-6.bg
-7.bg
-8.bg
-9.bg
-
-// bh : https://en.wikipedia.org/wiki/.bh
-bh
-com.bh
-edu.bh
-net.bh
-org.bh
-gov.bh
-
-// bi : https://en.wikipedia.org/wiki/.bi
-// http://whois.nic.bi/
-bi
-co.bi
-com.bi
-edu.bi
-or.bi
-org.bi
-
-// biz : https://en.wikipedia.org/wiki/.biz
-biz
-
-// bj : https://en.wikipedia.org/wiki/.bj
-bj
-asso.bj
-barreau.bj
-gouv.bj
-
-// bm : http://www.bermudanic.bm/dnr-text.txt
-bm
-com.bm
-edu.bm
-gov.bm
-net.bm
-org.bm
-
-// bn : https://en.wikipedia.org/wiki/.bn
-*.bn
-
-// bo : http://www.nic.bo/
-bo
-com.bo
-edu.bo
-gov.bo
-gob.bo
-int.bo
-org.bo
-net.bo
-mil.bo
-tv.bo
-
-// br : http://registro.br/dominio/categoria.html
-// Submitted by registry <fneves@registro.br>
-br
-adm.br
-adv.br
-agr.br
-am.br
-arq.br
-art.br
-ato.br
-b.br
-bio.br
-blog.br
-bmd.br
-cim.br
-cng.br
-cnt.br
-com.br
-coop.br
-ecn.br
-eco.br
-edu.br
-emp.br
-eng.br
-esp.br
-etc.br
-eti.br
-far.br
-flog.br
-fm.br
-fnd.br
-fot.br
-fst.br
-g12.br
-ggf.br
-gov.br
-imb.br
-ind.br
-inf.br
-jor.br
-jus.br
-leg.br
-lel.br
-mat.br
-med.br
-mil.br
-mp.br
-mus.br
-net.br
-*.nom.br
-not.br
-ntr.br
-odo.br
-org.br
-ppg.br
-pro.br
-psc.br
-psi.br
-qsl.br
-radio.br
-rec.br
-slg.br
-srv.br
-taxi.br
-teo.br
-tmp.br
-trd.br
-tur.br
-tv.br
-vet.br
-vlog.br
-wiki.br
-zlg.br
-
-// bs : http://www.nic.bs/rules.html
-bs
-com.bs
-net.bs
-org.bs
-edu.bs
-gov.bs
-
-// bt : https://en.wikipedia.org/wiki/.bt
-bt
-com.bt
-edu.bt
-gov.bt
-net.bt
-org.bt
-
-// bv : No registrations at this time.
-// Submitted by registry <jarle@uninett.no>
-bv
-
-// bw : https://en.wikipedia.org/wiki/.bw
-// http://www.gobin.info/domainname/bw.doc
-// list of other 2nd level tlds ?
-bw
-co.bw
-org.bw
-
-// by : https://en.wikipedia.org/wiki/.by
-// http://tld.by/rules_2006_en.html
-// list of other 2nd level tlds ?
-by
-gov.by
-mil.by
-// Official information does not indicate that com.by is a reserved
-// second-level domain, but it's being used as one (see www.google.com.by and
-// www.yahoo.com.by, for example), so we list it here for safety's sake.
-com.by
-
-// http://hoster.by/
-of.by
-
-// bz : https://en.wikipedia.org/wiki/.bz
-// http://www.belizenic.bz/
-bz
-com.bz
-net.bz
-org.bz
-edu.bz
-gov.bz
-
-// ca : https://en.wikipedia.org/wiki/.ca
-ca
-// ca geographical names
-ab.ca
-bc.ca
-mb.ca
-nb.ca
-nf.ca
-nl.ca
-ns.ca
-nt.ca
-nu.ca
-on.ca
-pe.ca
-qc.ca
-sk.ca
-yk.ca
-// gc.ca: https://en.wikipedia.org/wiki/.gc.ca
-// see also: http://registry.gc.ca/en/SubdomainFAQ
-gc.ca
-
-// cat : https://en.wikipedia.org/wiki/.cat
-cat
-
-// cc : https://en.wikipedia.org/wiki/.cc
-cc
-
-// cd : https://en.wikipedia.org/wiki/.cd
-// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1
-cd
-gov.cd
-
-// cf : https://en.wikipedia.org/wiki/.cf
-cf
-
-// cg : https://en.wikipedia.org/wiki/.cg
-cg
-
-// ch : https://en.wikipedia.org/wiki/.ch
-ch
-
-// ci : https://en.wikipedia.org/wiki/.ci
-// http://www.nic.ci/index.php?page=charte
-ci
-org.ci
-or.ci
-com.ci
-co.ci
-edu.ci
-ed.ci
-ac.ci
-net.ci
-go.ci
-asso.ci
-xn--aroport-bya.ci
-aéroport.ci
-int.ci
-presse.ci
-md.ci
-gouv.ci
-
-// ck : https://en.wikipedia.org/wiki/.ck
-*.ck
-!www.ck
-
-// cl : https://en.wikipedia.org/wiki/.cl
-cl
-gov.cl
-gob.cl
-co.cl
-mil.cl
-
-// cm : https://en.wikipedia.org/wiki/.cm plus bug 981927
-cm
-co.cm
-com.cm
-gov.cm
-net.cm
-
-// cn : https://en.wikipedia.org/wiki/.cn
-// Submitted by registry <tanyaling@cnnic.cn>
-cn
-ac.cn
-com.cn
-edu.cn
-gov.cn
-net.cn
-org.cn
-mil.cn
-xn--55qx5d.cn
-公司.cn
-xn--io0a7i.cn
-网络.cn
-xn--od0alg.cn
-網絡.cn
-// cn geographic names
-ah.cn
-bj.cn
-cq.cn
-fj.cn
-gd.cn
-gs.cn
-gz.cn
-gx.cn
-ha.cn
-hb.cn
-he.cn
-hi.cn
-hl.cn
-hn.cn
-jl.cn
-js.cn
-jx.cn
-ln.cn
-nm.cn
-nx.cn
-qh.cn
-sc.cn
-sd.cn
-sh.cn
-sn.cn
-sx.cn
-tj.cn
-xj.cn
-xz.cn
-yn.cn
-zj.cn
-hk.cn
-mo.cn
-tw.cn
-
-// co : https://en.wikipedia.org/wiki/.co
-// Submitted by registry <tecnico@uniandes.edu.co>
-co
-arts.co
-com.co
-edu.co
-firm.co
-gov.co
-info.co
-int.co
-mil.co
-net.co
-nom.co
-org.co
-rec.co
-web.co
-
-// com : https://en.wikipedia.org/wiki/.com
-com
-
-// coop : https://en.wikipedia.org/wiki/.coop
-coop
-
-// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do
-cr
-ac.cr
-co.cr
-ed.cr
-fi.cr
-go.cr
-or.cr
-sa.cr
-
-// cu : https://en.wikipedia.org/wiki/.cu
-cu
-com.cu
-edu.cu
-org.cu
-net.cu
-gov.cu
-inf.cu
-
-// cv : https://en.wikipedia.org/wiki/.cv
-cv
-
-// cw : http://www.una.cw/cw_registry/
-// Confirmed by registry <registry@una.net> 2013-03-26
-cw
-com.cw
-edu.cw
-net.cw
-org.cw
-
-// cx : https://en.wikipedia.org/wiki/.cx
-// list of other 2nd level tlds ?
-cx
-gov.cx
-
-// cy : http://www.nic.cy/
-// Submitted by registry Panayiotou Fotia <cydns@ucy.ac.cy>
-cy
-ac.cy
-biz.cy
-com.cy
-ekloges.cy
-gov.cy
-ltd.cy
-name.cy
-net.cy
-org.cy
-parliament.cy
-press.cy
-pro.cy
-tm.cy
-
-// cz : https://en.wikipedia.org/wiki/.cz
-cz
-
-// de : https://en.wikipedia.org/wiki/.de
-// Confirmed by registry <ops@denic.de> (with technical
-// reservations) 2008-07-01
-de
-
-// dj : https://en.wikipedia.org/wiki/.dj
-dj
-
-// dk : https://en.wikipedia.org/wiki/.dk
-// Confirmed by registry <robert@dk-hostmaster.dk> 2008-06-17
-dk
-
-// dm : https://en.wikipedia.org/wiki/.dm
-dm
-com.dm
-net.dm
-org.dm
-edu.dm
-gov.dm
-
-// do : https://en.wikipedia.org/wiki/.do
-do
-art.do
-com.do
-edu.do
-gob.do
-gov.do
-mil.do
-net.do
-org.do
-sld.do
-web.do
-
-// dz : https://en.wikipedia.org/wiki/.dz
-dz
-com.dz
-org.dz
-net.dz
-gov.dz
-edu.dz
-asso.dz
-pol.dz
-art.dz
-
-// ec : http://www.nic.ec/reg/paso1.asp
-// Submitted by registry <vabboud@nic.ec>
-ec
-com.ec
-info.ec
-net.ec
-fin.ec
-k12.ec
-med.ec
-pro.ec
-org.ec
-edu.ec
-gov.ec
-gob.ec
-mil.ec
-
-// edu : https://en.wikipedia.org/wiki/.edu
-edu
-
-// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B
-ee
-edu.ee
-gov.ee
-riik.ee
-lib.ee
-med.ee
-com.ee
-pri.ee
-aip.ee
-org.ee
-fie.ee
-
-// eg : https://en.wikipedia.org/wiki/.eg
-eg
-com.eg
-edu.eg
-eun.eg
-gov.eg
-mil.eg
-name.eg
-net.eg
-org.eg
-sci.eg
-
-// er : https://en.wikipedia.org/wiki/.er
-*.er
-
-// es : https://www.nic.es/site_ingles/ingles/dominios/index.html
-es
-com.es
-nom.es
-org.es
-gob.es
-edu.es
-
-// et : https://en.wikipedia.org/wiki/.et
-et
-com.et
-gov.et
-org.et
-edu.et
-biz.et
-name.et
-info.et
-net.et
-
-// eu : https://en.wikipedia.org/wiki/.eu
-eu
-
-// fi : https://en.wikipedia.org/wiki/.fi
-fi
-// aland.fi : https://en.wikipedia.org/wiki/.ax
-// This domain is being phased out in favor of .ax. As there are still many
-// domains under aland.fi, we still keep it on the list until aland.fi is
-// completely removed.
-// TODO: Check for updates (expected to be phased out around Q1/2009)
-aland.fi
-
-// fj : https://en.wikipedia.org/wiki/.fj
-*.fj
-
-// fk : https://en.wikipedia.org/wiki/.fk
-*.fk
-
-// fm : https://en.wikipedia.org/wiki/.fm
-fm
-
-// fo : https://en.wikipedia.org/wiki/.fo
-fo
-
-// fr : http://www.afnic.fr/
-// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs
-fr
-com.fr
-asso.fr
-nom.fr
-prd.fr
-presse.fr
-tm.fr
-// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels
-aeroport.fr
-assedic.fr
-avocat.fr
-avoues.fr
-cci.fr
-chambagri.fr
-chirurgiens-dentistes.fr
-experts-comptables.fr
-geometre-expert.fr
-gouv.fr
-greta.fr
-huissier-justice.fr
-medecin.fr
-notaires.fr
-pharmacien.fr
-port.fr
-veterinaire.fr
-
-// ga : https://en.wikipedia.org/wiki/.ga
-ga
-
-// gb : This registry is effectively dormant
-// Submitted by registry <Damien.Shaw@ja.net>
-gb
-
-// gd : https://en.wikipedia.org/wiki/.gd
-gd
-
-// ge : http://www.nic.net.ge/policy_en.pdf
-ge
-com.ge
-edu.ge
-gov.ge
-org.ge
-mil.ge
-net.ge
-pvt.ge
-
-// gf : https://en.wikipedia.org/wiki/.gf
-gf
-
-// gg : http://www.channelisles.net/register-domains/
-// Confirmed by registry <nigel@channelisles.net> 2013-11-28
-gg
-co.gg
-net.gg
-org.gg
-
-// gh : https://en.wikipedia.org/wiki/.gh
-// see also: http://www.nic.gh/reg_now.php
-// Although domains directly at second level are not possible at the moment,
-// they have been possible for some time and may come back.
-gh
-com.gh
-edu.gh
-gov.gh
-org.gh
-mil.gh
-
-// gi : http://www.nic.gi/rules.html
-gi
-com.gi
-ltd.gi
-gov.gi
-mod.gi
-edu.gi
-org.gi
-
-// gl : https://en.wikipedia.org/wiki/.gl
-// http://nic.gl
-gl
-co.gl
-com.gl
-edu.gl
-net.gl
-org.gl
-
-// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm
-gm
-
-// gn : http://psg.com/dns/gn/gn.txt
-// Submitted by registry <randy@psg.com>
-gn
-ac.gn
-com.gn
-edu.gn
-gov.gn
-org.gn
-net.gn
-
-// gov : https://en.wikipedia.org/wiki/.gov
-gov
-
-// gp : http://www.nic.gp/index.php?lang=en
-gp
-com.gp
-net.gp
-mobi.gp
-edu.gp
-org.gp
-asso.gp
-
-// gq : https://en.wikipedia.org/wiki/.gq
-gq
-
-// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html
-// Submitted by registry <segred@ics.forth.gr>
-gr
-com.gr
-edu.gr
-net.gr
-org.gr
-gov.gr
-
-// gs : https://en.wikipedia.org/wiki/.gs
-gs
-
-// gt : http://www.gt/politicas_de_registro.html
-gt
-com.gt
-edu.gt
-gob.gt
-ind.gt
-mil.gt
-net.gt
-org.gt
-
-// gu : http://gadao.gov.gu/registration.txt
-*.gu
-
-// gw : https://en.wikipedia.org/wiki/.gw
-gw
-
-// gy : https://en.wikipedia.org/wiki/.gy
-// http://registry.gy/
-gy
-co.gy
-com.gy
-edu.gy
-gov.gy
-net.gy
-org.gy
-
-// hk : https://www.hkdnr.hk
-// Submitted by registry <hk.tech@hkirc.hk>
-hk
-com.hk
-edu.hk
-gov.hk
-idv.hk
-net.hk
-org.hk
-xn--55qx5d.hk
-公司.hk
-xn--wcvs22d.hk
-教育.hk
-xn--lcvr32d.hk
-敎育.hk
-xn--mxtq1m.hk
-政府.hk
-xn--gmqw5a.hk
-個人.hk
-xn--ciqpn.hk
-个人.hk
-xn--gmq050i.hk
-箇人.hk
-xn--zf0avx.hk
-網络.hk
-xn--io0a7i.hk
-网络.hk
-xn--mk0axi.hk
-组織.hk
-xn--od0alg.hk
-網絡.hk
-xn--od0aq3b.hk
-网絡.hk
-xn--tn0ag.hk
-组织.hk
-xn--uc0atv.hk
-組織.hk
-xn--uc0ay4a.hk
-組织.hk
-
-// hm : https://en.wikipedia.org/wiki/.hm
-hm
-
-// hn : http://www.nic.hn/politicas/ps02,,05.html
-hn
-com.hn
-edu.hn
-org.hn
-net.hn
-mil.hn
-gob.hn
-
-// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf
-hr
-iz.hr
-from.hr
-name.hr
-com.hr
-
-// ht : http://www.nic.ht/info/charte.cfm
-ht
-com.ht
-shop.ht
-firm.ht
-info.ht
-adult.ht
-net.ht
-pro.ht
-org.ht
-med.ht
-art.ht
-coop.ht
-pol.ht
-asso.ht
-edu.ht
-rel.ht
-gouv.ht
-perso.ht
-
-// hu : http://www.domain.hu/domain/English/sld.html
-// Confirmed by registry <pasztor@iszt.hu> 2008-06-12
-hu
-co.hu
-info.hu
-org.hu
-priv.hu
-sport.hu
-tm.hu
-2000.hu
-agrar.hu
-bolt.hu
-casino.hu
-city.hu
-erotica.hu
-erotika.hu
-film.hu
-forum.hu
-games.hu
-hotel.hu
-ingatlan.hu
-jogasz.hu
-konyvelo.hu
-lakas.hu
-media.hu
-news.hu
-reklam.hu
-sex.hu
-shop.hu
-suli.hu
-szex.hu
-tozsde.hu
-utazas.hu
-video.hu
-
-// id : https://register.pandi.or.id/
-id
-ac.id
-biz.id
-co.id
-desa.id
-go.id
-mil.id
-my.id
-net.id
-or.id
-sch.id
-web.id
-
-// ie : https://en.wikipedia.org/wiki/.ie
-ie
-gov.ie
-
-// il : http://www.isoc.org.il/domains/
-il
-ac.il
-co.il
-gov.il
-idf.il
-k12.il
-muni.il
-net.il
-org.il
-
-// im : https://www.nic.im/
-// Submitted by registry <info@nic.im>
-im
-ac.im
-co.im
-com.im
-ltd.co.im
-net.im
-org.im
-plc.co.im
-tt.im
-tv.im
-
-// in : https://en.wikipedia.org/wiki/.in
-// see also: https://registry.in/Policies
-// Please note, that nic.in is not an official eTLD, but used by most
-// government institutions.
-in
-co.in
-firm.in
-net.in
-org.in
-gen.in
-ind.in
-nic.in
-ac.in
-edu.in
-res.in
-gov.in
-mil.in
-
-// info : https://en.wikipedia.org/wiki/.info
-info
-
-// int : https://en.wikipedia.org/wiki/.int
-// Confirmed by registry <iana-questions@icann.org> 2008-06-18
-int
-eu.int
-
-// io : http://www.nic.io/rules.html
-// list of other 2nd level tlds ?
-io
-com.io
-
-// iq : http://www.cmc.iq/english/iq/iqregister1.htm
-iq
-gov.iq
-edu.iq
-mil.iq
-com.iq
-org.iq
-net.iq
-
-// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules
-// Also see http://www.nic.ir/Internationalized_Domain_Names
-// Two <iran>.ir entries added at request of <tech-team@nic.ir>, 2010-04-16
-ir
-ac.ir
-co.ir
-gov.ir
-id.ir
-net.ir
-org.ir
-sch.ir
-// xn--mgba3a4f16a.ir (<iran>.ir, Persian YEH)
-xn--mgba3a4f16a.ir
-ایران.ir
-// xn--mgba3a4fra.ir (<iran>.ir, Arabic YEH)
-xn--mgba3a4fra.ir
-ايران.ir
-
-// is : http://www.isnic.is/domain/rules.php
-// Confirmed by registry <marius@isgate.is> 2008-12-06
-is
-net.is
-com.is
-edu.is
-gov.is
-org.is
-int.is
-
-// it : https://en.wikipedia.org/wiki/.it
-it
-gov.it
-edu.it
-// Reserved geo-names:
-// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf
-// There is also a list of reserved geo-names corresponding to Italian municipalities
-// http://www.nic.it/documenti/appendice-c.pdf, but it is not included here.
-// Regions
-abr.it
-abruzzo.it
-aosta-valley.it
-aostavalley.it
-bas.it
-basilicata.it
-cal.it
-calabria.it
-cam.it
-campania.it
-emilia-romagna.it
-emiliaromagna.it
-emr.it
-friuli-v-giulia.it
-friuli-ve-giulia.it
-friuli-vegiulia.it
-friuli-venezia-giulia.it
-friuli-veneziagiulia.it
-friuli-vgiulia.it
-friuliv-giulia.it
-friulive-giulia.it
-friulivegiulia.it
-friulivenezia-giulia.it
-friuliveneziagiulia.it
-friulivgiulia.it
-fvg.it
-laz.it
-lazio.it
-lig.it
-liguria.it
-lom.it
-lombardia.it
-lombardy.it
-lucania.it
-mar.it
-marche.it
-mol.it
-molise.it
-piedmont.it
-piemonte.it
-pmn.it
-pug.it
-puglia.it
-sar.it
-sardegna.it
-sardinia.it
-sic.it
-sicilia.it
-sicily.it
-taa.it
-tos.it
-toscana.it
-trentino-a-adige.it
-trentino-aadige.it
-trentino-alto-adige.it
-trentino-altoadige.it
-trentino-s-tirol.it
-trentino-stirol.it
-trentino-sud-tirol.it
-trentino-sudtirol.it
-trentino-sued-tirol.it
-trentino-suedtirol.it
-trentinoa-adige.it
-trentinoaadige.it
-trentinoalto-adige.it
-trentinoaltoadige.it
-trentinos-tirol.it
-trentinostirol.it
-trentinosud-tirol.it
-trentinosudtirol.it
-trentinosued-tirol.it
-trentinosuedtirol.it
-tuscany.it
-umb.it
-umbria.it
-val-d-aosta.it
-val-daosta.it
-vald-aosta.it
-valdaosta.it
-valle-aosta.it
-valle-d-aosta.it
-valle-daosta.it
-valleaosta.it
-valled-aosta.it
-valledaosta.it
-vallee-aoste.it
-valleeaoste.it
-vao.it
-vda.it
-ven.it
-veneto.it
-// Provinces
-ag.it
-agrigento.it
-al.it
-alessandria.it
-alto-adige.it
-altoadige.it
-an.it
-ancona.it
-andria-barletta-trani.it
-andria-trani-barletta.it
-andriabarlettatrani.it
-andriatranibarletta.it
-ao.it
-aosta.it
-aoste.it
-ap.it
-aq.it
-aquila.it
-ar.it
-arezzo.it
-ascoli-piceno.it
-ascolipiceno.it
-asti.it
-at.it
-av.it
-avellino.it
-ba.it
-balsan.it
-bari.it
-barletta-trani-andria.it
-barlettatraniandria.it
-belluno.it
-benevento.it
-bergamo.it
-bg.it
-bi.it
-biella.it
-bl.it
-bn.it
-bo.it
-bologna.it
-bolzano.it
-bozen.it
-br.it
-brescia.it
-brindisi.it
-bs.it
-bt.it
-bz.it
-ca.it
-cagliari.it
-caltanissetta.it
-campidano-medio.it
-campidanomedio.it
-campobasso.it
-carbonia-iglesias.it
-carboniaiglesias.it
-carrara-massa.it
-carraramassa.it
-caserta.it
-catania.it
-catanzaro.it
-cb.it
-ce.it
-cesena-forli.it
-cesenaforli.it
-ch.it
-chieti.it
-ci.it
-cl.it
-cn.it
-co.it
-como.it
-cosenza.it
-cr.it
-cremona.it
-crotone.it
-cs.it
-ct.it
-cuneo.it
-cz.it
-dell-ogliastra.it
-dellogliastra.it
-en.it
-enna.it
-fc.it
-fe.it
-fermo.it
-ferrara.it
-fg.it
-fi.it
-firenze.it
-florence.it
-fm.it
-foggia.it
-forli-cesena.it
-forlicesena.it
-fr.it
-frosinone.it
-ge.it
-genoa.it
-genova.it
-go.it
-gorizia.it
-gr.it
-grosseto.it
-iglesias-carbonia.it
-iglesiascarbonia.it
-im.it
-imperia.it
-is.it
-isernia.it
-kr.it
-la-spezia.it
-laquila.it
-laspezia.it
-latina.it
-lc.it
-le.it
-lecce.it
-lecco.it
-li.it
-livorno.it
-lo.it
-lodi.it
-lt.it
-lu.it
-lucca.it
-macerata.it
-mantova.it
-massa-carrara.it
-massacarrara.it
-matera.it
-mb.it
-mc.it
-me.it
-medio-campidano.it
-mediocampidano.it
-messina.it
-mi.it
-milan.it
-milano.it
-mn.it
-mo.it
-modena.it
-monza-brianza.it
-monza-e-della-brianza.it
-monza.it
-monzabrianza.it
-monzaebrianza.it
-monzaedellabrianza.it
-ms.it
-mt.it
-na.it
-naples.it
-napoli.it
-no.it
-novara.it
-nu.it
-nuoro.it
-og.it
-ogliastra.it
-olbia-tempio.it
-olbiatempio.it
-or.it
-oristano.it
-ot.it
-pa.it
-padova.it
-padua.it
-palermo.it
-parma.it
-pavia.it
-pc.it
-pd.it
-pe.it
-perugia.it
-pesaro-urbino.it
-pesarourbino.it
-pescara.it
-pg.it
-pi.it
-piacenza.it
-pisa.it
-pistoia.it
-pn.it
-po.it
-pordenone.it
-potenza.it
-pr.it
-prato.it
-pt.it
-pu.it
-pv.it
-pz.it
-ra.it
-ragusa.it
-ravenna.it
-rc.it
-re.it
-reggio-calabria.it
-reggio-emilia.it
-reggiocalabria.it
-reggioemilia.it
-rg.it
-ri.it
-rieti.it
-rimini.it
-rm.it
-rn.it
-ro.it
-roma.it
-rome.it
-rovigo.it
-sa.it
-salerno.it
-sassari.it
-savona.it
-si.it
-siena.it
-siracusa.it
-so.it
-sondrio.it
-sp.it
-sr.it
-ss.it
-suedtirol.it
-sv.it
-ta.it
-taranto.it
-te.it
-tempio-olbia.it
-tempioolbia.it
-teramo.it
-terni.it
-tn.it
-to.it
-torino.it
-tp.it
-tr.it
-trani-andria-barletta.it
-trani-barletta-andria.it
-traniandriabarletta.it
-tranibarlettaandria.it
-trapani.it
-trentino.it
-trento.it
-treviso.it
-trieste.it
-ts.it
-turin.it
-tv.it
-ud.it
-udine.it
-urbino-pesaro.it
-urbinopesaro.it
-va.it
-varese.it
-vb.it
-vc.it
-ve.it
-venezia.it
-venice.it
-verbania.it
-vercelli.it
-verona.it
-vi.it
-vibo-valentia.it
-vibovalentia.it
-vicenza.it
-viterbo.it
-vr.it
-vs.it
-vt.it
-vv.it
-
-// je : http://www.channelisles.net/register-domains/
-// Confirmed by registry <nigel@channelisles.net> 2013-11-28
-je
-co.je
-net.je
-org.je
-
-// jm : http://www.com.jm/register.html
-*.jm
-
-// jo : http://www.dns.jo/Registration_policy.aspx
-jo
-com.jo
-org.jo
-net.jo
-edu.jo
-sch.jo
-gov.jo
-mil.jo
-name.jo
-
-// jobs : https://en.wikipedia.org/wiki/.jobs
-jobs
-
-// jp : https://en.wikipedia.org/wiki/.jp
-// http://jprs.co.jp/en/jpdomain.html
-// Submitted by registry <info@jprs.jp>
-jp
-// jp organizational type names
-ac.jp
-ad.jp
-co.jp
-ed.jp
-go.jp
-gr.jp
-lg.jp
-ne.jp
-or.jp
-// jp prefecture type names
-aichi.jp
-akita.jp
-aomori.jp
-chiba.jp
-ehime.jp
-fukui.jp
-fukuoka.jp
-fukushima.jp
-gifu.jp
-gunma.jp
-hiroshima.jp
-hokkaido.jp
-hyogo.jp
-ibaraki.jp
-ishikawa.jp
-iwate.jp
-kagawa.jp
-kagoshima.jp
-kanagawa.jp
-kochi.jp
-kumamoto.jp
-kyoto.jp
-mie.jp
-miyagi.jp
-miyazaki.jp
-nagano.jp
-nagasaki.jp
-nara.jp
-niigata.jp
-oita.jp
-okayama.jp
-okinawa.jp
-osaka.jp
-saga.jp
-saitama.jp
-shiga.jp
-shimane.jp
-shizuoka.jp
-tochigi.jp
-tokushima.jp
-tokyo.jp
-tottori.jp
-toyama.jp
-wakayama.jp
-yamagata.jp
-yamaguchi.jp
-yamanashi.jp
-xn--4pvxs.jp
-栃木.jp
-xn--vgu402c.jp
-愛知.jp
-xn--c3s14m.jp
-愛媛.jp
-xn--f6qx53a.jp
-兵庫.jp
-xn--8pvr4u.jp
-熊本.jp
-xn--uist22h.jp
-茨城.jp
-xn--djrs72d6uy.jp
-北海道.jp
-xn--mkru45i.jp
-千葉.jp
-xn--0trq7p7nn.jp
-和歌山.jp
-xn--8ltr62k.jp
-長崎.jp
-xn--2m4a15e.jp
-長野.jp
-xn--efvn9s.jp
-新潟.jp
-xn--32vp30h.jp
-青森.jp
-xn--4it797k.jp
-静岡.jp
-xn--1lqs71d.jp
-東京.jp
-xn--5rtp49c.jp
-石川.jp
-xn--5js045d.jp
-埼玉.jp
-xn--ehqz56n.jp
-三重.jp
-xn--1lqs03n.jp
-京都.jp
-xn--qqqt11m.jp
-佐賀.jp
-xn--kbrq7o.jp
-大分.jp
-xn--pssu33l.jp
-大阪.jp
-xn--ntsq17g.jp
-奈良.jp
-xn--uisz3g.jp
-宮城.jp
-xn--6btw5a.jp
-宮崎.jp
-xn--1ctwo.jp
-富山.jp
-xn--6orx2r.jp
-山口.jp
-xn--rht61e.jp
-山形.jp
-xn--rht27z.jp
-山梨.jp
-xn--djty4k.jp
-岩手.jp
-xn--nit225k.jp
-岐阜.jp
-xn--rht3d.jp
-岡山.jp
-xn--klty5x.jp
-島根.jp
-xn--kltx9a.jp
-広島.jp
-xn--kltp7d.jp
-徳島.jp
-xn--uuwu58a.jp
-沖縄.jp
-xn--zbx025d.jp
-滋賀.jp
-xn--ntso0iqx3a.jp
-神奈川.jp
-xn--elqq16h.jp
-福井.jp
-xn--4it168d.jp
-福岡.jp
-xn--klt787d.jp
-福島.jp
-xn--rny31h.jp
-秋田.jp
-xn--7t0a264c.jp
-群馬.jp
-xn--5rtq34k.jp
-香川.jp
-xn--k7yn95e.jp
-高知.jp
-xn--tor131o.jp
-鳥取.jp
-xn--d5qv7z876c.jp
-鹿児島.jp
-// jp geographic type names
-// http://jprs.jp/doc/rule/saisoku-1.html
-*.kawasaki.jp
-*.kitakyushu.jp
-*.kobe.jp
-*.nagoya.jp
-*.sapporo.jp
-*.sendai.jp
-*.yokohama.jp
-!city.kawasaki.jp
-!city.kitakyushu.jp
-!city.kobe.jp
-!city.nagoya.jp
-!city.sapporo.jp
-!city.sendai.jp
-!city.yokohama.jp
-// 4th level registration
-aisai.aichi.jp
-ama.aichi.jp
-anjo.aichi.jp
-asuke.aichi.jp
-chiryu.aichi.jp
-chita.aichi.jp
-fuso.aichi.jp
-gamagori.aichi.jp
-handa.aichi.jp
-hazu.aichi.jp
-hekinan.aichi.jp
-higashiura.aichi.jp
-ichinomiya.aichi.jp
-inazawa.aichi.jp
-inuyama.aichi.jp
-isshiki.aichi.jp
-iwakura.aichi.jp
-kanie.aichi.jp
-kariya.aichi.jp
-kasugai.aichi.jp
-kira.aichi.jp
-kiyosu.aichi.jp
-komaki.aichi.jp
-konan.aichi.jp
-kota.aichi.jp
-mihama.aichi.jp
-miyoshi.aichi.jp
-nishio.aichi.jp
-nisshin.aichi.jp
-obu.aichi.jp
-oguchi.aichi.jp
-oharu.aichi.jp
-okazaki.aichi.jp
-owariasahi.aichi.jp
-seto.aichi.jp
-shikatsu.aichi.jp
-shinshiro.aichi.jp
-shitara.aichi.jp
-tahara.aichi.jp
-takahama.aichi.jp
-tobishima.aichi.jp
-toei.aichi.jp
-togo.aichi.jp
-tokai.aichi.jp
-tokoname.aichi.jp
-toyoake.aichi.jp
-toyohashi.aichi.jp
-toyokawa.aichi.jp
-toyone.aichi.jp
-toyota.aichi.jp
-tsushima.aichi.jp
-yatomi.aichi.jp
-akita.akita.jp
-daisen.akita.jp
-fujisato.akita.jp
-gojome.akita.jp
-hachirogata.akita.jp
-happou.akita.jp
-higashinaruse.akita.jp
-honjo.akita.jp
-honjyo.akita.jp
-ikawa.akita.jp
-kamikoani.akita.jp
-kamioka.akita.jp
-katagami.akita.jp
-kazuno.akita.jp
-kitaakita.akita.jp
-kosaka.akita.jp
-kyowa.akita.jp
-misato.akita.jp
-mitane.akita.jp
-moriyoshi.akita.jp
-nikaho.akita.jp
-noshiro.akita.jp
-odate.akita.jp
-oga.akita.jp
-ogata.akita.jp
-semboku.akita.jp
-yokote.akita.jp
-yurihonjo.akita.jp
-aomori.aomori.jp
-gonohe.aomori.jp
-hachinohe.aomori.jp
-hashikami.aomori.jp
-hiranai.aomori.jp
-hirosaki.aomori.jp
-itayanagi.aomori.jp
-kuroishi.aomori.jp
-misawa.aomori.jp
-mutsu.aomori.jp
-nakadomari.aomori.jp
-noheji.aomori.jp
-oirase.aomori.jp
-owani.aomori.jp
-rokunohe.aomori.jp
-sannohe.aomori.jp
-shichinohe.aomori.jp
-shingo.aomori.jp
-takko.aomori.jp
-towada.aomori.jp
-tsugaru.aomori.jp
-tsuruta.aomori.jp
-abiko.chiba.jp
-asahi.chiba.jp
-chonan.chiba.jp
-chosei.chiba.jp
-choshi.chiba.jp
-chuo.chiba.jp
-funabashi.chiba.jp
-futtsu.chiba.jp
-hanamigawa.chiba.jp
-ichihara.chiba.jp
-ichikawa.chiba.jp
-ichinomiya.chiba.jp
-inzai.chiba.jp
-isumi.chiba.jp
-kamagaya.chiba.jp
-kamogawa.chiba.jp
-kashiwa.chiba.jp
-katori.chiba.jp
-katsuura.chiba.jp
-kimitsu.chiba.jp
-kisarazu.chiba.jp
-kozaki.chiba.jp
-kujukuri.chiba.jp
-kyonan.chiba.jp
-matsudo.chiba.jp
-midori.chiba.jp
-mihama.chiba.jp
-minamiboso.chiba.jp
-mobara.chiba.jp
-mutsuzawa.chiba.jp
-nagara.chiba.jp
-nagareyama.chiba.jp
-narashino.chiba.jp
-narita.chiba.jp
-noda.chiba.jp
-oamishirasato.chiba.jp
-omigawa.chiba.jp
-onjuku.chiba.jp
-otaki.chiba.jp
-sakae.chiba.jp
-sakura.chiba.jp
-shimofusa.chiba.jp
-shirako.chiba.jp
-shiroi.chiba.jp
-shisui.chiba.jp
-sodegaura.chiba.jp
-sosa.chiba.jp
-tako.chiba.jp
-tateyama.chiba.jp
-togane.chiba.jp
-tohnosho.chiba.jp
-tomisato.chiba.jp
-urayasu.chiba.jp
-yachimata.chiba.jp
-yachiyo.chiba.jp
-yokaichiba.chiba.jp
-yokoshibahikari.chiba.jp
-yotsukaido.chiba.jp
-ainan.ehime.jp
-honai.ehime.jp
-ikata.ehime.jp
-imabari.ehime.jp
-iyo.ehime.jp
-kamijima.ehime.jp
-kihoku.ehime.jp
-kumakogen.ehime.jp
-masaki.ehime.jp
-matsuno.ehime.jp
-matsuyama.ehime.jp
-namikata.ehime.jp
-niihama.ehime.jp
-ozu.ehime.jp
-saijo.ehime.jp
-seiyo.ehime.jp
-shikokuchuo.ehime.jp
-tobe.ehime.jp
-toon.ehime.jp
-uchiko.ehime.jp
-uwajima.ehime.jp
-yawatahama.ehime.jp
-echizen.fukui.jp
-eiheiji.fukui.jp
-fukui.fukui.jp
-ikeda.fukui.jp
-katsuyama.fukui.jp
-mihama.fukui.jp
-minamiechizen.fukui.jp
-obama.fukui.jp
-ohi.fukui.jp
-ono.fukui.jp
-sabae.fukui.jp
-sakai.fukui.jp
-takahama.fukui.jp
-tsuruga.fukui.jp
-wakasa.fukui.jp
-ashiya.fukuoka.jp
-buzen.fukuoka.jp
-chikugo.fukuoka.jp
-chikuho.fukuoka.jp
-chikujo.fukuoka.jp
-chikushino.fukuoka.jp
-chikuzen.fukuoka.jp
-chuo.fukuoka.jp
-dazaifu.fukuoka.jp
-fukuchi.fukuoka.jp
-hakata.fukuoka.jp
-higashi.fukuoka.jp
-hirokawa.fukuoka.jp
-hisayama.fukuoka.jp
-iizuka.fukuoka.jp
-inatsuki.fukuoka.jp
-kaho.fukuoka.jp
-kasuga.fukuoka.jp
-kasuya.fukuoka.jp
-kawara.fukuoka.jp
-keisen.fukuoka.jp
-koga.fukuoka.jp
-kurate.fukuoka.jp
-kurogi.fukuoka.jp
-kurume.fukuoka.jp
-minami.fukuoka.jp
-miyako.fukuoka.jp
-miyama.fukuoka.jp
-miyawaka.fukuoka.jp
-mizumaki.fukuoka.jp
-munakata.fukuoka.jp
-nakagawa.fukuoka.jp
-nakama.fukuoka.jp
-nishi.fukuoka.jp
-nogata.fukuoka.jp
-ogori.fukuoka.jp
-okagaki.fukuoka.jp
-okawa.fukuoka.jp
-oki.fukuoka.jp
-omuta.fukuoka.jp
-onga.fukuoka.jp
-onojo.fukuoka.jp
-oto.fukuoka.jp
-saigawa.fukuoka.jp
-sasaguri.fukuoka.jp
-shingu.fukuoka.jp
-shinyoshitomi.fukuoka.jp
-shonai.fukuoka.jp
-soeda.fukuoka.jp
-sue.fukuoka.jp
-tachiarai.fukuoka.jp
-tagawa.fukuoka.jp
-takata.fukuoka.jp
-toho.fukuoka.jp
-toyotsu.fukuoka.jp
-tsuiki.fukuoka.jp
-ukiha.fukuoka.jp
-umi.fukuoka.jp
-usui.fukuoka.jp
-yamada.fukuoka.jp
-yame.fukuoka.jp
-yanagawa.fukuoka.jp
-yukuhashi.fukuoka.jp
-aizubange.fukushima.jp
-aizumisato.fukushima.jp
-aizuwakamatsu.fukushima.jp
-asakawa.fukushima.jp
-bandai.fukushima.jp
-date.fukushima.jp
-fukushima.fukushima.jp
-furudono.fukushima.jp
-futaba.fukushima.jp
-hanawa.fukushima.jp
-higashi.fukushima.jp
-hirata.fukushima.jp
-hirono.fukushima.jp
-iitate.fukushima.jp
-inawashiro.fukushima.jp
-ishikawa.fukushima.jp
-iwaki.fukushima.jp
-izumizaki.fukushima.jp
-kagamiishi.fukushima.jp
-kaneyama.fukushima.jp
-kawamata.fukushima.jp
-kitakata.fukushima.jp
-kitashiobara.fukushima.jp
-koori.fukushima.jp
-koriyama.fukushima.jp
-kunimi.fukushima.jp
-miharu.fukushima.jp
-mishima.fukushima.jp
-namie.fukushima.jp
-nango.fukushima.jp
-nishiaizu.fukushima.jp
-nishigo.fukushima.jp
-okuma.fukushima.jp
-omotego.fukushima.jp
-ono.fukushima.jp
-otama.fukushima.jp
-samegawa.fukushima.jp
-shimogo.fukushima.jp
-shirakawa.fukushima.jp
-showa.fukushima.jp
-soma.fukushima.jp
-sukagawa.fukushima.jp
-taishin.fukushima.jp
-tamakawa.fukushima.jp
-tanagura.fukushima.jp
-tenei.fukushima.jp
-yabuki.fukushima.jp
-yamato.fukushima.jp
-yamatsuri.fukushima.jp
-yanaizu.fukushima.jp
-yugawa.fukushima.jp
-anpachi.gifu.jp
-ena.gifu.jp
-gifu.gifu.jp
-ginan.gifu.jp
-godo.gifu.jp
-gujo.gifu.jp
-hashima.gifu.jp
-hichiso.gifu.jp
-hida.gifu.jp
-higashishirakawa.gifu.jp
-ibigawa.gifu.jp
-ikeda.gifu.jp
-kakamigahara.gifu.jp
-kani.gifu.jp
-kasahara.gifu.jp
-kasamatsu.gifu.jp
-kawaue.gifu.jp
-kitagata.gifu.jp
-mino.gifu.jp
-minokamo.gifu.jp
-mitake.gifu.jp
-mizunami.gifu.jp
-motosu.gifu.jp
-nakatsugawa.gifu.jp
-ogaki.gifu.jp
-sakahogi.gifu.jp
-seki.gifu.jp
-sekigahara.gifu.jp
-shirakawa.gifu.jp
-tajimi.gifu.jp
-takayama.gifu.jp
-tarui.gifu.jp
-toki.gifu.jp
-tomika.gifu.jp
-wanouchi.gifu.jp
-yamagata.gifu.jp
-yaotsu.gifu.jp
-yoro.gifu.jp
-annaka.gunma.jp
-chiyoda.gunma.jp
-fujioka.gunma.jp
-higashiagatsuma.gunma.jp
-isesaki.gunma.jp
-itakura.gunma.jp
-kanna.gunma.jp
-kanra.gunma.jp
-katashina.gunma.jp
-kawaba.gunma.jp
-kiryu.gunma.jp
-kusatsu.gunma.jp
-maebashi.gunma.jp
-meiwa.gunma.jp
-midori.gunma.jp
-minakami.gunma.jp
-naganohara.gunma.jp
-nakanojo.gunma.jp
-nanmoku.gunma.jp
-numata.gunma.jp
-oizumi.gunma.jp
-ora.gunma.jp
-ota.gunma.jp
-shibukawa.gunma.jp
-shimonita.gunma.jp
-shinto.gunma.jp
-showa.gunma.jp
-takasaki.gunma.jp
-takayama.gunma.jp
-tamamura.gunma.jp
-tatebayashi.gunma.jp
-tomioka.gunma.jp
-tsukiyono.gunma.jp
-tsumagoi.gunma.jp
-ueno.gunma.jp
-yoshioka.gunma.jp
-asaminami.hiroshima.jp
-daiwa.hiroshima.jp
-etajima.hiroshima.jp
-fuchu.hiroshima.jp
-fukuyama.hiroshima.jp
-hatsukaichi.hiroshima.jp
-higashihiroshima.hiroshima.jp
-hongo.hiroshima.jp
-jinsekikogen.hiroshima.jp
-kaita.hiroshima.jp
-kui.hiroshima.jp
-kumano.hiroshima.jp
-kure.hiroshima.jp
-mihara.hiroshima.jp
-miyoshi.hiroshima.jp
-naka.hiroshima.jp
-onomichi.hiroshima.jp
-osakikamijima.hiroshima.jp
-otake.hiroshima.jp
-saka.hiroshima.jp
-sera.hiroshima.jp
-seranishi.hiroshima.jp
-shinichi.hiroshima.jp
-shobara.hiroshima.jp
-takehara.hiroshima.jp
-abashiri.hokkaido.jp
-abira.hokkaido.jp
-aibetsu.hokkaido.jp
-akabira.hokkaido.jp
-akkeshi.hokkaido.jp
-asahikawa.hokkaido.jp
-ashibetsu.hokkaido.jp
-ashoro.hokkaido.jp
-assabu.hokkaido.jp
-atsuma.hokkaido.jp
-bibai.hokkaido.jp
-biei.hokkaido.jp
-bifuka.hokkaido.jp
-bihoro.hokkaido.jp
-biratori.hokkaido.jp
-chippubetsu.hokkaido.jp
-chitose.hokkaido.jp
-date.hokkaido.jp
-ebetsu.hokkaido.jp
-embetsu.hokkaido.jp
-eniwa.hokkaido.jp
-erimo.hokkaido.jp
-esan.hokkaido.jp
-esashi.hokkaido.jp
-fukagawa.hokkaido.jp
-fukushima.hokkaido.jp
-furano.hokkaido.jp
-furubira.hokkaido.jp
-haboro.hokkaido.jp
-hakodate.hokkaido.jp
-hamatonbetsu.hokkaido.jp
-hidaka.hokkaido.jp
-higashikagura.hokkaido.jp
-higashikawa.hokkaido.jp
-hiroo.hokkaido.jp
-hokuryu.hokkaido.jp
-hokuto.hokkaido.jp
-honbetsu.hokkaido.jp
-horokanai.hokkaido.jp
-horonobe.hokkaido.jp
-ikeda.hokkaido.jp
-imakane.hokkaido.jp
-ishikari.hokkaido.jp
-iwamizawa.hokkaido.jp
-iwanai.hokkaido.jp
-kamifurano.hokkaido.jp
-kamikawa.hokkaido.jp
-kamishihoro.hokkaido.jp
-kamisunagawa.hokkaido.jp
-kamoenai.hokkaido.jp
-kayabe.hokkaido.jp
-kembuchi.hokkaido.jp
-kikonai.hokkaido.jp
-kimobetsu.hokkaido.jp
-kitahiroshima.hokkaido.jp
-kitami.hokkaido.jp
-kiyosato.hokkaido.jp
-koshimizu.hokkaido.jp
-kunneppu.hokkaido.jp
-kuriyama.hokkaido.jp
-kuromatsunai.hokkaido.jp
-kushiro.hokkaido.jp
-kutchan.hokkaido.jp
-kyowa.hokkaido.jp
-mashike.hokkaido.jp
-matsumae.hokkaido.jp
-mikasa.hokkaido.jp
-minamifurano.hokkaido.jp
-mombetsu.hokkaido.jp
-moseushi.hokkaido.jp
-mukawa.hokkaido.jp
-muroran.hokkaido.jp
-naie.hokkaido.jp
-nakagawa.hokkaido.jp
-nakasatsunai.hokkaido.jp
-nakatombetsu.hokkaido.jp
-nanae.hokkaido.jp
-nanporo.hokkaido.jp
-nayoro.hokkaido.jp
-nemuro.hokkaido.jp
-niikappu.hokkaido.jp
-niki.hokkaido.jp
-nishiokoppe.hokkaido.jp
-noboribetsu.hokkaido.jp
-numata.hokkaido.jp
-obihiro.hokkaido.jp
-obira.hokkaido.jp
-oketo.hokkaido.jp
-okoppe.hokkaido.jp
-otaru.hokkaido.jp
-otobe.hokkaido.jp
-otofuke.hokkaido.jp
-otoineppu.hokkaido.jp
-oumu.hokkaido.jp
-ozora.hokkaido.jp
-pippu.hokkaido.jp
-rankoshi.hokkaido.jp
-rebun.hokkaido.jp
-rikubetsu.hokkaido.jp
-rishiri.hokkaido.jp
-rishirifuji.hokkaido.jp
-saroma.hokkaido.jp
-sarufutsu.hokkaido.jp
-shakotan.hokkaido.jp
-shari.hokkaido.jp
-shibecha.hokkaido.jp
-shibetsu.hokkaido.jp
-shikabe.hokkaido.jp
-shikaoi.hokkaido.jp
-shimamaki.hokkaido.jp
-shimizu.hokkaido.jp
-shimokawa.hokkaido.jp
-shinshinotsu.hokkaido.jp
-shintoku.hokkaido.jp
-shiranuka.hokkaido.jp
-shiraoi.hokkaido.jp
-shiriuchi.hokkaido.jp
-sobetsu.hokkaido.jp
-sunagawa.hokkaido.jp
-taiki.hokkaido.jp
-takasu.hokkaido.jp
-takikawa.hokkaido.jp
-takinoue.hokkaido.jp
-teshikaga.hokkaido.jp
-tobetsu.hokkaido.jp
-tohma.hokkaido.jp
-tomakomai.hokkaido.jp
-tomari.hokkaido.jp
-toya.hokkaido.jp
-toyako.hokkaido.jp
-toyotomi.hokkaido.jp
-toyoura.hokkaido.jp
-tsubetsu.hokkaido.jp
-tsukigata.hokkaido.jp
-urakawa.hokkaido.jp
-urausu.hokkaido.jp
-uryu.hokkaido.jp
-utashinai.hokkaido.jp
-wakkanai.hokkaido.jp
-wassamu.hokkaido.jp
-yakumo.hokkaido.jp
-yoichi.hokkaido.jp
-aioi.hyogo.jp
-akashi.hyogo.jp
-ako.hyogo.jp
-amagasaki.hyogo.jp
-aogaki.hyogo.jp
-asago.hyogo.jp
-ashiya.hyogo.jp
-awaji.hyogo.jp
-fukusaki.hyogo.jp
-goshiki.hyogo.jp
-harima.hyogo.jp
-himeji.hyogo.jp
-ichikawa.hyogo.jp
-inagawa.hyogo.jp
-itami.hyogo.jp
-kakogawa.hyogo.jp
-kamigori.hyogo.jp
-kamikawa.hyogo.jp
-kasai.hyogo.jp
-kasuga.hyogo.jp
-kawanishi.hyogo.jp
-miki.hyogo.jp
-minamiawaji.hyogo.jp
-nishinomiya.hyogo.jp
-nishiwaki.hyogo.jp
-ono.hyogo.jp
-sanda.hyogo.jp
-sannan.hyogo.jp
-sasayama.hyogo.jp
-sayo.hyogo.jp
-shingu.hyogo.jp
-shinonsen.hyogo.jp
-shiso.hyogo.jp
-sumoto.hyogo.jp
-taishi.hyogo.jp
-taka.hyogo.jp
-takarazuka.hyogo.jp
-takasago.hyogo.jp
-takino.hyogo.jp
-tamba.hyogo.jp
-tatsuno.hyogo.jp
-toyooka.hyogo.jp
-yabu.hyogo.jp
-yashiro.hyogo.jp
-yoka.hyogo.jp
-yokawa.hyogo.jp
-ami.ibaraki.jp
-asahi.ibaraki.jp
-bando.ibaraki.jp
-chikusei.ibaraki.jp
-daigo.ibaraki.jp
-fujishiro.ibaraki.jp
-hitachi.ibaraki.jp
-hitachinaka.ibaraki.jp
-hitachiomiya.ibaraki.jp
-hitachiota.ibaraki.jp
-ibaraki.ibaraki.jp
-ina.ibaraki.jp
-inashiki.ibaraki.jp
-itako.ibaraki.jp
-iwama.ibaraki.jp
-joso.ibaraki.jp
-kamisu.ibaraki.jp
-kasama.ibaraki.jp
-kashima.ibaraki.jp
-kasumigaura.ibaraki.jp
-koga.ibaraki.jp
-miho.ibaraki.jp
-mito.ibaraki.jp
-moriya.ibaraki.jp
-naka.ibaraki.jp
-namegata.ibaraki.jp
-oarai.ibaraki.jp
-ogawa.ibaraki.jp
-omitama.ibaraki.jp
-ryugasaki.ibaraki.jp
-sakai.ibaraki.jp
-sakuragawa.ibaraki.jp
-shimodate.ibaraki.jp
-shimotsuma.ibaraki.jp
-shirosato.ibaraki.jp
-sowa.ibaraki.jp
-suifu.ibaraki.jp
-takahagi.ibaraki.jp
-tamatsukuri.ibaraki.jp
-tokai.ibaraki.jp
-tomobe.ibaraki.jp
-tone.ibaraki.jp
-toride.ibaraki.jp
-tsuchiura.ibaraki.jp
-tsukuba.ibaraki.jp
-uchihara.ibaraki.jp
-ushiku.ibaraki.jp
-yachiyo.ibaraki.jp
-yamagata.ibaraki.jp
-yawara.ibaraki.jp
-yuki.ibaraki.jp
-anamizu.ishikawa.jp
-hakui.ishikawa.jp
-hakusan.ishikawa.jp
-kaga.ishikawa.jp
-kahoku.ishikawa.jp
-kanazawa.ishikawa.jp
-kawakita.ishikawa.jp
-komatsu.ishikawa.jp
-nakanoto.ishikawa.jp
-nanao.ishikawa.jp
-nomi.ishikawa.jp
-nonoichi.ishikawa.jp
-noto.ishikawa.jp
-shika.ishikawa.jp
-suzu.ishikawa.jp
-tsubata.ishikawa.jp
-tsurugi.ishikawa.jp
-uchinada.ishikawa.jp
-wajima.ishikawa.jp
-fudai.iwate.jp
-fujisawa.iwate.jp
-hanamaki.iwate.jp
-hiraizumi.iwate.jp
-hirono.iwate.jp
-ichinohe.iwate.jp
-ichinoseki.iwate.jp
-iwaizumi.iwate.jp
-iwate.iwate.jp
-joboji.iwate.jp
-kamaishi.iwate.jp
-kanegasaki.iwate.jp
-karumai.iwate.jp
-kawai.iwate.jp
-kitakami.iwate.jp
-kuji.iwate.jp
-kunohe.iwate.jp
-kuzumaki.iwate.jp
-miyako.iwate.jp
-mizusawa.iwate.jp
-morioka.iwate.jp
-ninohe.iwate.jp
-noda.iwate.jp
-ofunato.iwate.jp
-oshu.iwate.jp
-otsuchi.iwate.jp
-rikuzentakata.iwate.jp
-shiwa.iwate.jp
-shizukuishi.iwate.jp
-sumita.iwate.jp
-tanohata.iwate.jp
-tono.iwate.jp
-yahaba.iwate.jp
-yamada.iwate.jp
-ayagawa.kagawa.jp
-higashikagawa.kagawa.jp
-kanonji.kagawa.jp
-kotohira.kagawa.jp
-manno.kagawa.jp
-marugame.kagawa.jp
-mitoyo.kagawa.jp
-naoshima.kagawa.jp
-sanuki.kagawa.jp
-tadotsu.kagawa.jp
-takamatsu.kagawa.jp
-tonosho.kagawa.jp
-uchinomi.kagawa.jp
-utazu.kagawa.jp
-zentsuji.kagawa.jp
-akune.kagoshima.jp
-amami.kagoshima.jp
-hioki.kagoshima.jp
-isa.kagoshima.jp
-isen.kagoshima.jp
-izumi.kagoshima.jp
-kagoshima.kagoshima.jp
-kanoya.kagoshima.jp
-kawanabe.kagoshima.jp
-kinko.kagoshima.jp
-kouyama.kagoshima.jp
-makurazaki.kagoshima.jp
-matsumoto.kagoshima.jp
-minamitane.kagoshima.jp
-nakatane.kagoshima.jp
-nishinoomote.kagoshima.jp
-satsumasendai.kagoshima.jp
-soo.kagoshima.jp
-tarumizu.kagoshima.jp
-yusui.kagoshima.jp
-aikawa.kanagawa.jp
-atsugi.kanagawa.jp
-ayase.kanagawa.jp
-chigasaki.kanagawa.jp
-ebina.kanagawa.jp
-fujisawa.kanagawa.jp
-hadano.kanagawa.jp
-hakone.kanagawa.jp
-hiratsuka.kanagawa.jp
-isehara.kanagawa.jp
-kaisei.kanagawa.jp
-kamakura.kanagawa.jp
-kiyokawa.kanagawa.jp
-matsuda.kanagawa.jp
-minamiashigara.kanagawa.jp
-miura.kanagawa.jp
-nakai.kanagawa.jp
-ninomiya.kanagawa.jp
-odawara.kanagawa.jp
-oi.kanagawa.jp
-oiso.kanagawa.jp
-sagamihara.kanagawa.jp
-samukawa.kanagawa.jp
-tsukui.kanagawa.jp
-yamakita.kanagawa.jp
-yamato.kanagawa.jp
-yokosuka.kanagawa.jp
-yugawara.kanagawa.jp
-zama.kanagawa.jp
-zushi.kanagawa.jp
-aki.kochi.jp
-geisei.kochi.jp
-hidaka.kochi.jp
-higashitsuno.kochi.jp
-ino.kochi.jp
-kagami.kochi.jp
-kami.kochi.jp
-kitagawa.kochi.jp
-kochi.kochi.jp
-mihara.kochi.jp
-motoyama.kochi.jp
-muroto.kochi.jp
-nahari.kochi.jp
-nakamura.kochi.jp
-nankoku.kochi.jp
-nishitosa.kochi.jp
-niyodogawa.kochi.jp
-ochi.kochi.jp
-okawa.kochi.jp
-otoyo.kochi.jp
-otsuki.kochi.jp
-sakawa.kochi.jp
-sukumo.kochi.jp
-susaki.kochi.jp
-tosa.kochi.jp
-tosashimizu.kochi.jp
-toyo.kochi.jp
-tsuno.kochi.jp
-umaji.kochi.jp
-yasuda.kochi.jp
-yusuhara.kochi.jp
-amakusa.kumamoto.jp
-arao.kumamoto.jp
-aso.kumamoto.jp
-choyo.kumamoto.jp
-gyokuto.kumamoto.jp
-kamiamakusa.kumamoto.jp
-kikuchi.kumamoto.jp
-kumamoto.kumamoto.jp
-mashiki.kumamoto.jp
-mifune.kumamoto.jp
-minamata.kumamoto.jp
-minamioguni.kumamoto.jp
-nagasu.kumamoto.jp
-nishihara.kumamoto.jp
-oguni.kumamoto.jp
-ozu.kumamoto.jp
-sumoto.kumamoto.jp
-takamori.kumamoto.jp
-uki.kumamoto.jp
-uto.kumamoto.jp
-yamaga.kumamoto.jp
-yamato.kumamoto.jp
-yatsushiro.kumamoto.jp
-ayabe.kyoto.jp
-fukuchiyama.kyoto.jp
-higashiyama.kyoto.jp
-ide.kyoto.jp
-ine.kyoto.jp
-joyo.kyoto.jp
-kameoka.kyoto.jp
-kamo.kyoto.jp
-kita.kyoto.jp
-kizu.kyoto.jp
-kumiyama.kyoto.jp
-kyotamba.kyoto.jp
-kyotanabe.kyoto.jp
-kyotango.kyoto.jp
-maizuru.kyoto.jp
-minami.kyoto.jp
-minamiyamashiro.kyoto.jp
-miyazu.kyoto.jp
-muko.kyoto.jp
-nagaokakyo.kyoto.jp
-nakagyo.kyoto.jp
-nantan.kyoto.jp
-oyamazaki.kyoto.jp
-sakyo.kyoto.jp
-seika.kyoto.jp
-tanabe.kyoto.jp
-uji.kyoto.jp
-ujitawara.kyoto.jp
-wazuka.kyoto.jp
-yamashina.kyoto.jp
-yawata.kyoto.jp
-asahi.mie.jp
-inabe.mie.jp
-ise.mie.jp
-kameyama.mie.jp
-kawagoe.mie.jp
-kiho.mie.jp
-kisosaki.mie.jp
-kiwa.mie.jp
-komono.mie.jp
-kumano.mie.jp
-kuwana.mie.jp
-matsusaka.mie.jp
-meiwa.mie.jp
-mihama.mie.jp
-minamiise.mie.jp
-misugi.mie.jp
-miyama.mie.jp
-nabari.mie.jp
-shima.mie.jp
-suzuka.mie.jp
-tado.mie.jp
-taiki.mie.jp
-taki.mie.jp
-tamaki.mie.jp
-toba.mie.jp
-tsu.mie.jp
-udono.mie.jp
-ureshino.mie.jp
-watarai.mie.jp
-yokkaichi.mie.jp
-furukawa.miyagi.jp
-higashimatsushima.miyagi.jp
-ishinomaki.miyagi.jp
-iwanuma.miyagi.jp
-kakuda.miyagi.jp
-kami.miyagi.jp
-kawasaki.miyagi.jp
-marumori.miyagi.jp
-matsushima.miyagi.jp
-minamisanriku.miyagi.jp
-misato.miyagi.jp
-murata.miyagi.jp
-natori.miyagi.jp
-ogawara.miyagi.jp
-ohira.miyagi.jp
-onagawa.miyagi.jp
-osaki.miyagi.jp
-rifu.miyagi.jp
-semine.miyagi.jp
-shibata.miyagi.jp
-shichikashuku.miyagi.jp
-shikama.miyagi.jp
-shiogama.miyagi.jp
-shiroishi.miyagi.jp
-tagajo.miyagi.jp
-taiwa.miyagi.jp
-tome.miyagi.jp
-tomiya.miyagi.jp
-wakuya.miyagi.jp
-watari.miyagi.jp
-yamamoto.miyagi.jp
-zao.miyagi.jp
-aya.miyazaki.jp
-ebino.miyazaki.jp
-gokase.miyazaki.jp
-hyuga.miyazaki.jp
-kadogawa.miyazaki.jp
-kawaminami.miyazaki.jp
-kijo.miyazaki.jp
-kitagawa.miyazaki.jp
-kitakata.miyazaki.jp
-kitaura.miyazaki.jp
-kobayashi.miyazaki.jp
-kunitomi.miyazaki.jp
-kushima.miyazaki.jp
-mimata.miyazaki.jp
-miyakonojo.miyazaki.jp
-miyazaki.miyazaki.jp
-morotsuka.miyazaki.jp
-nichinan.miyazaki.jp
-nishimera.miyazaki.jp
-nobeoka.miyazaki.jp
-saito.miyazaki.jp
-shiiba.miyazaki.jp
-shintomi.miyazaki.jp
-takaharu.miyazaki.jp
-takanabe.miyazaki.jp
-takazaki.miyazaki.jp
-tsuno.miyazaki.jp
-achi.nagano.jp
-agematsu.nagano.jp
-anan.nagano.jp
-aoki.nagano.jp
-asahi.nagano.jp
-azumino.nagano.jp
-chikuhoku.nagano.jp
-chikuma.nagano.jp
-chino.nagano.jp
-fujimi.nagano.jp
-hakuba.nagano.jp
-hara.nagano.jp
-hiraya.nagano.jp
-iida.nagano.jp
-iijima.nagano.jp
-iiyama.nagano.jp
-iizuna.nagano.jp
-ikeda.nagano.jp
-ikusaka.nagano.jp
-ina.nagano.jp
-karuizawa.nagano.jp
-kawakami.nagano.jp
-kiso.nagano.jp
-kisofukushima.nagano.jp
-kitaaiki.nagano.jp
-komagane.nagano.jp
-komoro.nagano.jp
-matsukawa.nagano.jp
-matsumoto.nagano.jp
-miasa.nagano.jp
-minamiaiki.nagano.jp
-minamimaki.nagano.jp
-minamiminowa.nagano.jp
-minowa.nagano.jp
-miyada.nagano.jp
-miyota.nagano.jp
-mochizuki.nagano.jp
-nagano.nagano.jp
-nagawa.nagano.jp
-nagiso.nagano.jp
-nakagawa.nagano.jp
-nakano.nagano.jp
-nozawaonsen.nagano.jp
-obuse.nagano.jp
-ogawa.nagano.jp
-okaya.nagano.jp
-omachi.nagano.jp
-omi.nagano.jp
-ookuwa.nagano.jp
-ooshika.nagano.jp
-otaki.nagano.jp
-otari.nagano.jp
-sakae.nagano.jp
-sakaki.nagano.jp
-saku.nagano.jp
-sakuho.nagano.jp
-shimosuwa.nagano.jp
-shinanomachi.nagano.jp
-shiojiri.nagano.jp
-suwa.nagano.jp
-suzaka.nagano.jp
-takagi.nagano.jp
-takamori.nagano.jp
-takayama.nagano.jp
-tateshina.nagano.jp
-tatsuno.nagano.jp
-togakushi.nagano.jp
-togura.nagano.jp
-tomi.nagano.jp
-ueda.nagano.jp
-wada.nagano.jp
-yamagata.nagano.jp
-yamanouchi.nagano.jp
-yasaka.nagano.jp
-yasuoka.nagano.jp
-chijiwa.nagasaki.jp
-futsu.nagasaki.jp
-goto.nagasaki.jp
-hasami.nagasaki.jp
-hirado.nagasaki.jp
-iki.nagasaki.jp
-isahaya.nagasaki.jp
-kawatana.nagasaki.jp
-kuchinotsu.nagasaki.jp
-matsuura.nagasaki.jp
-nagasaki.nagasaki.jp
-obama.nagasaki.jp
-omura.nagasaki.jp
-oseto.nagasaki.jp
-saikai.nagasaki.jp
-sasebo.nagasaki.jp
-seihi.nagasaki.jp
-shimabara.nagasaki.jp
-shinkamigoto.nagasaki.jp
-togitsu.nagasaki.jp
-tsushima.nagasaki.jp
-unzen.nagasaki.jp
-ando.nara.jp
-gose.nara.jp
-heguri.nara.jp
-higashiyoshino.nara.jp
-ikaruga.nara.jp
-ikoma.nara.jp
-kamikitayama.nara.jp
-kanmaki.nara.jp
-kashiba.nara.jp
-kashihara.nara.jp
-katsuragi.nara.jp
-kawai.nara.jp
-kawakami.nara.jp
-kawanishi.nara.jp
-koryo.nara.jp
-kurotaki.nara.jp
-mitsue.nara.jp
-miyake.nara.jp
-nara.nara.jp
-nosegawa.nara.jp
-oji.nara.jp
-ouda.nara.jp
-oyodo.nara.jp
-sakurai.nara.jp
-sango.nara.jp
-shimoichi.nara.jp
-shimokitayama.nara.jp
-shinjo.nara.jp
-soni.nara.jp
-takatori.nara.jp
-tawaramoto.nara.jp
-tenkawa.nara.jp
-tenri.nara.jp
-uda.nara.jp
-yamatokoriyama.nara.jp
-yamatotakada.nara.jp
-yamazoe.nara.jp
-yoshino.nara.jp
-aga.niigata.jp
-agano.niigata.jp
-gosen.niigata.jp
-itoigawa.niigata.jp
-izumozaki.niigata.jp
-joetsu.niigata.jp
-kamo.niigata.jp
-kariwa.niigata.jp
-kashiwazaki.niigata.jp
-minamiuonuma.niigata.jp
-mitsuke.niigata.jp
-muika.niigata.jp
-murakami.niigata.jp
-myoko.niigata.jp
-nagaoka.niigata.jp
-niigata.niigata.jp
-ojiya.niigata.jp
-omi.niigata.jp
-sado.niigata.jp
-sanjo.niigata.jp
-seiro.niigata.jp
-seirou.niigata.jp
-sekikawa.niigata.jp
-shibata.niigata.jp
-tagami.niigata.jp
-tainai.niigata.jp
-tochio.niigata.jp
-tokamachi.niigata.jp
-tsubame.niigata.jp
-tsunan.niigata.jp
-uonuma.niigata.jp
-yahiko.niigata.jp
-yoita.niigata.jp
-yuzawa.niigata.jp
-beppu.oita.jp
-bungoono.oita.jp
-bungotakada.oita.jp
-hasama.oita.jp
-hiji.oita.jp
-himeshima.oita.jp
-hita.oita.jp
-kamitsue.oita.jp
-kokonoe.oita.jp
-kuju.oita.jp
-kunisaki.oita.jp
-kusu.oita.jp
-oita.oita.jp
-saiki.oita.jp
-taketa.oita.jp
-tsukumi.oita.jp
-usa.oita.jp
-usuki.oita.jp
-yufu.oita.jp
-akaiwa.okayama.jp
-asakuchi.okayama.jp
-bizen.okayama.jp
-hayashima.okayama.jp
-ibara.okayama.jp
-kagamino.okayama.jp
-kasaoka.okayama.jp
-kibichuo.okayama.jp
-kumenan.okayama.jp
-kurashiki.okayama.jp
-maniwa.okayama.jp
-misaki.okayama.jp
-nagi.okayama.jp
-niimi.okayama.jp
-nishiawakura.okayama.jp
-okayama.okayama.jp
-satosho.okayama.jp
-setouchi.okayama.jp
-shinjo.okayama.jp
-shoo.okayama.jp
-soja.okayama.jp
-takahashi.okayama.jp
-tamano.okayama.jp
-tsuyama.okayama.jp
-wake.okayama.jp
-yakage.okayama.jp
-aguni.okinawa.jp
-ginowan.okinawa.jp
-ginoza.okinawa.jp
-gushikami.okinawa.jp
-haebaru.okinawa.jp
-higashi.okinawa.jp
-hirara.okinawa.jp
-iheya.okinawa.jp
-ishigaki.okinawa.jp
-ishikawa.okinawa.jp
-itoman.okinawa.jp
-izena.okinawa.jp
-kadena.okinawa.jp
-kin.okinawa.jp
-kitadaito.okinawa.jp
-kitanakagusuku.okinawa.jp
-kumejima.okinawa.jp
-kunigami.okinawa.jp
-minamidaito.okinawa.jp
-motobu.okinawa.jp
-nago.okinawa.jp
-naha.okinawa.jp
-nakagusuku.okinawa.jp
-nakijin.okinawa.jp
-nanjo.okinawa.jp
-nishihara.okinawa.jp
-ogimi.okinawa.jp
-okinawa.okinawa.jp
-onna.okinawa.jp
-shimoji.okinawa.jp
-taketomi.okinawa.jp
-tarama.okinawa.jp
-tokashiki.okinawa.jp
-tomigusuku.okinawa.jp
-tonaki.okinawa.jp
-urasoe.okinawa.jp
-uruma.okinawa.jp
-yaese.okinawa.jp
-yomitan.okinawa.jp
-yonabaru.okinawa.jp
-yonaguni.okinawa.jp
-zamami.okinawa.jp
-abeno.osaka.jp
-chihayaakasaka.osaka.jp
-chuo.osaka.jp
-daito.osaka.jp
-fujiidera.osaka.jp
-habikino.osaka.jp
-hannan.osaka.jp
-higashiosaka.osaka.jp
-higashisumiyoshi.osaka.jp
-higashiyodogawa.osaka.jp
-hirakata.osaka.jp
-ibaraki.osaka.jp
-ikeda.osaka.jp
-izumi.osaka.jp
-izumiotsu.osaka.jp
-izumisano.osaka.jp
-kadoma.osaka.jp
-kaizuka.osaka.jp
-kanan.osaka.jp
-kashiwara.osaka.jp
-katano.osaka.jp
-kawachinagano.osaka.jp
-kishiwada.osaka.jp
-kita.osaka.jp
-kumatori.osaka.jp
-matsubara.osaka.jp
-minato.osaka.jp
-minoh.osaka.jp
-misaki.osaka.jp
-moriguchi.osaka.jp
-neyagawa.osaka.jp
-nishi.osaka.jp
-nose.osaka.jp
-osakasayama.osaka.jp
-sakai.osaka.jp
-sayama.osaka.jp
-sennan.osaka.jp
-settsu.osaka.jp
-shijonawate.osaka.jp
-shimamoto.osaka.jp
-suita.osaka.jp
-tadaoka.osaka.jp
-taishi.osaka.jp
-tajiri.osaka.jp
-takaishi.osaka.jp
-takatsuki.osaka.jp
-tondabayashi.osaka.jp
-toyonaka.osaka.jp
-toyono.osaka.jp
-yao.osaka.jp
-ariake.saga.jp
-arita.saga.jp
-fukudomi.saga.jp
-genkai.saga.jp
-hamatama.saga.jp
-hizen.saga.jp
-imari.saga.jp
-kamimine.saga.jp
-kanzaki.saga.jp
-karatsu.saga.jp
-kashima.saga.jp
-kitagata.saga.jp
-kitahata.saga.jp
-kiyama.saga.jp
-kouhoku.saga.jp
-kyuragi.saga.jp
-nishiarita.saga.jp
-ogi.saga.jp
-omachi.saga.jp
-ouchi.saga.jp
-saga.saga.jp
-shiroishi.saga.jp
-taku.saga.jp
-tara.saga.jp
-tosu.saga.jp
-yoshinogari.saga.jp
-arakawa.saitama.jp
-asaka.saitama.jp
-chichibu.saitama.jp
-fujimi.saitama.jp
-fujimino.saitama.jp
-fukaya.saitama.jp
-hanno.saitama.jp
-hanyu.saitama.jp
-hasuda.saitama.jp
-hatogaya.saitama.jp
-hatoyama.saitama.jp
-hidaka.saitama.jp
-higashichichibu.saitama.jp
-higashimatsuyama.saitama.jp
-honjo.saitama.jp
-ina.saitama.jp
-iruma.saitama.jp
-iwatsuki.saitama.jp
-kamiizumi.saitama.jp
-kamikawa.saitama.jp
-kamisato.saitama.jp
-kasukabe.saitama.jp
-kawagoe.saitama.jp
-kawaguchi.saitama.jp
-kawajima.saitama.jp
-kazo.saitama.jp
-kitamoto.saitama.jp
-koshigaya.saitama.jp
-kounosu.saitama.jp
-kuki.saitama.jp
-kumagaya.saitama.jp
-matsubushi.saitama.jp
-minano.saitama.jp
-misato.saitama.jp
-miyashiro.saitama.jp
-miyoshi.saitama.jp
-moroyama.saitama.jp
-nagatoro.saitama.jp
-namegawa.saitama.jp
-niiza.saitama.jp
-ogano.saitama.jp
-ogawa.saitama.jp
-ogose.saitama.jp
-okegawa.saitama.jp
-omiya.saitama.jp
-otaki.saitama.jp
-ranzan.saitama.jp
-ryokami.saitama.jp
-saitama.saitama.jp
-sakado.saitama.jp
-satte.saitama.jp
-sayama.saitama.jp
-shiki.saitama.jp
-shiraoka.saitama.jp
-soka.saitama.jp
-sugito.saitama.jp
-toda.saitama.jp
-tokigawa.saitama.jp
-tokorozawa.saitama.jp
-tsurugashima.saitama.jp
-urawa.saitama.jp
-warabi.saitama.jp
-yashio.saitama.jp
-yokoze.saitama.jp
-yono.saitama.jp
-yorii.saitama.jp
-yoshida.saitama.jp
-yoshikawa.saitama.jp
-yoshimi.saitama.jp
-aisho.shiga.jp
-gamo.shiga.jp
-higashiomi.shiga.jp
-hikone.shiga.jp
-koka.shiga.jp
-konan.shiga.jp
-kosei.shiga.jp
-koto.shiga.jp
-kusatsu.shiga.jp
-maibara.shiga.jp
-moriyama.shiga.jp
-nagahama.shiga.jp
-nishiazai.shiga.jp
-notogawa.shiga.jp
-omihachiman.shiga.jp
-otsu.shiga.jp
-ritto.shiga.jp
-ryuoh.shiga.jp
-takashima.shiga.jp
-takatsuki.shiga.jp
-torahime.shiga.jp
-toyosato.shiga.jp
-yasu.shiga.jp
-akagi.shimane.jp
-ama.shimane.jp
-gotsu.shimane.jp
-hamada.shimane.jp
-higashiizumo.shimane.jp
-hikawa.shimane.jp
-hikimi.shimane.jp
-izumo.shimane.jp
-kakinoki.shimane.jp
-masuda.shimane.jp
-matsue.shimane.jp
-misato.shimane.jp
-nishinoshima.shimane.jp
-ohda.shimane.jp
-okinoshima.shimane.jp
-okuizumo.shimane.jp
-shimane.shimane.jp
-tamayu.shimane.jp
-tsuwano.shimane.jp
-unnan.shimane.jp
-yakumo.shimane.jp
-yasugi.shimane.jp
-yatsuka.shimane.jp
-arai.shizuoka.jp
-atami.shizuoka.jp
-fuji.shizuoka.jp
-fujieda.shizuoka.jp
-fujikawa.shizuoka.jp
-fujinomiya.shizuoka.jp
-fukuroi.shizuoka.jp
-gotemba.shizuoka.jp
-haibara.shizuoka.jp
-hamamatsu.shizuoka.jp
-higashiizu.shizuoka.jp
-ito.shizuoka.jp
-iwata.shizuoka.jp
-izu.shizuoka.jp
-izunokuni.shizuoka.jp
-kakegawa.shizuoka.jp
-kannami.shizuoka.jp
-kawanehon.shizuoka.jp
-kawazu.shizuoka.jp
-kikugawa.shizuoka.jp
-kosai.shizuoka.jp
-makinohara.shizuoka.jp
-matsuzaki.shizuoka.jp
-minamiizu.shizuoka.jp
-mishima.shizuoka.jp
-morimachi.shizuoka.jp
-nishiizu.shizuoka.jp
-numazu.shizuoka.jp
-omaezaki.shizuoka.jp
-shimada.shizuoka.jp
-shimizu.shizuoka.jp
-shimoda.shizuoka.jp
-shizuoka.shizuoka.jp
-susono.shizuoka.jp
-yaizu.shizuoka.jp
-yoshida.shizuoka.jp
-ashikaga.tochigi.jp
-bato.tochigi.jp
-haga.tochigi.jp
-ichikai.tochigi.jp
-iwafune.tochigi.jp
-kaminokawa.tochigi.jp
-kanuma.tochigi.jp
-karasuyama.tochigi.jp
-kuroiso.tochigi.jp
-mashiko.tochigi.jp
-mibu.tochigi.jp
-moka.tochigi.jp
-motegi.tochigi.jp
-nasu.tochigi.jp
-nasushiobara.tochigi.jp
-nikko.tochigi.jp
-nishikata.tochigi.jp
-nogi.tochigi.jp
-ohira.tochigi.jp
-ohtawara.tochigi.jp
-oyama.tochigi.jp
-sakura.tochigi.jp
-sano.tochigi.jp
-shimotsuke.tochigi.jp
-shioya.tochigi.jp
-takanezawa.tochigi.jp
-tochigi.tochigi.jp
-tsuga.tochigi.jp
-ujiie.tochigi.jp
-utsunomiya.tochigi.jp
-yaita.tochigi.jp
-aizumi.tokushima.jp
-anan.tokushima.jp
-ichiba.tokushima.jp
-itano.tokushima.jp
-kainan.tokushima.jp
-komatsushima.tokushima.jp
-matsushige.tokushima.jp
-mima.tokushima.jp
-minami.tokushima.jp
-miyoshi.tokushima.jp
-mugi.tokushima.jp
-nakagawa.tokushima.jp
-naruto.tokushima.jp
-sanagochi.tokushima.jp
-shishikui.tokushima.jp
-tokushima.tokushima.jp
-wajiki.tokushima.jp
-adachi.tokyo.jp
-akiruno.tokyo.jp
-akishima.tokyo.jp
-aogashima.tokyo.jp
-arakawa.tokyo.jp
-bunkyo.tokyo.jp
-chiyoda.tokyo.jp
-chofu.tokyo.jp
-chuo.tokyo.jp
-edogawa.tokyo.jp
-fuchu.tokyo.jp
-fussa.tokyo.jp
-hachijo.tokyo.jp
-hachioji.tokyo.jp
-hamura.tokyo.jp
-higashikurume.tokyo.jp
-higashimurayama.tokyo.jp
-higashiyamato.tokyo.jp
-hino.tokyo.jp
-hinode.tokyo.jp
-hinohara.tokyo.jp
-inagi.tokyo.jp
-itabashi.tokyo.jp
-katsushika.tokyo.jp
-kita.tokyo.jp
-kiyose.tokyo.jp
-kodaira.tokyo.jp
-koganei.tokyo.jp
-kokubunji.tokyo.jp
-komae.tokyo.jp
-koto.tokyo.jp
-kouzushima.tokyo.jp
-kunitachi.tokyo.jp
-machida.tokyo.jp
-meguro.tokyo.jp
-minato.tokyo.jp
-mitaka.tokyo.jp
-mizuho.tokyo.jp
-musashimurayama.tokyo.jp
-musashino.tokyo.jp
-nakano.tokyo.jp
-nerima.tokyo.jp
-ogasawara.tokyo.jp
-okutama.tokyo.jp
-ome.tokyo.jp
-oshima.tokyo.jp
-ota.tokyo.jp
-setagaya.tokyo.jp
-shibuya.tokyo.jp
-shinagawa.tokyo.jp
-shinjuku.tokyo.jp
-suginami.tokyo.jp
-sumida.tokyo.jp
-tachikawa.tokyo.jp
-taito.tokyo.jp
-tama.tokyo.jp
-toshima.tokyo.jp
-chizu.tottori.jp
-hino.tottori.jp
-kawahara.tottori.jp
-koge.tottori.jp
-kotoura.tottori.jp
-misasa.tottori.jp
-nanbu.tottori.jp
-nichinan.tottori.jp
-sakaiminato.tottori.jp
-tottori.tottori.jp
-wakasa.tottori.jp
-yazu.tottori.jp
-yonago.tottori.jp
-asahi.toyama.jp
-fuchu.toyama.jp
-fukumitsu.toyama.jp
-funahashi.toyama.jp
-himi.toyama.jp
-imizu.toyama.jp
-inami.toyama.jp
-johana.toyama.jp
-kamiichi.toyama.jp
-kurobe.toyama.jp
-nakaniikawa.toyama.jp
-namerikawa.toyama.jp
-nanto.toyama.jp
-nyuzen.toyama.jp
-oyabe.toyama.jp
-taira.toyama.jp
-takaoka.toyama.jp
-tateyama.toyama.jp
-toga.toyama.jp
-tonami.toyama.jp
-toyama.toyama.jp
-unazuki.toyama.jp
-uozu.toyama.jp
-yamada.toyama.jp
-arida.wakayama.jp
-aridagawa.wakayama.jp
-gobo.wakayama.jp
-hashimoto.wakayama.jp
-hidaka.wakayama.jp
-hirogawa.wakayama.jp
-inami.wakayama.jp
-iwade.wakayama.jp
-kainan.wakayama.jp
-kamitonda.wakayama.jp
-katsuragi.wakayama.jp
-kimino.wakayama.jp
-kinokawa.wakayama.jp
-kitayama.wakayama.jp
-koya.wakayama.jp
-koza.wakayama.jp
-kozagawa.wakayama.jp
-kudoyama.wakayama.jp
-kushimoto.wakayama.jp
-mihama.wakayama.jp
-misato.wakayama.jp
-nachikatsuura.wakayama.jp
-shingu.wakayama.jp
-shirahama.wakayama.jp
-taiji.wakayama.jp
-tanabe.wakayama.jp
-wakayama.wakayama.jp
-yuasa.wakayama.jp
-yura.wakayama.jp
-asahi.yamagata.jp
-funagata.yamagata.jp
-higashine.yamagata.jp
-iide.yamagata.jp
-kahoku.yamagata.jp
-kaminoyama.yamagata.jp
-kaneyama.yamagata.jp
-kawanishi.yamagata.jp
-mamurogawa.yamagata.jp
-mikawa.yamagata.jp
-murayama.yamagata.jp
-nagai.yamagata.jp
-nakayama.yamagata.jp
-nanyo.yamagata.jp
-nishikawa.yamagata.jp
-obanazawa.yamagata.jp
-oe.yamagata.jp
-oguni.yamagata.jp
-ohkura.yamagata.jp
-oishida.yamagata.jp
-sagae.yamagata.jp
-sakata.yamagata.jp
-sakegawa.yamagata.jp
-shinjo.yamagata.jp
-shirataka.yamagata.jp
-shonai.yamagata.jp
-takahata.yamagata.jp
-tendo.yamagata.jp
-tozawa.yamagata.jp
-tsuruoka.yamagata.jp
-yamagata.yamagata.jp
-yamanobe.yamagata.jp
-yonezawa.yamagata.jp
-yuza.yamagata.jp
-abu.yamaguchi.jp
-hagi.yamaguchi.jp
-hikari.yamaguchi.jp
-hofu.yamaguchi.jp
-iwakuni.yamaguchi.jp
-kudamatsu.yamaguchi.jp
-mitou.yamaguchi.jp
-nagato.yamaguchi.jp
-oshima.yamaguchi.jp
-shimonoseki.yamaguchi.jp
-shunan.yamaguchi.jp
-tabuse.yamaguchi.jp
-tokuyama.yamaguchi.jp
-toyota.yamaguchi.jp
-ube.yamaguchi.jp
-yuu.yamaguchi.jp
-chuo.yamanashi.jp
-doshi.yamanashi.jp
-fuefuki.yamanashi.jp
-fujikawa.yamanashi.jp
-fujikawaguchiko.yamanashi.jp
-fujiyoshida.yamanashi.jp
-hayakawa.yamanashi.jp
-hokuto.yamanashi.jp
-ichikawamisato.yamanashi.jp
-kai.yamanashi.jp
-kofu.yamanashi.jp
-koshu.yamanashi.jp
-kosuge.yamanashi.jp
-minami-alps.yamanashi.jp
-minobu.yamanashi.jp
-nakamichi.yamanashi.jp
-nanbu.yamanashi.jp
-narusawa.yamanashi.jp
-nirasaki.yamanashi.jp
-nishikatsura.yamanashi.jp
-oshino.yamanashi.jp
-otsuki.yamanashi.jp
-showa.yamanashi.jp
-tabayama.yamanashi.jp
-tsuru.yamanashi.jp
-uenohara.yamanashi.jp
-yamanakako.yamanashi.jp
-yamanashi.yamanashi.jp
-
-// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145
-*.ke
-
-// kg : http://www.domain.kg/dmn_n.html
-kg
-org.kg
-net.kg
-com.kg
-edu.kg
-gov.kg
-mil.kg
-
-// kh : http://www.mptc.gov.kh/dns_registration.htm
-*.kh
-
-// ki : http://www.ki/dns/index.html
-ki
-edu.ki
-biz.ki
-net.ki
-org.ki
-gov.ki
-info.ki
-com.ki
-
-// km : https://en.wikipedia.org/wiki/.km
-// http://www.domaine.km/documents/charte.doc
-km
-org.km
-nom.km
-gov.km
-prd.km
-tm.km
-edu.km
-mil.km
-ass.km
-com.km
-// These are only mentioned as proposed suggestions at domaine.km, but
-// https://en.wikipedia.org/wiki/.km says they're available for registration:
-coop.km
-asso.km
-presse.km
-medecin.km
-notaires.km
-pharmaciens.km
-veterinaire.km
-gouv.km
-
-// kn : https://en.wikipedia.org/wiki/.kn
-// http://www.dot.kn/domainRules.html
-kn
-net.kn
-org.kn
-edu.kn
-gov.kn
-
-// kp : http://www.kcce.kp/en_index.php
-kp
-com.kp
-edu.kp
-gov.kp
-org.kp
-rep.kp
-tra.kp
-
-// kr : https://en.wikipedia.org/wiki/.kr
-// see also: http://domain.nida.or.kr/eng/registration.jsp
-kr
-ac.kr
-co.kr
-es.kr
-go.kr
-hs.kr
-kg.kr
-mil.kr
-ms.kr
-ne.kr
-or.kr
-pe.kr
-re.kr
-sc.kr
-// kr geographical names
-busan.kr
-chungbuk.kr
-chungnam.kr
-daegu.kr
-daejeon.kr
-gangwon.kr
-gwangju.kr
-gyeongbuk.kr
-gyeonggi.kr
-gyeongnam.kr
-incheon.kr
-jeju.kr
-jeonbuk.kr
-jeonnam.kr
-seoul.kr
-ulsan.kr
-
-// kw : https://en.wikipedia.org/wiki/.kw
-*.kw
-
-// ky : http://www.icta.ky/da_ky_reg_dom.php
-// Confirmed by registry <kysupport@perimeterusa.com> 2008-06-17
-ky
-edu.ky
-gov.ky
-com.ky
-org.ky
-net.ky
-
-// kz : https://en.wikipedia.org/wiki/.kz
-// see also: http://www.nic.kz/rules/index.jsp
-kz
-org.kz
-edu.kz
-net.kz
-gov.kz
-mil.kz
-com.kz
-
-// la : https://en.wikipedia.org/wiki/.la
-// Submitted by registry <gavin.brown@nic.la>
-la
-int.la
-net.la
-info.la
-edu.la
-gov.la
-per.la
-com.la
-org.la
-
-// lb : https://en.wikipedia.org/wiki/.lb
-// Submitted by registry <randy@psg.com>
-lb
-com.lb
-edu.lb
-gov.lb
-net.lb
-org.lb
-
-// lc : https://en.wikipedia.org/wiki/.lc
-// see also: http://www.nic.lc/rules.htm
-lc
-com.lc
-net.lc
-co.lc
-org.lc
-edu.lc
-gov.lc
-
-// li : https://en.wikipedia.org/wiki/.li
-li
-
-// lk : http://www.nic.lk/seclevpr.html
-lk
-gov.lk
-sch.lk
-net.lk
-int.lk
-com.lk
-org.lk
-edu.lk
-ngo.lk
-soc.lk
-web.lk
-ltd.lk
-assn.lk
-grp.lk
-hotel.lk
-ac.lk
-
-// lr : http://psg.com/dns/lr/lr.txt
-// Submitted by registry <randy@psg.com>
-lr
-com.lr
-edu.lr
-gov.lr
-org.lr
-net.lr
-
-// ls : https://en.wikipedia.org/wiki/.ls
-ls
-co.ls
-org.ls
-
-// lt : https://en.wikipedia.org/wiki/.lt
-lt
-// gov.lt : http://www.gov.lt/index_en.php
-gov.lt
-
-// lu : http://www.dns.lu/en/
-lu
-
-// lv : http://www.nic.lv/DNS/En/generic.php
-lv
-com.lv
-edu.lv
-gov.lv
-org.lv
-mil.lv
-id.lv
-net.lv
-asn.lv
-conf.lv
-
-// ly : http://www.nic.ly/regulations.php
-ly
-com.ly
-net.ly
-gov.ly
-plc.ly
-edu.ly
-sch.ly
-med.ly
-org.ly
-id.ly
-
-// ma : https://en.wikipedia.org/wiki/.ma
-// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf
-ma
-co.ma
-net.ma
-gov.ma
-org.ma
-ac.ma
-press.ma
-
-// mc : http://www.nic.mc/
-mc
-tm.mc
-asso.mc
-
-// md : https://en.wikipedia.org/wiki/.md
-md
-
-// me : https://en.wikipedia.org/wiki/.me
-me
-co.me
-net.me
-org.me
-edu.me
-ac.me
-gov.me
-its.me
-priv.me
-
-// mg : http://nic.mg/nicmg/?page_id=39
-mg
-org.mg
-nom.mg
-gov.mg
-prd.mg
-tm.mg
-edu.mg
-mil.mg
-com.mg
-co.mg
-
-// mh : https://en.wikipedia.org/wiki/.mh
-mh
-
-// mil : https://en.wikipedia.org/wiki/.mil
-mil
-
-// mk : https://en.wikipedia.org/wiki/.mk
-// see also: http://dns.marnet.net.mk/postapka.php
-mk
-com.mk
-org.mk
-net.mk
-edu.mk
-gov.mk
-inf.mk
-name.mk
-
-// ml : http://www.gobin.info/domainname/ml-template.doc
-// see also: https://en.wikipedia.org/wiki/.ml
-ml
-com.ml
-edu.ml
-gouv.ml
-gov.ml
-net.ml
-org.ml
-presse.ml
-
-// mm : https://en.wikipedia.org/wiki/.mm
-*.mm
-
-// mn : https://en.wikipedia.org/wiki/.mn
-mn
-gov.mn
-edu.mn
-org.mn
-
-// mo : http://www.monic.net.mo/
-mo
-com.mo
-net.mo
-org.mo
-edu.mo
-gov.mo
-
-// mobi : https://en.wikipedia.org/wiki/.mobi
-mobi
-
-// mp : http://www.dot.mp/
-// Confirmed by registry <dcamacho@saipan.com> 2008-06-17
-mp
-
-// mq : https://en.wikipedia.org/wiki/.mq
-mq
-
-// mr : https://en.wikipedia.org/wiki/.mr
-mr
-gov.mr
-
-// ms : http://www.nic.ms/pdf/MS_Domain_Name_Rules.pdf
-ms
-com.ms
-edu.ms
-gov.ms
-net.ms
-org.ms
-
-// mt : https://www.nic.org.mt/go/policy
-// Submitted by registry <help@nic.org.mt>
-mt
-com.mt
-edu.mt
-net.mt
-org.mt
-
-// mu : https://en.wikipedia.org/wiki/.mu
-mu
-com.mu
-net.mu
-org.mu
-gov.mu
-ac.mu
-co.mu
-or.mu
-
-// museum : http://about.museum/naming/
-// http://index.museum/
-museum
-academy.museum
-agriculture.museum
-air.museum
-airguard.museum
-alabama.museum
-alaska.museum
-amber.museum
-ambulance.museum
-american.museum
-americana.museum
-americanantiques.museum
-americanart.museum
-amsterdam.museum
-and.museum
-annefrank.museum
-anthro.museum
-anthropology.museum
-antiques.museum
-aquarium.museum
-arboretum.museum
-archaeological.museum
-archaeology.museum
-architecture.museum
-art.museum
-artanddesign.museum
-artcenter.museum
-artdeco.museum
-arteducation.museum
-artgallery.museum
-arts.museum
-artsandcrafts.museum
-asmatart.museum
-assassination.museum
-assisi.museum
-association.museum
-astronomy.museum
-atlanta.museum
-austin.museum
-australia.museum
-automotive.museum
-aviation.museum
-axis.museum
-badajoz.museum
-baghdad.museum
-bahn.museum
-bale.museum
-baltimore.museum
-barcelona.museum
-baseball.museum
-basel.museum
-baths.museum
-bauern.museum
-beauxarts.museum
-beeldengeluid.museum
-bellevue.museum
-bergbau.museum
-berkeley.museum
-berlin.museum
-bern.museum
-bible.museum
-bilbao.museum
-bill.museum
-birdart.museum
-birthplace.museum
-bonn.museum
-boston.museum
-botanical.museum
-botanicalgarden.museum
-botanicgarden.museum
-botany.museum
-brandywinevalley.museum
-brasil.museum
-bristol.museum
-british.museum
-britishcolumbia.museum
-broadcast.museum
-brunel.museum
-brussel.museum
-brussels.museum
-bruxelles.museum
-building.museum
-burghof.museum
-bus.museum
-bushey.museum
-cadaques.museum
-california.museum
-cambridge.museum
-can.museum
-canada.museum
-capebreton.museum
-carrier.museum
-cartoonart.museum
-casadelamoneda.museum
-castle.museum
-castres.museum
-celtic.museum
-center.museum
-chattanooga.museum
-cheltenham.museum
-chesapeakebay.museum
-chicago.museum
-children.museum
-childrens.museum
-childrensgarden.museum
-chiropractic.museum
-chocolate.museum
-christiansburg.museum
-cincinnati.museum
-cinema.museum
-circus.museum
-civilisation.museum
-civilization.museum
-civilwar.museum
-clinton.museum
-clock.museum
-coal.museum
-coastaldefence.museum
-cody.museum
-coldwar.museum
-collection.museum
-colonialwilliamsburg.museum
-coloradoplateau.museum
-columbia.museum
-columbus.museum
-communication.museum
-communications.museum
-community.museum
-computer.museum
-computerhistory.museum
-xn--comunicaes-v6a2o.museum
-comunicações.museum
-contemporary.museum
-contemporaryart.museum
-convent.museum
-copenhagen.museum
-corporation.museum
-xn--correios-e-telecomunicaes-ghc29a.museum
-correios-e-telecomunicações.museum
-corvette.museum
-costume.museum
-countryestate.museum
-county.museum
-crafts.museum
-cranbrook.museum
-creation.museum
-cultural.museum
-culturalcenter.museum
-culture.museum
-cyber.museum
-cymru.museum
-dali.museum
-dallas.museum
-database.museum
-ddr.museum
-decorativearts.museum
-delaware.museum
-delmenhorst.museum
-denmark.museum
-depot.museum
-design.museum
-detroit.museum
-dinosaur.museum
-discovery.museum
-dolls.museum
-donostia.museum
-durham.museum
-eastafrica.museum
-eastcoast.museum
-education.museum
-educational.museum
-egyptian.museum
-eisenbahn.museum
-elburg.museum
-elvendrell.museum
-embroidery.museum
-encyclopedic.museum
-england.museum
-entomology.museum
-environment.museum
-environmentalconservation.museum
-epilepsy.museum
-essex.museum
-estate.museum
-ethnology.museum
-exeter.museum
-exhibition.museum
-family.museum
-farm.museum
-farmequipment.museum
-farmers.museum
-farmstead.museum
-field.museum
-figueres.museum
-filatelia.museum
-film.museum
-fineart.museum
-finearts.museum
-finland.museum
-flanders.museum
-florida.museum
-force.museum
-fortmissoula.museum
-fortworth.museum
-foundation.museum
-francaise.museum
-frankfurt.museum
-franziskaner.museum
-freemasonry.museum
-freiburg.museum
-fribourg.museum
-frog.museum
-fundacio.museum
-furniture.museum
-gallery.museum
-garden.museum
-gateway.museum
-geelvinck.museum
-gemological.museum
-geology.museum
-georgia.museum
-giessen.museum
-glas.museum
-glass.museum
-gorge.museum
-grandrapids.museum
-graz.museum
-guernsey.museum
-halloffame.museum
-hamburg.museum
-handson.museum
-harvestcelebration.museum
-hawaii.museum
-health.museum
-heimatunduhren.museum
-hellas.museum
-helsinki.museum
-hembygdsforbund.museum
-heritage.museum
-histoire.museum
-historical.museum
-historicalsociety.museum
-historichouses.museum
-historisch.museum
-historisches.museum
-history.museum
-historyofscience.museum
-horology.museum
-house.museum
-humanities.museum
-illustration.museum
-imageandsound.museum
-indian.museum
-indiana.museum
-indianapolis.museum
-indianmarket.museum
-intelligence.museum
-interactive.museum
-iraq.museum
-iron.museum
-isleofman.museum
-jamison.museum
-jefferson.museum
-jerusalem.museum
-jewelry.museum
-jewish.museum
-jewishart.museum
-jfk.museum
-journalism.museum
-judaica.museum
-judygarland.museum
-juedisches.museum
-juif.museum
-karate.museum
-karikatur.museum
-kids.museum
-koebenhavn.museum
-koeln.museum
-kunst.museum
-kunstsammlung.museum
-kunstunddesign.museum
-labor.museum
-labour.museum
-lajolla.museum
-lancashire.museum
-landes.museum
-lans.museum
-xn--lns-qla.museum
-läns.museum
-larsson.museum
-lewismiller.museum
-lincoln.museum
-linz.museum
-living.museum
-livinghistory.museum
-localhistory.museum
-london.museum
-losangeles.museum
-louvre.museum
-loyalist.museum
-lucerne.museum
-luxembourg.museum
-luzern.museum
-mad.museum
-madrid.museum
-mallorca.museum
-manchester.museum
-mansion.museum
-mansions.museum
-manx.museum
-marburg.museum
-maritime.museum
-maritimo.museum
-maryland.museum
-marylhurst.museum
-media.museum
-medical.museum
-medizinhistorisches.museum
-meeres.museum
-memorial.museum
-mesaverde.museum
-michigan.museum
-midatlantic.museum
-military.museum
-mill.museum
-miners.museum
-mining.museum
-minnesota.museum
-missile.museum
-missoula.museum
-modern.museum
-moma.museum
-money.museum
-monmouth.museum
-monticello.museum
-montreal.museum
-moscow.museum
-motorcycle.museum
-muenchen.museum
-muenster.museum
-mulhouse.museum
-muncie.museum
-museet.museum
-museumcenter.museum
-museumvereniging.museum
-music.museum
-national.museum
-nationalfirearms.museum
-nationalheritage.museum
-nativeamerican.museum
-naturalhistory.museum
-naturalhistorymuseum.museum
-naturalsciences.museum
-nature.museum
-naturhistorisches.museum
-natuurwetenschappen.museum
-naumburg.museum
-naval.museum
-nebraska.museum
-neues.museum
-newhampshire.museum
-newjersey.museum
-newmexico.museum
-newport.museum
-newspaper.museum
-newyork.museum
-niepce.museum
-norfolk.museum
-north.museum
-nrw.museum
-nuernberg.museum
-nuremberg.museum
-nyc.museum
-nyny.museum
-oceanographic.museum
-oceanographique.museum
-omaha.museum
-online.museum
-ontario.museum
-openair.museum
-oregon.museum
-oregontrail.museum
-otago.museum
-oxford.museum
-pacific.museum
-paderborn.museum
-palace.museum
-paleo.museum
-palmsprings.museum
-panama.museum
-paris.museum
-pasadena.museum
-pharmacy.museum
-philadelphia.museum
-philadelphiaarea.museum
-philately.museum
-phoenix.museum
-photography.museum
-pilots.museum
-pittsburgh.museum
-planetarium.museum
-plantation.museum
-plants.museum
-plaza.museum
-portal.museum
-portland.museum
-portlligat.museum
-posts-and-telecommunications.museum
-preservation.museum
-presidio.museum
-press.museum
-project.museum
-public.museum
-pubol.museum
-quebec.museum
-railroad.museum
-railway.museum
-research.museum
-resistance.museum
-riodejaneiro.museum
-rochester.museum
-rockart.museum
-roma.museum
-russia.museum
-saintlouis.museum
-salem.museum
-salvadordali.museum
-salzburg.museum
-sandiego.museum
-sanfrancisco.museum
-santabarbara.museum
-santacruz.museum
-santafe.museum
-saskatchewan.museum
-satx.museum
-savannahga.museum
-schlesisches.museum
-schoenbrunn.museum
-schokoladen.museum
-school.museum
-schweiz.museum
-science.museum
-scienceandhistory.museum
-scienceandindustry.museum
-sciencecenter.museum
-sciencecenters.museum
-science-fiction.museum
-sciencehistory.museum
-sciences.museum
-sciencesnaturelles.museum
-scotland.museum
-seaport.museum
-settlement.museum
-settlers.museum
-shell.museum
-sherbrooke.museum
-sibenik.museum
-silk.museum
-ski.museum
-skole.museum
-society.museum
-sologne.museum
-soundandvision.museum
-southcarolina.museum
-southwest.museum
-space.museum
-spy.museum
-square.museum
-stadt.museum
-stalbans.museum
-starnberg.museum
-state.museum
-stateofdelaware.museum
-station.museum
-steam.museum
-steiermark.museum
-stjohn.museum
-stockholm.museum
-stpetersburg.museum
-stuttgart.museum
-suisse.museum
-surgeonshall.museum
-surrey.museum
-svizzera.museum
-sweden.museum
-sydney.museum
-tank.museum
-tcm.museum
-technology.museum
-telekommunikation.museum
-television.museum
-texas.museum
-textile.museum
-theater.museum
-time.museum
-timekeeping.museum
-topology.museum
-torino.museum
-touch.museum
-town.museum
-transport.museum
-tree.museum
-trolley.museum
-trust.museum
-trustee.museum
-uhren.museum
-ulm.museum
-undersea.museum
-university.museum
-usa.museum
-usantiques.museum
-usarts.museum
-uscountryestate.museum
-usculture.museum
-usdecorativearts.museum
-usgarden.museum
-ushistory.museum
-ushuaia.museum
-uslivinghistory.museum
-utah.museum
-uvic.museum
-valley.museum
-vantaa.museum
-versailles.museum
-viking.museum
-village.museum
-virginia.museum
-virtual.museum
-virtuel.museum
-vlaanderen.museum
-volkenkunde.museum
-wales.museum
-wallonie.museum
-war.museum
-washingtondc.museum
-watchandclock.museum
-watch-and-clock.museum
-western.museum
-westfalen.museum
-whaling.museum
-wildlife.museum
-williamsburg.museum
-windmill.museum
-workshop.museum
-york.museum
-yorkshire.museum
-yosemite.museum
-youth.museum
-zoological.museum
-zoology.museum
-xn--9dbhblg6di.museum
-ירושלים.museum
-xn--h1aegh.museum
-иком.museum
-
-// mv : https://en.wikipedia.org/wiki/.mv
-// "mv" included because, contra Wikipedia, google.mv exists.
-mv
-aero.mv
-biz.mv
-com.mv
-coop.mv
-edu.mv
-gov.mv
-info.mv
-int.mv
-mil.mv
-museum.mv
-name.mv
-net.mv
-org.mv
-pro.mv
-
-// mw : http://www.registrar.mw/
-mw
-ac.mw
-biz.mw
-co.mw
-com.mw
-coop.mw
-edu.mw
-gov.mw
-int.mw
-museum.mw
-net.mw
-org.mw
-
-// mx : http://www.nic.mx/
-// Submitted by registry <farias@nic.mx>
-mx
-com.mx
-org.mx
-gob.mx
-edu.mx
-net.mx
-
-// my : http://www.mynic.net.my/
-my
-com.my
-net.my
-org.my
-gov.my
-edu.my
-mil.my
-name.my
-
-// mz : http://www.uem.mz/
-// Submitted by registry <antonio@uem.mz>
-mz
-ac.mz
-adv.mz
-co.mz
-edu.mz
-gov.mz
-mil.mz
-net.mz
-org.mz
-
-// na : http://www.na-nic.com.na/
-// http://www.info.na/domain/
-na
-info.na
-pro.na
-name.na
-school.na
-or.na
-dr.na
-us.na
-mx.na
-ca.na
-in.na
-cc.na
-tv.na
-ws.na
-mobi.na
-co.na
-com.na
-org.na
-
-// name : has 2nd-level tlds, but there's no list of them
-name
-
-// nc : http://www.cctld.nc/
-nc
-asso.nc
-
-// ne : https://en.wikipedia.org/wiki/.ne
-ne
-
-// net : https://en.wikipedia.org/wiki/.net
-net
-
-// nf : https://en.wikipedia.org/wiki/.nf
-nf
-com.nf
-net.nf
-per.nf
-rec.nf
-web.nf
-arts.nf
-firm.nf
-info.nf
-other.nf
-store.nf
-
-// ng : http://www.nira.org.ng/index.php/join-us/register-ng-domain/189-nira-slds
-ng
-com.ng
-edu.ng
-gov.ng
-i.ng
-mil.ng
-mobi.ng
-name.ng
-net.ng
-org.ng
-sch.ng
-
-// ni : http://www.nic.ni/
-ni
-ac.ni
-biz.ni
-co.ni
-com.ni
-edu.ni
-gob.ni
-in.ni
-info.ni
-int.ni
-mil.ni
-net.ni
-nom.ni
-org.ni
-web.ni
-
-// nl : https://en.wikipedia.org/wiki/.nl
-// https://www.sidn.nl/
-// ccTLD for the Netherlands
-nl
-
-// BV.nl will be a registry for dutch BV's (besloten vennootschap)
-bv.nl
-
-// no : http://www.norid.no/regelverk/index.en.html
-// The Norwegian registry has declined to notify us of updates. The web pages
-// referenced below are the official source of the data. There is also an
-// announce mailing list:
-// https://postlister.uninett.no/sympa/info/norid-diskusjon
-no
-// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html
-fhs.no
-vgs.no
-fylkesbibl.no
-folkebibl.no
-museum.no
-idrett.no
-priv.no
-// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html
-mil.no
-stat.no
-dep.no
-kommune.no
-herad.no
-// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html
-// counties
-aa.no
-ah.no
-bu.no
-fm.no
-hl.no
-hm.no
-jan-mayen.no
-mr.no
-nl.no
-nt.no
-of.no
-ol.no
-oslo.no
-rl.no
-sf.no
-st.no
-svalbard.no
-tm.no
-tr.no
-va.no
-vf.no
-// primary and lower secondary schools per county
-gs.aa.no
-gs.ah.no
-gs.bu.no
-gs.fm.no
-gs.hl.no
-gs.hm.no
-gs.jan-mayen.no
-gs.mr.no
-gs.nl.no
-gs.nt.no
-gs.of.no
-gs.ol.no
-gs.oslo.no
-gs.rl.no
-gs.sf.no
-gs.st.no
-gs.svalbard.no
-gs.tm.no
-gs.tr.no
-gs.va.no
-gs.vf.no
-// cities
-akrehamn.no
-xn--krehamn-dxa.no
-åkrehamn.no
-algard.no
-xn--lgrd-poac.no
-ålgård.no
-arna.no
-brumunddal.no
-bryne.no
-bronnoysund.no
-xn--brnnysund-m8ac.no
-brønnøysund.no
-drobak.no
-xn--drbak-wua.no
-drøbak.no
-egersund.no
-fetsund.no
-floro.no
-xn--flor-jra.no
-florø.no
-fredrikstad.no
-hokksund.no
-honefoss.no
-xn--hnefoss-q1a.no
-hønefoss.no
-jessheim.no
-jorpeland.no
-xn--jrpeland-54a.no
-jørpeland.no
-kirkenes.no
-kopervik.no
-krokstadelva.no
-langevag.no
-xn--langevg-jxa.no
-langevåg.no
-leirvik.no
-mjondalen.no
-xn--mjndalen-64a.no
-mjøndalen.no
-mo-i-rana.no
-mosjoen.no
-xn--mosjen-eya.no
-mosjøen.no
-nesoddtangen.no
-orkanger.no
-osoyro.no
-xn--osyro-wua.no
-osøyro.no
-raholt.no
-xn--rholt-mra.no
-råholt.no
-sandnessjoen.no
-xn--sandnessjen-ogb.no
-sandnessjøen.no
-skedsmokorset.no
-slattum.no
-spjelkavik.no
-stathelle.no
-stavern.no
-stjordalshalsen.no
-xn--stjrdalshalsen-sqb.no
-stjørdalshalsen.no
-tananger.no
-tranby.no
-vossevangen.no
-// communities
-afjord.no
-xn--fjord-lra.no
-åfjord.no
-agdenes.no
-al.no
-xn--l-1fa.no
-ål.no
-alesund.no
-xn--lesund-hua.no
-ålesund.no
-alstahaug.no
-alta.no
-xn--lt-liac.no
-áltá.no
-alaheadju.no
-xn--laheadju-7ya.no
-álaheadju.no
-alvdal.no
-amli.no
-xn--mli-tla.no
-åmli.no
-amot.no
-xn--mot-tla.no
-åmot.no
-andebu.no
-andoy.no
-xn--andy-ira.no
-andøy.no
-andasuolo.no
-ardal.no
-xn--rdal-poa.no
-årdal.no
-aremark.no
-arendal.no
-xn--s-1fa.no
-ås.no
-aseral.no
-xn--seral-lra.no
-åseral.no
-asker.no
-askim.no
-askvoll.no
-askoy.no
-xn--asky-ira.no
-askøy.no
-asnes.no
-xn--snes-poa.no
-åsnes.no
-audnedaln.no
-aukra.no
-aure.no
-aurland.no
-aurskog-holand.no
-xn--aurskog-hland-jnb.no
-aurskog-høland.no
-austevoll.no
-austrheim.no
-averoy.no
-xn--avery-yua.no
-averøy.no
-balestrand.no
-ballangen.no
-balat.no
-xn--blt-elab.no
-bálát.no
-balsfjord.no
-bahccavuotna.no
-xn--bhccavuotna-k7a.no
-báhccavuotna.no
-bamble.no
-bardu.no
-beardu.no
-beiarn.no
-bajddar.no
-xn--bjddar-pta.no
-bájddar.no
-baidar.no
-xn--bidr-5nac.no
-báidár.no
-berg.no
-bergen.no
-berlevag.no
-xn--berlevg-jxa.no
-berlevåg.no
-bearalvahki.no
-xn--bearalvhki-y4a.no
-bearalváhki.no
-bindal.no
-birkenes.no
-bjarkoy.no
-xn--bjarky-fya.no
-bjarkøy.no
-bjerkreim.no
-bjugn.no
-bodo.no
-xn--bod-2na.no
-bodø.no
-badaddja.no
-xn--bdddj-mrabd.no
-bådåddjå.no
-budejju.no
-bokn.no
-bremanger.no
-bronnoy.no
-xn--brnny-wuac.no
-brønnøy.no
-bygland.no
-bykle.no
-barum.no
-xn--brum-voa.no
-bærum.no
-bo.telemark.no
-xn--b-5ga.telemark.no
-bø.telemark.no
-bo.nordland.no
-xn--b-5ga.nordland.no
-bø.nordland.no
-bievat.no
-xn--bievt-0qa.no
-bievát.no
-bomlo.no
-xn--bmlo-gra.no
-bømlo.no
-batsfjord.no
-xn--btsfjord-9za.no
-båtsfjord.no
-bahcavuotna.no
-xn--bhcavuotna-s4a.no
-báhcavuotna.no
-dovre.no
-drammen.no
-drangedal.no
-dyroy.no
-xn--dyry-ira.no
-dyrøy.no
-donna.no
-xn--dnna-gra.no
-dønna.no
-eid.no
-eidfjord.no
-eidsberg.no
-eidskog.no
-eidsvoll.no
-eigersund.no
-elverum.no
-enebakk.no
-engerdal.no
-etne.no
-etnedal.no
-evenes.no
-evenassi.no
-xn--eveni-0qa01ga.no
-evenášši.no
-evje-og-hornnes.no
-farsund.no
-fauske.no
-fuossko.no
-fuoisku.no
-fedje.no
-fet.no
-finnoy.no
-xn--finny-yua.no
-finnøy.no
-fitjar.no
-fjaler.no
-fjell.no
-flakstad.no
-flatanger.no
-flekkefjord.no
-flesberg.no
-flora.no
-fla.no
-xn--fl-zia.no
-flå.no
-folldal.no
-forsand.no
-fosnes.no
-frei.no
-frogn.no
-froland.no
-frosta.no
-frana.no
-xn--frna-woa.no
-fræna.no
-froya.no
-xn--frya-hra.no
-frøya.no
-fusa.no
-fyresdal.no
-forde.no
-xn--frde-gra.no
-førde.no
-gamvik.no
-gangaviika.no
-xn--ggaviika-8ya47h.no
-gáŋgaviika.no
-gaular.no
-gausdal.no
-gildeskal.no
-xn--gildeskl-g0a.no
-gildeskål.no
-giske.no
-gjemnes.no
-gjerdrum.no
-gjerstad.no
-gjesdal.no
-gjovik.no
-xn--gjvik-wua.no
-gjøvik.no
-gloppen.no
-gol.no
-gran.no
-grane.no
-granvin.no
-gratangen.no
-grimstad.no
-grong.no
-kraanghke.no
-xn--kranghke-b0a.no
-kråanghke.no
-grue.no
-gulen.no
-hadsel.no
-halden.no
-halsa.no
-hamar.no
-hamaroy.no
-habmer.no
-xn--hbmer-xqa.no
-hábmer.no
-hapmir.no
-xn--hpmir-xqa.no
-hápmir.no
-hammerfest.no
-hammarfeasta.no
-xn--hmmrfeasta-s4ac.no
-hámmárfeasta.no
-haram.no
-hareid.no
-harstad.no
-hasvik.no
-aknoluokta.no
-xn--koluokta-7ya57h.no
-ákŋoluokta.no
-hattfjelldal.no
-aarborte.no
-haugesund.no
-hemne.no
-hemnes.no
-hemsedal.no
-heroy.more-og-romsdal.no
-xn--hery-ira.xn--mre-og-romsdal-qqb.no
-herøy.møre-og-romsdal.no
-heroy.nordland.no
-xn--hery-ira.nordland.no
-herøy.nordland.no
-hitra.no
-hjartdal.no
-hjelmeland.no
-hobol.no
-xn--hobl-ira.no
-hobøl.no
-hof.no
-hol.no
-hole.no
-holmestrand.no
-holtalen.no
-xn--holtlen-hxa.no
-holtålen.no
-hornindal.no
-horten.no
-hurdal.no
-hurum.no
-hvaler.no
-hyllestad.no
-hagebostad.no
-xn--hgebostad-g3a.no
-hægebostad.no
-hoyanger.no
-xn--hyanger-q1a.no
-høyanger.no
-hoylandet.no
-xn--hylandet-54a.no
-høylandet.no
-ha.no
-xn--h-2fa.no
-hå.no
-ibestad.no
-inderoy.no
-xn--indery-fya.no
-inderøy.no
-iveland.no
-jevnaker.no
-jondal.no
-jolster.no
-xn--jlster-bya.no
-jølster.no
-karasjok.no
-karasjohka.no
-xn--krjohka-hwab49j.no
-kárášjohka.no
-karlsoy.no
-galsa.no
-xn--gls-elac.no
-gálsá.no
-karmoy.no
-xn--karmy-yua.no
-karmøy.no
-kautokeino.no
-guovdageaidnu.no
-klepp.no
-klabu.no
-xn--klbu-woa.no
-klæbu.no
-kongsberg.no
-kongsvinger.no
-kragero.no
-xn--krager-gya.no
-kragerø.no
-kristiansand.no
-kristiansund.no
-krodsherad.no
-xn--krdsherad-m8a.no
-krødsherad.no
-kvalsund.no
-rahkkeravju.no
-xn--rhkkervju-01af.no
-ráhkkerávju.no
-kvam.no
-kvinesdal.no
-kvinnherad.no
-kviteseid.no
-kvitsoy.no
-xn--kvitsy-fya.no
-kvitsøy.no
-kvafjord.no
-xn--kvfjord-nxa.no
-kvæfjord.no
-giehtavuoatna.no
-kvanangen.no
-xn--kvnangen-k0a.no
-kvænangen.no
-navuotna.no
-xn--nvuotna-hwa.no
-návuotna.no
-kafjord.no
-xn--kfjord-iua.no
-kåfjord.no
-gaivuotna.no
-xn--givuotna-8ya.no
-gáivuotna.no
-larvik.no
-lavangen.no
-lavagis.no
-loabat.no
-xn--loabt-0qa.no
-loabát.no
-lebesby.no
-davvesiida.no
-leikanger.no
-leirfjord.no
-leka.no
-leksvik.no
-lenvik.no
-leangaviika.no
-xn--leagaviika-52b.no
-leaŋgaviika.no
-lesja.no
-levanger.no
-lier.no
-lierne.no
-lillehammer.no
-lillesand.no
-lindesnes.no
-lindas.no
-xn--linds-pra.no
-lindås.no
-lom.no
-loppa.no
-lahppi.no
-xn--lhppi-xqa.no
-láhppi.no
-lund.no
-lunner.no
-luroy.no
-xn--lury-ira.no
-lurøy.no
-luster.no
-lyngdal.no
-lyngen.no
-ivgu.no
-lardal.no
-lerdal.no
-xn--lrdal-sra.no
-lærdal.no
-lodingen.no
-xn--ldingen-q1a.no
-lødingen.no
-lorenskog.no
-xn--lrenskog-54a.no
-lørenskog.no
-loten.no
-xn--lten-gra.no
-løten.no
-malvik.no
-masoy.no
-xn--msy-ula0h.no
-måsøy.no
-muosat.no
-xn--muost-0qa.no
-muosát.no
-mandal.no
-marker.no
-marnardal.no
-masfjorden.no
-meland.no
-meldal.no
-melhus.no
-meloy.no
-xn--mely-ira.no
-meløy.no
-meraker.no
-xn--merker-kua.no
-meråker.no
-moareke.no
-xn--moreke-jua.no
-moåreke.no
-midsund.no
-midtre-gauldal.no
-modalen.no
-modum.no
-molde.no
-moskenes.no
-moss.no
-mosvik.no
-malselv.no
-xn--mlselv-iua.no
-målselv.no
-malatvuopmi.no
-xn--mlatvuopmi-s4a.no
-málatvuopmi.no
-namdalseid.no
-aejrie.no
-namsos.no
-namsskogan.no
-naamesjevuemie.no
-xn--nmesjevuemie-tcba.no
-nååmesjevuemie.no
-laakesvuemie.no
-nannestad.no
-narvik.no
-narviika.no
-naustdal.no
-nedre-eiker.no
-nes.akershus.no
-nes.buskerud.no
-nesna.no
-nesodden.no
-nesseby.no
-unjarga.no
-xn--unjrga-rta.no
-unjárga.no
-nesset.no
-nissedal.no
-nittedal.no
-nord-aurdal.no
-nord-fron.no
-nord-odal.no
-norddal.no
-nordkapp.no
-davvenjarga.no
-xn--davvenjrga-y4a.no
-davvenjárga.no
-nordre-land.no
-nordreisa.no
-raisa.no
-xn--risa-5na.no
-ráisa.no
-nore-og-uvdal.no
-notodden.no
-naroy.no
-xn--nry-yla5g.no
-nærøy.no
-notteroy.no
-xn--nttery-byae.no
-nøtterøy.no
-odda.no
-oksnes.no
-xn--ksnes-uua.no
-øksnes.no
-oppdal.no
-oppegard.no
-xn--oppegrd-ixa.no
-oppegård.no
-orkdal.no
-orland.no
-xn--rland-uua.no
-ørland.no
-orskog.no
-xn--rskog-uua.no
-ørskog.no
-orsta.no
-xn--rsta-fra.no
-ørsta.no
-os.hedmark.no
-os.hordaland.no
-osen.no
-osteroy.no
-xn--ostery-fya.no
-osterøy.no
-ostre-toten.no
-xn--stre-toten-zcb.no
-østre-toten.no
-overhalla.no
-ovre-eiker.no
-xn--vre-eiker-k8a.no
-øvre-eiker.no
-oyer.no
-xn--yer-zna.no
-øyer.no
-oygarden.no
-xn--ygarden-p1a.no
-øygarden.no
-oystre-slidre.no
-xn--ystre-slidre-ujb.no
-øystre-slidre.no
-porsanger.no
-porsangu.no
-xn--porsgu-sta26f.no
-porsáŋgu.no
-porsgrunn.no
-radoy.no
-xn--rady-ira.no
-radøy.no
-rakkestad.no
-rana.no
-ruovat.no
-randaberg.no
-rauma.no
-rendalen.no
-rennebu.no
-rennesoy.no
-xn--rennesy-v1a.no
-rennesøy.no
-rindal.no
-ringebu.no
-ringerike.no
-ringsaker.no
-rissa.no
-risor.no
-xn--risr-ira.no
-risør.no
-roan.no
-rollag.no
-rygge.no
-ralingen.no
-xn--rlingen-mxa.no
-rælingen.no
-rodoy.no
-xn--rdy-0nab.no
-rødøy.no
-romskog.no
-xn--rmskog-bya.no
-rømskog.no
-roros.no
-xn--rros-gra.no
-røros.no
-rost.no
-xn--rst-0na.no
-røst.no
-royken.no
-xn--ryken-vua.no
-røyken.no
-royrvik.no
-xn--ryrvik-bya.no
-røyrvik.no
-rade.no
-xn--rde-ula.no
-råde.no
-salangen.no
-siellak.no
-saltdal.no
-salat.no
-xn--slt-elab.no
-sálát.no
-xn--slat-5na.no
-sálat.no
-samnanger.no
-sande.more-og-romsdal.no
-sande.xn--mre-og-romsdal-qqb.no
-sande.møre-og-romsdal.no
-sande.vestfold.no
-sandefjord.no
-sandnes.no
-sandoy.no
-xn--sandy-yua.no
-sandøy.no
-sarpsborg.no
-sauda.no
-sauherad.no
-sel.no
-selbu.no
-selje.no
-seljord.no
-sigdal.no
-siljan.no
-sirdal.no
-skaun.no
-skedsmo.no
-ski.no
-skien.no
-skiptvet.no
-skjervoy.no
-xn--skjervy-v1a.no
-skjervøy.no
-skierva.no
-xn--skierv-uta.no
-skiervá.no
-skjak.no
-xn--skjk-soa.no
-skjåk.no
-skodje.no
-skanland.no
-xn--sknland-fxa.no
-skånland.no
-skanit.no
-xn--sknit-yqa.no
-skánit.no
-smola.no
-xn--smla-hra.no
-smøla.no
-snillfjord.no
-snasa.no
-xn--snsa-roa.no
-snåsa.no
-snoasa.no
-snaase.no
-xn--snase-nra.no
-snåase.no
-sogndal.no
-sokndal.no
-sola.no
-solund.no
-songdalen.no
-sortland.no
-spydeberg.no
-stange.no
-stavanger.no
-steigen.no
-steinkjer.no
-stjordal.no
-xn--stjrdal-s1a.no
-stjørdal.no
-stokke.no
-stor-elvdal.no
-stord.no
-stordal.no
-storfjord.no
-omasvuotna.no
-strand.no
-stranda.no
-stryn.no
-sula.no
-suldal.no
-sund.no
-sunndal.no
-surnadal.no
-sveio.no
-svelvik.no
-sykkylven.no
-sogne.no
-xn--sgne-gra.no
-søgne.no
-somna.no
-xn--smna-gra.no
-sømna.no
-sondre-land.no
-xn--sndre-land-0cb.no
-søndre-land.no
-sor-aurdal.no
-xn--sr-aurdal-l8a.no
-sør-aurdal.no
-sor-fron.no
-xn--sr-fron-q1a.no
-sør-fron.no
-sor-odal.no
-xn--sr-odal-q1a.no
-sør-odal.no
-sor-varanger.no
-xn--sr-varanger-ggb.no
-sør-varanger.no
-matta-varjjat.no
-xn--mtta-vrjjat-k7af.no
-mátta-várjjat.no
-sorfold.no
-xn--srfold-bya.no
-sørfold.no
-sorreisa.no
-xn--srreisa-q1a.no
-sørreisa.no
-sorum.no
-xn--srum-gra.no
-sørum.no
-tana.no
-deatnu.no
-time.no
-tingvoll.no
-tinn.no
-tjeldsund.no
-dielddanuorri.no
-tjome.no
-xn--tjme-hra.no
-tjøme.no
-tokke.no
-tolga.no
-torsken.no
-tranoy.no
-xn--trany-yua.no
-tranøy.no
-tromso.no
-xn--troms-zua.no
-tromsø.no
-tromsa.no
-romsa.no
-trondheim.no
-troandin.no
-trysil.no
-trana.no
-xn--trna-woa.no
-træna.no
-trogstad.no
-xn--trgstad-r1a.no
-trøgstad.no
-tvedestrand.no
-tydal.no
-tynset.no
-tysfjord.no
-divtasvuodna.no
-divttasvuotna.no
-tysnes.no
-tysvar.no
-xn--tysvr-vra.no
-tysvær.no
-tonsberg.no
-xn--tnsberg-q1a.no
-tønsberg.no
-ullensaker.no
-ullensvang.no
-ulvik.no
-utsira.no
-vadso.no
-xn--vads-jra.no
-vadsø.no
-cahcesuolo.no
-xn--hcesuolo-7ya35b.no
-čáhcesuolo.no
-vaksdal.no
-valle.no
-vang.no
-vanylven.no
-vardo.no
-xn--vard-jra.no
-vardø.no
-varggat.no
-xn--vrggt-xqad.no
-várggát.no
-vefsn.no
-vaapste.no
-vega.no
-vegarshei.no
-xn--vegrshei-c0a.no
-vegårshei.no
-vennesla.no
-verdal.no
-verran.no
-vestby.no
-vestnes.no
-vestre-slidre.no
-vestre-toten.no
-vestvagoy.no
-xn--vestvgy-ixa6o.no
-vestvågøy.no
-vevelstad.no
-vik.no
-vikna.no
-vindafjord.no
-volda.no
-voss.no
-varoy.no
-xn--vry-yla5g.no
-værøy.no
-vagan.no
-xn--vgan-qoa.no
-vågan.no
-voagat.no
-vagsoy.no
-xn--vgsy-qoa0j.no
-vågsøy.no
-vaga.no
-xn--vg-yiab.no
-vågå.no
-valer.ostfold.no
-xn--vler-qoa.xn--stfold-9xa.no
-våler.østfold.no
-valer.hedmark.no
-xn--vler-qoa.hedmark.no
-våler.hedmark.no
-
-// np : http://www.mos.com.np/register.html
-*.np
-
-// nr : http://cenpac.net.nr/dns/index.html
-// Submitted by registry <technician@cenpac.net.nr>
-nr
-biz.nr
-info.nr
-gov.nr
-edu.nr
-org.nr
-net.nr
-com.nr
-
-// nu : https://en.wikipedia.org/wiki/.nu
-nu
-
-// nz : https://en.wikipedia.org/wiki/.nz
-// Submitted by registry <jay@nzrs.net.nz>
-nz
-ac.nz
-co.nz
-cri.nz
-geek.nz
-gen.nz
-govt.nz
-health.nz
-iwi.nz
-kiwi.nz
-maori.nz
-mil.nz
-xn--mori-qsa.nz
-māori.nz
-net.nz
-org.nz
-parliament.nz
-school.nz
-
-// om : https://en.wikipedia.org/wiki/.om
-om
-co.om
-com.om
-edu.om
-gov.om
-med.om
-museum.om
-net.om
-org.om
-pro.om
-
-// onion : https://tools.ietf.org/html/rfc7686
-onion
-
-// org : https://en.wikipedia.org/wiki/.org
-org
-
-// pa : http://www.nic.pa/
-// Some additional second level "domains" resolve directly as hostnames, such as
-// pannet.pa, so we add a rule for "pa".
-pa
-ac.pa
-gob.pa
-com.pa
-org.pa
-sld.pa
-edu.pa
-net.pa
-ing.pa
-abo.pa
-med.pa
-nom.pa
-
-// pe : https://www.nic.pe/InformeFinalComision.pdf
-pe
-edu.pe
-gob.pe
-nom.pe
-mil.pe
-org.pe
-com.pe
-net.pe
-
-// pf : http://www.gobin.info/domainname/formulaire-pf.pdf
-pf
-com.pf
-org.pf
-edu.pf
-
-// pg : https://en.wikipedia.org/wiki/.pg
-*.pg
-
-// ph : http://www.domains.ph/FAQ2.asp
-// Submitted by registry <jed@email.com.ph>
-ph
-com.ph
-net.ph
-org.ph
-gov.ph
-edu.ph
-ngo.ph
-mil.ph
-i.ph
-
-// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK
-pk
-com.pk
-net.pk
-edu.pk
-org.pk
-fam.pk
-biz.pk
-web.pk
-gov.pk
-gob.pk
-gok.pk
-gon.pk
-gop.pk
-gos.pk
-info.pk
-
-// pl http://www.dns.pl/english/index.html
-// Submitted by registry
-pl
-com.pl
-net.pl
-org.pl
-// pl functional domains (http://www.dns.pl/english/index.html)
-aid.pl
-agro.pl
-atm.pl
-auto.pl
-biz.pl
-edu.pl
-gmina.pl
-gsm.pl
-info.pl
-mail.pl
-miasta.pl
-media.pl
-mil.pl
-nieruchomosci.pl
-nom.pl
-pc.pl
-powiat.pl
-priv.pl
-realestate.pl
-rel.pl
-sex.pl
-shop.pl
-sklep.pl
-sos.pl
-szkola.pl
-targi.pl
-tm.pl
-tourism.pl
-travel.pl
-turystyka.pl
-// Government domains
-gov.pl
-ap.gov.pl
-ic.gov.pl
-is.gov.pl
-us.gov.pl
-kmpsp.gov.pl
-kppsp.gov.pl
-kwpsp.gov.pl
-psp.gov.pl
-wskr.gov.pl
-kwp.gov.pl
-mw.gov.pl
-ug.gov.pl
-um.gov.pl
-umig.gov.pl
-ugim.gov.pl
-upow.gov.pl
-uw.gov.pl
-starostwo.gov.pl
-pa.gov.pl
-po.gov.pl
-psse.gov.pl
-pup.gov.pl
-rzgw.gov.pl
-sa.gov.pl
-so.gov.pl
-sr.gov.pl
-wsa.gov.pl
-sko.gov.pl
-uzs.gov.pl
-wiih.gov.pl
-winb.gov.pl
-pinb.gov.pl
-wios.gov.pl
-witd.gov.pl
-wzmiuw.gov.pl
-piw.gov.pl
-wiw.gov.pl
-griw.gov.pl
-wif.gov.pl
-oum.gov.pl
-sdn.gov.pl
-zp.gov.pl
-uppo.gov.pl
-mup.gov.pl
-wuoz.gov.pl
-konsulat.gov.pl
-oirm.gov.pl
-// pl regional domains (http://www.dns.pl/english/index.html)
-augustow.pl
-babia-gora.pl
-bedzin.pl
-beskidy.pl
-bialowieza.pl
-bialystok.pl
-bielawa.pl
-bieszczady.pl
-boleslawiec.pl
-bydgoszcz.pl
-bytom.pl
-cieszyn.pl
-czeladz.pl
-czest.pl
-dlugoleka.pl
-elblag.pl
-elk.pl
-glogow.pl
-gniezno.pl
-gorlice.pl
-grajewo.pl
-ilawa.pl
-jaworzno.pl
-jelenia-gora.pl
-jgora.pl
-kalisz.pl
-kazimierz-dolny.pl
-karpacz.pl
-kartuzy.pl
-kaszuby.pl
-katowice.pl
-kepno.pl
-ketrzyn.pl
-klodzko.pl
-kobierzyce.pl
-kolobrzeg.pl
-konin.pl
-konskowola.pl
-kutno.pl
-lapy.pl
-lebork.pl
-legnica.pl
-lezajsk.pl
-limanowa.pl
-lomza.pl
-lowicz.pl
-lubin.pl
-lukow.pl
-malbork.pl
-malopolska.pl
-mazowsze.pl
-mazury.pl
-mielec.pl
-mielno.pl
-mragowo.pl
-naklo.pl
-nowaruda.pl
-nysa.pl
-olawa.pl
-olecko.pl
-olkusz.pl
-olsztyn.pl
-opoczno.pl
-opole.pl
-ostroda.pl
-ostroleka.pl
-ostrowiec.pl
-ostrowwlkp.pl
-pila.pl
-pisz.pl
-podhale.pl
-podlasie.pl
-polkowice.pl
-pomorze.pl
-pomorskie.pl
-prochowice.pl
-pruszkow.pl
-przeworsk.pl
-pulawy.pl
-radom.pl
-rawa-maz.pl
-rybnik.pl
-rzeszow.pl
-sanok.pl
-sejny.pl
-slask.pl
-slupsk.pl
-sosnowiec.pl
-stalowa-wola.pl
-skoczow.pl
-starachowice.pl
-stargard.pl
-suwalki.pl
-swidnica.pl
-swiebodzin.pl
-swinoujscie.pl
-szczecin.pl
-szczytno.pl
-tarnobrzeg.pl
-tgory.pl
-turek.pl
-tychy.pl
-ustka.pl
-walbrzych.pl
-warmia.pl
-warszawa.pl
-waw.pl
-wegrow.pl
-wielun.pl
-wlocl.pl
-wloclawek.pl
-wodzislaw.pl
-wolomin.pl
-wroclaw.pl
-zachpomor.pl
-zagan.pl
-zarow.pl
-zgora.pl
-zgorzelec.pl
-
-// pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
-pm
-
-// pn : http://www.government.pn/PnRegistry/policies.htm
-pn
-gov.pn
-co.pn
-org.pn
-edu.pn
-net.pn
-
-// post : https://en.wikipedia.org/wiki/.post
-post
-
-// pr : http://www.nic.pr/index.asp?f=1
-pr
-com.pr
-net.pr
-org.pr
-gov.pr
-edu.pr
-isla.pr
-pro.pr
-biz.pr
-info.pr
-name.pr
-// these aren't mentioned on nic.pr, but on https://en.wikipedia.org/wiki/.pr
-est.pr
-prof.pr
-ac.pr
-
-// pro : http://registry.pro/get-pro
-pro
-aaa.pro
-aca.pro
-acct.pro
-avocat.pro
-bar.pro
-cpa.pro
-eng.pro
-jur.pro
-law.pro
-med.pro
-recht.pro
-
-// ps : https://en.wikipedia.org/wiki/.ps
-// http://www.nic.ps/registration/policy.html#reg
-ps
-edu.ps
-gov.ps
-sec.ps
-plo.ps
-com.ps
-org.ps
-net.ps
-
-// pt : http://online.dns.pt/dns/start_dns
-pt
-net.pt
-gov.pt
-org.pt
-edu.pt
-int.pt
-publ.pt
-com.pt
-nome.pt
-
-// pw : https://en.wikipedia.org/wiki/.pw
-pw
-co.pw
-ne.pw
-or.pw
-ed.pw
-go.pw
-belau.pw
-
-// py : http://www.nic.py/pautas.html#seccion_9
-// Submitted by registry
-py
-com.py
-coop.py
-edu.py
-gov.py
-mil.py
-net.py
-org.py
-
-// qa : http://domains.qa/en/
-qa
-com.qa
-edu.qa
-gov.qa
-mil.qa
-name.qa
-net.qa
-org.qa
-sch.qa
-
-// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs
-re
-asso.re
-com.re
-nom.re
-
-// ro : http://www.rotld.ro/
-ro
-arts.ro
-com.ro
-firm.ro
-info.ro
-nom.ro
-nt.ro
-org.ro
-rec.ro
-store.ro
-tm.ro
-www.ro
-
-// rs : https://www.rnids.rs/en/domains/national-domains
-rs
-ac.rs
-co.rs
-edu.rs
-gov.rs
-in.rs
-org.rs
-
-// ru : https://cctld.ru/en/domains/domens_ru/reserved/
-ru
-ac.ru
-edu.ru
-gov.ru
-int.ru
-mil.ru
-test.ru
-
-// rw : http://www.nic.rw/cgi-bin/policy.pl
-rw
-gov.rw
-net.rw
-edu.rw
-ac.rw
-com.rw
-co.rw
-int.rw
-mil.rw
-gouv.rw
-
-// sa : http://www.nic.net.sa/
-sa
-com.sa
-net.sa
-org.sa
-gov.sa
-med.sa
-pub.sa
-edu.sa
-sch.sa
-
-// sb : http://www.sbnic.net.sb/
-// Submitted by registry <lee.humphries@telekom.com.sb>
-sb
-com.sb
-edu.sb
-gov.sb
-net.sb
-org.sb
-
-// sc : http://www.nic.sc/
-sc
-com.sc
-gov.sc
-net.sc
-org.sc
-edu.sc
-
-// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm
-// Submitted by registry <admin@isoc.sd>
-sd
-com.sd
-net.sd
-org.sd
-edu.sd
-med.sd
-tv.sd
-gov.sd
-info.sd
-
-// se : https://en.wikipedia.org/wiki/.se
-// Submitted by registry <patrik.wallstrom@iis.se>
-se
-a.se
-ac.se
-b.se
-bd.se
-brand.se
-c.se
-d.se
-e.se
-f.se
-fh.se
-fhsk.se
-fhv.se
-g.se
-h.se
-i.se
-k.se
-komforb.se
-kommunalforbund.se
-komvux.se
-l.se
-lanbib.se
-m.se
-n.se
-naturbruksgymn.se
-o.se
-org.se
-p.se
-parti.se
-pp.se
-press.se
-r.se
-s.se
-t.se
-tm.se
-u.se
-w.se
-x.se
-y.se
-z.se
-
-// sg : http://www.nic.net.sg/page/registration-policies-procedures-and-guidelines
-sg
-com.sg
-net.sg
-org.sg
-gov.sg
-edu.sg
-per.sg
-
-// sh : http://www.nic.sh/registrar.html
-sh
-com.sh
-net.sh
-gov.sh
-org.sh
-mil.sh
-
-// si : https://en.wikipedia.org/wiki/.si
-si
-
-// sj : No registrations at this time.
-// Submitted by registry <jarle@uninett.no>
-sj
-
-// sk : https://en.wikipedia.org/wiki/.sk
-// list of 2nd level domains ?
-sk
-
-// sl : http://www.nic.sl
-// Submitted by registry <adam@neoip.com>
-sl
-com.sl
-net.sl
-edu.sl
-gov.sl
-org.sl
-
-// sm : https://en.wikipedia.org/wiki/.sm
-sm
-
-// sn : https://en.wikipedia.org/wiki/.sn
-sn
-art.sn
-com.sn
-edu.sn
-gouv.sn
-org.sn
-perso.sn
-univ.sn
-
-// so : http://www.soregistry.com/
-so
-com.so
-net.so
-org.so
-
-// sr : https://en.wikipedia.org/wiki/.sr
-sr
-
-// st : http://www.nic.st/html/policyrules/
-st
-co.st
-com.st
-consulado.st
-edu.st
-embaixada.st
-gov.st
-mil.st
-net.st
-org.st
-principe.st
-saotome.st
-store.st
-
-// su : https://en.wikipedia.org/wiki/.su
-su
-
-// sv : http://www.svnet.org.sv/niveldos.pdf
-sv
-com.sv
-edu.sv
-gob.sv
-org.sv
-red.sv
-
-// sx : https://en.wikipedia.org/wiki/.sx
-// Submitted by registry <jcvignes@openregistry.com>
-sx
-gov.sx
-
-// sy : https://en.wikipedia.org/wiki/.sy
-// see also: http://www.gobin.info/domainname/sy.doc
-sy
-edu.sy
-gov.sy
-net.sy
-mil.sy
-com.sy
-org.sy
-
-// sz : https://en.wikipedia.org/wiki/.sz
-// http://www.sispa.org.sz/
-sz
-co.sz
-ac.sz
-org.sz
-
-// tc : https://en.wikipedia.org/wiki/.tc
-tc
-
-// td : https://en.wikipedia.org/wiki/.td
-td
-
-// tel: https://en.wikipedia.org/wiki/.tel
-// http://www.telnic.org/
-tel
-
-// tf : https://en.wikipedia.org/wiki/.tf
-tf
-
-// tg : https://en.wikipedia.org/wiki/.tg
-// http://www.nic.tg/
-tg
-
-// th : https://en.wikipedia.org/wiki/.th
-// Submitted by registry <krit@thains.co.th>
-th
-ac.th
-co.th
-go.th
-in.th
-mi.th
-net.th
-or.th
-
-// tj : http://www.nic.tj/policy.html
-tj
-ac.tj
-biz.tj
-co.tj
-com.tj
-edu.tj
-go.tj
-gov.tj
-int.tj
-mil.tj
-name.tj
-net.tj
-nic.tj
-org.tj
-test.tj
-web.tj
-
-// tk : https://en.wikipedia.org/wiki/.tk
-tk
-
-// tl : https://en.wikipedia.org/wiki/.tl
-tl
-gov.tl
-
-// tm : http://www.nic.tm/local.html
-tm
-com.tm
-co.tm
-org.tm
-net.tm
-nom.tm
-gov.tm
-mil.tm
-edu.tm
-
-// tn : https://en.wikipedia.org/wiki/.tn
-// http://whois.ati.tn/
-tn
-com.tn
-ens.tn
-fin.tn
-gov.tn
-ind.tn
-intl.tn
-nat.tn
-net.tn
-org.tn
-info.tn
-perso.tn
-tourism.tn
-edunet.tn
-rnrt.tn
-rns.tn
-rnu.tn
-mincom.tn
-agrinet.tn
-defense.tn
-turen.tn
-
-// to : https://en.wikipedia.org/wiki/.to
-// Submitted by registry <egullich@colo.to>
-to
-com.to
-gov.to
-net.to
-org.to
-edu.to
-mil.to
-
-// subTLDs: https://www.nic.tr/forms/eng/policies.pdf
-// and: https://www.nic.tr/forms/politikalar.pdf
-// Submitted by <mehmetgurevin@gmail.com>
-tr
-com.tr
-info.tr
-biz.tr
-net.tr
-org.tr
-web.tr
-gen.tr
-tv.tr
-av.tr
-dr.tr
-bbs.tr
-name.tr
-tel.tr
-gov.tr
-bel.tr
-pol.tr
-mil.tr
-k12.tr
-edu.tr
-kep.tr
-
-// Used by Northern Cyprus
-nc.tr
-
-// Used by government agencies of Northern Cyprus
-gov.nc.tr
-
-// travel : https://en.wikipedia.org/wiki/.travel
-travel
-
-// tt : http://www.nic.tt/
-tt
-co.tt
-com.tt
-org.tt
-net.tt
-biz.tt
-info.tt
-pro.tt
-int.tt
-coop.tt
-jobs.tt
-mobi.tt
-travel.tt
-museum.tt
-aero.tt
-name.tt
-gov.tt
-edu.tt
-
-// tv : https://en.wikipedia.org/wiki/.tv
-// Not listing any 2LDs as reserved since none seem to exist in practice,
-// Wikipedia notwithstanding.
-tv
-
-// tw : https://en.wikipedia.org/wiki/.tw
-tw
-edu.tw
-gov.tw
-mil.tw
-com.tw
-net.tw
-org.tw
-idv.tw
-game.tw
-ebiz.tw
-club.tw
-xn--zf0ao64a.tw
-網路.tw
-xn--uc0atv.tw
-組織.tw
-xn--czrw28b.tw
-商業.tw
-
-// tz : http://www.tznic.or.tz/index.php/domains
-// Submitted by registry <manager@tznic.or.tz>
-tz
-ac.tz
-co.tz
-go.tz
-hotel.tz
-info.tz
-me.tz
-mil.tz
-mobi.tz
-ne.tz
-or.tz
-sc.tz
-tv.tz
-
-// ua : https://hostmaster.ua/policy/?ua
-// Submitted by registry <dk@cctld.ua>
-ua
-// ua 2LD
-com.ua
-edu.ua
-gov.ua
-in.ua
-net.ua
-org.ua
-// ua geographic names
-// https://hostmaster.ua/2ld/
-cherkassy.ua
-cherkasy.ua
-chernigov.ua
-chernihiv.ua
-chernivtsi.ua
-chernovtsy.ua
-ck.ua
-cn.ua
-cr.ua
-crimea.ua
-cv.ua
-dn.ua
-dnepropetrovsk.ua
-dnipropetrovsk.ua
-dominic.ua
-donetsk.ua
-dp.ua
-if.ua
-ivano-frankivsk.ua
-kh.ua
-kharkiv.ua
-kharkov.ua
-kherson.ua
-khmelnitskiy.ua
-khmelnytskyi.ua
-kiev.ua
-kirovograd.ua
-km.ua
-kr.ua
-krym.ua
-ks.ua
-kv.ua
-kyiv.ua
-lg.ua
-lt.ua
-lugansk.ua
-lutsk.ua
-lv.ua
-lviv.ua
-mk.ua
-mykolaiv.ua
-nikolaev.ua
-od.ua
-odesa.ua
-odessa.ua
-pl.ua
-poltava.ua
-rivne.ua
-rovno.ua
-rv.ua
-sb.ua
-sebastopol.ua
-sevastopol.ua
-sm.ua
-sumy.ua
-te.ua
-ternopil.ua
-uz.ua
-uzhgorod.ua
-vinnica.ua
-vinnytsia.ua
-vn.ua
-volyn.ua
-yalta.ua
-zaporizhzhe.ua
-zaporizhzhia.ua
-zhitomir.ua
-zhytomyr.ua
-zp.ua
-zt.ua
-
-// ug : https://www.registry.co.ug/
-ug
-co.ug
-or.ug
-ac.ug
-sc.ug
-go.ug
-ne.ug
-com.ug
-org.ug
-
-// uk : https://en.wikipedia.org/wiki/.uk
-// Submitted by registry <Michael.Daly@nominet.org.uk>
-uk
-ac.uk
-co.uk
-gov.uk
-ltd.uk
-me.uk
-net.uk
-nhs.uk
-org.uk
-plc.uk
-police.uk
-*.sch.uk
-
-// us : https://en.wikipedia.org/wiki/.us
-us
-dni.us
-fed.us
-isa.us
-kids.us
-nsn.us
-// us geographic names
-ak.us
-al.us
-ar.us
-as.us
-az.us
-ca.us
-co.us
-ct.us
-dc.us
-de.us
-fl.us
-ga.us
-gu.us
-hi.us
-ia.us
-id.us
-il.us
-in.us
-ks.us
-ky.us
-la.us
-ma.us
-md.us
-me.us
-mi.us
-mn.us
-mo.us
-ms.us
-mt.us
-nc.us
-nd.us
-ne.us
-nh.us
-nj.us
-nm.us
-nv.us
-ny.us
-oh.us
-ok.us
-or.us
-pa.us
-pr.us
-ri.us
-sc.us
-sd.us
-tn.us
-tx.us
-ut.us
-vi.us
-vt.us
-va.us
-wa.us
-wi.us
-wv.us
-wy.us
-// The registrar notes several more specific domains available in each state,
-// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat
-// haphazard; in some states these domains resolve as addresses, while in others
-// only subdomains are available, or even nothing at all. We include the
-// most common ones where it's clear that different sites are different
-// entities.
-k12.ak.us
-k12.al.us
-k12.ar.us
-k12.as.us
-k12.az.us
-k12.ca.us
-k12.co.us
-k12.ct.us
-k12.dc.us
-k12.de.us
-k12.fl.us
-k12.ga.us
-k12.gu.us
-// k12.hi.us Bug 614565 - Hawaii has a state-wide DOE login
-k12.ia.us
-k12.id.us
-k12.il.us
-k12.in.us
-k12.ks.us
-k12.ky.us
-k12.la.us
-k12.ma.us
-k12.md.us
-k12.me.us
-k12.mi.us
-k12.mn.us
-k12.mo.us
-k12.ms.us
-k12.mt.us
-k12.nc.us
-// k12.nd.us Bug 1028347 - Removed at request of Travis Rosso <trossow@nd.gov>
-k12.ne.us
-k12.nh.us
-k12.nj.us
-k12.nm.us
-k12.nv.us
-k12.ny.us
-k12.oh.us
-k12.ok.us
-k12.or.us
-k12.pa.us
-k12.pr.us
-k12.ri.us
-k12.sc.us
-// k12.sd.us Bug 934131 - Removed at request of James Booze <James.Booze@k12.sd.us>
-k12.tn.us
-k12.tx.us
-k12.ut.us
-k12.vi.us
-k12.vt.us
-k12.va.us
-k12.wa.us
-k12.wi.us
-// k12.wv.us Bug 947705 - Removed at request of Verne Britton <verne@wvnet.edu>
-k12.wy.us
-cc.ak.us
-cc.al.us
-cc.ar.us
-cc.as.us
-cc.az.us
-cc.ca.us
-cc.co.us
-cc.ct.us
-cc.dc.us
-cc.de.us
-cc.fl.us
-cc.ga.us
-cc.gu.us
-cc.hi.us
-cc.ia.us
-cc.id.us
-cc.il.us
-cc.in.us
-cc.ks.us
-cc.ky.us
-cc.la.us
-cc.ma.us
-cc.md.us
-cc.me.us
-cc.mi.us
-cc.mn.us
-cc.mo.us
-cc.ms.us
-cc.mt.us
-cc.nc.us
-cc.nd.us
-cc.ne.us
-cc.nh.us
-cc.nj.us
-cc.nm.us
-cc.nv.us
-cc.ny.us
-cc.oh.us
-cc.ok.us
-cc.or.us
-cc.pa.us
-cc.pr.us
-cc.ri.us
-cc.sc.us
-cc.sd.us
-cc.tn.us
-cc.tx.us
-cc.ut.us
-cc.vi.us
-cc.vt.us
-cc.va.us
-cc.wa.us
-cc.wi.us
-cc.wv.us
-cc.wy.us
-lib.ak.us
-lib.al.us
-lib.ar.us
-lib.as.us
-lib.az.us
-lib.ca.us
-lib.co.us
-lib.ct.us
-lib.dc.us
-// lib.de.us Issue #243 - Moved to Private section at request of Ed Moore <Ed.Moore@lib.de.us>
-lib.fl.us
-lib.ga.us
-lib.gu.us
-lib.hi.us
-lib.ia.us
-lib.id.us
-lib.il.us
-lib.in.us
-lib.ks.us
-lib.ky.us
-lib.la.us
-lib.ma.us
-lib.md.us
-lib.me.us
-lib.mi.us
-lib.mn.us
-lib.mo.us
-lib.ms.us
-lib.mt.us
-lib.nc.us
-lib.nd.us
-lib.ne.us
-lib.nh.us
-lib.nj.us
-lib.nm.us
-lib.nv.us
-lib.ny.us
-lib.oh.us
-lib.ok.us
-lib.or.us
-lib.pa.us
-lib.pr.us
-lib.ri.us
-lib.sc.us
-lib.sd.us
-lib.tn.us
-lib.tx.us
-lib.ut.us
-lib.vi.us
-lib.vt.us
-lib.va.us
-lib.wa.us
-lib.wi.us
-// lib.wv.us Bug 941670 - Removed at request of Larry W Arnold <arnold@wvlc.lib.wv.us>
-lib.wy.us
-// k12.ma.us contains school districts in Massachusetts. The 4LDs are
-// managed independently except for private (PVT), charter (CHTR) and
-// parochial (PAROCH) schools. Those are delegated directly to the
-// 5LD operators. <k12-ma-hostmaster _ at _ rsuc.gweep.net>
-pvt.k12.ma.us
-chtr.k12.ma.us
-paroch.k12.ma.us
-
-// uy : http://www.nic.org.uy/
-uy
-com.uy
-edu.uy
-gub.uy
-mil.uy
-net.uy
-org.uy
-
-// uz : http://www.reg.uz/
-uz
-co.uz
-com.uz
-net.uz
-org.uz
-
-// va : https://en.wikipedia.org/wiki/.va
-va
-
-// vc : https://en.wikipedia.org/wiki/.vc
-// Submitted by registry <kshah@ca.afilias.info>
-vc
-com.vc
-net.vc
-org.vc
-gov.vc
-mil.vc
-edu.vc
-
-// ve : https://registro.nic.ve/
-// Submitted by registry
-ve
-arts.ve
-co.ve
-com.ve
-e12.ve
-edu.ve
-firm.ve
-gob.ve
-gov.ve
-info.ve
-int.ve
-mil.ve
-net.ve
-org.ve
-rec.ve
-store.ve
-tec.ve
-web.ve
-
-// vg : https://en.wikipedia.org/wiki/.vg
-vg
-
-// vi : http://www.nic.vi/newdomainform.htm
-// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other
-// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they
-// are available for registration (which they do not seem to be).
-vi
-co.vi
-com.vi
-k12.vi
-net.vi
-org.vi
-
-// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp
-vn
-com.vn
-net.vn
-org.vn
-edu.vn
-gov.vn
-int.vn
-ac.vn
-biz.vn
-info.vn
-name.vn
-pro.vn
-health.vn
-
-// vu : https://en.wikipedia.org/wiki/.vu
-// http://www.vunic.vu/
-vu
-com.vu
-edu.vu
-net.vu
-org.vu
-
-// wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
-wf
-
-// ws : https://en.wikipedia.org/wiki/.ws
-// http://samoanic.ws/index.dhtml
-ws
-com.ws
-net.ws
-org.ws
-gov.ws
-edu.ws
-
-// yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
-yt
-
-// IDN ccTLDs
-// When submitting patches, please maintain a sort by ISO 3166 ccTLD, then
-// U-label, and follow this format:
-// // A-Label ("<Latin renderings>", <language name>[, variant info]) : <ISO 3166 ccTLD>
-// // [sponsoring org]
-// U-Label
-
-// xn--mgbaam7a8h ("Emerat", Arabic) : AE
-// http://nic.ae/english/arabicdomain/rules.jsp
-xn--mgbaam7a8h
-امارات
-
-// xn--y9a3aq ("hye", Armenian) : AM
-// ISOC AM (operated by .am Registry)
-xn--y9a3aq
-հայ
-
-// xn--54b7fta0cc ("Bangla", Bangla) : BD
-xn--54b7fta0cc
-বাংলা
-
-// xn--90ais ("bel", Belarusian/Russian Cyrillic) : BY
-// Operated by .by registry
-xn--90ais
-бел
-
-// xn--fiqs8s ("Zhongguo/China", Chinese, Simplified) : CN
-// CNNIC
-// http://cnnic.cn/html/Dir/2005/10/11/3218.htm
-xn--fiqs8s
-中国
-
-// xn--fiqz9s ("Zhongguo/China", Chinese, Traditional) : CN
-// CNNIC
-// http://cnnic.cn/html/Dir/2005/10/11/3218.htm
-xn--fiqz9s
-中國
-
-// xn--lgbbat1ad8j ("Algeria/Al Jazair", Arabic) : DZ
-xn--lgbbat1ad8j
-الجزائر
-
-// xn--wgbh1c ("Egypt/Masr", Arabic) : EG
-// http://www.dotmasr.eg/
-xn--wgbh1c
-مصر
-
-// xn--e1a4c ("eu", Cyrillic) : EU
-xn--e1a4c
-ею
-
-// xn--node ("ge", Georgian Mkhedruli) : GE
-xn--node
-გე
-
-// xn--qxam ("el", Greek) : GR
-// Hellenic Ministry of Infrastructure, Transport, and Networks
-xn--qxam
-ελ
-
-// xn--j6w193g ("Hong Kong", Chinese) : HK
-// https://www2.hkirc.hk/register/rules.jsp
-xn--j6w193g
-香港
-
-// xn--h2brj9c ("Bharat", Devanagari) : IN
-// India
-xn--h2brj9c
-भारत
-
-// xn--mgbbh1a71e ("Bharat", Arabic) : IN
-// India
-xn--mgbbh1a71e
-بھارت
-
-// xn--fpcrj9c3d ("Bharat", Telugu) : IN
-// India
-xn--fpcrj9c3d
-భారత్
-
-// xn--gecrj9c ("Bharat", Gujarati) : IN
-// India
-xn--gecrj9c
-ભારત
-
-// xn--s9brj9c ("Bharat", Gurmukhi) : IN
-// India
-xn--s9brj9c
-ਭਾਰਤ
-
-// xn--45brj9c ("Bharat", Bengali) : IN
-// India
-xn--45brj9c
-ভারত
-
-// xn--xkc2dl3a5ee0h ("India", Tamil) : IN
-// India
-xn--xkc2dl3a5ee0h
-இந்தியா
-
-// xn--mgba3a4f16a ("Iran", Persian) : IR
-xn--mgba3a4f16a
-ایران
-
-// xn--mgba3a4fra ("Iran", Arabic) : IR
-xn--mgba3a4fra
-ايران
-
-// xn--mgbtx2b ("Iraq", Arabic) : IQ
-// Communications and Media Commission
-xn--mgbtx2b
-عراق
-
-// xn--mgbayh7gpa ("al-Ordon", Arabic) : JO
-// National Information Technology Center (NITC)
-// Royal Scientific Society, Al-Jubeiha
-xn--mgbayh7gpa
-الاردن
-
-// xn--3e0b707e ("Republic of Korea", Hangul) : KR
-xn--3e0b707e
-한국
-
-// xn--80ao21a ("Kaz", Kazakh) : KZ
-xn--80ao21a
-қаз
-
-// xn--fzc2c9e2c ("Lanka", Sinhalese-Sinhala) : LK
-// http://nic.lk
-xn--fzc2c9e2c
-ලංකා
-
-// xn--xkc2al3hye2a ("Ilangai", Tamil) : LK
-// http://nic.lk
-xn--xkc2al3hye2a
-இலங்கை
-
-// xn--mgbc0a9azcg ("Morocco/al-Maghrib", Arabic) : MA
-xn--mgbc0a9azcg
-المغرب
-
-// xn--d1alf ("mkd", Macedonian) : MK
-// MARnet
-xn--d1alf
-мкд
-
-// xn--l1acc ("mon", Mongolian) : MN
-xn--l1acc
-мон
-
-// xn--mix891f ("Macao", Chinese, Traditional) : MO
-// MONIC / HNET Asia (Registry Operator for .mo)
-xn--mix891f
-澳門
-
-// xn--mix082f ("Macao", Chinese, Simplified) : MO
-xn--mix082f
-澳门
-
-// xn--mgbx4cd0ab ("Malaysia", Malay) : MY
-xn--mgbx4cd0ab
-مليسيا
-
-// xn--mgb9awbf ("Oman", Arabic) : OM
-xn--mgb9awbf
-عمان
-
-// xn--mgbai9azgqp6j ("Pakistan", Urdu/Arabic) : PK
-xn--mgbai9azgqp6j
-پاکستان
-
-// xn--mgbai9a5eva00b ("Pakistan", Urdu/Arabic, variant) : PK
-xn--mgbai9a5eva00b
-پاكستان
-
-// xn--ygbi2ammx ("Falasteen", Arabic) : PS
-// The Palestinian National Internet Naming Authority (PNINA)
-// http://www.pnina.ps
-xn--ygbi2ammx
-فلسطين
-
-// xn--90a3ac ("srb", Cyrillic) : RS
-// https://www.rnids.rs/en/domains/national-domains
-xn--90a3ac
-срб
-xn--o1ac.xn--90a3ac
-пр.срб
-xn--c1avg.xn--90a3ac
-орг.срб
-xn--90azh.xn--90a3ac
-обр.срб
-xn--d1at.xn--90a3ac
-од.срб
-xn--o1ach.xn--90a3ac
-упр.срб
-xn--80au.xn--90a3ac
-ак.срб
-
-// xn--p1ai ("rf", Russian-Cyrillic) : RU
-// http://www.cctld.ru/en/docs/rulesrf.php
-xn--p1ai
-рф
-
-// xn--wgbl6a ("Qatar", Arabic) : QA
-// http://www.ict.gov.qa/
-xn--wgbl6a
-قطر
-
-// xn--mgberp4a5d4ar ("AlSaudiah", Arabic) : SA
-// http://www.nic.net.sa/
-xn--mgberp4a5d4ar
-السعودية
-
-// xn--mgberp4a5d4a87g ("AlSaudiah", Arabic, variant) : SA
-xn--mgberp4a5d4a87g
-السعودیة
-
-// xn--mgbqly7c0a67fbc ("AlSaudiah", Arabic, variant) : SA
-xn--mgbqly7c0a67fbc
-السعودیۃ
-
-// xn--mgbqly7cvafr ("AlSaudiah", Arabic, variant) : SA
-xn--mgbqly7cvafr
-السعوديه
-
-// xn--mgbpl2fh ("sudan", Arabic) : SD
-// Operated by .sd registry
-xn--mgbpl2fh
-سودان
-
-// xn--yfro4i67o Singapore ("Singapore", Chinese) : SG
-xn--yfro4i67o
-新加坡
-
-// xn--clchc0ea0b2g2a9gcd ("Singapore", Tamil) : SG
-xn--clchc0ea0b2g2a9gcd
-சிங்கப்பூர்
-
-// xn--ogbpf8fl ("Syria", Arabic) : SY
-xn--ogbpf8fl
-سورية
-
-// xn--mgbtf8fl ("Syria", Arabic, variant) : SY
-xn--mgbtf8fl
-سوريا
-
-// xn--o3cw4h ("Thai", Thai) : TH
-// http://www.thnic.co.th
-xn--o3cw4h
-ไทย
-
-// xn--pgbs0dh ("Tunisia", Arabic) : TN
-// http://nic.tn
-xn--pgbs0dh
-تونس
-
-// xn--kpry57d ("Taiwan", Chinese, Traditional) : TW
-// http://www.twnic.net/english/dn/dn_07a.htm
-xn--kpry57d
-台灣
-
-// xn--kprw13d ("Taiwan", Chinese, Simplified) : TW
-// http://www.twnic.net/english/dn/dn_07a.htm
-xn--kprw13d
-台湾
-
-// xn--nnx388a ("Taiwan", Chinese, variant) : TW
-xn--nnx388a
-臺灣
-
-// xn--j1amh ("ukr", Cyrillic) : UA
-xn--j1amh
-укр
-
-// xn--mgb2ddes ("AlYemen", Arabic) : YE
-xn--mgb2ddes
-اليمن
-
-// xxx : http://icmregistry.com
-xxx
-
-// ye : http://www.y.net.ye/services/domain_name.htm
-*.ye
-
-// za : http://www.zadna.org.za/content/page/domain-information
-ac.za
-agric.za
-alt.za
-co.za
-edu.za
-gov.za
-grondar.za
-law.za
-mil.za
-net.za
-ngo.za
-nis.za
-nom.za
-org.za
-school.za
-tm.za
-web.za
-
-// zm : https://zicta.zm/
-// Submitted by registry <info@zicta.zm>
-zm
-ac.zm
-biz.zm
-co.zm
-com.zm
-edu.zm
-gov.zm
-info.zm
-mil.zm
-net.zm
-org.zm
-sch.zm
-
-// zw : https://en.wikipedia.org/wiki/.zw
-*.zw
-
-
-// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2016-11-29T01:06:51Z
-
-// aaa : 2015-02-26 American Automobile Association, Inc.
-aaa
-
-// aarp : 2015-05-21 AARP
-aarp
-
-// abarth : 2015-07-30 Fiat Chrysler Automobiles N.V.
-abarth
-
-// abb : 2014-10-24 ABB Ltd
-abb
-
-// abbott : 2014-07-24 Abbott Laboratories, Inc.
-abbott
-
-// abbvie : 2015-07-30 AbbVie Inc.
-abbvie
-
-// abc : 2015-07-30 Disney Enterprises, Inc.
-abc
-
-// able : 2015-06-25 Able Inc.
-able
-
-// abogado : 2014-04-24 Top Level Domain Holdings Limited
-abogado
-
-// abudhabi : 2015-07-30 Abu Dhabi Systems and Information Centre
-abudhabi
-
-// academy : 2013-11-07 Half Oaks, LLC
-academy
-
-// accenture : 2014-08-15 Accenture plc
-accenture
-
-// accountant : 2014-11-20 dot Accountant Limited
-accountant
-
-// accountants : 2014-03-20 Knob Town, LLC
-accountants
-
-// aco : 2015-01-08 ACO Severin Ahlmann GmbH & Co. KG
-aco
-
-// active : 2014-05-01 The Active Network, Inc
-active
-
-// actor : 2013-12-12 United TLD Holdco Ltd.
-actor
-
-// adac : 2015-07-16 Allgemeiner Deutscher Automobil-Club e.V. (ADAC)
-adac
-
-// ads : 2014-12-04 Charleston Road Registry Inc.
-ads
-
-// adult : 2014-10-16 ICM Registry AD LLC
-adult
-
-// aeg : 2015-03-19 Aktiebolaget Electrolux
-aeg
-
-// aetna : 2015-05-21 Aetna Life Insurance Company
-aetna
-
-// afamilycompany : 2015-07-23 Johnson Shareholdings, Inc.
-afamilycompany
-
-// afl : 2014-10-02 Australian Football League
-afl
-
-// africa : 2014-03-24 ZA Central Registry NPC trading as Registry.Africa
-africa
-
-// agakhan : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation)
-agakhan
-
-// agency : 2013-11-14 Steel Falls, LLC
-agency
-
-// aig : 2014-12-18 American International Group, Inc.
-aig
-
-// aigo : 2015-08-06 aigo Digital Technology Co,Ltd.
-aigo
-
-// airbus : 2015-07-30 Airbus S.A.S.
-airbus
-
-// airforce : 2014-03-06 United TLD Holdco Ltd.
-airforce
-
-// airtel : 2014-10-24 Bharti Airtel Limited
-airtel
-
-// akdn : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation)
-akdn
-
-// alfaromeo : 2015-07-31 Fiat Chrysler Automobiles N.V.
-alfaromeo
-
-// alibaba : 2015-01-15 Alibaba Group Holding Limited
-alibaba
-
-// alipay : 2015-01-15 Alibaba Group Holding Limited
-alipay
-
-// allfinanz : 2014-07-03 Allfinanz Deutsche Vermögensberatung Aktiengesellschaft
-allfinanz
-
-// allstate : 2015-07-31 Allstate Fire and Casualty Insurance Company
-allstate
-
-// ally : 2015-06-18 Ally Financial Inc.
-ally
-
-// alsace : 2014-07-02 REGION D ALSACE
-alsace
-
-// alstom : 2015-07-30 ALSTOM
-alstom
-
-// americanexpress : 2015-07-31 American Express Travel Related Services Company, Inc.
-americanexpress
-
-// americanfamily : 2015-07-23 AmFam, Inc.
-americanfamily
-
-// amex : 2015-07-31 American Express Travel Related Services Company, Inc.
-amex
-
-// amfam : 2015-07-23 AmFam, Inc.
-amfam
-
-// amica : 2015-05-28 Amica Mutual Insurance Company
-amica
-
-// amsterdam : 2014-07-24 Gemeente Amsterdam
-amsterdam
-
-// analytics : 2014-12-18 Campus IP LLC
-analytics
-
-// android : 2014-08-07 Charleston Road Registry Inc.
-android
-
-// anquan : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD.
-anquan
-
-// anz : 2015-07-31 Australia and New Zealand Banking Group Limited
-anz
-
-// aol : 2015-09-17 AOL Inc.
-aol
-
-// apartments : 2014-12-11 June Maple, LLC
-apartments
-
-// app : 2015-05-14 Charleston Road Registry Inc.
-app
-
-// apple : 2015-05-14 Apple Inc.
-apple
-
-// aquarelle : 2014-07-24 Aquarelle.com
-aquarelle
-
-// arab : 2015-11-12 League of Arab States
-arab
-
-// aramco : 2014-11-20 Aramco Services Company
-aramco
-
-// archi : 2014-02-06 STARTING DOT LIMITED
-archi
-
-// army : 2014-03-06 United TLD Holdco Ltd.
-army
-
-// art : 2016-03-24 UK Creative Ideas Limited
-art
-
-// arte : 2014-12-11 Association Relative à la Télévision Européenne G.E.I.E.
-arte
-
-// asda : 2015-07-31 Wal-Mart Stores, Inc.
-asda
-
-// associates : 2014-03-06 Baxter Hill, LLC
-associates
-
-// athleta : 2015-07-30 The Gap, Inc.
-athleta
-
-// attorney : 2014-03-20
-attorney
-
-// auction : 2014-03-20
-auction
-
-// audi : 2015-05-21 AUDI Aktiengesellschaft
-audi
-
-// audible : 2015-06-25 Amazon EU S.à r.l.
-audible
-
-// audio : 2014-03-20 Uniregistry, Corp.
-audio
-
-// auspost : 2015-08-13 Australian Postal Corporation
-auspost
-
-// author : 2014-12-18 Amazon EU S.à r.l.
-author
-
-// auto : 2014-11-13
-auto
-
-// autos : 2014-01-09 DERAutos, LLC
-autos
-
-// avianca : 2015-01-08 Aerovias del Continente Americano S.A. Avianca
-avianca
-
-// aws : 2015-06-25 Amazon EU S.à r.l.
-aws
-
-// axa : 2013-12-19 AXA SA
-axa
-
-// azure : 2014-12-18 Microsoft Corporation
-azure
-
-// baby : 2015-04-09 Johnson & Johnson Services, Inc.
-baby
-
-// baidu : 2015-01-08 Baidu, Inc.
-baidu
-
-// banamex : 2015-07-30 Citigroup Inc.
-banamex
-
-// bananarepublic : 2015-07-31 The Gap, Inc.
-bananarepublic
-
-// band : 2014-06-12
-band
-
-// bank : 2014-09-25 fTLD Registry Services LLC
-bank
-
-// bar : 2013-12-12 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
-bar
-
-// barcelona : 2014-07-24 Municipi de Barcelona
-barcelona
-
-// barclaycard : 2014-11-20 Barclays Bank PLC
-barclaycard
-
-// barclays : 2014-11-20 Barclays Bank PLC
-barclays
-
-// barefoot : 2015-06-11 Gallo Vineyards, Inc.
-barefoot
-
-// bargains : 2013-11-14 Half Hallow, LLC
-bargains
-
-// baseball : 2015-10-29 MLB Advanced Media DH, LLC
-baseball
-
-// basketball : 2015-08-20 Fédération Internationale de Basketball (FIBA)
-basketball
-
-// bauhaus : 2014-04-17 Werkhaus GmbH
-bauhaus
-
-// bayern : 2014-01-23 Bayern Connect GmbH
-bayern
-
-// bbc : 2014-12-18 British Broadcasting Corporation
-bbc
-
-// bbt : 2015-07-23 BB&T Corporation
-bbt
-
-// bbva : 2014-10-02 BANCO BILBAO VIZCAYA ARGENTARIA, S.A.
-bbva
-
-// bcg : 2015-04-02 The Boston Consulting Group, Inc.
-bcg
-
-// bcn : 2014-07-24 Municipi de Barcelona
-bcn
-
-// beats : 2015-05-14 Beats Electronics, LLC
-beats
-
-// beauty : 2015-12-03 L'Oréal
-beauty
-
-// beer : 2014-01-09 Top Level Domain Holdings Limited
-beer
-
-// bentley : 2014-12-18 Bentley Motors Limited
-bentley
-
-// berlin : 2013-10-31 dotBERLIN GmbH & Co. KG
-berlin
-
-// best : 2013-12-19 BestTLD Pty Ltd
-best
-
-// bestbuy : 2015-07-31 BBY Solutions, Inc.
-bestbuy
-
-// bet : 2015-05-07 Afilias plc
-bet
-
-// bharti : 2014-01-09 Bharti Enterprises (Holding) Private Limited
-bharti
-
-// bible : 2014-06-19 American Bible Society
-bible
-
-// bid : 2013-12-19 dot Bid Limited
-bid
-
-// bike : 2013-08-27 Grand Hollow, LLC
-bike
-
-// bing : 2014-12-18 Microsoft Corporation
-bing
-
-// bingo : 2014-12-04 Sand Cedar, LLC
-bingo
-
-// bio : 2014-03-06 STARTING DOT LIMITED
-bio
-
-// black : 2014-01-16 Afilias Limited
-black
-
-// blackfriday : 2014-01-16 Uniregistry, Corp.
-blackfriday
-
-// blanco : 2015-07-16 BLANCO GmbH + Co KG
-blanco
-
-// blockbuster : 2015-07-30 Dish DBS Corporation
-blockbuster
-
-// blog : 2015-05-14
-blog
-
-// bloomberg : 2014-07-17 Bloomberg IP Holdings LLC
-bloomberg
-
-// blue : 2013-11-07 Afilias Limited
-blue
-
-// bms : 2014-10-30 Bristol-Myers Squibb Company
-bms
-
-// bmw : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft
-bmw
-
-// bnl : 2014-07-24 Banca Nazionale del Lavoro
-bnl
-
-// bnpparibas : 2014-05-29 BNP Paribas
-bnpparibas
-
-// boats : 2014-12-04 DERBoats, LLC
-boats
-
-// boehringer : 2015-07-09 Boehringer Ingelheim International GmbH
-boehringer
-
-// bofa : 2015-07-31 NMS Services, Inc.
-bofa
-
-// bom : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br
-bom
-
-// bond : 2014-06-05 Bond University Limited
-bond
-
-// boo : 2014-01-30 Charleston Road Registry Inc.
-boo
-
-// book : 2015-08-27 Amazon EU S.à r.l.
-book
-
-// booking : 2015-07-16 Booking.com B.V.
-booking
-
-// boots : 2015-01-08 THE BOOTS COMPANY PLC
-boots
-
-// bosch : 2015-06-18 Robert Bosch GMBH
-bosch
-
-// bostik : 2015-05-28 Bostik SA
-bostik
-
-// boston : 2015-12-10
-boston
-
-// bot : 2014-12-18 Amazon EU S.à r.l.
-bot
-
-// boutique : 2013-11-14 Over Galley, LLC
-boutique
-
-// box : 2015-11-12 NS1 Limited
-box
-
-// bradesco : 2014-12-18 Banco Bradesco S.A.
-bradesco
-
-// bridgestone : 2014-12-18 Bridgestone Corporation
-bridgestone
-
-// broadway : 2014-12-22 Celebrate Broadway, Inc.
-broadway
-
-// broker : 2014-12-11 IG Group Holdings PLC
-broker
-
-// brother : 2015-01-29 Brother Industries, Ltd.
-brother
-
-// brussels : 2014-02-06 DNS.be vzw
-brussels
-
-// budapest : 2013-11-21 Top Level Domain Holdings Limited
-budapest
-
-// bugatti : 2015-07-23 Bugatti International SA
-bugatti
-
-// build : 2013-11-07 Plan Bee LLC
-build
-
-// builders : 2013-11-07 Atomic Madison, LLC
-builders
-
-// business : 2013-11-07 Spring Cross, LLC
-business
-
-// buy : 2014-12-18 Amazon EU S.à r.l.
-buy
-
-// buzz : 2013-10-02 DOTSTRATEGY CO.
-buzz
-
-// bzh : 2014-02-27 Association www.bzh
-bzh
-
-// cab : 2013-10-24 Half Sunset, LLC
-cab
-
-// cafe : 2015-02-11 Pioneer Canyon, LLC
-cafe
-
-// cal : 2014-07-24 Charleston Road Registry Inc.
-cal
-
-// call : 2014-12-18 Amazon EU S.à r.l.
-call
-
-// calvinklein : 2015-07-30 PVH gTLD Holdings LLC
-calvinklein
-
-// cam : 2016-04-21 AC Webconnecting Holding B.V.
-cam
-
-// camera : 2013-08-27 Atomic Maple, LLC
-camera
-
-// camp : 2013-11-07 Delta Dynamite, LLC
-camp
-
-// cancerresearch : 2014-05-15 Australian Cancer Research Foundation
-cancerresearch
-
-// canon : 2014-09-12 Canon Inc.
-canon
-
-// capetown : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry
-capetown
-
-// capital : 2014-03-06 Delta Mill, LLC
-capital
-
-// capitalone : 2015-08-06 Capital One Financial Corporation
-capitalone
-
-// car : 2015-01-22
-car
-
-// caravan : 2013-12-12 Caravan International, Inc.
-caravan
-
-// cards : 2013-12-05 Foggy Hollow, LLC
-cards
-
-// care : 2014-03-06 Goose Cross
-care
-
-// career : 2013-10-09 dotCareer LLC
-career
-
-// careers : 2013-10-02 Wild Corner, LLC
-careers
-
-// cars : 2014-11-13
-cars
-
-// cartier : 2014-06-23 Richemont DNS Inc.
-cartier
-
-// casa : 2013-11-21 Top Level Domain Holdings Limited
-casa
-
-// case : 2015-09-03 CNH Industrial N.V.
-case
-
-// caseih : 2015-09-03 CNH Industrial N.V.
-caseih
-
-// cash : 2014-03-06 Delta Lake, LLC
-cash
-
-// casino : 2014-12-18 Binky Sky, LLC
-casino
-
-// catering : 2013-12-05 New Falls. LLC
-catering
-
-// catholic : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
-catholic
-
-// cba : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA
-cba
-
-// cbn : 2014-08-22 The Christian Broadcasting Network, Inc.
-cbn
-
-// cbre : 2015-07-02 CBRE, Inc.
-cbre
-
-// cbs : 2015-08-06 CBS Domains Inc.
-cbs
-
-// ceb : 2015-04-09 The Corporate Executive Board Company
-ceb
-
-// center : 2013-11-07 Tin Mill, LLC
-center
-
-// ceo : 2013-11-07 CEOTLD Pty Ltd
-ceo
-
-// cern : 2014-06-05 European Organization for Nuclear Research ("CERN")
-cern
-
-// cfa : 2014-08-28 CFA Institute
-cfa
-
-// cfd : 2014-12-11 IG Group Holdings PLC
-cfd
-
-// chanel : 2015-04-09 Chanel International B.V.
-chanel
-
-// channel : 2014-05-08 Charleston Road Registry Inc.
-channel
-
-// chase : 2015-04-30 JPMorgan Chase & Co.
-chase
-
-// chat : 2014-12-04 Sand Fields, LLC
-chat
-
-// cheap : 2013-11-14 Sand Cover, LLC
-cheap
-
-// chintai : 2015-06-11 CHINTAI Corporation
-chintai
-
-// chloe : 2014-10-16 Richemont DNS Inc.
-chloe
-
-// christmas : 2013-11-21 Uniregistry, Corp.
-christmas
-
-// chrome : 2014-07-24 Charleston Road Registry Inc.
-chrome
-
-// chrysler : 2015-07-30 FCA US LLC.
-chrysler
-
-// church : 2014-02-06 Holly Fields, LLC
-church
-
-// cipriani : 2015-02-19 Hotel Cipriani Srl
-cipriani
-
-// circle : 2014-12-18 Amazon EU S.à r.l.
-circle
-
-// cisco : 2014-12-22 Cisco Technology, Inc.
-cisco
-
-// citadel : 2015-07-23 Citadel Domain LLC
-citadel
-
-// citi : 2015-07-30 Citigroup Inc.
-citi
-
-// citic : 2014-01-09 CITIC Group Corporation
-citic
-
-// city : 2014-05-29 Snow Sky, LLC
-city
-
-// cityeats : 2014-12-11 Lifestyle Domain Holdings, Inc.
-cityeats
-
-// claims : 2014-03-20 Black Corner, LLC
-claims
-
-// cleaning : 2013-12-05 Fox Shadow, LLC
-cleaning
-
-// click : 2014-06-05 Uniregistry, Corp.
-click
-
-// clinic : 2014-03-20 Goose Park, LLC
-clinic
-
-// clinique : 2015-10-01 The Estée Lauder Companies Inc.
-clinique
-
-// clothing : 2013-08-27 Steel Lake, LLC
-clothing
-
-// cloud : 2015-04-16 ARUBA S.p.A.
-cloud
-
-// club : 2013-11-08 .CLUB DOMAINS, LLC
-club
-
-// clubmed : 2015-06-25 Club Méditerranée S.A.
-clubmed
-
-// coach : 2014-10-09 Koko Island, LLC
-coach
-
-// codes : 2013-10-31 Puff Willow, LLC
-codes
-
-// coffee : 2013-10-17 Trixy Cover, LLC
-coffee
-
-// college : 2014-01-16 XYZ.COM LLC
-college
-
-// cologne : 2014-02-05 NetCologne Gesellschaft für Telekommunikation mbH
-cologne
-
-// comcast : 2015-07-23 Comcast IP Holdings I, LLC
-comcast
-
-// commbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA
-commbank
-
-// community : 2013-12-05 Fox Orchard, LLC
-community
-
-// company : 2013-11-07 Silver Avenue, LLC
-company
-
-// compare : 2015-10-08 iSelect Ltd
-compare
-
-// computer : 2013-10-24 Pine Mill, LLC
-computer
-
-// comsec : 2015-01-08 VeriSign, Inc.
-comsec
-
-// condos : 2013-12-05 Pine House, LLC
-condos
-
-// construction : 2013-09-16 Fox Dynamite, LLC
-construction
-
-// consulting : 2013-12-05
-consulting
-
-// contact : 2015-01-08 Top Level Spectrum, Inc.
-contact
-
-// contractors : 2013-09-10 Magic Woods, LLC
-contractors
-
-// cooking : 2013-11-21 Top Level Domain Holdings Limited
-cooking
-
-// cookingchannel : 2015-07-02 Lifestyle Domain Holdings, Inc.
-cookingchannel
-
-// cool : 2013-11-14 Koko Lake, LLC
-cool
-
-// corsica : 2014-09-25 Collectivité Territoriale de Corse
-corsica
-
-// country : 2013-12-19 Top Level Domain Holdings Limited
-country
-
-// coupon : 2015-02-26 Amazon EU S.à r.l.
-coupon
-
-// coupons : 2015-03-26 Black Island, LLC
-coupons
-
-// courses : 2014-12-04 OPEN UNIVERSITIES AUSTRALIA PTY LTD
-courses
-
-// credit : 2014-03-20 Snow Shadow, LLC
-credit
-
-// creditcard : 2014-03-20 Binky Frostbite, LLC
-creditcard
-
-// creditunion : 2015-01-22 CUNA Performance Resources, LLC
-creditunion
-
-// cricket : 2014-10-09 dot Cricket Limited
-cricket
-
-// crown : 2014-10-24 Crown Equipment Corporation
-crown
-
-// crs : 2014-04-03 Federated Co-operatives Limited
-crs
-
-// cruise : 2015-12-10 Viking River Cruises (Bermuda) Ltd.
-cruise
-
-// cruises : 2013-12-05 Spring Way, LLC
-cruises
-
-// csc : 2014-09-25 Alliance-One Services, Inc.
-csc
-
-// cuisinella : 2014-04-03 SALM S.A.S.
-cuisinella
-
-// cymru : 2014-05-08 Nominet UK
-cymru
-
-// cyou : 2015-01-22 Beijing Gamease Age Digital Technology Co., Ltd.
-cyou
-
-// dabur : 2014-02-06 Dabur India Limited
-dabur
-
-// dad : 2014-01-23 Charleston Road Registry Inc.
-dad
-
-// dance : 2013-10-24 United TLD Holdco Ltd.
-dance
-
-// data : 2016-06-02 Dish DBS Corporation
-data
-
-// date : 2014-11-20 dot Date Limited
-date
-
-// dating : 2013-12-05 Pine Fest, LLC
-dating
-
-// datsun : 2014-03-27 NISSAN MOTOR CO., LTD.
-datsun
-
-// day : 2014-01-30 Charleston Road Registry Inc.
-day
-
-// dclk : 2014-11-20 Charleston Road Registry Inc.
-dclk
-
-// dds : 2015-05-07 Top Level Domain Holdings Limited
-dds
-
-// deal : 2015-06-25 Amazon EU S.à r.l.
-deal
-
-// dealer : 2014-12-22 Dealer Dot Com, Inc.
-dealer
-
-// deals : 2014-05-22 Sand Sunset, LLC
-deals
-
-// degree : 2014-03-06
-degree
-
-// delivery : 2014-09-11 Steel Station, LLC
-delivery
-
-// dell : 2014-10-24 Dell Inc.
-dell
-
-// deloitte : 2015-07-31 Deloitte Touche Tohmatsu
-deloitte
-
-// delta : 2015-02-19 Delta Air Lines, Inc.
-delta
-
-// democrat : 2013-10-24 United TLD Holdco Ltd.
-democrat
-
-// dental : 2014-03-20 Tin Birch, LLC
-dental
-
-// dentist : 2014-03-20
-dentist
-
-// desi : 2013-11-14 Desi Networks LLC
-desi
-
-// design : 2014-11-07 Top Level Design, LLC
-design
-
-// dev : 2014-10-16 Charleston Road Registry Inc.
-dev
-
-// dhl : 2015-07-23 Deutsche Post AG
-dhl
-
-// diamonds : 2013-09-22 John Edge, LLC
-diamonds
-
-// diet : 2014-06-26 Uniregistry, Corp.
-diet
-
-// digital : 2014-03-06 Dash Park, LLC
-digital
-
-// direct : 2014-04-10 Half Trail, LLC
-direct
-
-// directory : 2013-09-20 Extra Madison, LLC
-directory
-
-// discount : 2014-03-06 Holly Hill, LLC
-discount
-
-// discover : 2015-07-23 Discover Financial Services
-discover
-
-// dish : 2015-07-30 Dish DBS Corporation
-dish
-
-// diy : 2015-11-05 Lifestyle Domain Holdings, Inc.
-diy
-
-// dnp : 2013-12-13 Dai Nippon Printing Co., Ltd.
-dnp
-
-// docs : 2014-10-16 Charleston Road Registry Inc.
-docs
-
-// doctor : 2016-06-02 Brice Trail, LLC
-doctor
-
-// dodge : 2015-07-30 FCA US LLC.
-dodge
-
-// dog : 2014-12-04 Koko Mill, LLC
-dog
-
-// doha : 2014-09-18 Communications Regulatory Authority (CRA)
-doha
-
-// domains : 2013-10-17 Sugar Cross, LLC
-domains
-
-// dot : 2015-05-21 Dish DBS Corporation
-dot
-
-// download : 2014-11-20 dot Support Limited
-download
-
-// drive : 2015-03-05 Charleston Road Registry Inc.
-drive
-
-// dtv : 2015-06-04 Dish DBS Corporation
-dtv
-
-// dubai : 2015-01-01 Dubai Smart Government Department
-dubai
-
-// duck : 2015-07-23 Johnson Shareholdings, Inc.
-duck
-
-// dunlop : 2015-07-02 The Goodyear Tire & Rubber Company
-dunlop
-
-// duns : 2015-08-06 The Dun & Bradstreet Corporation
-duns
-
-// dupont : 2015-06-25 E. I. du Pont de Nemours and Company
-dupont
-
-// durban : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry
-durban
-
-// dvag : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG
-dvag
-
-// dvr : 2016-05-26 Hughes Satellite Systems Corporation
-dvr
-
-// dwg : 2015-07-23 Autodesk, Inc.
-dwg
-
-// earth : 2014-12-04 Interlink Co., Ltd.
-earth
-
-// eat : 2014-01-23 Charleston Road Registry Inc.
-eat
-
-// eco : 2016-07-08 Big Room Inc.
-eco
-
-// edeka : 2014-12-18 EDEKA Verband kaufmännischer Genossenschaften e.V.
-edeka
-
-// education : 2013-11-07 Brice Way, LLC
-education
-
-// email : 2013-10-31 Spring Madison, LLC
-email
-
-// emerck : 2014-04-03 Merck KGaA
-emerck
-
-// energy : 2014-09-11 Binky Birch, LLC
-energy
-
-// engineer : 2014-03-06 United TLD Holdco Ltd.
-engineer
-
-// engineering : 2014-03-06 Romeo Canyon
-engineering
-
-// enterprises : 2013-09-20 Snow Oaks, LLC
-enterprises
-
-// epost : 2015-07-23 Deutsche Post AG
-epost
-
-// epson : 2014-12-04 Seiko Epson Corporation
-epson
-
-// equipment : 2013-08-27 Corn Station, LLC
-equipment
-
-// ericsson : 2015-07-09 Telefonaktiebolaget L M Ericsson
-ericsson
-
-// erni : 2014-04-03 ERNI Group Holding AG
-erni
-
-// esq : 2014-05-08 Charleston Road Registry Inc.
-esq
-
-// estate : 2013-08-27 Trixy Park, LLC
-estate
-
-// esurance : 2015-07-23 Esurance Insurance Company
-esurance
-
-// etisalat : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat)
-etisalat
-
-// eurovision : 2014-04-24 European Broadcasting Union (EBU)
-eurovision
-
-// eus : 2013-12-12 Puntueus Fundazioa
-eus
-
-// events : 2013-12-05 Pioneer Maple, LLC
-events
-
-// everbank : 2014-05-15 EverBank
-everbank
-
-// exchange : 2014-03-06 Spring Falls, LLC
-exchange
-
-// expert : 2013-11-21 Magic Pass, LLC
-expert
-
-// exposed : 2013-12-05 Victor Beach, LLC
-exposed
-
-// express : 2015-02-11 Sea Sunset, LLC
-express
-
-// extraspace : 2015-05-14 Extra Space Storage LLC
-extraspace
-
-// fage : 2014-12-18 Fage International S.A.
-fage
-
-// fail : 2014-03-06 Atomic Pipe, LLC
-fail
-
-// fairwinds : 2014-11-13 FairWinds Partners, LLC
-fairwinds
-
-// faith : 2014-11-20 dot Faith Limited
-faith
-
-// family : 2015-04-02
-family
-
-// fan : 2014-03-06
-fan
-
-// fans : 2014-11-07 Asiamix Digital Limited
-fans
-
-// farm : 2013-11-07 Just Maple, LLC
-farm
-
-// farmers : 2015-07-09 Farmers Insurance Exchange
-farmers
-
-// fashion : 2014-07-03 Top Level Domain Holdings Limited
-fashion
-
-// fast : 2014-12-18 Amazon EU S.à r.l.
-fast
-
-// fedex : 2015-08-06 Federal Express Corporation
-fedex
-
-// feedback : 2013-12-19 Top Level Spectrum, Inc.
-feedback
-
-// ferrari : 2015-07-31 Fiat Chrysler Automobiles N.V.
-ferrari
-
-// ferrero : 2014-12-18 Ferrero Trading Lux S.A.
-ferrero
-
-// fiat : 2015-07-31 Fiat Chrysler Automobiles N.V.
-fiat
-
-// fidelity : 2015-07-30 Fidelity Brokerage Services LLC
-fidelity
-
-// fido : 2015-08-06 Rogers Communications Partnership
-fido
-
-// film : 2015-01-08 Motion Picture Domain Registry Pty Ltd
-film
-
-// final : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br
-final
-
-// finance : 2014-03-20 Cotton Cypress, LLC
-finance
-
-// financial : 2014-03-06 Just Cover, LLC
-financial
-
-// fire : 2015-06-25 Amazon EU S.à r.l.
-fire
-
-// firestone : 2014-12-18 Bridgestone Corporation
-firestone
-
-// firmdale : 2014-03-27 Firmdale Holdings Limited
-firmdale
-
-// fish : 2013-12-12 Fox Woods, LLC
-fish
-
-// fishing : 2013-11-21 Top Level Domain Holdings Limited
-fishing
-
-// fit : 2014-11-07 Top Level Domain Holdings Limited
-fit
-
-// fitness : 2014-03-06 Brice Orchard, LLC
-fitness
-
-// flickr : 2015-04-02 Yahoo! Domain Services Inc.
-flickr
-
-// flights : 2013-12-05 Fox Station, LLC
-flights
-
-// flir : 2015-07-23 FLIR Systems, Inc.
-flir
-
-// florist : 2013-11-07 Half Cypress, LLC
-florist
-
-// flowers : 2014-10-09 Uniregistry, Corp.
-flowers
-
-// fly : 2014-05-08 Charleston Road Registry Inc.
-fly
-
-// foo : 2014-01-23 Charleston Road Registry Inc.
-foo
-
-// food : 2016-04-21 Lifestyle Domain Holdings, Inc.
-food
-
-// foodnetwork : 2015-07-02 Lifestyle Domain Holdings, Inc.
-foodnetwork
-
-// football : 2014-12-18 Foggy Farms, LLC
-football
-
-// ford : 2014-11-13 Ford Motor Company
-ford
-
-// forex : 2014-12-11 IG Group Holdings PLC
-forex
-
-// forsale : 2014-05-22
-forsale
-
-// forum : 2015-04-02 Fegistry, LLC
-forum
-
-// foundation : 2013-12-05 John Dale, LLC
-foundation
-
-// fox : 2015-09-11 FOX Registry, LLC
-fox
-
-// free : 2015-12-10 Amazon EU S.à r.l.
-free
-
-// fresenius : 2015-07-30 Fresenius Immobilien-Verwaltungs-GmbH
-fresenius
-
-// frl : 2014-05-15 FRLregistry B.V.
-frl
-
-// frogans : 2013-12-19 OP3FT
-frogans
-
-// frontdoor : 2015-07-02 Lifestyle Domain Holdings, Inc.
-frontdoor
-
-// frontier : 2015-02-05 Frontier Communications Corporation
-frontier
-
-// ftr : 2015-07-16 Frontier Communications Corporation
-ftr
-
-// fujitsu : 2015-07-30 Fujitsu Limited
-fujitsu
-
-// fujixerox : 2015-07-23 Xerox DNHC LLC
-fujixerox
-
-// fun : 2016-01-14
-fun
-
-// fund : 2014-03-20 John Castle, LLC
-fund
-
-// furniture : 2014-03-20 Lone Fields, LLC
-furniture
-
-// futbol : 2013-09-20
-futbol
-
-// fyi : 2015-04-02 Silver Tigers, LLC
-fyi
-
-// gal : 2013-11-07 Asociación puntoGAL
-gal
-
-// gallery : 2013-09-13 Sugar House, LLC
-gallery
-
-// gallo : 2015-06-11 Gallo Vineyards, Inc.
-gallo
-
-// gallup : 2015-02-19 Gallup, Inc.
-gallup
-
-// game : 2015-05-28 Uniregistry, Corp.
-game
-
-// games : 2015-05-28
-games
-
-// gap : 2015-07-31 The Gap, Inc.
-gap
-
-// garden : 2014-06-26 Top Level Domain Holdings Limited
-garden
-
-// gbiz : 2014-07-17 Charleston Road Registry Inc.
-gbiz
-
-// gdn : 2014-07-31 Joint Stock Company "Navigation-information systems"
-gdn
-
-// gea : 2014-12-04 GEA Group Aktiengesellschaft
-gea
-
-// gent : 2014-01-23 COMBELL GROUP NV/SA
-gent
-
-// genting : 2015-03-12 Resorts World Inc Pte. Ltd.
-genting
-
-// george : 2015-07-31 Wal-Mart Stores, Inc.
-george
-
-// ggee : 2014-01-09 GMO Internet, Inc.
-ggee
-
-// gift : 2013-10-17 Uniregistry, Corp.
-gift
-
-// gifts : 2014-07-03 Goose Sky, LLC
-gifts
-
-// gives : 2014-03-06 United TLD Holdco Ltd.
-gives
-
-// giving : 2014-11-13 Giving Limited
-giving
-
-// glade : 2015-07-23 Johnson Shareholdings, Inc.
-glade
-
-// glass : 2013-11-07 Black Cover, LLC
-glass
-
-// gle : 2014-07-24 Charleston Road Registry Inc.
-gle
-
-// global : 2014-04-17 Dot GLOBAL AS
-global
-
-// globo : 2013-12-19 Globo Comunicação e Participações S.A
-globo
-
-// gmail : 2014-05-01 Charleston Road Registry Inc.
-gmail
-
-// gmbh : 2016-01-29 Extra Dynamite, LLC
-gmbh
-
-// gmo : 2014-01-09 GMO Internet, Inc.
-gmo
-
-// gmx : 2014-04-24 1&1 Mail & Media GmbH
-gmx
-
-// godaddy : 2015-07-23 Go Daddy East, LLC
-godaddy
-
-// gold : 2015-01-22 June Edge, LLC
-gold
-
-// goldpoint : 2014-11-20 YODOBASHI CAMERA CO.,LTD.
-goldpoint
-
-// golf : 2014-12-18 Lone falls, LLC
-golf
-
-// goo : 2014-12-18 NTT Resonant Inc.
-goo
-
-// goodhands : 2015-07-31 Allstate Fire and Casualty Insurance Company
-goodhands
-
-// goodyear : 2015-07-02 The Goodyear Tire & Rubber Company
-goodyear
-
-// goog : 2014-11-20 Charleston Road Registry Inc.
-goog
-
-// google : 2014-07-24 Charleston Road Registry Inc.
-google
-
-// gop : 2014-01-16 Republican State Leadership Committee, Inc.
-gop
-
-// got : 2014-12-18 Amazon EU S.à r.l.
-got
-
-// grainger : 2015-05-07 Grainger Registry Services, LLC
-grainger
-
-// graphics : 2013-09-13 Over Madison, LLC
-graphics
-
-// gratis : 2014-03-20 Pioneer Tigers, LLC
-gratis
-
-// green : 2014-05-08 Afilias Limited
-green
-
-// gripe : 2014-03-06 Corn Sunset, LLC
-gripe
-
-// grocery : 2016-06-16 Wal-Mart Stores, Inc.
-grocery
-
-// group : 2014-08-15 Romeo Town, LLC
-group
-
-// guardian : 2015-07-30 The Guardian Life Insurance Company of America
-guardian
-
-// gucci : 2014-11-13 Guccio Gucci S.p.a.
-gucci
-
-// guge : 2014-08-28 Charleston Road Registry Inc.
-guge
-
-// guide : 2013-09-13 Snow Moon, LLC
-guide
-
-// guitars : 2013-11-14 Uniregistry, Corp.
-guitars
-
-// guru : 2013-08-27 Pioneer Cypress, LLC
-guru
-
-// hair : 2015-12-03 L'Oréal
-hair
-
-// hamburg : 2014-02-20 Hamburg Top-Level-Domain GmbH
-hamburg
-
-// hangout : 2014-11-13 Charleston Road Registry Inc.
-hangout
-
-// haus : 2013-12-05
-haus
-
-// hbo : 2015-07-30 HBO Registry Services, Inc.
-hbo
-
-// hdfc : 2015-07-30 HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED
-hdfc
-
-// hdfcbank : 2015-02-12 HDFC Bank Limited
-hdfcbank
-
-// health : 2015-02-11 DotHealth, LLC
-health
-
-// healthcare : 2014-06-12 Silver Glen, LLC
-healthcare
-
-// help : 2014-06-26 Uniregistry, Corp.
-help
-
-// helsinki : 2015-02-05 City of Helsinki
-helsinki
-
-// here : 2014-02-06 Charleston Road Registry Inc.
-here
-
-// hermes : 2014-07-10 HERMES INTERNATIONAL
-hermes
-
-// hgtv : 2015-07-02 Lifestyle Domain Holdings, Inc.
-hgtv
-
-// hiphop : 2014-03-06 Uniregistry, Corp.
-hiphop
-
-// hisamitsu : 2015-07-16 Hisamitsu Pharmaceutical Co.,Inc.
-hisamitsu
-
-// hitachi : 2014-10-31 Hitachi, Ltd.
-hitachi
-
-// hiv : 2014-03-13
-hiv
-
-// hkt : 2015-05-14 PCCW-HKT DataCom Services Limited
-hkt
-
-// hockey : 2015-03-19 Half Willow, LLC
-hockey
-
-// holdings : 2013-08-27 John Madison, LLC
-holdings
-
-// holiday : 2013-11-07 Goose Woods, LLC
-holiday
-
-// homedepot : 2015-04-02 Homer TLC, Inc.
-homedepot
-
-// homegoods : 2015-07-16 The TJX Companies, Inc.
-homegoods
-
-// homes : 2014-01-09 DERHomes, LLC
-homes
-
-// homesense : 2015-07-16 The TJX Companies, Inc.
-homesense
-
-// honda : 2014-12-18 Honda Motor Co., Ltd.
-honda
-
-// honeywell : 2015-07-23 Honeywell GTLD LLC
-honeywell
-
-// horse : 2013-11-21 Top Level Domain Holdings Limited
-horse
-
-// hospital : 2016-10-20 Ruby Pike, LLC
-hospital
-
-// host : 2014-04-17 DotHost Inc.
-host
-
-// hosting : 2014-05-29 Uniregistry, Corp.
-hosting
-
-// hot : 2015-08-27 Amazon EU S.à r.l.
-hot
-
-// hoteles : 2015-03-05 Travel Reservations SRL
-hoteles
-
-// hotels : 2016-04-07 Booking.com B.V.
-hotels
-
-// hotmail : 2014-12-18 Microsoft Corporation
-hotmail
-
-// house : 2013-11-07 Sugar Park, LLC
-house
-
-// how : 2014-01-23 Charleston Road Registry Inc.
-how
-
-// hsbc : 2014-10-24 HSBC Holdings PLC
-hsbc
-
-// htc : 2015-04-02 HTC corporation
-htc
-
-// hughes : 2015-07-30 Hughes Satellite Systems Corporation
-hughes
-
-// hyatt : 2015-07-30 Hyatt GTLD, L.L.C.
-hyatt
-
-// hyundai : 2015-07-09 Hyundai Motor Company
-hyundai
-
-// ibm : 2014-07-31 International Business Machines Corporation
-ibm
-
-// icbc : 2015-02-19 Industrial and Commercial Bank of China Limited
-icbc
-
-// ice : 2014-10-30 IntercontinentalExchange, Inc.
-ice
-
-// icu : 2015-01-08 One.com A/S
-icu
-
-// ieee : 2015-07-23 IEEE Global LLC
-ieee
-
-// ifm : 2014-01-30 ifm electronic gmbh
-ifm
-
-// iinet : 2014-07-03 Connect West Pty. Ltd.
-iinet
-
-// ikano : 2015-07-09 Ikano S.A.
-ikano
-
-// imamat : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation)
-imamat
-
-// imdb : 2015-06-25 Amazon EU S.à r.l.
-imdb
-
-// immo : 2014-07-10 Auburn Bloom, LLC
-immo
-
-// immobilien : 2013-11-07 United TLD Holdco Ltd.
-immobilien
-
-// industries : 2013-12-05 Outer House, LLC
-industries
-
-// infiniti : 2014-03-27 NISSAN MOTOR CO., LTD.
-infiniti
-
-// ing : 2014-01-23 Charleston Road Registry Inc.
-ing
-
-// ink : 2013-12-05 Top Level Design, LLC
-ink
-
-// institute : 2013-11-07 Outer Maple, LLC
-institute
-
-// insurance : 2015-02-19 fTLD Registry Services LLC
-insurance
-
-// insure : 2014-03-20 Pioneer Willow, LLC
-insure
-
-// intel : 2015-08-06 Intel Corporation
-intel
-
-// international : 2013-11-07 Wild Way, LLC
-international
-
-// intuit : 2015-07-30 Intuit Administrative Services, Inc.
-intuit
-
-// investments : 2014-03-20 Holly Glen, LLC
-investments
-
-// ipiranga : 2014-08-28 Ipiranga Produtos de Petroleo S.A.
-ipiranga
-
-// irish : 2014-08-07 Dot-Irish LLC
-irish
-
-// iselect : 2015-02-11 iSelect Ltd
-iselect
-
-// ismaili : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation)
-ismaili
-
-// ist : 2014-08-28 Istanbul Metropolitan Municipality
-ist
-
-// istanbul : 2014-08-28 Istanbul Metropolitan Municipality
-istanbul
-
-// itau : 2014-10-02 Itau Unibanco Holding S.A.
-itau
-
-// itv : 2015-07-09 ITV Services Limited
-itv
-
-// iveco : 2015-09-03 CNH Industrial N.V.
-iveco
-
-// iwc : 2014-06-23 Richemont DNS Inc.
-iwc
-
-// jaguar : 2014-11-13 Jaguar Land Rover Ltd
-jaguar
-
-// java : 2014-06-19 Oracle Corporation
-java
-
-// jcb : 2014-11-20 JCB Co., Ltd.
-jcb
-
-// jcp : 2015-04-23 JCP Media, Inc.
-jcp
-
-// jeep : 2015-07-30 FCA US LLC.
-jeep
-
-// jetzt : 2014-01-09
-jetzt
-
-// jewelry : 2015-03-05 Wild Bloom, LLC
-jewelry
-
-// jio : 2015-04-02 Affinity Names, Inc.
-jio
-
-// jlc : 2014-12-04 Richemont DNS Inc.
-jlc
-
-// jll : 2015-04-02 Jones Lang LaSalle Incorporated
-jll
-
-// jmp : 2015-03-26 Matrix IP LLC
-jmp
-
-// jnj : 2015-06-18 Johnson & Johnson Services, Inc.
-jnj
-
-// joburg : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry
-joburg
-
-// jot : 2014-12-18 Amazon EU S.à r.l.
-jot
-
-// joy : 2014-12-18 Amazon EU S.à r.l.
-joy
-
-// jpmorgan : 2015-04-30 JPMorgan Chase & Co.
-jpmorgan
-
-// jprs : 2014-09-18 Japan Registry Services Co., Ltd.
-jprs
-
-// juegos : 2014-03-20 Uniregistry, Corp.
-juegos
-
-// juniper : 2015-07-30 JUNIPER NETWORKS, INC.
-juniper
-
-// kaufen : 2013-11-07 United TLD Holdco Ltd.
-kaufen
-
-// kddi : 2014-09-12 KDDI CORPORATION
-kddi
-
-// kerryhotels : 2015-04-30 Kerry Trading Co. Limited
-kerryhotels
-
-// kerrylogistics : 2015-04-09 Kerry Trading Co. Limited
-kerrylogistics
-
-// kerryproperties : 2015-04-09 Kerry Trading Co. Limited
-kerryproperties
-
-// kfh : 2014-12-04 Kuwait Finance House
-kfh
-
-// kia : 2015-07-09 KIA MOTORS CORPORATION
-kia
-
-// kim : 2013-09-23 Afilias Limited
-kim
-
-// kinder : 2014-11-07 Ferrero Trading Lux S.A.
-kinder
-
-// kindle : 2015-06-25 Amazon EU S.à r.l.
-kindle
-
-// kitchen : 2013-09-20 Just Goodbye, LLC
-kitchen
-
-// kiwi : 2013-09-20 DOT KIWI LIMITED
-kiwi
-
-// koeln : 2014-01-09 NetCologne Gesellschaft für Telekommunikation mbH
-koeln
-
-// komatsu : 2015-01-08 Komatsu Ltd.
-komatsu
-
-// kosher : 2015-08-20 Kosher Marketing Assets LLC
-kosher
-
-// kpmg : 2015-04-23 KPMG International Cooperative (KPMG International Genossenschaft)
-kpmg
-
-// kpn : 2015-01-08 Koninklijke KPN N.V.
-kpn
-
-// krd : 2013-12-05 KRG Department of Information Technology
-krd
-
-// kred : 2013-12-19 KredTLD Pty Ltd
-kred
-
-// kuokgroup : 2015-04-09 Kerry Trading Co. Limited
-kuokgroup
-
-// kyoto : 2014-11-07 Academic Institution: Kyoto Jyoho Gakuen
-kyoto
-
-// lacaixa : 2014-01-09 CAIXA D'ESTALVIS I PENSIONS DE BARCELONA
-lacaixa
-
-// ladbrokes : 2015-08-06 LADBROKES INTERNATIONAL PLC
-ladbrokes
-
-// lamborghini : 2015-06-04 Automobili Lamborghini S.p.A.
-lamborghini
-
-// lamer : 2015-10-01 The Estée Lauder Companies Inc.
-lamer
-
-// lancaster : 2015-02-12 LANCASTER
-lancaster
-
-// lancia : 2015-07-31 Fiat Chrysler Automobiles N.V.
-lancia
-
-// lancome : 2015-07-23 L'Oréal
-lancome
-
-// land : 2013-09-10 Pine Moon, LLC
-land
-
-// landrover : 2014-11-13 Jaguar Land Rover Ltd
-landrover
-
-// lanxess : 2015-07-30 LANXESS Corporation
-lanxess
-
-// lasalle : 2015-04-02 Jones Lang LaSalle Incorporated
-lasalle
-
-// lat : 2014-10-16 ECOM-LAC Federaciòn de Latinoamèrica y el Caribe para Internet y el Comercio Electrònico
-lat
-
-// latino : 2015-07-30 Dish DBS Corporation
-latino
-
-// latrobe : 2014-06-16 La Trobe University
-latrobe
-
-// law : 2015-01-22 Minds + Machines Group Limited
-law
-
-// lawyer : 2014-03-20
-lawyer
-
-// lds : 2014-03-20 IRI Domain Management, LLC ("Applicant")
-lds
-
-// lease : 2014-03-06 Victor Trail, LLC
-lease
-
-// leclerc : 2014-08-07 A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc
-leclerc
-
-// lefrak : 2015-07-16 LeFrak Organization, Inc.
-lefrak
-
-// legal : 2014-10-16 Blue Falls, LLC
-legal
-
-// lego : 2015-07-16 LEGO Juris A/S
-lego
-
-// lexus : 2015-04-23 TOYOTA MOTOR CORPORATION
-lexus
-
-// lgbt : 2014-05-08 Afilias Limited
-lgbt
-
-// liaison : 2014-10-02 Liaison Technologies, Incorporated
-liaison
-
-// lidl : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG
-lidl
-
-// life : 2014-02-06 Trixy Oaks, LLC
-life
-
-// lifeinsurance : 2015-01-15 American Council of Life Insurers
-lifeinsurance
-
-// lifestyle : 2014-12-11 Lifestyle Domain Holdings, Inc.
-lifestyle
-
-// lighting : 2013-08-27 John McCook, LLC
-lighting
-
-// like : 2014-12-18 Amazon EU S.à r.l.
-like
-
-// lilly : 2015-07-31 Eli Lilly and Company
-lilly
-
-// limited : 2014-03-06 Big Fest, LLC
-limited
-
-// limo : 2013-10-17 Hidden Frostbite, LLC
-limo
-
-// lincoln : 2014-11-13 Ford Motor Company
-lincoln
-
-// linde : 2014-12-04 Linde Aktiengesellschaft
-linde
-
-// link : 2013-11-14 Uniregistry, Corp.
-link
-
-// lipsy : 2015-06-25 Lipsy Ltd
-lipsy
-
-// live : 2014-12-04
-live
-
-// living : 2015-07-30 Lifestyle Domain Holdings, Inc.
-living
-
-// lixil : 2015-03-19 LIXIL Group Corporation
-lixil
-
-// loan : 2014-11-20 dot Loan Limited
-loan
-
-// loans : 2014-03-20 June Woods, LLC
-loans
-
-// locker : 2015-06-04 Dish DBS Corporation
-locker
-
-// locus : 2015-06-25 Locus Analytics LLC
-locus
-
-// loft : 2015-07-30 Annco, Inc.
-loft
-
-// lol : 2015-01-30 Uniregistry, Corp.
-lol
-
-// london : 2013-11-14 Dot London Domains Limited
-london
-
-// lotte : 2014-11-07 Lotte Holdings Co., Ltd.
-lotte
-
-// lotto : 2014-04-10 Afilias Limited
-lotto
-
-// love : 2014-12-22 Merchant Law Group LLP
-love
-
-// lpl : 2015-07-30 LPL Holdings, Inc.
-lpl
-
-// lplfinancial : 2015-07-30 LPL Holdings, Inc.
-lplfinancial
-
-// ltd : 2014-09-25 Over Corner, LLC
-ltd
-
-// ltda : 2014-04-17 DOMAIN ROBOT SERVICOS DE HOSPEDAGEM NA INTERNET LTDA
-ltda
-
-// lundbeck : 2015-08-06 H. Lundbeck A/S
-lundbeck
-
-// lupin : 2014-11-07 LUPIN LIMITED
-lupin
-
-// luxe : 2014-01-09 Top Level Domain Holdings Limited
-luxe
-
-// luxury : 2013-10-17 Luxury Partners, LLC
-luxury
-
-// macys : 2015-07-31 Macys, Inc.
-macys
-
-// madrid : 2014-05-01 Comunidad de Madrid
-madrid
-
-// maif : 2014-10-02 Mutuelle Assurance Instituteur France (MAIF)
-maif
-
-// maison : 2013-12-05 Victor Frostbite, LLC
-maison
-
-// makeup : 2015-01-15 L'Oréal
-makeup
-
-// man : 2014-12-04 MAN SE
-man
-
-// management : 2013-11-07 John Goodbye, LLC
-management
-
-// mango : 2013-10-24 PUNTO FA S.L.
-mango
-
-// map : 2016-06-09 Charleston Road Registry Inc.
-map
-
-// market : 2014-03-06
-market
-
-// marketing : 2013-11-07 Fern Pass, LLC
-marketing
-
-// markets : 2014-12-11 IG Group Holdings PLC
-markets
-
-// marriott : 2014-10-09 Marriott Worldwide Corporation
-marriott
-
-// marshalls : 2015-07-16 The TJX Companies, Inc.
-marshalls
-
-// maserati : 2015-07-31 Fiat Chrysler Automobiles N.V.
-maserati
-
-// mattel : 2015-08-06 Mattel Sites, Inc.
-mattel
-
-// mba : 2015-04-02 Lone Hollow, LLC
-mba
-
-// mcd : 2015-07-30 McDonald’s Corporation
-mcd
-
-// mcdonalds : 2015-07-30 McDonald’s Corporation
-mcdonalds
-
-// mckinsey : 2015-07-31 McKinsey Holdings, Inc.
-mckinsey
-
-// med : 2015-08-06 Medistry LLC
-med
-
-// media : 2014-03-06 Grand Glen, LLC
-media
-
-// meet : 2014-01-16
-meet
-
-// melbourne : 2014-05-29 The Crown in right of the State of Victoria, represented by its Department of State Development, Business and Innovation
-melbourne
-
-// meme : 2014-01-30 Charleston Road Registry Inc.
-meme
-
-// memorial : 2014-10-16 Dog Beach, LLC
-memorial
-
-// men : 2015-02-26 Exclusive Registry Limited
-men
-
-// menu : 2013-09-11 Wedding TLD2, LLC
-menu
-
-// meo : 2014-11-07 PT Comunicacoes S.A.
-meo
-
-// merckmsd : 2016-07-14 MSD Registry Holdings, Inc.
-merckmsd
-
-// metlife : 2015-05-07 MetLife Services and Solutions, LLC
-metlife
-
-// miami : 2013-12-19 Top Level Domain Holdings Limited
-miami
-
-// microsoft : 2014-12-18 Microsoft Corporation
-microsoft
-
-// mini : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft
-mini
-
-// mint : 2015-07-30 Intuit Administrative Services, Inc.
-mint
-
-// mit : 2015-07-02 Massachusetts Institute of Technology
-mit
-
-// mitsubishi : 2015-07-23 Mitsubishi Corporation
-mitsubishi
-
-// mlb : 2015-05-21 MLB Advanced Media DH, LLC
-mlb
-
-// mls : 2015-04-23 The Canadian Real Estate Association
-mls
-
-// mma : 2014-11-07 MMA IARD
-mma
-
-// mobile : 2016-06-02 Dish DBS Corporation
-mobile
-
-// mobily : 2014-12-18 GreenTech Consultancy Company W.L.L.
-mobily
-
-// moda : 2013-11-07 United TLD Holdco Ltd.
-moda
-
-// moe : 2013-11-13 Interlink Co., Ltd.
-moe
-
-// moi : 2014-12-18 Amazon EU S.à r.l.
-moi
-
-// mom : 2015-04-16 Uniregistry, Corp.
-mom
-
-// monash : 2013-09-30 Monash University
-monash
-
-// money : 2014-10-16 Outer McCook, LLC
-money
-
-// monster : 2015-09-11 Monster Worldwide, Inc.
-monster
-
-// montblanc : 2014-06-23 Richemont DNS Inc.
-montblanc
-
-// mopar : 2015-07-30 FCA US LLC.
-mopar
-
-// mormon : 2013-12-05 IRI Domain Management, LLC ("Applicant")
-mormon
-
-// mortgage : 2014-03-20
-mortgage
-
-// moscow : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
-moscow
-
-// moto : 2015-06-04
-moto
-
-// motorcycles : 2014-01-09 DERMotorcycles, LLC
-motorcycles
-
-// mov : 2014-01-30 Charleston Road Registry Inc.
-mov
-
-// movie : 2015-02-05 New Frostbite, LLC
-movie
-
-// movistar : 2014-10-16 Telefónica S.A.
-movistar
-
-// msd : 2015-07-23 MSD Registry Holdings, Inc.
-msd
-
-// mtn : 2014-12-04 MTN Dubai Limited
-mtn
-
-// mtpc : 2014-11-20 Mitsubishi Tanabe Pharma Corporation
-mtpc
-
-// mtr : 2015-03-12 MTR Corporation Limited
-mtr
-
-// mutual : 2015-04-02 Northwestern Mutual MU TLD Registry, LLC
-mutual
-
-// mutuelle : 2015-06-18 Fédération Nationale de la Mutualité Française
-mutuelle
-
-// nab : 2015-08-20 National Australia Bank Limited
-nab
-
-// nadex : 2014-12-11 IG Group Holdings PLC
-nadex
-
-// nagoya : 2013-10-24 GMO Registry, Inc.
-nagoya
-
-// nationwide : 2015-07-23 Nationwide Mutual Insurance Company
-nationwide
-
-// natura : 2015-03-12 NATURA COSMÉTICOS S.A.
-natura
-
-// navy : 2014-03-06 United TLD Holdco Ltd.
-navy
-
-// nba : 2015-07-31 NBA REGISTRY, LLC
-nba
-
-// nec : 2015-01-08 NEC Corporation
-nec
-
-// netbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA
-netbank
-
-// netflix : 2015-06-18 Netflix, Inc.
-netflix
-
-// network : 2013-11-14 Trixy Manor, LLC
-network
-
-// neustar : 2013-12-05 NeuStar, Inc.
-neustar
-
-// new : 2014-01-30 Charleston Road Registry Inc.
-new
-
-// newholland : 2015-09-03 CNH Industrial N.V.
-newholland
-
-// news : 2014-12-18
-news
-
-// next : 2015-06-18 Next plc
-next
-
-// nextdirect : 2015-06-18 Next plc
-nextdirect
-
-// nexus : 2014-07-24 Charleston Road Registry Inc.
-nexus
-
-// nfl : 2015-07-23 NFL Reg Ops LLC
-nfl
-
-// ngo : 2014-03-06 Public Interest Registry
-ngo
-
-// nhk : 2014-02-13 Japan Broadcasting Corporation (NHK)
-nhk
-
-// nico : 2014-12-04 DWANGO Co., Ltd.
-nico
-
-// nike : 2015-07-23 NIKE, Inc.
-nike
-
-// nikon : 2015-05-21 NIKON CORPORATION
-nikon
-
-// ninja : 2013-11-07 United TLD Holdco Ltd.
-ninja
-
-// nissan : 2014-03-27 NISSAN MOTOR CO., LTD.
-nissan
-
-// nissay : 2015-10-29 Nippon Life Insurance Company
-nissay
-
-// nokia : 2015-01-08 Nokia Corporation
-nokia
-
-// northwesternmutual : 2015-06-18 Northwestern Mutual Registry, LLC
-northwesternmutual
-
-// norton : 2014-12-04 Symantec Corporation
-norton
-
-// now : 2015-06-25 Amazon EU S.à r.l.
-now
-
-// nowruz : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
-nowruz
-
-// nowtv : 2015-05-14 Starbucks (HK) Limited
-nowtv
-
-// nra : 2014-05-22 NRA Holdings Company, INC.
-nra
-
-// nrw : 2013-11-21 Minds + Machines GmbH
-nrw
-
-// ntt : 2014-10-31 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
-ntt
-
-// nyc : 2014-01-23 The City of New York by and through the New York City Department of Information Technology & Telecommunications
-nyc
-
-// obi : 2014-09-25 OBI Group Holding SE & Co. KGaA
-obi
-
-// observer : 2015-04-30
-observer
-
-// off : 2015-07-23 Johnson Shareholdings, Inc.
-off
-
-// office : 2015-03-12 Microsoft Corporation
-office
-
-// okinawa : 2013-12-05 BusinessRalliart Inc.
-okinawa
-
-// olayan : 2015-05-14 Crescent Holding GmbH
-olayan
-
-// olayangroup : 2015-05-14 Crescent Holding GmbH
-olayangroup
-
-// oldnavy : 2015-07-31 The Gap, Inc.
-oldnavy
-
-// ollo : 2015-06-04 Dish DBS Corporation
-ollo
-
-// omega : 2015-01-08 The Swatch Group Ltd
-omega
-
-// one : 2014-11-07 One.com A/S
-one
-
-// ong : 2014-03-06 Public Interest Registry
-ong
-
-// onl : 2013-09-16 I-Registry Ltd.
-onl
-
-// online : 2015-01-15 DotOnline Inc.
-online
-
-// onyourside : 2015-07-23 Nationwide Mutual Insurance Company
-onyourside
-
-// ooo : 2014-01-09 INFIBEAM INCORPORATION LIMITED
-ooo
-
-// open : 2015-07-31 American Express Travel Related Services Company, Inc.
-open
-
-// oracle : 2014-06-19 Oracle Corporation
-oracle
-
-// orange : 2015-03-12 Orange Brand Services Limited
-orange
-
-// organic : 2014-03-27 Afilias Limited
-organic
-
-// orientexpress : 2015-02-05
-orientexpress
-
-// origins : 2015-10-01 The Estée Lauder Companies Inc.
-origins
-
-// osaka : 2014-09-04 Interlink Co., Ltd.
-osaka
-
-// otsuka : 2013-10-11 Otsuka Holdings Co., Ltd.
-otsuka
-
-// ott : 2015-06-04 Dish DBS Corporation
-ott
-
-// ovh : 2014-01-16 OVH SAS
-ovh
-
-// page : 2014-12-04 Charleston Road Registry Inc.
-page
-
-// pamperedchef : 2015-02-05 The Pampered Chef, Ltd.
-pamperedchef
-
-// panasonic : 2015-07-30 Panasonic Corporation
-panasonic
-
-// panerai : 2014-11-07 Richemont DNS Inc.
-panerai
-
-// paris : 2014-01-30 City of Paris
-paris
-
-// pars : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
-pars
-
-// partners : 2013-12-05 Magic Glen, LLC
-partners
-
-// parts : 2013-12-05 Sea Goodbye, LLC
-parts
-
-// party : 2014-09-11 Blue Sky Registry Limited
-party
-
-// passagens : 2015-03-05 Travel Reservations SRL
-passagens
-
-// pay : 2015-08-27 Amazon EU S.à r.l.
-pay
-
-// pccw : 2015-05-14 PCCW Enterprises Limited
-pccw
-
-// pet : 2015-05-07 Afilias plc
-pet
-
-// pfizer : 2015-09-11 Pfizer Inc.
-pfizer
-
-// pharmacy : 2014-06-19 National Association of Boards of Pharmacy
-pharmacy
-
-// phd : 2016-07-28 Charleston Road Registry Inc.
-phd
-
-// philips : 2014-11-07 Koninklijke Philips N.V.
-philips
-
-// phone : 2016-06-02 Dish DBS Corporation
-phone
-
-// photo : 2013-11-14 Uniregistry, Corp.
-photo
-
-// photography : 2013-09-20 Sugar Glen, LLC
-photography
-
-// photos : 2013-10-17 Sea Corner, LLC
-photos
-
-// physio : 2014-05-01 PhysBiz Pty Ltd
-physio
-
-// piaget : 2014-10-16 Richemont DNS Inc.
-piaget
-
-// pics : 2013-11-14 Uniregistry, Corp.
-pics
-
-// pictet : 2014-06-26 Pictet Europe S.A.
-pictet
-
-// pictures : 2014-03-06 Foggy Sky, LLC
-pictures
-
-// pid : 2015-01-08 Top Level Spectrum, Inc.
-pid
-
-// pin : 2014-12-18 Amazon EU S.à r.l.
-pin
-
-// ping : 2015-06-11 Ping Registry Provider, Inc.
-ping
-
-// pink : 2013-10-01 Afilias Limited
-pink
-
-// pioneer : 2015-07-16 Pioneer Corporation
-pioneer
-
-// pizza : 2014-06-26 Foggy Moon, LLC
-pizza
-
-// place : 2014-04-24 Snow Galley, LLC
-place
-
-// play : 2015-03-05 Charleston Road Registry Inc.
-play
-
-// playstation : 2015-07-02 Sony Computer Entertainment Inc.
-playstation
-
-// plumbing : 2013-09-10 Spring Tigers, LLC
-plumbing
-
-// plus : 2015-02-05 Sugar Mill, LLC
-plus
-
-// pnc : 2015-07-02 PNC Domain Co., LLC
-pnc
-
-// pohl : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG
-pohl
-
-// poker : 2014-07-03 Afilias Domains No. 5 Limited
-poker
-
-// politie : 2015-08-20 Politie Nederland
-politie
-
-// porn : 2014-10-16 ICM Registry PN LLC
-porn
-
-// pramerica : 2015-07-30 Prudential Financial, Inc.
-pramerica
-
-// praxi : 2013-12-05 Praxi S.p.A.
-praxi
-
-// press : 2014-04-03 DotPress Inc.
-press
-
-// prime : 2015-06-25 Amazon EU S.à r.l.
-prime
-
-// prod : 2014-01-23 Charleston Road Registry Inc.
-prod
-
-// productions : 2013-12-05 Magic Birch, LLC
-productions
-
-// prof : 2014-07-24 Charleston Road Registry Inc.
-prof
-
-// progressive : 2015-07-23 Progressive Casualty Insurance Company
-progressive
-
-// promo : 2014-12-18
-promo
-
-// properties : 2013-12-05 Big Pass, LLC
-properties
-
-// property : 2014-05-22 Uniregistry, Corp.
-property
-
-// protection : 2015-04-23
-protection
-
-// pru : 2015-07-30 Prudential Financial, Inc.
-pru
-
-// prudential : 2015-07-30 Prudential Financial, Inc.
-prudential
-
-// pub : 2013-12-12 United TLD Holdco Ltd.
-pub
-
-// pwc : 2015-10-29 PricewaterhouseCoopers LLP
-pwc
-
-// qpon : 2013-11-14 dotCOOL, Inc.
-qpon
-
-// quebec : 2013-12-19 PointQuébec Inc
-quebec
-
-// quest : 2015-03-26 Quest ION Limited
-quest
-
-// qvc : 2015-07-30 QVC, Inc.
-qvc
-
-// racing : 2014-12-04 Premier Registry Limited
-racing
-
-// radio : 2016-07-21 European Broadcasting Union (EBU)
-radio
-
-// raid : 2015-07-23 Johnson Shareholdings, Inc.
-raid
-
-// read : 2014-12-18 Amazon EU S.à r.l.
-read
-
-// realestate : 2015-09-11 dotRealEstate LLC
-realestate
-
-// realtor : 2014-05-29 Real Estate Domains LLC
-realtor
-
-// realty : 2015-03-19 Fegistry, LLC
-realty
-
-// recipes : 2013-10-17 Grand Island, LLC
-recipes
-
-// red : 2013-11-07 Afilias Limited
-red
-
-// redstone : 2014-10-31 Redstone Haute Couture Co., Ltd.
-redstone
-
-// redumbrella : 2015-03-26 Travelers TLD, LLC
-redumbrella
-
-// rehab : 2014-03-06 United TLD Holdco Ltd.
-rehab
-
-// reise : 2014-03-13
-reise
-
-// reisen : 2014-03-06 New Cypress, LLC
-reisen
-
-// reit : 2014-09-04 National Association of Real Estate Investment Trusts, Inc.
-reit
-
-// reliance : 2015-04-02 Reliance Industries Limited
-reliance
-
-// ren : 2013-12-12 Beijing Qianxiang Wangjing Technology Development Co., Ltd.
-ren
-
-// rent : 2014-12-04 DERRent, LLC
-rent
-
-// rentals : 2013-12-05 Big Hollow,LLC
-rentals
-
-// repair : 2013-11-07 Lone Sunset, LLC
-repair
-
-// report : 2013-12-05 Binky Glen, LLC
-report
-
-// republican : 2014-03-20 United TLD Holdco Ltd.
-republican
-
-// rest : 2013-12-19 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
-rest
-
-// restaurant : 2014-07-03 Snow Avenue, LLC
-restaurant
-
-// review : 2014-11-20 dot Review Limited
-review
-
-// reviews : 2013-09-13
-reviews
-
-// rexroth : 2015-06-18 Robert Bosch GMBH
-rexroth
-
-// rich : 2013-11-21 I-Registry Ltd.
-rich
-
-// richardli : 2015-05-14 Pacific Century Asset Management (HK) Limited
-richardli
-
-// ricoh : 2014-11-20 Ricoh Company, Ltd.
-ricoh
-
-// rightathome : 2015-07-23 Johnson Shareholdings, Inc.
-rightathome
-
-// ril : 2015-04-02 Reliance Industries Limited
-ril
-
-// rio : 2014-02-27 Empresa Municipal de Informática SA - IPLANRIO
-rio
-
-// rip : 2014-07-10 United TLD Holdco Ltd.
-rip
-
-// rmit : 2015-11-19 Royal Melbourne Institute of Technology
-rmit
-
-// rocher : 2014-12-18 Ferrero Trading Lux S.A.
-rocher
-
-// rocks : 2013-11-14
-rocks
-
-// rodeo : 2013-12-19 Top Level Domain Holdings Limited
-rodeo
-
-// rogers : 2015-08-06 Rogers Communications Partnership
-rogers
-
-// room : 2014-12-18 Amazon EU S.à r.l.
-room
-
-// rsvp : 2014-05-08 Charleston Road Registry Inc.
-rsvp
-
-// ruhr : 2013-10-02 regiodot GmbH & Co. KG
-ruhr
-
-// run : 2015-03-19 Snow Park, LLC
-run
-
-// rwe : 2015-04-02 RWE AG
-rwe
-
-// ryukyu : 2014-01-09 BusinessRalliart Inc.
-ryukyu
-
-// saarland : 2013-12-12 dotSaarland GmbH
-saarland
-
-// safe : 2014-12-18 Amazon EU S.à r.l.
-safe
-
-// safety : 2015-01-08 Safety Registry Services, LLC.
-safety
-
-// sakura : 2014-12-18 SAKURA Internet Inc.
-sakura
-
-// sale : 2014-10-16
-sale
-
-// salon : 2014-12-11 Outer Orchard, LLC
-salon
-
-// samsclub : 2015-07-31 Wal-Mart Stores, Inc.
-samsclub
-
-// samsung : 2014-04-03 SAMSUNG SDS CO., LTD
-samsung
-
-// sandvik : 2014-11-13 Sandvik AB
-sandvik
-
-// sandvikcoromant : 2014-11-07 Sandvik AB
-sandvikcoromant
-
-// sanofi : 2014-10-09 Sanofi
-sanofi
-
-// sap : 2014-03-27 SAP AG
-sap
-
-// sapo : 2014-11-07 PT Comunicacoes S.A.
-sapo
-
-// sarl : 2014-07-03 Delta Orchard, LLC
-sarl
-
-// sas : 2015-04-02 Research IP LLC
-sas
-
-// save : 2015-06-25 Amazon EU S.à r.l.
-save
-
-// saxo : 2014-10-31 Saxo Bank A/S
-saxo
-
-// sbi : 2015-03-12 STATE BANK OF INDIA
-sbi
-
-// sbs : 2014-11-07 SPECIAL BROADCASTING SERVICE CORPORATION
-sbs
-
-// sca : 2014-03-13 SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ)
-sca
-
-// scb : 2014-02-20 The Siam Commercial Bank Public Company Limited ("SCB")
-scb
-
-// schaeffler : 2015-08-06 Schaeffler Technologies AG & Co. KG
-schaeffler
-
-// schmidt : 2014-04-03 SALM S.A.S.
-schmidt
-
-// scholarships : 2014-04-24 Scholarships.com, LLC
-scholarships
-
-// school : 2014-12-18 Little Galley, LLC
-school
-
-// schule : 2014-03-06 Outer Moon, LLC
-schule
-
-// schwarz : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG
-schwarz
-
-// science : 2014-09-11 dot Science Limited
-science
-
-// scjohnson : 2015-07-23 Johnson Shareholdings, Inc.
-scjohnson
-
-// scor : 2014-10-31 SCOR SE
-scor
-
-// scot : 2014-01-23 Dot Scot Registry Limited
-scot
-
-// search : 2016-06-09 Charleston Road Registry Inc.
-search
-
-// seat : 2014-05-22 SEAT, S.A. (Sociedad Unipersonal)
-seat
-
-// secure : 2015-08-27 Amazon EU S.à r.l.
-secure
-
-// security : 2015-05-14
-security
-
-// seek : 2014-12-04 Seek Limited
-seek
-
-// select : 2015-10-08 iSelect Ltd
-select
-
-// sener : 2014-10-24 Sener Ingeniería y Sistemas, S.A.
-sener
-
-// services : 2014-02-27 Fox Castle, LLC
-services
-
-// ses : 2015-07-23 SES
-ses
-
-// seven : 2015-08-06 Seven West Media Ltd
-seven
-
-// sew : 2014-07-17 SEW-EURODRIVE GmbH & Co KG
-sew
-
-// sex : 2014-11-13 ICM Registry SX LLC
-sex
-
-// sexy : 2013-09-11 Uniregistry, Corp.
-sexy
-
-// sfr : 2015-08-13 Societe Francaise du Radiotelephone - SFR
-sfr
-
-// shangrila : 2015-09-03 Shangri‐La International Hotel Management Limited
-shangrila
-
-// sharp : 2014-05-01 Sharp Corporation
-sharp
-
-// shaw : 2015-04-23 Shaw Cablesystems G.P.
-shaw
-
-// shell : 2015-07-30 Shell Information Technology International Inc
-shell
-
-// shia : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
-shia
-
-// shiksha : 2013-11-14 Afilias Limited
-shiksha
-
-// shoes : 2013-10-02 Binky Galley, LLC
-shoes
-
-// shop : 2016-04-08 GMO Registry, Inc.
-shop
-
-// shopping : 2016-03-31
-shopping
-
-// shouji : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD.
-shouji
-
-// show : 2015-03-05 Snow Beach, LLC
-show
-
-// showtime : 2015-08-06 CBS Domains Inc.
-showtime
-
-// shriram : 2014-01-23 Shriram Capital Ltd.
-shriram
-
-// silk : 2015-06-25 Amazon EU S.à r.l.
-silk
-
-// sina : 2015-03-12 Sina Corporation
-sina
-
-// singles : 2013-08-27 Fern Madison, LLC
-singles
-
-// site : 2015-01-15 DotSite Inc.
-site
-
-// ski : 2015-04-09 STARTING DOT LIMITED
-ski
-
-// skin : 2015-01-15 L'Oréal
-skin
-
-// sky : 2014-06-19 Sky IP International Ltd, a company incorporated in England and Wales, operating via its registered Swiss branch
-sky
-
-// skype : 2014-12-18 Microsoft Corporation
-skype
-
-// sling : 2015-07-30 Hughes Satellite Systems Corporation
-sling
-
-// smart : 2015-07-09 Smart Communications, Inc. (SMART)
-smart
-
-// smile : 2014-12-18 Amazon EU S.à r.l.
-smile
-
-// sncf : 2015-02-19 Société Nationale des Chemins de fer Francais S N C F
-sncf
-
-// soccer : 2015-03-26 Foggy Shadow, LLC
-soccer
-
-// social : 2013-11-07 United TLD Holdco Ltd.
-social
-
-// softbank : 2015-07-02 SoftBank Corp.
-softbank
-
-// software : 2014-03-20
-software
-
-// sohu : 2013-12-19 Sohu.com Limited
-sohu
-
-// solar : 2013-11-07 Ruby Town, LLC
-solar
-
-// solutions : 2013-11-07 Silver Cover, LLC
-solutions
-
-// song : 2015-02-26 Amazon EU S.à r.l.
-song
-
-// sony : 2015-01-08 Sony Corporation
-sony
-
-// soy : 2014-01-23 Charleston Road Registry Inc.
-soy
-
-// space : 2014-04-03 DotSpace Inc.
-space
-
-// spiegel : 2014-02-05 SPIEGEL-Verlag Rudolf Augstein GmbH & Co. KG
-spiegel
-
-// spot : 2015-02-26 Amazon EU S.à r.l.
-spot
-
-// spreadbetting : 2014-12-11 IG Group Holdings PLC
-spreadbetting
-
-// srl : 2015-05-07 mySRL GmbH
-srl
-
-// srt : 2015-07-30 FCA US LLC.
-srt
-
-// stada : 2014-11-13 STADA Arzneimittel AG
-stada
-
-// staples : 2015-07-30 Staples, Inc.
-staples
-
-// star : 2015-01-08 Star India Private Limited
-star
-
-// starhub : 2015-02-05 StarHub Ltd
-starhub
-
-// statebank : 2015-03-12 STATE BANK OF INDIA
-statebank
-
-// statefarm : 2015-07-30 State Farm Mutual Automobile Insurance Company
-statefarm
-
-// statoil : 2014-12-04 Statoil ASA
-statoil
-
-// stc : 2014-10-09 Saudi Telecom Company
-stc
-
-// stcgroup : 2014-10-09 Saudi Telecom Company
-stcgroup
-
-// stockholm : 2014-12-18 Stockholms kommun
-stockholm
-
-// storage : 2014-12-22 Self Storage Company LLC
-storage
-
-// store : 2015-04-09 DotStore Inc.
-store
-
-// stream : 2016-01-08 dot Stream Limited
-stream
-
-// studio : 2015-02-11
-studio
-
-// study : 2014-12-11 OPEN UNIVERSITIES AUSTRALIA PTY LTD
-study
-
-// style : 2014-12-04 Binky Moon, LLC
-style
-
-// sucks : 2014-12-22 Vox Populi Registry Inc.
-sucks
-
-// supplies : 2013-12-19 Atomic Fields, LLC
-supplies
-
-// supply : 2013-12-19 Half Falls, LLC
-supply
-
-// support : 2013-10-24 Grand Orchard, LLC
-support
-
-// surf : 2014-01-09 Top Level Domain Holdings Limited
-surf
-
-// surgery : 2014-03-20 Tin Avenue, LLC
-surgery
-
-// suzuki : 2014-02-20 SUZUKI MOTOR CORPORATION
-suzuki
-
-// swatch : 2015-01-08 The Swatch Group Ltd
-swatch
-
-// swiftcover : 2015-07-23 Swiftcover Insurance Services Limited
-swiftcover
-
-// swiss : 2014-10-16 Swiss Confederation
-swiss
-
-// sydney : 2014-09-18 State of New South Wales, Department of Premier and Cabinet
-sydney
-
-// symantec : 2014-12-04 Symantec Corporation
-symantec
-
-// systems : 2013-11-07 Dash Cypress, LLC
-systems
-
-// tab : 2014-12-04 Tabcorp Holdings Limited
-tab
-
-// taipei : 2014-07-10 Taipei City Government
-taipei
-
-// talk : 2015-04-09 Amazon EU S.à r.l.
-talk
-
-// taobao : 2015-01-15 Alibaba Group Holding Limited
-taobao
-
-// target : 2015-07-31 Target Domain Holdings, LLC
-target
-
-// tatamotors : 2015-03-12 Tata Motors Ltd
-tatamotors
-
-// tatar : 2014-04-24 Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic"
-tatar
-
-// tattoo : 2013-08-30 Uniregistry, Corp.
-tattoo
-
-// tax : 2014-03-20 Storm Orchard, LLC
-tax
-
-// taxi : 2015-03-19 Pine Falls, LLC
-taxi
-
-// tci : 2014-09-12 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
-tci
-
-// tdk : 2015-06-11 TDK Corporation
-tdk
-
-// team : 2015-03-05 Atomic Lake, LLC
-team
-
-// tech : 2015-01-30 Dot Tech LLC
-tech
-
-// technology : 2013-09-13 Auburn Falls
-technology
-
-// telecity : 2015-02-19 TelecityGroup International Limited
-telecity
-
-// telefonica : 2014-10-16 Telefónica S.A.
-telefonica
-
-// temasek : 2014-08-07 Temasek Holdings (Private) Limited
-temasek
-
-// tennis : 2014-12-04 Cotton Bloom, LLC
-tennis
-
-// teva : 2015-07-02 Teva Pharmaceutical Industries Limited
-teva
-
-// thd : 2015-04-02 Homer TLC, Inc.
-thd
-
-// theater : 2015-03-19 Blue Tigers, LLC
-theater
-
-// theatre : 2015-05-07
-theatre
-
-// theguardian : 2015-04-30 Guardian News and Media Limited
-theguardian
-
-// tiaa : 2015-07-23 Teachers Insurance and Annuity Association of America
-tiaa
-
-// tickets : 2015-02-05 Accent Media Limited
-tickets
-
-// tienda : 2013-11-14 Victor Manor, LLC
-tienda
-
-// tiffany : 2015-01-30 Tiffany and Company
-tiffany
-
-// tips : 2013-09-20 Corn Willow, LLC
-tips
-
-// tires : 2014-11-07 Dog Edge, LLC
-tires
-
-// tirol : 2014-04-24 punkt Tirol GmbH
-tirol
-
-// tjmaxx : 2015-07-16 The TJX Companies, Inc.
-tjmaxx
-
-// tjx : 2015-07-16 The TJX Companies, Inc.
-tjx
-
-// tkmaxx : 2015-07-16 The TJX Companies, Inc.
-tkmaxx
-
-// tmall : 2015-01-15 Alibaba Group Holding Limited
-tmall
-
-// today : 2013-09-20 Pearl Woods, LLC
-today
-
-// tokyo : 2013-11-13 GMO Registry, Inc.
-tokyo
-
-// tools : 2013-11-21 Pioneer North, LLC
-tools
-
-// top : 2014-03-20 Jiangsu Bangning Science & Technology Co.,Ltd.
-top
-
-// toray : 2014-12-18 Toray Industries, Inc.
-toray
-
-// toshiba : 2014-04-10 TOSHIBA Corporation
-toshiba
-
-// total : 2015-08-06 Total SA
-total
-
-// tours : 2015-01-22 Sugar Station, LLC
-tours
-
-// town : 2014-03-06 Koko Moon, LLC
-town
-
-// toyota : 2015-04-23 TOYOTA MOTOR CORPORATION
-toyota
-
-// toys : 2014-03-06 Pioneer Orchard, LLC
-toys
-
-// trade : 2014-01-23 Elite Registry Limited
-trade
-
-// trading : 2014-12-11 IG Group Holdings PLC
-trading
-
-// training : 2013-11-07 Wild Willow, LLC
-training
-
-// travelchannel : 2015-07-02 Lifestyle Domain Holdings, Inc.
-travelchannel
-
-// travelers : 2015-03-26 Travelers TLD, LLC
-travelers
-
-// travelersinsurance : 2015-03-26 Travelers TLD, LLC
-travelersinsurance
-
-// trust : 2014-10-16
-trust
-
-// trv : 2015-03-26 Travelers TLD, LLC
-trv
-
-// tube : 2015-06-11 Latin American Telecom LLC
-tube
-
-// tui : 2014-07-03 TUI AG
-tui
-
-// tunes : 2015-02-26 Amazon EU S.à r.l.
-tunes
-
-// tushu : 2014-12-18 Amazon EU S.à r.l.
-tushu
-
-// tvs : 2015-02-19 T V SUNDRAM IYENGAR & SONS LIMITED
-tvs
-
-// ubank : 2015-08-20 National Australia Bank Limited
-ubank
-
-// ubs : 2014-12-11 UBS AG
-ubs
-
-// uconnect : 2015-07-30 FCA US LLC.
-uconnect
-
-// unicom : 2015-10-15 China United Network Communications Corporation Limited
-unicom
-
-// university : 2014-03-06 Little Station, LLC
-university
-
-// uno : 2013-09-11 Dot Latin LLC
-uno
-
-// uol : 2014-05-01 UBN INTERNET LTDA.
-uol
-
-// ups : 2015-06-25 UPS Market Driver, Inc.
-ups
-
-// vacations : 2013-12-05 Atomic Tigers, LLC
-vacations
-
-// vana : 2014-12-11 Lifestyle Domain Holdings, Inc.
-vana
-
-// vanguard : 2015-09-03 The Vanguard Group, Inc.
-vanguard
-
-// vegas : 2014-01-16 Dot Vegas, Inc.
-vegas
-
-// ventures : 2013-08-27 Binky Lake, LLC
-ventures
-
-// verisign : 2015-08-13 VeriSign, Inc.
-verisign
-
-// versicherung : 2014-03-20 dotversicherung-registry GmbH
-versicherung
-
-// vet : 2014-03-06
-vet
-
-// viajes : 2013-10-17 Black Madison, LLC
-viajes
-
-// video : 2014-10-16
-video
-
-// vig : 2015-05-14 VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe
-vig
-
-// viking : 2015-04-02 Viking River Cruises (Bermuda) Ltd.
-viking
-
-// villas : 2013-12-05 New Sky, LLC
-villas
-
-// vin : 2015-06-18 Holly Shadow, LLC
-vin
-
-// vip : 2015-01-22 Minds + Machines Group Limited
-vip
-
-// virgin : 2014-09-25 Virgin Enterprises Limited
-virgin
-
-// visa : 2015-07-30 Visa Worldwide Pte. Limited
-visa
-
-// vision : 2013-12-05 Koko Station, LLC
-vision
-
-// vista : 2014-09-18 Vistaprint Limited
-vista
-
-// vistaprint : 2014-09-18 Vistaprint Limited
-vistaprint
-
-// viva : 2014-11-07 Saudi Telecom Company
-viva
-
-// vivo : 2015-07-31 Telefonica Brasil S.A.
-vivo
-
-// vlaanderen : 2014-02-06 DNS.be vzw
-vlaanderen
-
-// vodka : 2013-12-19 Top Level Domain Holdings Limited
-vodka
-
-// volkswagen : 2015-05-14 Volkswagen Group of America Inc.
-volkswagen
-
-// volvo : 2015-11-12 Volvo Holding Sverige Aktiebolag
-volvo
-
-// vote : 2013-11-21 Monolith Registry LLC
-vote
-
-// voting : 2013-11-13 Valuetainment Corp.
-voting
-
-// voto : 2013-11-21 Monolith Registry LLC
-voto
-
-// voyage : 2013-08-27 Ruby House, LLC
-voyage
-
-// vuelos : 2015-03-05 Travel Reservations SRL
-vuelos
-
-// wales : 2014-05-08 Nominet UK
-wales
-
-// walmart : 2015-07-31 Wal-Mart Stores, Inc.
-walmart
-
-// walter : 2014-11-13 Sandvik AB
-walter
-
-// wang : 2013-10-24 Zodiac Leo Limited
-wang
-
-// wanggou : 2014-12-18 Amazon EU S.à r.l.
-wanggou
-
-// warman : 2015-06-18 Weir Group IP Limited
-warman
-
-// watch : 2013-11-14 Sand Shadow, LLC
-watch
-
-// watches : 2014-12-22 Richemont DNS Inc.
-watches
-
-// weather : 2015-01-08 The Weather Channel, LLC
-weather
-
-// weatherchannel : 2015-03-12 The Weather Channel, LLC
-weatherchannel
-
-// webcam : 2014-01-23 dot Webcam Limited
-webcam
-
-// weber : 2015-06-04 Saint-Gobain Weber SA
-weber
-
-// website : 2014-04-03 DotWebsite Inc.
-website
-
-// wed : 2013-10-01 Atgron, Inc.
-wed
-
-// wedding : 2014-04-24 Top Level Domain Holdings Limited
-wedding
-
-// weibo : 2015-03-05 Sina Corporation
-weibo
-
-// weir : 2015-01-29 Weir Group IP Limited
-weir
-
-// whoswho : 2014-02-20 Who's Who Registry
-whoswho
-
-// wien : 2013-10-28 punkt.wien GmbH
-wien
-
-// wiki : 2013-11-07 Top Level Design, LLC
-wiki
-
-// williamhill : 2014-03-13 William Hill Organization Limited
-williamhill
-
-// win : 2014-11-20 First Registry Limited
-win
-
-// windows : 2014-12-18 Microsoft Corporation
-windows
-
-// wine : 2015-06-18 June Station, LLC
-wine
-
-// winners : 2015-07-16 The TJX Companies, Inc.
-winners
-
-// wme : 2014-02-13 William Morris Endeavor Entertainment, LLC
-wme
-
-// wolterskluwer : 2015-08-06 Wolters Kluwer N.V.
-wolterskluwer
-
-// woodside : 2015-07-09 Woodside Petroleum Limited
-woodside
-
-// work : 2013-12-19 Top Level Domain Holdings Limited
-work
-
-// works : 2013-11-14 Little Dynamite, LLC
-works
-
-// world : 2014-06-12 Bitter Fields, LLC
-world
-
-// wow : 2015-10-08 Amazon EU S.à r.l.
-wow
-
-// wtc : 2013-12-19 World Trade Centers Association, Inc.
-wtc
-
-// wtf : 2014-03-06 Hidden Way, LLC
-wtf
-
-// xbox : 2014-12-18 Microsoft Corporation
-xbox
-
-// xerox : 2014-10-24 Xerox DNHC LLC
-xerox
-
-// xfinity : 2015-07-09 Comcast IP Holdings I, LLC
-xfinity
-
-// xihuan : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD.
-xihuan
-
-// xin : 2014-12-11 Elegant Leader Limited
-xin
-
-// xn--11b4c3d : 2015-01-15 VeriSign Sarl
-xn--11b4c3d
-कॉम
-
-// xn--1ck2e1b : 2015-02-26 Amazon EU S.à r.l.
-xn--1ck2e1b
-セール
-
-// xn--1qqw23a : 2014-01-09 Guangzhou YU Wei Information Technology Co., Ltd.
-xn--1qqw23a
-佛山
-
-// xn--30rr7y : 2014-06-12 Excellent First Limited
-xn--30rr7y
-慈善
-
-// xn--3bst00m : 2013-09-13 Eagle Horizon Limited
-xn--3bst00m
-集团
-
-// xn--3ds443g : 2013-09-08 TLD REGISTRY LIMITED
-xn--3ds443g
-在线
-
-// xn--3oq18vl8pn36a : 2015-07-02 Volkswagen (China) Investment Co., Ltd.
-xn--3oq18vl8pn36a
-大众汽车
-
-// xn--3pxu8k : 2015-01-15 VeriSign Sarl
-xn--3pxu8k
-点看
-
-// xn--42c2d9a : 2015-01-15 VeriSign Sarl
-xn--42c2d9a
-คอม
-
-// xn--45q11c : 2013-11-21 Zodiac Scorpio Limited
-xn--45q11c
-八卦
-
-// xn--4gbrim : 2013-10-04 Suhub Electronic Establishment
-xn--4gbrim
-موقع
-
-// xn--4gq48lf9j : 2015-07-31 Wal-Mart Stores, Inc.
-xn--4gq48lf9j
-一号店
-
-// xn--55qw42g : 2013-11-08 China Organizational Name Administration Center
-xn--55qw42g
-公益
-
-// xn--55qx5d : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center)
-xn--55qx5d
-公司
-
-// xn--5su34j936bgsg : 2015-09-03 Shangri‐La International Hotel Management Limited
-xn--5su34j936bgsg
-香格里拉
-
-// xn--5tzm5g : 2014-12-22 Global Website TLD Asia Limited
-xn--5tzm5g
-网站
-
-// xn--6frz82g : 2013-09-23 Afilias Limited
-xn--6frz82g
-移动
-
-// xn--6qq986b3xl : 2013-09-13 Tycoon Treasure Limited
-xn--6qq986b3xl
-我爱你
-
-// xn--80adxhks : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
-xn--80adxhks
-москва
-
-// xn--80aqecdr1a : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
-xn--80aqecdr1a
-католик
-
-// xn--80asehdb : 2013-07-14 CORE Association
-xn--80asehdb
-онлайн
-
-// xn--80aswg : 2013-07-14 CORE Association
-xn--80aswg
-сайт
-
-// xn--8y0a063a : 2015-03-26 China United Network Communications Corporation Limited
-xn--8y0a063a
-联通
-
-// xn--9dbq2a : 2015-01-15 VeriSign Sarl
-xn--9dbq2a
-קום
-
-// xn--9et52u : 2014-06-12 RISE VICTORY LIMITED
-xn--9et52u
-时尚
-
-// xn--9krt00a : 2015-03-12 Sina Corporation
-xn--9krt00a
-微博
-
-// xn--b4w605ferd : 2014-08-07 Temasek Holdings (Private) Limited
-xn--b4w605ferd
-淡马锡
-
-// xn--bck1b9a5dre4c : 2015-02-26 Amazon EU S.à r.l.
-xn--bck1b9a5dre4c
-ファッション
-
-// xn--c1avg : 2013-11-14 Public Interest Registry
-xn--c1avg
-орг
-
-// xn--c2br7g : 2015-01-15 VeriSign Sarl
-xn--c2br7g
-नेट
-
-// xn--cck2b3b : 2015-02-26 Amazon EU S.à r.l.
-xn--cck2b3b
-ストア
-
-// xn--cg4bki : 2013-09-27 SAMSUNG SDS CO., LTD
-xn--cg4bki
-삼성
-
-// xn--czr694b : 2014-01-16 Dot Trademark TLD Holding Company Limted
-xn--czr694b
-商标
-
-// xn--czrs0t : 2013-12-19 Wild Island, LLC
-xn--czrs0t
-商店
-
-// xn--czru2d : 2013-11-21 Zodiac Capricorn Limited
-xn--czru2d
-商城
-
-// xn--d1acj3b : 2013-11-20 The Foundation for Network Initiatives “The Smart Internet”
-xn--d1acj3b
-дети
-
-// xn--eckvdtc9d : 2014-12-18 Amazon EU S.à r.l.
-xn--eckvdtc9d
-ポイント
-
-// xn--efvy88h : 2014-08-22 Xinhua News Agency Guangdong Branch 新华通讯社广东分社
-xn--efvy88h
-新闻
-
-// xn--estv75g : 2015-02-19 Industrial and Commercial Bank of China Limited
-xn--estv75g
-工行
-
-// xn--fct429k : 2015-04-09 Amazon EU S.à r.l.
-xn--fct429k
-家電
-
-// xn--fhbei : 2015-01-15 VeriSign Sarl
-xn--fhbei
-كوم
-
-// xn--fiq228c5hs : 2013-09-08 TLD REGISTRY LIMITED
-xn--fiq228c5hs
-中文网
-
-// xn--fiq64b : 2013-10-14 CITIC Group Corporation
-xn--fiq64b
-中信
-
-// xn--fjq720a : 2014-05-22 Will Bloom, LLC
-xn--fjq720a
-娱乐
-
-// xn--flw351e : 2014-07-31 Charleston Road Registry Inc.
-xn--flw351e
-谷歌
-
-// xn--fzys8d69uvgm : 2015-05-14 PCCW Enterprises Limited
-xn--fzys8d69uvgm
-電訊盈科
-
-// xn--g2xx48c : 2015-01-30 Minds + Machines Group Limited
-xn--g2xx48c
-购物
-
-// xn--gckr3f0f : 2015-02-26 Amazon EU S.à r.l.
-xn--gckr3f0f
-クラウド
-
-// xn--gk3at1e : 2015-10-08 Amazon EU S.à r.l.
-xn--gk3at1e
-通販
-
-// xn--hxt814e : 2014-05-15 Zodiac Libra Limited
-xn--hxt814e
-网店
-
-// xn--i1b6b1a6a2e : 2013-11-14 Public Interest Registry
-xn--i1b6b1a6a2e
-संगठन
-
-// xn--imr513n : 2014-12-11 Dot Trademark TLD Holding Company Limted
-xn--imr513n
-餐厅
-
-// xn--io0a7i : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center)
-xn--io0a7i
-网络
-
-// xn--j1aef : 2015-01-15 VeriSign Sarl
-xn--j1aef
-ком
-
-// xn--jlq61u9w7b : 2015-01-08 Nokia Corporation
-xn--jlq61u9w7b
-诺基亚
-
-// xn--jvr189m : 2015-02-26 Amazon EU S.à r.l.
-xn--jvr189m
-食品
-
-// xn--kcrx77d1x4a : 2014-11-07 Koninklijke Philips N.V.
-xn--kcrx77d1x4a
-飞利浦
-
-// xn--kpu716f : 2014-12-22 Richemont DNS Inc.
-xn--kpu716f
-手表
-
-// xn--kput3i : 2014-02-13 Beijing RITT-Net Technology Development Co., Ltd
-xn--kput3i
-手机
-
-// xn--mgba3a3ejt : 2014-11-20 Aramco Services Company
-xn--mgba3a3ejt
-ارامكو
-
-// xn--mgba7c0bbn0a : 2015-05-14 Crescent Holding GmbH
-xn--mgba7c0bbn0a
-العليان
-
-// xn--mgbaakc7dvf : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat)
-xn--mgbaakc7dvf
-اتصالات
-
-// xn--mgbab2bd : 2013-10-31 CORE Association
-xn--mgbab2bd
-بازار
-
-// xn--mgbb9fbpob : 2014-12-18 GreenTech Consultancy Company W.L.L.
-xn--mgbb9fbpob
-موبايلي
-
-// xn--mgbca7dzdo : 2015-07-30 Abu Dhabi Systems and Information Centre
-xn--mgbca7dzdo
-ابوظبي
-
-// xn--mgbi4ecexp : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
-xn--mgbi4ecexp
-كاثوليك
-
-// xn--mgbt3dhd : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
-xn--mgbt3dhd
-همراه
-
-// xn--mk1bu44c : 2015-01-15 VeriSign Sarl
-xn--mk1bu44c
-닷컴
-
-// xn--mxtq1m : 2014-03-06 Net-Chinese Co., Ltd.
-xn--mxtq1m
-政府
-
-// xn--ngbc5azd : 2013-07-13 International Domain Registry Pty. Ltd.
-xn--ngbc5azd
-شبكة
-
-// xn--ngbe9e0a : 2014-12-04 Kuwait Finance House
-xn--ngbe9e0a
-بيتك
-
-// xn--ngbrx : 2015-11-12 League of Arab States
-xn--ngbrx
-عرب
-
-// xn--nqv7f : 2013-11-14 Public Interest Registry
-xn--nqv7f
-机构
-
-// xn--nqv7fs00ema : 2013-11-14 Public Interest Registry
-xn--nqv7fs00ema
-组织机构
-
-// xn--nyqy26a : 2014-11-07 Stable Tone Limited
-xn--nyqy26a
-健康
-
-// xn--p1acf : 2013-12-12 Rusnames Limited
-xn--p1acf
-рус
-
-// xn--pbt977c : 2014-12-22 Richemont DNS Inc.
-xn--pbt977c
-珠宝
-
-// xn--pssy2u : 2015-01-15 VeriSign Sarl
-xn--pssy2u
-大拿
-
-// xn--q9jyb4c : 2013-09-17 Charleston Road Registry Inc.
-xn--q9jyb4c
-みんな
-
-// xn--qcka1pmc : 2014-07-31 Charleston Road Registry Inc.
-xn--qcka1pmc
-グーグル
-
-// xn--rhqv96g : 2013-09-11 Stable Tone Limited
-xn--rhqv96g
-世界
-
-// xn--rovu88b : 2015-02-26 Amazon EU S.à r.l.
-xn--rovu88b
-書籍
-
-// xn--ses554g : 2014-01-16
-xn--ses554g
-网址
-
-// xn--t60b56a : 2015-01-15 VeriSign Sarl
-xn--t60b56a
-닷넷
-
-// xn--tckwe : 2015-01-15 VeriSign Sarl
-xn--tckwe
-コム
-
-// xn--tiq49xqyj : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
-xn--tiq49xqyj
-天主教
-
-// xn--unup4y : 2013-07-14 Spring Fields, LLC
-xn--unup4y
-游戏
-
-// xn--vermgensberater-ctb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG
-xn--vermgensberater-ctb
-vermögensberater
-
-// xn--vermgensberatung-pwb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG
-xn--vermgensberatung-pwb
-vermögensberatung
-
-// xn--vhquv : 2013-08-27 Dash McCook, LLC
-xn--vhquv
-企业
-
-// xn--vuq861b : 2014-10-16 Beijing Tele-info Network Technology Co., Ltd.
-xn--vuq861b
-信息
-
-// xn--w4r85el8fhu5dnra : 2015-04-30 Kerry Trading Co. Limited
-xn--w4r85el8fhu5dnra
-嘉里大酒店
-
-// xn--w4rs40l : 2015-07-30 Kerry Trading Co. Limited
-xn--w4rs40l
-嘉里
-
-// xn--xhq521b : 2013-11-14 Guangzhou YU Wei Information Technology Co., Ltd.
-xn--xhq521b
-广东
-
-// xn--zfr164b : 2013-11-08 China Organizational Name Administration Center
-xn--zfr164b
-政务
-
-// xperia : 2015-05-14 Sony Mobile Communications AB
-xperia
-
-// xyz : 2013-12-05 XYZ.COM LLC
-xyz
-
-// yachts : 2014-01-09 DERYachts, LLC
-yachts
-
-// yahoo : 2015-04-02 Yahoo! Domain Services Inc.
-yahoo
-
-// yamaxun : 2014-12-18 Amazon EU S.à r.l.
-yamaxun
-
-// yandex : 2014-04-10 YANDEX, LLC
-yandex
-
-// yodobashi : 2014-11-20 YODOBASHI CAMERA CO.,LTD.
-yodobashi
-
-// yoga : 2014-05-29 Top Level Domain Holdings Limited
-yoga
-
-// yokohama : 2013-12-12 GMO Registry, Inc.
-yokohama
-
-// you : 2015-04-09 Amazon EU S.à r.l.
-you
-
-// youtube : 2014-05-01 Charleston Road Registry Inc.
-youtube
-
-// yun : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD.
-yun
-
-// zappos : 2015-06-25 Amazon EU S.à r.l.
-zappos
-
-// zara : 2014-11-07 Industria de Diseño Textil, S.A. (INDITEX, S.A.)
-zara
-
-// zero : 2014-12-18 Amazon EU S.à r.l.
-zero
-
-// zip : 2014-05-08 Charleston Road Registry Inc.
-zip
-
-// zippo : 2015-07-02 Zadco Company
-zippo
-
-// zone : 2013-11-14 Outer Falls, LLC
-zone
-
-// zuerich : 2014-11-07 Kanton Zürich (Canton of Zurich)
-zuerich
-
-
-// ===END ICANN DOMAINS===
-// ===BEGIN PRIVATE DOMAINS===
-// (Note: these are in alphabetical order by company name)
-
-// Agnat sp. z o.o. : https://domena.pl
-// Submitted by Przemyslaw Plewa <it-admin@domena.pl>
-beep.pl
-
-// Alces Software Ltd : http://alces-software.com
-// Submitted by Mark J. Titorenko <mark.titorenko@alces-software.com>
-*.compute.estate
-*.alces.network
-
-// alwaysdata : https://www.alwaysdata.com
-// Submitted by Cyril <admin@alwaysdata.com>
-*.alwaysdata.net
-
-// Amazon CloudFront : https://aws.amazon.com/cloudfront/
-// Submitted by Donavan Miller <donavanm@amazon.com>
-cloudfront.net
-
-// Amazon Elastic Compute Cloud: https://aws.amazon.com/ec2/
-// Submitted by Luke Wells <psl-maintainers@amazon.com>
-*.compute.amazonaws.com
-*.compute-1.amazonaws.com
-*.compute.amazonaws.com.cn
-us-east-1.amazonaws.com
-
-// Amazon Elastic Beanstalk : https://aws.amazon.com/elasticbeanstalk/
-// Submitted by Luke Wells <psl-maintainers@amazon.com>
-elasticbeanstalk.cn-north-1.amazonaws.com.cn
-*.elasticbeanstalk.com
-
-// Amazon Elastic Load Balancing : https://aws.amazon.com/elasticloadbalancing/
-// Submitted by Luke Wells <psl-maintainers@amazon.com>
-*.elb.amazonaws.com
-*.elb.amazonaws.com.cn
-
-// Amazon S3 : https://aws.amazon.com/s3/
-// Submitted by Luke Wells <psl-maintainers@amazon.com>
-s3.amazonaws.com
-s3-ap-northeast-1.amazonaws.com
-s3-ap-northeast-2.amazonaws.com
-s3-ap-south-1.amazonaws.com
-s3-ap-southeast-1.amazonaws.com
-s3-ap-southeast-2.amazonaws.com
-s3-ca-central-1.amazonaws.com
-s3-eu-central-1.amazonaws.com
-s3-eu-west-1.amazonaws.com
-s3-eu-west-2.amazonaws.com
-s3-external-1.amazonaws.com
-s3-fips-us-gov-west-1.amazonaws.com
-s3-sa-east-1.amazonaws.com
-s3-us-gov-west-1.amazonaws.com
-s3-us-east-2.amazonaws.com
-s3-us-west-1.amazonaws.com
-s3-us-west-2.amazonaws.com
-s3.ap-northeast-2.amazonaws.com
-s3.ap-south-1.amazonaws.com
-s3.cn-north-1.amazonaws.com.cn
-s3.ca-central-1.amazonaws.com
-s3.eu-central-1.amazonaws.com
-s3.eu-west-2.amazonaws.com
-s3.us-east-2.amazonaws.com
-s3.dualstack.ap-northeast-1.amazonaws.com
-s3.dualstack.ap-northeast-2.amazonaws.com
-s3.dualstack.ap-south-1.amazonaws.com
-s3.dualstack.ap-southeast-1.amazonaws.com
-s3.dualstack.ap-southeast-2.amazonaws.com
-s3.dualstack.ca-central-1.amazonaws.com
-s3.dualstack.eu-central-1.amazonaws.com
-s3.dualstack.eu-west-1.amazonaws.com
-s3.dualstack.eu-west-2.amazonaws.com
-s3.dualstack.sa-east-1.amazonaws.com
-s3.dualstack.us-east-1.amazonaws.com
-s3.dualstack.us-east-2.amazonaws.com
-s3-website-us-east-1.amazonaws.com
-s3-website-us-west-1.amazonaws.com
-s3-website-us-west-2.amazonaws.com
-s3-website-ap-northeast-1.amazonaws.com
-s3-website-ap-southeast-1.amazonaws.com
-s3-website-ap-southeast-2.amazonaws.com
-s3-website-eu-west-1.amazonaws.com
-s3-website-sa-east-1.amazonaws.com
-s3-website.ap-northeast-2.amazonaws.com
-s3-website.ap-south-1.amazonaws.com
-s3-website.ca-central-1.amazonaws.com
-s3-website.eu-central-1.amazonaws.com
-s3-website.eu-west-2.amazonaws.com
-s3-website.us-east-2.amazonaws.com
-
-// Amune : https://amune.org/
-// Submitted by Team Amune <cert@amune.org>
-t3l3p0rt.net
-tele.amune.org
-
-// Aptible : https://www.aptible.com/
-// Submitted by Thomas Orozco <thomas@aptible.com>
-on-aptible.com
-
-// Asociación Amigos de la Informática "Euskalamiga" : http://encounter.eus/
-// Submitted by Hector Martin <marcan@euskalencounter.org>
-user.party.eus
-
-// Association potager.org : https://potager.org/
-// Submitted by Lunar <jardiniers@potager.org>
-pimienta.org
-poivron.org
-potager.org
-sweetpepper.org
-
-// ASUSTOR Inc. : http://www.asustor.com
-// Submitted by Vincent Tseng <vincenttseng@asustor.com>
-myasustor.com
-
-// AVM : https://avm.de
-// Submitted by Andreas Weise <a.weise@avm.de>
-myfritz.net
-
-// backplane : https://www.backplane.io
-// Submitted by Anthony Voutas <anthony@backplane.io>
-backplaneapp.io
-
-// BetaInABox
-// Submitted by Adrian <adrian@betainabox.com>
-betainabox.com
-
-// BinaryLane : http://www.binarylane.com
-// Submitted by Nathan O'Sullivan <nathan@mammoth.com.au>
-bnr.la
-
-// Boxfuse : https://boxfuse.com
-// Submitted by Axel Fontaine <axel@boxfuse.com>
-boxfuse.io
-
-// BrowserSafetyMark
-// Submitted by Dave Tharp <browsersafetymark.io@quicinc.com>
-browsersafetymark.io
-
-// callidomus: https://www.callidomus.com/
-// Submitted by Marcus Popp <admin@callidomus.com>
-mycd.eu
-
-// CentralNic : http://www.centralnic.com/names/domains
-// Submitted by registry <gavin.brown@centralnic.com>
-ae.org
-ar.com
-br.com
-cn.com
-com.de
-com.se
-de.com
-eu.com
-gb.com
-gb.net
-hu.com
-hu.net
-jp.net
-jpn.com
-kr.com
-mex.com
-no.com
-qc.com
-ru.com
-sa.com
-se.com
-se.net
-uk.com
-uk.net
-us.com
-uy.com
-za.bz
-za.com
-
-// Africa.com Web Solutions Ltd : https://registry.africa.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-africa.com
-
-// iDOT Services Limited : http://www.domain.gr.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-gr.com
-
-// Radix FZC : http://domains.in.net
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-in.net
-
-// US REGISTRY LLC : http://us.org
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-us.org
-
-// co.com Registry, LLC : https://registry.co.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-co.com
-
-// c.la : http://www.c.la/
-c.la
-
-// certmgr.org : https://certmgr.org
-// Submitted by B. Blechschmidt <hostmaster@certmgr.org>
-certmgr.org
-
-// Citrix : https://citrix.com
-// Submitted by Alex Stoddard <alex.stoddard@citrix.com>
-xenapponazure.com
-
-// ClearVox : http://www.clearvox.nl/
-// Submitted by Leon Rowland <leon@clearvox.nl>
-virtueeldomein.nl
-
-// cloudControl : https://www.cloudcontrol.com/
-// Submitted by Tobias Wilken <tw@cloudcontrol.com>
-cloudcontrolled.com
-cloudcontrolapp.com
-
-// co.ca : http://registry.co.ca/
-co.ca
-
-// i-registry s.r.o. : http://www.i-registry.cz/
-// Submitted by Martin Semrad <semrad@i-registry.cz>
-co.cz
-
-// CDN77.com : http://www.cdn77.com
-// Submitted by Jan Krpes <jan.krpes@cdn77.com>
-c.cdn77.org
-cdn77-ssl.net
-r.cdn77.net
-rsc.cdn77.org
-ssl.origin.cdn77-secure.org
-
-// Cloud DNS Ltd : http://www.cloudns.net
-// Submitted by Aleksander Hristov <noc@cloudns.net>
-cloudns.asia
-cloudns.biz
-cloudns.club
-cloudns.cc
-cloudns.eu
-cloudns.in
-cloudns.info
-cloudns.org
-cloudns.pro
-cloudns.pw
-cloudns.us
-
-// CoDNS B.V.
-co.nl
-co.no
-
-// Commerce Guys, SAS
-// Submitted by Damien Tournoud <damien@commerceguys.com>
-*.platform.sh
-
-// COSIMO GmbH http://www.cosimo.de
-// Submitted by Rene Marticke <rmarticke@cosimo.de>
-dyn.cosidns.de
-dynamisches-dns.de
-dnsupdater.de
-internet-dns.de
-l-o-g-i-n.de
-dynamic-dns.info
-feste-ip.net
-knx-server.net
-static-access.net
-
-// Craynic, s.r.o. : http://www.craynic.com/
-// Submitted by Ales Krajnik <ales.krajnik@craynic.com>
-realm.cz
-
-// Cryptonomic : https://cryptonomic.net/
-// Submitted by Andrew Cady <public-suffix-list@cryptonomic.net>
-*.cryptonomic.net
-
-// Cupcake : https://cupcake.io/
-// Submitted by Jonathan Rudenberg <jonathan@cupcake.io>
-cupcake.is
-
-// cyon GmbH : https://www.cyon.ch/
-// Submitted by Dominic Luechinger <dol@cyon.ch>
-cyon.link
-cyon.site
-
-// Daplie, Inc : https://daplie.com
-// Submitted by AJ ONeal <aj@daplie.com>
-daplie.me
-
-// Dansk.net : http://www.dansk.net/
-// Submitted by Anani Voule <digital@digital.co.dk>
-biz.dk
-co.dk
-firm.dk
-reg.dk
-store.dk
-
-// deSEC : https://desec.io/
-// Submitted by Peter Thomassen <peter@desec.io>
-dedyn.io
-
-// DNShome : https://www.dnshome.de/
-// Submitted by Norbert Auler <mail@dnshome.de>
-dnshome.de
-
-// DreamHost : http://www.dreamhost.com/
-// Submitted by Andrew Farmer <andrew.farmer@dreamhost.com>
-dreamhosters.com
-
-// Drobo : http://www.drobo.com/
-// Submitted by Ricardo Padilha <rpadilha@drobo.com>
-mydrobo.com
-
-// Drud Holdings, LLC. : https://www.drud.com/
-// Submitted by Kevin Bridges <kevin@drud.com>
-drud.io
-drud.us
-
-// DuckDNS : http://www.duckdns.org/
-// Submitted by Richard Harper <richard@duckdns.org>
-duckdns.org
-
-// dy.fi : http://dy.fi/
-// Submitted by Heikki Hannikainen <hessu@hes.iki.fi>
-dy.fi
-tunk.org
-
-// DynDNS.com : http://www.dyndns.com/services/dns/dyndns/
-dyndns-at-home.com
-dyndns-at-work.com
-dyndns-blog.com
-dyndns-free.com
-dyndns-home.com
-dyndns-ip.com
-dyndns-mail.com
-dyndns-office.com
-dyndns-pics.com
-dyndns-remote.com
-dyndns-server.com
-dyndns-web.com
-dyndns-wiki.com
-dyndns-work.com
-dyndns.biz
-dyndns.info
-dyndns.org
-dyndns.tv
-at-band-camp.net
-ath.cx
-barrel-of-knowledge.info
-barrell-of-knowledge.info
-better-than.tv
-blogdns.com
-blogdns.net
-blogdns.org
-blogsite.org
-boldlygoingnowhere.org
-broke-it.net
-buyshouses.net
-cechire.com
-dnsalias.com
-dnsalias.net
-dnsalias.org
-dnsdojo.com
-dnsdojo.net
-dnsdojo.org
-does-it.net
-doesntexist.com
-doesntexist.org
-dontexist.com
-dontexist.net
-dontexist.org
-doomdns.com
-doomdns.org
-dvrdns.org
-dyn-o-saur.com
-dynalias.com
-dynalias.net
-dynalias.org
-dynathome.net
-dyndns.ws
-endofinternet.net
-endofinternet.org
-endoftheinternet.org
-est-a-la-maison.com
-est-a-la-masion.com
-est-le-patron.com
-est-mon-blogueur.com
-for-better.biz
-for-more.biz
-for-our.info
-for-some.biz
-for-the.biz
-forgot.her.name
-forgot.his.name
-from-ak.com
-from-al.com
-from-ar.com
-from-az.net
-from-ca.com
-from-co.net
-from-ct.com
-from-dc.com
-from-de.com
-from-fl.com
-from-ga.com
-from-hi.com
-from-ia.com
-from-id.com
-from-il.com
-from-in.com
-from-ks.com
-from-ky.com
-from-la.net
-from-ma.com
-from-md.com
-from-me.org
-from-mi.com
-from-mn.com
-from-mo.com
-from-ms.com
-from-mt.com
-from-nc.com
-from-nd.com
-from-ne.com
-from-nh.com
-from-nj.com
-from-nm.com
-from-nv.com
-from-ny.net
-from-oh.com
-from-ok.com
-from-or.com
-from-pa.com
-from-pr.com
-from-ri.com
-from-sc.com
-from-sd.com
-from-tn.com
-from-tx.com
-from-ut.com
-from-va.com
-from-vt.com
-from-wa.com
-from-wi.com
-from-wv.com
-from-wy.com
-ftpaccess.cc
-fuettertdasnetz.de
-game-host.org
-game-server.cc
-getmyip.com
-gets-it.net
-go.dyndns.org
-gotdns.com
-gotdns.org
-groks-the.info
-groks-this.info
-ham-radio-op.net
-here-for-more.info
-hobby-site.com
-hobby-site.org
-home.dyndns.org
-homedns.org
-homeftp.net
-homeftp.org
-homeip.net
-homelinux.com
-homelinux.net
-homelinux.org
-homeunix.com
-homeunix.net
-homeunix.org
-iamallama.com
-in-the-band.net
-is-a-anarchist.com
-is-a-blogger.com
-is-a-bookkeeper.com
-is-a-bruinsfan.org
-is-a-bulls-fan.com
-is-a-candidate.org
-is-a-caterer.com
-is-a-celticsfan.org
-is-a-chef.com
-is-a-chef.net
-is-a-chef.org
-is-a-conservative.com
-is-a-cpa.com
-is-a-cubicle-slave.com
-is-a-democrat.com
-is-a-designer.com
-is-a-doctor.com
-is-a-financialadvisor.com
-is-a-geek.com
-is-a-geek.net
-is-a-geek.org
-is-a-green.com
-is-a-guru.com
-is-a-hard-worker.com
-is-a-hunter.com
-is-a-knight.org
-is-a-landscaper.com
-is-a-lawyer.com
-is-a-liberal.com
-is-a-libertarian.com
-is-a-linux-user.org
-is-a-llama.com
-is-a-musician.com
-is-a-nascarfan.com
-is-a-nurse.com
-is-a-painter.com
-is-a-patsfan.org
-is-a-personaltrainer.com
-is-a-photographer.com
-is-a-player.com
-is-a-republican.com
-is-a-rockstar.com
-is-a-socialist.com
-is-a-soxfan.org
-is-a-student.com
-is-a-teacher.com
-is-a-techie.com
-is-a-therapist.com
-is-an-accountant.com
-is-an-actor.com
-is-an-actress.com
-is-an-anarchist.com
-is-an-artist.com
-is-an-engineer.com
-is-an-entertainer.com
-is-by.us
-is-certified.com
-is-found.org
-is-gone.com
-is-into-anime.com
-is-into-cars.com
-is-into-cartoons.com
-is-into-games.com
-is-leet.com
-is-lost.org
-is-not-certified.com
-is-saved.org
-is-slick.com
-is-uberleet.com
-is-very-bad.org
-is-very-evil.org
-is-very-good.org
-is-very-nice.org
-is-very-sweet.org
-is-with-theband.com
-isa-geek.com
-isa-geek.net
-isa-geek.org
-isa-hockeynut.com
-issmarterthanyou.com
-isteingeek.de
-istmein.de
-kicks-ass.net
-kicks-ass.org
-knowsitall.info
-land-4-sale.us
-lebtimnetz.de
-leitungsen.de
-likes-pie.com
-likescandy.com
-merseine.nu
-mine.nu
-misconfused.org
-mypets.ws
-myphotos.cc
-neat-url.com
-office-on-the.net
-on-the-web.tv
-podzone.net
-podzone.org
-readmyblog.org
-saves-the-whales.com
-scrapper-site.net
-scrapping.cc
-selfip.biz
-selfip.com
-selfip.info
-selfip.net
-selfip.org
-sells-for-less.com
-sells-for-u.com
-sells-it.net
-sellsyourhome.org
-servebbs.com
-servebbs.net
-servebbs.org
-serveftp.net
-serveftp.org
-servegame.org
-shacknet.nu
-simple-url.com
-space-to-rent.com
-stuff-4-sale.org
-stuff-4-sale.us
-teaches-yoga.com
-thruhere.net
-traeumtgerade.de
-webhop.biz
-webhop.info
-webhop.net
-webhop.org
-worse-than.tv
-writesthisblog.com
-
-// ddnss.de : https://www.ddnss.de/
-// Submitted by Robert Niedziela <webmaster@ddnss.de>
-ddnss.de
-dyn.ddnss.de
-dyndns.ddnss.de
-dyndns1.de
-dyn-ip24.de
-home-webserver.de
-dyn.home-webserver.de
-myhome-server.de
-ddnss.org
-
-// dynv6 : https://dynv6.com
-// Submitted by Dominik Menke <dom@digineo.de> 2016-01-18
-dynv6.net
-
-// E4YOU spol. s.r.o. : https://e4you.cz/
-// Submitted by Vladimir Dudr <info@e4you.cz>
-e4.cz
-
-// Enonic : http://enonic.com/
-// Submitted by Erik Kaareng-Sunde <esu@enonic.com>
-enonic.io
-customer.enonic.io
-
-// EU.org https://eu.org/
-// Submitted by Pierre Beyssac <hostmaster@eu.org>
-eu.org
-al.eu.org
-asso.eu.org
-at.eu.org
-au.eu.org
-be.eu.org
-bg.eu.org
-ca.eu.org
-cd.eu.org
-ch.eu.org
-cn.eu.org
-cy.eu.org
-cz.eu.org
-de.eu.org
-dk.eu.org
-edu.eu.org
-ee.eu.org
-es.eu.org
-fi.eu.org
-fr.eu.org
-gr.eu.org
-hr.eu.org
-hu.eu.org
-ie.eu.org
-il.eu.org
-in.eu.org
-int.eu.org
-is.eu.org
-it.eu.org
-jp.eu.org
-kr.eu.org
-lt.eu.org
-lu.eu.org
-lv.eu.org
-mc.eu.org
-me.eu.org
-mk.eu.org
-mt.eu.org
-my.eu.org
-net.eu.org
-ng.eu.org
-nl.eu.org
-no.eu.org
-nz.eu.org
-paris.eu.org
-pl.eu.org
-pt.eu.org
-q-a.eu.org
-ro.eu.org
-ru.eu.org
-se.eu.org
-si.eu.org
-sk.eu.org
-tr.eu.org
-uk.eu.org
-us.eu.org
-
-// Evennode : http://www.evennode.com/
-// Submitted by Michal Kralik <support@evennode.com>
-eu-1.evennode.com
-eu-2.evennode.com
-us-1.evennode.com
-us-2.evennode.com
-
-// Facebook, Inc.
-// Submitted by Peter Ruibal <public-suffix@fb.com>
-apps.fbsbx.com
-
-// FAITID : https://faitid.org/
-// Submitted by Maxim Alzoba <tech.contact@faitid.org>
-// https://www.flexireg.net/stat_info
-ru.net
-adygeya.ru
-bashkiria.ru
-bir.ru
-cbg.ru
-com.ru
-dagestan.ru
-grozny.ru
-kalmykia.ru
-kustanai.ru
-marine.ru
-mordovia.ru
-msk.ru
-mytis.ru
-nalchik.ru
-nov.ru
-pyatigorsk.ru
-spb.ru
-vladikavkaz.ru
-vladimir.ru
-abkhazia.su
-adygeya.su
-aktyubinsk.su
-arkhangelsk.su
-armenia.su
-ashgabad.su
-azerbaijan.su
-balashov.su
-bashkiria.su
-bryansk.su
-bukhara.su
-chimkent.su
-dagestan.su
-east-kazakhstan.su
-exnet.su
-georgia.su
-grozny.su
-ivanovo.su
-jambyl.su
-kalmykia.su
-kaluga.su
-karacol.su
-karaganda.su
-karelia.su
-khakassia.su
-krasnodar.su
-kurgan.su
-kustanai.su
-lenug.su
-mangyshlak.su
-mordovia.su
-msk.su
-murmansk.su
-nalchik.su
-navoi.su
-north-kazakhstan.su
-nov.su
-obninsk.su
-penza.su
-pokrovsk.su
-sochi.su
-spb.su
-tashkent.su
-termez.su
-togliatti.su
-troitsk.su
-tselinograd.su
-tula.su
-tuva.su
-vladikavkaz.su
-vladimir.su
-vologda.su
-
-// Fastly Inc. : http://www.fastly.com/
-// Submitted by Fastly Security <security@fastly.com>
-map.fastly.net
-a.prod.fastly.net
-global.prod.fastly.net
-a.ssl.fastly.net
-b.ssl.fastly.net
-global.ssl.fastly.net
-fastlylb.net
-map.fastlylb.net
-
-// Featherhead : https://featherhead.xyz/
-// Submitted by Simon Menke <simon@featherhead.xyz>
-fhapp.xyz
-
-// Firebase, Inc.
-// Submitted by Chris Raynor <chris@firebase.com>
-firebaseapp.com
-
-// Flynn : https://flynn.io
-// Submitted by Jonathan Rudenberg <jonathan@flynn.io>
-flynnhub.com
-
-// Freebox : http://www.freebox.fr
-// Submitted by Romain Fliedel <rfliedel@freebox.fr>
-freebox-os.com
-freeboxos.com
-fbx-os.fr
-fbxos.fr
-freebox-os.fr
-freeboxos.fr
-
-// Fusion Intranet : https://www.fusion-intranet.com
-// Submitted by Matthias Burtscher <matthias.burtscher@fusonic.net>
-myfusion.cloud
-
-// Futureweb OG : http://www.futureweb.at
-// Submitted by Andreas Schnederle-Wagner <schnederle@futureweb.at>
-futurehosting.at
-futuremailing.at
-*.ex.ortsinfo.at
-*.kunden.ortsinfo.at
-*.statics.cloud
-
-// GDS : https://www.gov.uk/service-manual/operations/operating-servicegovuk-subdomains
-// Submitted by David Illsley <david.illsley@digital.cabinet-office.gov.uk>
-service.gov.uk
-
-// GitHub, Inc.
-// Submitted by Patrick Toomey <security@github.com>
-github.io
-githubusercontent.com
-githubcloud.com
-*.api.githubcloud.com
-*.ext.githubcloud.com
-gist.githubcloud.com
-*.githubcloudusercontent.com
-
-// GitLab, Inc.
-// Submitted by Alex Hanselka <alex@gitlab.com>
-gitlab.io
-
-// UKHomeOffice : https://www.gov.uk/government/organisations/home-office
-// Submitted by Jon Shanks <jon.shanks@digital.homeoffice.gov.uk>
-homeoffice.gov.uk
-
-// GlobeHosting, Inc.
-// Submitted by Zoltan Egresi <egresi@globehosting.com>
-ro.im
-shop.ro
-
-// GoIP DNS Services : http://www.goip.de
-// Submitted by Christian Poulter <milchstrasse@goip.de>
-goip.de
-
-// Google, Inc.
-// Submitted by Eduardo Vela <evn@google.com>
-*.0emm.com
-appspot.com
-blogspot.ae
-blogspot.al
-blogspot.am
-blogspot.ba
-blogspot.be
-blogspot.bg
-blogspot.bj
-blogspot.ca
-blogspot.cf
-blogspot.ch
-blogspot.cl
-blogspot.co.at
-blogspot.co.id
-blogspot.co.il
-blogspot.co.ke
-blogspot.co.nz
-blogspot.co.uk
-blogspot.co.za
-blogspot.com
-blogspot.com.ar
-blogspot.com.au
-blogspot.com.br
-blogspot.com.by
-blogspot.com.co
-blogspot.com.cy
-blogspot.com.ee
-blogspot.com.eg
-blogspot.com.es
-blogspot.com.mt
-blogspot.com.ng
-blogspot.com.tr
-blogspot.com.uy
-blogspot.cv
-blogspot.cz
-blogspot.de
-blogspot.dk
-blogspot.fi
-blogspot.fr
-blogspot.gr
-blogspot.hk
-blogspot.hr
-blogspot.hu
-blogspot.ie
-blogspot.in
-blogspot.is
-blogspot.it
-blogspot.jp
-blogspot.kr
-blogspot.li
-blogspot.lt
-blogspot.lu
-blogspot.md
-blogspot.mk
-blogspot.mr
-blogspot.mx
-blogspot.my
-blogspot.nl
-blogspot.no
-blogspot.pe
-blogspot.pt
-blogspot.qa
-blogspot.re
-blogspot.ro
-blogspot.rs
-blogspot.ru
-blogspot.se
-blogspot.sg
-blogspot.si
-blogspot.sk
-blogspot.sn
-blogspot.td
-blogspot.tw
-blogspot.ug
-blogspot.vn
-cloudfunctions.net
-codespot.com
-googleapis.com
-googlecode.com
-pagespeedmobilizer.com
-publishproxy.com
-withgoogle.com
-withyoutube.com
-
-// Hashbang : https://hashbang.sh
-hashbang.sh
-
-// Hasura : https://hasura.io
-// Submitted by Shahidh K Muhammed <shahidh@hasura.io>
-hasura-app.io
-
-// Hepforge : https://www.hepforge.org
-// Submitted by David Grellscheid <admin@hepforge.org>
-hepforge.org
-
-// Heroku : https://www.heroku.com/
-// Submitted by Tom Maher <tmaher@heroku.com>
-herokuapp.com
-herokussl.com
-
-// iki.fi
-// Submitted by Hannu Aronsson <haa@iki.fi>
-iki.fi
-
-// info.at : http://www.info.at/
-biz.at
-info.at
-
-// Interlegis : http://www.interlegis.leg.br
-// Submitted by Gabriel Ferreira <registrobr@interlegis.leg.br>
-ac.leg.br
-al.leg.br
-am.leg.br
-ap.leg.br
-ba.leg.br
-ce.leg.br
-df.leg.br
-es.leg.br
-go.leg.br
-ma.leg.br
-mg.leg.br
-ms.leg.br
-mt.leg.br
-pa.leg.br
-pb.leg.br
-pe.leg.br
-pi.leg.br
-pr.leg.br
-rj.leg.br
-rn.leg.br
-ro.leg.br
-rr.leg.br
-rs.leg.br
-sc.leg.br
-se.leg.br
-sp.leg.br
-to.leg.br
-
-// Joyent : https://www.joyent.com/
-// Submitted by Brian Bennett <brian.bennett@joyent.com>
-*.triton.zone
-*.cns.joyent.com
-
-// JS.ORG : http://dns.js.org
-// Submitted by Stefan Keim <admin@js.org>
-js.org
-
-// Keyweb AG : https://www.keyweb.de
-// Submitted by Martin Dannehl <postmaster@keymachine.de>
-keymachine.de
-
-// KnightPoint Systems, LLC : http://www.knightpoint.com/
-// Submitted by Roy Keene <rkeene@knightpoint.com>
-knightpoint.systems
-
-// .KRD : http://nic.krd/data/krd/Registration%20Policy.pdf
-co.krd
-edu.krd
-
-// Magento Commerce
-// Submitted by Damien Tournoud <dtournoud@magento.cloud>
-*.magentosite.cloud
-
-// Meteor Development Group : https://www.meteor.com/hosting
-// Submitted by Pierre Carrier <pierre@meteor.com>
-meteorapp.com
-eu.meteorapp.com
-
-// Michau Enterprises Limited : http://www.co.pl/
-co.pl
-
-// Microsoft : http://microsoft.com
-// Submitted by Barry Dorrans <bdorrans@microsoft.com>
-azurewebsites.net
-azure-mobile.net
-cloudapp.net
-
-// Mozilla Foundation : https://mozilla.org/
-// Submitted by glob <glob@mozilla.com>
-bmoattachments.org
-
-// Neustar Inc.
-// Submitted by Trung Tran <Trung.Tran@neustar.biz>
-4u.com
-
-// ngrok : https://ngrok.com/
-// Submitted by Alan Shreve <alan@ngrok.com>
-ngrok.io
-
-// NFSN, Inc. : https://www.NearlyFreeSpeech.NET/
-// Submitted by Jeff Wheelhouse <support@nearlyfreespeech.net>
-nfshost.com
-
-// nsupdate.info : https://www.nsupdate.info/
-// Submitted by Thomas Waldmann <info@nsupdate.info>
-nsupdate.info
-nerdpol.ovh
-
-// No-IP.com : https://noip.com/
-// Submitted by Deven Reza <publicsuffixlist@noip.com>
-blogsyte.com
-brasilia.me
-cable-modem.org
-ciscofreak.com
-collegefan.org
-couchpotatofries.org
-damnserver.com
-ddns.me
-ditchyourip.com
-dnsfor.me
-dnsiskinky.com
-dvrcam.info
-dynns.com
-eating-organic.net
-fantasyleague.cc
-geekgalaxy.com
-golffan.us
-health-carereform.com
-homesecuritymac.com
-homesecuritypc.com
-hopto.me
-ilovecollege.info
-loginto.me
-mlbfan.org
-mmafan.biz
-myactivedirectory.com
-mydissent.net
-myeffect.net
-mymediapc.net
-mypsx.net
-mysecuritycamera.com
-mysecuritycamera.net
-mysecuritycamera.org
-net-freaks.com
-nflfan.org
-nhlfan.net
-no-ip.ca
-no-ip.co.uk
-no-ip.net
-noip.us
-onthewifi.com
-pgafan.net
-point2this.com
-pointto.us
-privatizehealthinsurance.net
-quicksytes.com
-read-books.org
-securitytactics.com
-serveexchange.com
-servehumour.com
-servep2p.com
-servesarcasm.com
-stufftoread.com
-ufcfan.org
-unusualperson.com
-workisboring.com
-3utilities.com
-bounceme.net
-ddns.net
-ddnsking.com
-gotdns.ch
-hopto.org
-myftp.biz
-myftp.org
-myvnc.com
-no-ip.biz
-no-ip.info
-no-ip.org
-noip.me
-redirectme.net
-servebeer.com
-serveblog.net
-servecounterstrike.com
-serveftp.com
-servegame.com
-servehalflife.com
-servehttp.com
-serveirc.com
-serveminecraft.net
-servemp3.com
-servepics.com
-servequake.com
-sytes.net
-webhop.me
-zapto.org
-
-// NYC.mn : http://www.information.nyc.mn
-// Submitted by Matthew Brown <mattbrown@nyc.mn>
-nyc.mn
-
-// One Fold Media : http://www.onefoldmedia.com/
-// Submitted by Eddie Jones <eddie@onefoldmedia.com>
-nid.io
-
-// OpenCraft GmbH : http://opencraft.com/
-// Submitted by Sven Marnach <sven@opencraft.com>
-opencraft.hosting
-
-// Opera Software, A.S.A.
-// Submitted by Yngve Pettersen <yngve@opera.com>
-operaunite.com
-
-// OutSystems
-// Submitted by Duarte Santos <domain-admin@outsystemscloud.com>
-outsystemscloud.com
-
-// OwnProvider : http://www.ownprovider.com
-// Submitted by Jan Moennich <jan.moennich@ownprovider.com>
-ownprovider.com
-
-// oy.lc
-// Submitted by Charly Coste <changaco@changaco.oy.lc>
-oy.lc
-
-// Pagefog : https://pagefog.com/
-// Submitted by Derek Myers <derek@pagefog.com>
-pgfog.com
-
-// Pagefront : https://www.pagefronthq.com/
-// Submitted by Jason Kriss <jason@pagefronthq.com>
-pagefrontapp.com
-
-// .pl domains (grandfathered)
-art.pl
-gliwice.pl
-krakow.pl
-poznan.pl
-wroc.pl
-zakopane.pl
-
-// Pantheon Systems, Inc. : https://pantheon.io/
-// Submitted by Gary Dylina <gary@pantheon.io>
-pantheonsite.io
-gotpantheon.com
-
-// Peplink | Pepwave : http://peplink.com/
-// Submitted by Steve Leung <steveleung@peplink.com>
-mypep.link
-
-// Planet-Work : https://www.planet-work.com/
-// Submitted by Frédéric VANNIÈRE <f.vanniere@planet-work.com>
-on-web.fr
-
-// prgmr.com : https://prgmr.com/
-// Submitted by Sarah Newman <owner@prgmr.com>
-xen.prgmr.com
-
-// priv.at : http://www.nic.priv.at/
-// Submitted by registry <lendl@nic.at>
-priv.at
-
-// Protonet GmbH : http://protonet.io
-// Submitted by Martin Meier <admin@protonet.io>
-protonet.io
-
-// Publication Presse Communication SARL : https://ppcom.fr
-// Submitted by Yaacov Akiba Slama <admin@chirurgiens-dentistes-en-france.fr>
-chirurgiens-dentistes-en-france.fr
-
-// QA2
-// Submitted by Daniel Dent (https://www.danieldent.com/)
-qa2.com
-
-// QNAP System Inc : https://www.qnap.com
-// Submitted by Nick Chang <nickchang@qnap.com>
-dev-myqnapcloud.com
-alpha-myqnapcloud.com
-myqnapcloud.com
-
-// Rackmaze LLC : https://www.rackmaze.com
-// Submitted by Kirill Pertsev <kika@rackmaze.com>
-rackmaze.com
-rackmaze.net
-
-// Red Hat, Inc. OpenShift : https://openshift.redhat.com/
-// Submitted by Tim Kramer <tkramer@rhcloud.com>
-rhcloud.com
-
-// RethinkDB : https://www.rethinkdb.com/
-// Submitted by Chris Kastorff <info@rethinkdb.com>
-hzc.io
-
-// Revitalised Limited : http://www.revitalised.co.uk
-// Submitted by Jack Price <jack@revitalised.co.uk>
-wellbeingzone.eu
-ptplus.fit
-wellbeingzone.co.uk
-
-// Sandstorm Development Group, Inc. : https://sandcats.io/
-// Submitted by Asheesh Laroia <asheesh@sandstorm.io>
-sandcats.io
-
-// SBE network solutions GmbH : https://www.sbe.de/
-// Submitted by Norman Meilick <nm@sbe.de>
-logoip.de
-logoip.com
-
-// Securepoint GmbH : https://www.securepoint.de
-// Submitted by Erik Anders <erik.anders@securepoint.de>
-firewall-gateway.com
-firewall-gateway.de
-my-gateway.de
-my-router.de
-spdns.de
-spdns.eu
-firewall-gateway.net
-my-firewall.org
-myfirewall.org
-spdns.org
-
-// Service Online LLC : http://drs.ua/
-// Submitted by Serhii Bulakh <support@drs.ua>
-biz.ua
-co.ua
-pp.ua
-
-// ShiftEdit : https://shiftedit.net/
-// Submitted by Adam Jimenez <adam@shiftcreate.com>
-shiftedit.io
-
-// Shopblocks : http://www.shopblocks.com/
-// Submitted by Alex Bowers <alex@shopblocks.com>
-myshopblocks.com
-
-// SinaAppEngine : http://sae.sina.com.cn/
-// Submitted by SinaAppEngine <saesupport@sinacloud.com>
-1kapp.com
-appchizi.com
-applinzi.com
-sinaapp.com
-vipsinaapp.com
-
-// Skyhat : http://www.skyhat.io
-// Submitted by Shante Adam <shante@skyhat.io>
-bounty-full.com
-alpha.bounty-full.com
-beta.bounty-full.com
-
-// staticland : https://static.land
-// Submitted by Seth Vincent <sethvincent@gmail.com>
-static.land
-dev.static.land
-sites.static.land
-
-// SourceLair PC : https://www.sourcelair.com
-// Submitted by Antonis Kalipetis <akalipetis@sourcelair.com>
-apps.lair.io
-*.stolos.io
-
-// SpaceKit : https://www.spacekit.io/
-// Submitted by Reza Akhavan <spacekit.io@gmail.com>
-spacekit.io
-
-// Stackspace : https://www.stackspace.io/
-// Submitted by Lina He <info@stackspace.io>
-stackspace.space
-
-// Synology, Inc. : https://www.synology.com/
-// Submitted by Rony Weng <ronyweng@synology.com>
-diskstation.me
-dscloud.biz
-dscloud.me
-dscloud.mobi
-dsmynas.com
-dsmynas.net
-dsmynas.org
-familyds.com
-familyds.net
-familyds.org
-i234.me
-myds.me
-synology.me
-
-// TAIFUN Software AG : http://taifun-software.de
-// Submitted by Bjoern Henke <dev-server@taifun-software.de>
-taifun-dns.de
-
-// TASK geographical domains (www.task.gda.pl/uslugi/dns)
-gda.pl
-gdansk.pl
-gdynia.pl
-med.pl
-sopot.pl
-
-// TownNews.com : http://www.townnews.com
-// Submitted by Dustin Ward <dward@townnews.com>
-bloxcms.com
-townnews-staging.com
-
-// TransIP : htts://www.transip.nl
-// Submitted by Rory Breuk <rbreuk@transip.nl>
-*.transurl.be
-*.transurl.eu
-*.transurl.nl
-
-// TuxFamily : http://tuxfamily.org
-// Submitted by TuxFamily administrators <adm@staff.tuxfamily.org>
-tuxfamily.org
-
-// TwoDNS : https://www.twodns.de/
-// Submitted by TwoDNS-Support <support@two-dns.de>
-dd-dns.de
-diskstation.eu
-diskstation.org
-dray-dns.de
-draydns.de
-dyn-vpn.de
-dynvpn.de
-mein-vigor.de
-my-vigor.de
-my-wan.de
-syno-ds.de
-synology-diskstation.de
-synology-ds.de
-
-// UDR Limited : http://www.udr.hk.com
-// Submitted by registry <hostmaster@udr.hk.com>
-hk.com
-hk.org
-ltd.hk
-inc.hk
-
-// .US
-// Submitted by Ed Moore <Ed.Moore@lib.de.us>
-lib.de.us
-
-// Viprinet Europe GmbH : http://www.viprinet.com
-// Submitted by Simon Kissel <hostmaster@viprinet.com>
-router.management
-
-// Western Digital Technologies, Inc : https://www.wdc.com
-// Submitted by Jung Jin <jungseok.jin@wdc.com>
-remotewd.com
-
-// Wikimedia Labs : https://wikitech.wikimedia.org
-// Submitted by Yuvi Panda <yuvipanda@wikimedia.org>
-wmflabs.org
-
-// Yola : https://www.yola.com/
-// Submitted by Stefano Rivera <stefano@yola.com>
-yolasite.com
-
-// Yombo : https://yombo.net
-// Submitted by Mitch Schwenk <mitch@yombo.net>
-ybo.faith
-yombo.me
-homelink.one
-ybo.party
-ybo.review
-ybo.science
-ybo.trade
-
-// ZaNiC : http://www.za.net/
-// Submitted by registry <hostmaster@nic.za.net>
-za.net
-za.org
-
-// Zeit, Inc. : https://zeit.domains/
-// Submitted by Olli Vanhoja <olli@zeit.co>
-now.sh
-
-// 1GB LLC : https://www.1gb.ua/
-// Submitted by 1GB LLC <noc@1gb.com.ua>
-cc.ua
-inf.ua
-ltd.ua
-
-// ===END PRIVATE DOMAINS===
#
# 44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
#
-#.cloudflare.com-v1 !!! Please install additional package "ddns-scripts_cloudflare"
#.cloudflare.com-v4 !!! Please install additional package "ddns-scripts_cloudflare.com-v4"
+#.FreeDNS.42.pl !!! Please install additional package "ddns-scripts_freedns_42_pl"
#.godaddy.com-v1 !!! Please install additional package "ddns-scripts_godaddy.com-v1"
#.no-ip.com / noip.com !!! Please install additional package "ddns-scripts_no-ip_com"
#.route53-v1 !!! Please install additional package "ddns-scripts_route53-v1"
"dynv6.com" "http://dynv6.com/api/update?hostname=[DOMAIN]&token=[PASSWORD]&ipv4=[IP]" "updated|unchanged"
-"easydns.com" "http://[USERNAME]:[PASSWORD]@api.cp.easydns.com/dyn/generic.php?hostname=[DOMAIN]&myip=[IP]" "NOERROR"
+"easydns.com" "http://[USERNAME]:[PASSWORD]@api.cp.easydns.com/dyn/generic.php?hostname=[DOMAIN]&myip=[IP]" "OK|NOERROR"
"editdns.net" "http://dyndns-free.editdns.net/api/dynLinux.php?p=[PASSWORD]&r=[DOMAIN]"
-"goip.de" "http://www.goip.de/setip?username=[USERNAME]&password=[PASSWORD]&subdomain=[DOMAIN]&ip4=[IP]"
+"goip.de" "http://www.goip.de/setip?username=[USERNAME]&password=[PASSWORD]&subdomain=[DOMAIN]&ip=[IP]"
"google.com" "http://[USERNAME]:[PASSWORD]@domains.google.com/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg"
"no-ip.pl" "http://[USERNAME]:[PASSWORD]@update.no-ip.pl/?hostname=[DOMAIN]"
-"now-dns.com" "http://[USERNAME]:[PASSWORD]@now-dns.com/update?hostname=[DOMAIN]"
+"now-dns.com" "https://[USERNAME]:[PASSWORD]@now-dns.com/update?hostname=[DOMAIN]" "good|nochg"
"nsupdate.info" "http://[USERNAME]:[PASSWORD]@ipv4.nsupdate.info/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg"
#
# 66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
#
-#.cloudflare.com-v1 !!! Please install additional package "ddns-scripts_cloudflare"
#.cloudflare.com-v4 !!! Please install additional package "ddns-scripts_cloudflare.com-v4"
#.godaddy.com-v1 !!! Please install additional package "ddns-scripts_godaddy.com-v1"
#.no-ip.com / noip.com !!! Please install additional package "ddns-scripts_no-ip_com"
"no-ip.pl" "http://[USERNAME]:[PASSWORD]@update.no-ip.pl/?hostname=[DOMAIN]"
-"now-dns.com" "http://[USERNAME]:[PASSWORD]@now-dns.com/update?hostname=[DOMAIN]"
+"now-dns.com" "https://[USERNAME]:[PASSWORD]@now-dns.com/update?hostname=[DOMAIN]" "good|nochg"
"nsupdate.info" "http://[USERNAME]:[PASSWORD]@ipv6.nsupdate.info/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg"
+++ /dev/null
-#
-#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
-#
-# script for sending updates to cloudflare.com
-#.2014-2017 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-# many thanks to Paul for testing and feedback during development
-#
-# This script is parsed by dynamic_dns_functions.sh inside send_update() function
-#
-# using following options from /etc/config/ddns
-# option username - your cloudflare e-mail
-# option password - cloudflare api key, you can get it from cloudflare.com/my-account/
-# option domain - your full hostname to update, in cloudflare its subdomain.domain
-# i.e. myhost.example.com where myhost is the subdomain and example.com is your domain
-#
-# variable __IP already defined with the ip-address to use for update
-#
-[ $use_https -eq 0 ] && write_log 14 "Cloudflare only support updates via Secure HTTP (HTTPS). Please correct configuration!"
-[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'"
-[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'"
-
-local __RECID __URL __KEY __KEYS __FOUND __SUBDOM __DOMAIN __FQDN
-
-# split __SUBDOM __DOMAIN from $domain
-# given data:
-# @example.com for "domain record"
-# host.sub@example.com for a "host record"
-__SUBDOM=$(printf %s "$domain" | cut -d@ -f1)
-__DOMAIN=$(printf %s "$domain" | cut -d@ -f2)
-
-# Cloudflare v1 needs:
-# __DOMAIN = the base domain i.e. example.com
-# __SUBDOM = the host.sub to change if a "host record" or blank if domain record
-# __FQDN = the FQDN to detect record_id to change
-# i.e. example.com for the "domain record" or host.sub.example.com for "host record"
-if [ -z "$__SUBDOM" -o "$__SUBDOM" = "$__DOMAIN" ]; then
- __SUBDOM=""
- __FQDN="$__DOMAIN"
-else
- __FQDN="${__SUBDOM}.${__DOMAIN}"
-fi
-
-# parse OpenWrt script with
-# functions for parsing and generating json
-. /usr/share/libubox/jshn.sh
-
-# function copied from /usr/share/libubox/jshn.sh
-# from BB14.09 for backward compatibility to AA12.09
-type "json_get_keys" >/dev/null 2>&1 || json_get_keys() {
- local __dest="$1"
- local _tbl_cur
-
- if [ -n "$2" ]; then
- json_get_var _tbl_cur "$2"
- else
- _json_get_var _tbl_cur JSON_CUR
- fi
- local __var="${JSON_PREFIX}KEYS_${_tbl_cur}"
- eval "export -- \"$__dest=\${$__var}\"; [ -n \"\${$__var+x}\" ]"
-}
-
-# function to "sed" unwanted string parts from DATFILE
-cleanup() {
- # based on the sample output on cloudflare.com homepage we need to do some cleanup
- sed -i 's/^[ \t]*//;s/[ \t]*$//' $DATFILE # remove invisible chars at beginning and end of lines
- sed -i '/^-$/d' $DATFILE # remove lines with "-" (dash)
- sed -i '/^$/d' $DATFILE # remove empty lines
- sed -i "#'##g" $DATFILE # remove "'" (single quote)
-}
-
-[ -n "$rec_id" ] && __RECID="$rec_id" || {
- # build url according to cloudflare client api at https://www.cloudflare.com/docs/client-api.html
- # to "rec_load_all" to detect rec_id needed for update
- __URL="https://www.cloudflare.com/api_json.html" # https://www.cloudflare.com/api_json.html
- __URL="${__URL}?a=rec_load_all" # -d 'a=rec_load_all'
- __URL="${__URL}&tkn=$password" # -d 'tkn=8afbe6dea02407989af4dd4c97bb6e25'
- __URL="${__URL}&email=$username" # -d 'email=sample@example.com'
- __URL="${__URL}&z=$__DOMAIN" # -d 'z=example.com'
-
- # lets request the data
- do_transfer "$__URL" || return 1
-
- cleanup # cleanup dat file
- json_load "$(cat $DATFILE)" # lets extract data
- __FOUND=0 # found record indicator
- json_get_var __RES "result" # cloudflare result of last request
- json_get_var __MSG "msg" # cloudflare error message
- [ "$__RES" != "success" ] && {
- write_log 4 "'rec_load_all' failed with error: \n$__MSG"
- return 1
- }
-
- json_select "response"
- json_select "recs"
- json_select "objs"
- json_get_keys __KEYS
- for __KEY in $__KEYS; do
- local __ZONE __DISPLAY __NAME __TYPE
- json_select "$__KEY"
- # json_get_var __ZONE "zone_name" # for debugging
- # json_get_var __DISPLAY "display_name" # for debugging
- json_get_var __NAME "name"
- json_get_var __TYPE "type"
- if [ "$__NAME" = "$__FQDN" ]; then
- # we must verify IPv4 and IPv6 because there might be both for the same host
- [ \( $use_ipv6 -eq 0 -a "$__TYPE" = "A" \) -o \( $use_ipv6 -eq 1 -a "$__TYPE" = "AAAA" \) ] && {
- __FOUND=1 # mark found
- break # found leave for loop
- }
- fi
- json_select ..
- done
- [ $__FOUND -eq 0 ] && {
- # we don't need to continue trying to update cloudflare because record to update does not exist
- # user has to setup record first outside ddns-scripts
- write_log 14 "No valid record found at Cloudflare setup. Please create first!"
- }
- json_get_var __RECID "rec_id" # last thing to do get rec_id
- json_cleanup # cleanup
- write_log 7 "rec_id '$__RECID' detected for host/domain '$__FQDN'"
-}
-
-# build url according to cloudflare client api at https://www.cloudflare.com/docs/client-api.html
-# for "rec_edit" to update IP address
-__URL="https://www.cloudflare.com/api_json.html" # https://www.cloudflare.com/api_json.html
-__URL="${__URL}?a=rec_edit" # -d 'a=rec_edit'
-__URL="${__URL}&tkn=$password" # -d 'tkn=8afbe6dea02407989af4dd4c97bb6e25'
-__URL="${__URL}&id=$__RECID" # -d 'id=9001'
-__URL="${__URL}&email=$username" # -d 'email=sample@example.com'
-__URL="${__URL}&z=$__DOMAIN" # -d 'z=example.com'
-
-[ $use_ipv6 -eq 0 ] && __URL="${__URL}&type=A" # -d 'type=A' (IPv4)
-[ $use_ipv6 -eq 1 ] && __URL="${__URL}&type=AAAA" # -d 'type=AAAA' (IPv6)
-
-# handle subdomain or domain record
-[ -n "$__SUBDOM" ] && __URL="${__URL}&name=$__SUBDOM" # -d 'name=sub' (HOST/SUBDOMAIN)
-[ -z "$__SUBDOM" ] && __URL="${__URL}&name=$__DOMAIN" # -d 'name=example.com'(DOMAIN)
-
-__URL="${__URL}&content=$__IP" # -d 'content=1.2.3.4'
-__URL="${__URL}&service_mode=0" # -d 'service_mode=0'
-__URL="${__URL}&ttl=1" # -d 'ttl=1'
-
-# lets do the update
-do_transfer "$__URL" || return 1
-
-cleanup # cleanup tmp file
-json_load "$(cat $DATFILE)" # lets extract data
-json_get_var __RES "result" # cloudflare result of last request
-json_get_var __MSG "msg" # cloudflare error message
-[ "$__RES" != "success" ] && {
- write_log 4 "'rec_edit' failed with error:\n$__MSG"
- return 1
-}
-write_log 7 "Update of rec_id '$__RECID' successful"
-return 0
# option username - your cloudflare e-mail
# option password - cloudflare api key, you can get it from cloudflare.com/my-account/
# option domain - "hostname@yourdomain.TLD" # syntax changed to remove split_FQDN() function and tld_names.dat.gz
-# option param_opt - Whether the record is receiving the performance and security benefits of Cloudflare (not empty => false)
+#
+# The proxy status would not be changed by this script. Please change it in Cloudflare dashboard manually.
#
# variable __IP already defined with the ip-address to use for update
#
# check parameters
-[ -z "$CURL_SSL" ] && write_log 14 "Cloudflare communication require cURL with SSL support. Please install"
+[ -z "$CURL" ] && [ -z "$CURL_SSL" ] && write_log 14 "Cloudflare communication require cURL with SSL support. Please install"
[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing key as 'username'"
[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing secret as 'password'"
[ $use_https -eq 0 ] && use_https=1 # force HTTPS
# update is needed
# let's build data to send
-# set proxied parameter (default "true")
-[ -z "$param_opt" ] && __PROXIED="true" || {
- __PROXIED="false"
- write_log 7 "Cloudflare 'proxied' disabled"
-}
+# set proxied parameter
+__PROXIED=$(grep -o '"proxied":[^",]*' $DATFILE | grep -o '[^:]*$')
# use file to work around " needed for json
cat > $DATFILE << EOF
--- /dev/null
+#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
+#.2018 Michal Lipka <michal at sysadmin dot care>
+local __DUMMY
+local __URL="https://freedns.42.pl/xmlrpc.php"
+[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing 'username'"
+[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing 'password'"
+[ $ip_dynamic -eq 1 ] && __IP='\<dynamic\>'
+PROG="$(which curl) -sk"
+write_log 7 "sending update to freedns.42.pl with ip $__IP"
+XMLDATA="<?xml version='1.0'?><methodCall><methodName>xname.updateArecord</methodName><params><param><value><struct><member><name>name</name><value><string>[RECORDNAME]</string></value></member><member><name>zone</name><value><string>[ZONENAME]</string></value></member><member><name>oldaddress</name><value><string>*</string></value></member><member><name>updatereverse</name><value><string>0</string></value></member><member><name>user</name><value><string>[USERNAME]</string></value></member><member><name>ttl</name><value><string>600</string></value></member><member><name>newaddress</name><value><string>[IP]</string></value></member><member><name>password</name><value><string>[PASSWORD]</string></value></member></struct></value></param></params></methodCall>"
+XMLDATA=$(echo $XMLDATA | sed -e "s#\[USERNAME\]#$URL_USER#g" -e "s#\[PASSWORD\]#$URL_PASS#g" \
+-e "s#\[ZONENAME\]#$zone#g" -e "s#\[RECORDNAME\]#$record#g" -e "s#\[IP\]#$__IP#g")
+$PROG -d "$XMLDATA" -o $DATFILE $__URL || return 1
+write_log 7 "'freedns.42.pl' answered:${N}$(cat $DATFILE)"
+grep "<fault>" $DATFILE > /dev/null 2>&1 && return 1
+grep '<name>serial</name>' $DATFILE >/dev/null 2>&1
+return $?
#
# check parameters
-[ -z "$CURL_SSL" ] && write_log 14 "GoDaddy communication require cURL with SSL support. Please install"
+[ -z "$CURL" ] && [ -z "$CURL_SSL" ] && write_log 14 "GoDaddy communication require cURL with SSL support. Please install"
[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing key as 'username'"
[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing secret as 'password'"
[ $use_https -eq 0 ] && use_https=1 # force HTTPS
do_transfer "$__URL" || return 1
-write_log 7 "'no-ip.com' answered:\n$(cat $DATFILE)"
+write_log 7 "'no-ip.com' answered:${N}$(cat $DATFILE)"
# analyse provider answers
# "good [IP_ADR]" = successful
# "nochg [IP_ADR]" = no change but OK
do_transfer "$__URL" || return 1
-write_log 7 "'no-ip.com' answered:\n$(cat $DATFILE)"
+write_log 7 "'no-ip.com' answered:${N}$(cat $DATFILE)"
# analyse provider answers
# "good [IP_ADR]" = successful
# "nochg [IP_ADR]" = no change but OK
$__PROG -d $__TCP $DATFILE >$ERRFILE 2>&1
# nsupdate always return success
-write_log 7 "(k)nsupdate reports:\n$(cat $ERRFILE)"
+write_log 7 "(k)nsupdate reports:${N}$(cat $ERRFILE)"
-return 0
\ No newline at end of file
+return 0
#!/bin/sh
-#.Distributed under the terms of the GNU General Public License (GPL) version 2.0
-#.based on Yuval Adam's route53.sh found at https://github.com/yuvadm/route53-ddns/blob/master/route53.sh
-#.2017 Max Berger <max at berger dot name>
-[ -z "$CURL_SSL" ] && write_log 14 "Amazon AWS Route53 communication require cURL with SSL support. Please install"
-[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing key as 'username'"
-[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing secret as 'password'"
-[ -z "$domain" ] && write_log 14 "Service section not configured correctly! Missing zone id as 'domain'"
+# Distributed under the terms of the GNU General Public License (GPL) version 2.0
+# based on Yuval Adam's route53.sh found at https://github.com/yuvadm/route53-ddns/blob/master/route53.sh
+# 2017 Max Berger <max at berger dot name>
-set -euo pipefail
-IFS=$'\n\t'
+[ -z "${CURL_SSL}" ] && write_log 14 "Amazon AWS Route53 communication require cURL with SSL support. Please install"
+[ -z "{$username}" ] && write_log 14 "Service section not configured correctly! Missing key as 'username'"
+[ -z "${password}" ] && write_log 14 "Service section not configured correctly! Missing secret as 'password'"
+[ -z "${domain}" ] && write_log 14 "Service section not configured correctly! Missing zone id as 'domain'"
ENDPOINT="route53.amazonaws.com"
RECORD_TTL=300
-RECORD_NAME="$lookup_host".
-[ $use_ipv6 -eq 0 ] && RECORD_TYPE="A"
-[ $use_ipv6 -eq 1 ] && RECORD_TYPE="AAAA"
-RECORD_VALUE="$LOCAL_IP"
-HOSTED_ZONE_ID="$domain"
+RECORD_NAME="${lookup_host}."
+[ ${use_ipv6} -eq 0 ] && RECORD_TYPE="A"
+[ ${use_ipv6} -eq 1 ] && RECORD_TYPE="AAAA"
+RECORD_VALUE="${LOCAL_IP}"
+HOSTED_ZONE_ID="${domain}"
API_PATH="/2013-04-01/hostedzone/${HOSTED_ZONE_ID}/rrset/"
-AWS_ACCESS_KEY_ID="$username"
-AWS_SECRET_ACCESS_KEY="$password"
+AWS_ACCESS_KEY_ID="${username}"
+AWS_SECRET_ACCESS_KEY="${password}"
AWS_REGION='us-east-1'
AWS_SERVICE='route53'
hash() {
- msg=$1
- echo -en "$msg" | openssl dgst -sha256 | sed 's/^.* //'
+ msg="$1"
+ echo -en "${msg}" | openssl dgst -sha256 | sed 's/^.* //'
}
sign_plain() {
# Sign message using a plaintext key
- key=$1
- msg=$2
- echo -en "$msg" | openssl dgst -hex -sha256 -hmac "$key" | sed 's/^.* //'
+ key="$1"
+ msg="$2"
+ echo -en "${msg}" | openssl dgst -hex -sha256 -hmac "${key}" | sed 's/^.* //'
}
sign() {
# Sign message using a hex formatted key
- key=$1
- msg=$2
- echo -en "$msg" | openssl dgst -hex -sha256 -mac HMAC -macopt "hexkey:${key}" | sed 's/^.* //'
+ key="$1"
+ msg="$2"
+ echo -en "${msg}" | openssl dgst -hex -sha256 -mac HMAC -macopt "hexkey:${key}" | sed 's/^.* //'
}
request_body="<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
</ChangeBatch> \
</ChangeResourceRecordSetsRequest>"
-fulldate=$(date --utc +%Y%m%dT%H%M%SZ)
-shortdate=$(date --utc +%Y%m%d)
+fulldate="$(date --utc +%Y%m%dT%H%M%SZ)"
+shortdate="$(date --utc +%Y%m%d)"
signed_headers="host;x-amz-date"
-request_hash=$(hash "$request_body")
+request_hash="$(hash "${request_body}")"
canonical_request="POST\n${API_PATH}\n\nhost:route53.amazonaws.com\nx-amz-date:${fulldate}\n\n${signed_headers}\n${request_hash}"
-date_key=$(sign_plain "AWS4${AWS_SECRET_ACCESS_KEY}" "${shortdate}")
-region_key=$(sign "$date_key" $AWS_REGION)
-service_key=$(sign "$region_key" $AWS_SERVICE)
-signing_key=$(sign "$service_key" aws4_request)
+date_key="$(sign_plain "AWS4${AWS_SECRET_ACCESS_KEY}" "${shortdate}")"
+region_key="$(sign "${date_key}" ${AWS_REGION})"
+service_key="$(sign "${region_key}" ${AWS_SERVICE})"
+signing_key="$(sign "${service_key}" aws4_request)"
credential="${shortdate}/${AWS_REGION}/${AWS_SERVICE}/aws4_request"
-sigmsg="AWS4-HMAC-SHA256\n${fulldate}\n${credential}\n$(hash "$canonical_request")"
+sigmsg="AWS4-HMAC-SHA256\n${fulldate}\n${credential}\n$(hash "${canonical_request}")"
-signature=$(sign "$signing_key" "$sigmsg")
+signature="$(sign "${signing_key}" "${sigmsg}")"
authorization="AWS4-HMAC-SHA256 Credential=${AWS_ACCESS_KEY_ID}/${credential}, SignedHeaders=${signed_headers}, Signature=${signature}"
-ANSWER=$(curl \
+ANSWER="$(curl \
-X "POST" \
-H "Host: route53.amazonaws.com" \
-H "X-Amz-Date: ${fulldate}" \
-H "Authorization: ${authorization}" \
-H "Content-Type: text/xml" \
-d "$request_body" \
- "https://${ENDPOINT}${API_PATH}")
+ "https://${ENDPOINT}${API_PATH}")"
write_log 7 "${ANSWER}"
-echo ${ANSWER} | grep Error >/dev/null && return 1
-echo ${ANSWER} | grep ChangeInfo >/dev/null && return 0
+echo "${ANSWER}" | grep -F "Error" >/dev/null && return 1
+echo "${ANSWER}" | grep -F "ChangeInfo" >/dev/null && return 0
return 2
+++ /dev/null
-#!/bin/sh
-
-URL="https://publicsuffix.org/list/public_suffix_list.dat"
-TMPFILE=$(dirname $0)/public_suffix_list.tmp
-DATFILE=$(dirname $0)/public_suffix_list.dat
-
-wget -O $TMPFILE $URL || exit 1
-
-# there might be backslashes (at line end they produce problems)
-sed -i 's/\\//g' $TMPFILE
-
-# clear DATFILE if exist
-printf %s "" > $DATFILE
-L=0; M=0
-export CHARSET=UTF-8 # needed for idn
-cat ${TMPFILE} | while read LINE; do
- L=$(( L + 1 ))
- printf "\\r\\t%s\\t%s" "in: $L " "out: $(( $L + $M )) "
- printf %s\\n "$LINE" | grep -E "^\/\/" >/dev/null 2>&1 && {
- # do not modify lines beginning with "//"
- printf %s\\n "$LINE" >> $DATFILE
- continue
- }
- printf %s\\n "$LINE" | grep -E "^$" >/dev/null 2>&1 && {
- # do not modify empty lines
- printf %s\\n "$LINE" >> $DATFILE
- continue
- }
- ASCII=$(idn -a "$LINE") # write ASCII and UTF-8
- if [ "$ASCII" != "$LINE" ]; then
- printf %s\\n "$ASCII" >> $DATFILE
- printf "\\t%s\\n" "add: $ASCII"
- M=$(( M + 1 ))
- fi
- printf %s\\n "$LINE" >> $DATFILE
-done
-rm -f $TMPFILE
-gzip -f9 $DATFILE
-
include $(TOPDIR)/rules.mk
PKG_NAME:=dhcpcd
-PKG_VERSION:=6.11.5
+PKG_VERSION:=7.0.5
PKG_RELEASE:=1
PKG_SOURCE_URL:=ftp://roy.marples.name/pub/dhcpcd \
http://roy.marples.name/downloads/dhcpcd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=6f9674dc7e27e936cc787175404a6171618675ecfb6903ab9887b1b66a87d69e
+PKG_HASH:=aa43fdb990be7c413fa92bdbcfb3775e4cdbff725cbcb68cd2a714ed4f58879d
PKG_LICENSE:=BSD-2c
PKG_LICENSE_FILES:=
include $(TOPDIR)/rules.mk
PKG_NAME:=dmapd
-PKG_VERSION:=0.0.73
+PKG_VERSION:=0.0.77
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.flyn.org/projects/dmapd
-PKG_HASH:=5447e8d28cd93739efe479e8ca3e140043b11aca4427676e8990b300618011a1
+PKG_SOURCE_URL:=https://www.flyn.org/projects/dmapd
+PKG_HASH:=2ffadffaba3bf680ade3ab851132a1b0d596f7a9dd9cdc7fc8bfbabacc7fab8d
PKG_FIXUP:=autoreconf
PKG_INSTALL:=2
define Package/dmapd
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libdmapsharing +libdb47 +vips
+ DEPENDS:=+libdmapsharing +libdb47 +vips +libgst1pbutils
TITLE:= dmapd
URL:=http://www.flyn.org/projects/dmapd/
USERID:=dmapd=56:dmapd=56
# Copyright (C) 2009-2012 OpenWrt.org
START=60
+USE_PROCD=1
+PROG=/usr/sbin/dmapd
-start() {
+start_service() {
[ -d /var/run/dmapd ] || {
mkdir -m 0755 -p /var/run/dmapd
chown dmapd:dmapd /var/run/dmapd
mkdir -m 0755 -p /var/media/music
mkdir -m 0755 -p /var/media/pictures
- service_start /usr/sbin/dmapd -u dmapd -g dmapd -m /var/media/music -p /var/media/pictures --vips-disc-threshold 64k
-}
-
-stop() {
- service_stop /usr/sbin/dmapd
+ procd_open_instance
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_set_param pidfile /var/run/dmapd.pid
+ procd_set_param user dmapd
+ procd_set_param command $PROG -f
+ procd_close_instance
}
+++ /dev/null
---- a/distro/dmapd.conf
-+++ b/distro/dmapd.conf
-@@ -3,7 +3,7 @@
- Database-Dir=/var/db/dmapd
-
- # Name that will be used to identify share:
--Share-Name=dmapd
-+Share-Name=OpenWrt
-
- # User that dmapd will run as, current user if undefined:
- User=dmapd
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -233,7 +233,13 @@ else
+ AM_CONDITIONAL(USE_LIBDB, false)
+ fi
+
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
++dnl Test if --enable-unit-test given
++AC_ARG_ENABLE(unit-test, [AC_HELP_STRING([--enable-unit-test],[enable unit test])])
++if test "x$enable_unit_test" = "xyes" ; then
++ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
++else
++ have_check=no
++fi
+ AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+
+ AM_CONDITIONAL(FLYN, test "$FLYN")
+++ /dev/null
---- a/configure.ac
-+++ b/configure.ac
-@@ -233,7 +233,13 @@ else
- AM_CONDITIONAL(USE_LIBDB, false)
- fi
-
--PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
-+dnl Test if --enable-unit-test given
-+AC_ARG_ENABLE(unit-test, [AC_HELP_STRING([--enable-unit-test],[enable unit test])])
-+if test "x$enable_unit_test" = "xyes" ; then
-+ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
-+else
-+ have_check=no
-+fi
- AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
-
- AM_CONDITIONAL(FLYN, test "$FLYN")
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
-PKG_SOURCE:=v$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME)/archive/
-PKG_HASH:=cae011aacf6b250fc021c861fe46e15310349c474bca4553c0f829620e53e3bf
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME)
+PKG_SOURCE_VERSION:=35be4a5b40aedc6a800c06389c220a8dbf35f1cc
+PKG_MIRROR_HASH:=2dab9ba63ee8a2c09ac84f5b69dc5a1e9beb3cf3deede55d405b8bc5dc711e97
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
#
-# Copyright (C) 2015-2016 Thomas Weißschuh
+# Copyright (C) 2015-2018 Thomas Weißschuh
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=esniper
-PKG_VERSION:=2.32.0
+PKG_VERSION:=2.35.0
PKG_RELEASE:=1
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(VERSION_TRANSFORMED)
PKG_SOURCE:=$(PKG_NAME)-$(VERSION_TRANSFORMED).tgz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=5ee3e5237c6a12059ae9d38380505d38448c2c12787f9fcc603cdb0a1a519312
+PKG_HASH:=a93d4533e31640554f2e430ac76b43e73a50ed6d721511066020712ac8923c12
PKG_BUILD_PARALLEL:=1
--- /dev/null
+#
+# Copyright (C) 2010-2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=foolsm
+PKG_VERSION:=1.0.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://lsm.foobar.fi/download
+PKG_HASH:=33210209ca38b3bfef1a9180f765266a134fc811dea8bc06450a3bd48d1d083e
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/foolsm
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+ssmtp
+ TITLE:=A link state monitor
+ URL:=http://lsm.foobar.fi/
+endef
+
+define Package/foolsm/description
+ foolsm is a link state monitor for carrying out actions when a link
+ transistions from the up to down state or vice versa.
+endef
+
+define Package/foolsm/conffiles
+/etc/foolsm/foolsm.conf
+endef
+
+define Package/foolsm/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/foolsm $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/foolsm/script.d
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_DATA) ./files/connections.conf $(1)/etc/foolsm/connections.conf
+ $(INSTALL_DATA) ./files/foolsm.conf $(1)/etc/foolsm/foolsm.conf
+ $(INSTALL_BIN) ./files/foolsm_script $(1)/etc/foolsm/script
+ $(INSTALL_BIN) ./files/foolsm.init $(1)/etc/init.d/foolsm
+endef
+
+define Package/foolsm/conffiles
+/etc/foolsm/connections.conf
+/etc/foolsm/foolsm.conf
+endef
+
+$(eval $(call BuildPackage,foolsm))
--- /dev/null
+connection {
+ name=Provider1
+ checkip=1.1.1.1
+ device=pppoe-wan
+ ttl=2
+}
+
+connection {
+ name=Provider2
+ checkip=2.2.2.2
+ device=eth0.2
+ ttl=1
+}
--- /dev/null
+#
+# (C) 2009 Mika Ilmaranta <ilmis at nullnet.fi>
+#
+# License: GPLv2
+#
+
+#
+# Debug level: 0 .. 8 are normal, 9 gives lots of stuff and 100 doesn't
+# bother to detach
+#
+#debug=10
+#debug=9
+debug=8
+# reopen_on_enodev=1
+
+#
+# Defaults for the connection entries
+#
+defaults {
+ name=defaults
+ checkip=127.0.0.1
+ eventscript=/etc/foolsm/script
+ notifyscript=
+ max_packet_loss=20
+ max_successive_pkts_lost=7
+ min_packet_loss=5
+ min_successive_pkts_rcvd=10
+ interval_ms=2000
+ timeout_ms=2000
+ warn_email=root
+ check_arp=0
+ sourceip=
+# if using ping probes for monitoring only then defaults should
+# not define a default device for packets to autodiscover their path
+# to destination
+# device=eth0
+# use system default ttl
+ ttl=0
+}
+
+include /etc/foolsm/connections.conf
+
+#EOF
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010-2011 OpenWrt.org
+
+START=45
+
+SERVICE_USE_PID=1
+SERVICE_PID_FILE=/var/run/foolsm.pid
+
+start() {
+ service_start /usr/sbin/foolsm -c /etc/foolsm/foolsm.conf -p $SERVICE_PID_FILE
+}
+
+stop() {
+ service_stop /usr/sbin/foolsm
+}
+
+reload() {
+ service_reload /usr/sbin/foolsm
+}
--- /dev/null
+#!/bin/sh
+#
+# (C) 2009 Mika Ilmaranta <ilmis@nullnet.fi>
+# (C) 2009 Tom Eastep <teastep@shorewall.net>
+#
+# License: GPLv2
+#
+
+DATE=$(/bin/date)
+
+STATE=${1}
+NAME=${2}
+CHECKIP=${3}
+DEVICE=${4}
+WARN_EMAIL=${5}
+REPLIED=${6}
+WAITING=${7}
+TIMEOUT=${8}
+REPLY_LATE=${9}
+CONS_RCVD=${10}
+CONS_WAIT=${11}
+CONS_MISS=${12}
+AVG_RTT=${13}
+
+cat <<EOM | ssmtp ${WARN_EMAIL}
+Subject: "LSM: ${NAME} ${STATE}, DEV ${DEVICE}"
+
+Hi,
+
+Your connection ${NAME} has changed it's state to ${STATE} at ${DATE}.
+
+Following parameters were passed:
+
+newstate = ${STATE}
+name = ${NAME}
+checkip = ${CHECKIP}
+device = ${DEVICE}
+warn_email = ${WARN_EMAIL}
+
+Packet counters:
+
+replied = ${REPLIED} packets replied
+waiting = ${WAITING} packets waiting for reply
+timeout = ${TIMEOUT} packets that have timed out (= packet loss)
+reply_late = ${REPLY_LATE} packets that received a reply after timeout
+cons_rcvd = ${CONS_RCVD} consecutively received replies in sequence
+cons_wait = ${CONS_WAIT} consecutive packets waiting for reply
+cons_miss = ${CONS_MISS} consecutive packets that have timed out
+avg_rtt = ${AVG_RTT} average rtt, notice that waiting and timed out packets have rtt = 0 when calculating this
+
+Your LSM Daemon
+
+EOM
+
+exit 0
+
+#EOF
--- /dev/null
+--- a/defs.h 2016-11-10 07:22:50.275506874 -0500
++++ b/defs.h 2016-11-10 07:22:58.639469850 -0500
+@@ -22,7 +22,7 @@
+
+ #define min(x, y) ((x)<(y) ? (x) : (y))
+
+-#define PLUGIN_EXPORT_DIR "/var/lib/foolsm"
++#define PLUGIN_EXPORT_DIR "/tmp"
+
+ #endif
+
--- /dev/null
+--- a/forkexec.c 2017-11-02 07:45:28.679821530 -0400
++++ /bforkexec.c 2017-11-02 07:44:54.527653043 -0400
+@@ -108,7 +108,7 @@
+ int script_status;
+ pid_t pid;
+
+- while ((pid = waitpid(WAIT_ANY, &script_status, WNOHANG)) != 0) {
++ while ((pid = waitpid(-1, &script_status, WNOHANG)) != 0) {
+ if(pid == -1) {
+ if(cfg.debug >= 9 && errno != ECHILD)
+ syslog(LOG_ERR, "%s: %s: %d: waitpid failed %s", __FILE__, __FUNCTION__, __LINE__, strerror(errno));
include $(TOPDIR)/rules.mk
PKG_NAME:=freeradius3
-PKG_VERSION:=release_3_0_11
-PKG_RELEASE:=3
+PKG_VERSION:=release_3_0_17
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
-PKG_HASH:=f0b32edb90368c3b9523e2baa792a1794d8bad662407f0d210a6c460541379b7
+PKG_HASH:=5b2382f08c0d9d064298281c1fb8348fc13df76550ce7a5cfc47ea91361fad91
PKG_MAINTAINER:=Lucile Quirion <lucile.quirion@savoirfairelinux.com>
PKG_LICENSE:=GPL-2.0
CONFIGURE_ARGS+= --without-rlm_ldap
endif
+ifeq ($(CONFIG_USE_GLIBC),y)
+ TARGET_CFLAGS+= -DLIBBSD_OVERLAY -I$(STAGING_DIR)/usr/include/bsd \
+ -D_RPC_NETDB_H
+ #^^^^^^^^^^^^^ avoid inclusion of librpc's netdb.h
+ CONFIGURE_LIBS+= -Wl,--push-state,--as-needed -lbsd -Wl,--pop-state
+endif
+
CONFIGURE_VARS+= \
LDFLAGS="$$$$LDFLAGS" \
LIBS="$(CONFIGURE_LIBS)" \
--- a/src/main/tls.c
+++ b/src/main/tls.c
-@@ -369,7 +369,7 @@ tls_session_t *tls_new_session(TALLOC_CT
+@@ -594,7 +594,7 @@ tls_session_t *tls_new_session(TALLOC_CT
*
* FIXME: Also do it every N sessions?
*/
((conf->session_last_flushed + ((int)conf->session_timeout * 1800)) <= request->timestamp)){
RDEBUG2("Flushing SSL sessions (of #%ld)", SSL_CTX_sess_number(conf->ctx));
-@@ -463,7 +463,7 @@ tls_session_t *tls_new_session(TALLOC_CT
+@@ -689,7 +689,7 @@ tls_session_t *tls_new_session(TALLOC_CT
state->mtu = vp->vp_integer;
}
return state;
}
-@@ -2675,7 +2675,7 @@ post_ca:
+@@ -3151,7 +3151,7 @@ post_ca:
/*
* Callbacks, etc. for session resumption.
*/
/*
* Cache sessions on disk if requested.
*/
-@@ -2745,7 +2745,7 @@ post_ca:
+@@ -3221,7 +3221,7 @@ post_ca:
/*
* Setup session caching
*/
--- /dev/null
+--- a/src/include/threads.h
++++ b/src/include/threads.h
+@@ -89,7 +89,7 @@ static _t __fr_thread_local_init_##_n(pt
+ # define fr_thread_local_get(_n) _n
+ #elif defined(HAVE_PTHREAD_H)
+ # include <pthread.h>
+-# define fr_thread_local_setup(_t, _n) \
++# define fr_thread_local_setup(_t, _n) static __thread _t _n;\
+ static pthread_key_t __fr_thread_local_key_##_n;\
+ static pthread_once_t __fr_thread_local_once_##_n = PTHREAD_ONCE_INIT;\
+ static pthread_destructor_t __fr_thread_local_destructor_##_n = NULL;\
+@@ -100,17 +100,17 @@ static void __fr_thread_local_destroy_##
+ static void __fr_thread_local_key_init_##_n(void)\
+ {\
+ (void) pthread_key_create(&__fr_thread_local_key_##_n, __fr_thread_local_destroy_##_n);\
+- (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
+ }\
+ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
+ {\
+ __fr_thread_local_destructor_##_n = func;\
+ if (_n) return _n; \
+ (void) pthread_once(&__fr_thread_local_once_##_n, __fr_thread_local_key_init_##_n);\
++ (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
+ return _n;\
+ }
+-# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f)
+-# define fr_thread_local_set(_n, _v) __fr_thread_local_set_##_n(_v)
+-# define fr_thread_local_get(_n) __fr_thread_local_get_##_n()
++# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f)
++# define fr_thread_local_set(_n, _v) ((int)!((_n = _v) || 1))
++# define fr_thread_local_get(_n) _n
+ #endif
+ #endif
include $(TOPDIR)/rules.mk
PKG_NAME:=fwknop
-PKG_VERSION:=2.6.9
-PKG_RELEASE:=4
+PKG_VERSION:=2.6.10
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://www.cipherdyne.org/fwknop/download
-PKG_HASH:=5bf47fe1fd30e862d29464f762c0b8bf89b5e298665c37624d6707826da956d4
+PKG_SOURCE_URL:=https://www.cipherdyne.org/fwknop/download
+PKG_HASH:=f6c09bec97ed8e474a98ae14f9f53e1bcdda33393f20667b6af3fb6bb894ca77
PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
-PKG_LICENSE:=GPLv2
+PKG_LICENSE:=GPLv2+
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/fwknop/Default
TITLE:=FireWall KNock OPerator
- URL:=http://www.cipherdyne.org/fwknop/
+ URL:=https://www.cipherdyne.org/fwknop/
endef
define Package/fwknop/Default/description
# option uci_enabled '1'
config network
-# option network 'wan' # takes precedence over config.PCAP_INTF
+ # Logical network dependency, fully tracked, fwknopd gets restarted when
+ # necessary. Specifying network takes precedence over config.PCAP_INTF
+# option network 'wan'
config access
option SOURCE 'ANY'
option KEY 'CHANGEME'
config config
+ # Alternative direct physical interface definition, but untracked - you
+ # are on your own to correctly start/stop the service when needed
+# option PCAP_INTF 'eth0'
{
generate_configuration
- procd_open_instance
- procd_set_param command "$FWKNOPD_BIN" --foreground --syslog-enable
- procd_set_param respawn
-
- if [ $UCI_ENABLED -eq 1 ]; then
- procd_append_param command -c /var/etc/fwknopd.conf
- procd_append_param command -a /var/etc/access.conf
+ if [ -n "$DEPEND_IFNAME" ] ; then
+ # We know the interface, so we can start
+ procd_open_instance
+ procd_set_param command "$FWKNOPD_BIN" --foreground --syslog-enable
+ procd_set_param respawn
+ if [ $UCI_ENABLED -eq 1 ]; then
+ procd_append_param command -c /var/etc/fwknopd.conf
+ procd_append_param command -a /var/etc/access.conf
+ fi
+ procd_append_param command -i "$DEPEND_IFNAME"
+ procd_set_param netdev "$DEPEND_IFNAME"
+ procd_close_instance
+ else
+ logger -p daemon.info -t "fwknopd[----]" "Postponing start-up of fwknopd, network $NETWORK is not up"
fi
-
- procd_append_param command -i "$DEPEND_IFNAME"
- procd_set_param netdev "$DEPEND_IFNAME"
-
- procd_close_instance
}
service_triggers()
{
procd_add_reload_trigger "fwknopd"
+
+ if [ -n "$NETWORK" ] ; then
+ logger -p daemon.info -t "fwknopd[----]" "Listening for changes on network $NETWORK"
+ procd_add_reload_interface_trigger "$NETWORK"
+ fi
}
get_bool()
UCI_ENABLED=0
DEPEND_IFNAME=
- local NETWORK=
+ NETWORK=
local PCAP_INTF=
local USER_CONFIG_PATH=/etc/fwknop/fwknopd.conf
local DEFAULT_UCI_NETWORK=wan
if [ "$option" = "uci_enabled" ] && [ "$(get_bool "$value" 0)" -eq 1 ] ; then
> /var/etc/fwknopd.conf
> /var/etc/access.conf
- chmod 600 /var/etc/fwknopd.conf
- chmod 600 /var/etc/access.conf
+ chmod 600 /var/etc/fwknopd.conf
+ chmod 600 /var/etc/access.conf
UCI_ENABLED=1
+
+ # Forced defaults
+
+ # Do not let fwknopd to shut-down when interface goes down,
+ # control it from the start-up script instead:
+ # https://bugs.openwrt.org/index.php?do=details&task_id=1481
+ echo "EXIT_AT_INTF_DOWN n" >> /var/etc/fwknopd.conf
fi
}
elif [ "$type" = "network" ]; then
if [ $UCI_ENABLED -eq 1 ] && [ $option = "PCAP_INTF" ]; then
PCAP_INTF="$value"
echo "$option $value" >> /var/etc/fwknopd.conf #writing each option to fwknopd.conf
+ elif [ $UCI_ENABLED -eq 1 ] && [ $option = "EXIT_AT_INTF_DOWN" ]; then
+ logger -p daemon.warn -t "fwknopd[----]" "Ignoring EXIT_AT_INTF_DOWN option, forced to N (no) to work reliably with procd"
elif [ $UCI_ENABLED -eq 1 ]; then
echo "$option $value" >> /var/etc/fwknopd.conf #writing each option to fwknopd.conf
fi
}
- elif [ "$type" = "access" ]
- then
+ elif [ "$type" = "access" ]; then
if [ -f /tmp/access.conf.tmp ] ; then
cat /tmp/access.conf.tmp >> /var/etc/access.conf
rm /tmp/access.conf.tmp
fi
}
else
- option_cb() { return; }
+ reset_cb
if [ -z "$type" ]; then
# Finalize reading
if [ -f /tmp/access.conf.tmp ] ; then
if [ $UCI_ENABLED -eq 0 ]; then
if [ -f $USER_CONFIG_PATH ] ; then
- # Scan user configuration for PCAP_INTF settings
- DEPEND_IFNAME="$( sed -ne '/^\s*PCAP_INTF\s\+/ { s/^\s*PCAP_INTF\s\+//; s/\s\+$//; p; q; }' /etc/fwknop/fwknopd.conf )"
+ # Scan user configuration for PCAP_INTF settings and fallback to fwknopd's default
+ DEPEND_IFNAME="$( sed -ne '/^\s*PCAP_INTF\s\+/ { s/^\s*PCAP_INTF\s\+//; s/\s\+$//; p; q; }' $USER_CONFIG_PATH )"
if [ -n "$DEPEND_IFNAME" ]; then
logger -p daemon.debug -t "fwknopd[----]" "Found fwknopd.conf configuration, using PCAP_INTF interface $DEPEND_IFNAME"
else
NETWORK="$DEFAULT_UCI_NETWORK"
fi
+ # Resolve network if possible
if [ -n "$NETWORK" ]; then
. /lib/functions/network.sh
- network_get_physdev DEPEND_IFNAME "$NETWORK"
+ network_get_device DEPEND_IFNAME "$NETWORK"
if [ -n "$DEPEND_IFNAME" ]; then
logger -p daemon.debug -t "fwknopd[----]" "Resolved network $NETWORK as interface $DEPEND_IFNAME"
else
- logger -p daemon.warn -t "fwknopd[----]" "Cannot find interface for network $NETWORK, fwknopd's default $DEFAULT_FWKNOPD_IFNAME will be used"
- DEPEND_IFNAME="$DEFAULT_FWKNOPD_IFNAME"
+ logger -p daemon.warn -t "fwknopd[----]" "Cannot find interface for network $NETWORK, probably the network is not up"
fi
elif [ -n "$PCAP_INTF" ]; then
DEPEND_IFNAME="$PCAP_INTF"
--- /dev/null
+#
+# Copyright (C) 2018 Sartura Ltd.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_LICENSE:=ASL-2.0
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+
+PKG_NAME:=go-ethereum
+PKG_VERSION:=1.8.15
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ethereum/go-ethereum/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=5081f21ab53f7eb9b84dbed32c4b58bb1c59a61163a6efaa0e4a8de764177c62
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/ethereum/go-ethereum
+GO_PKG_BUILD_PKG:=github.com/ethereum/go-ethereum/cmd/geth
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/geth
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Ethereum Go client
+ URL:=https://geth.ethereum.org/
+ DEPENDS:=$(GO_ARCH_DEPENDS)
+ PKGARCH:=all
+endef
+
+define Package/geth/description
+Ethereum is a decentralized platform that runs smart contracts, applications
+that run exactly as programmed without possibility of downtime, censorship,
+fraud or third party interference.
+endef
+
+define Package/geth/install
+ $(call GoPackage/Package/Install/Bin,$(1))
+
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) ./files/geth.init $(1)/etc/init.d/geth
+endef
+
+$(eval $(call GoBinPackage,geth))
+$(eval $(call BuildPackage,geth))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=90
+STOP=10
+
+USE_PROCD=1
+PROG=/usr/bin/geth
+
+start_service() {
+ procd_open_instance
+ procd_set_param command ${PROG}
+ procd_append_param command --syncmode "light" --cache 1024
+ procd_set_param respawn
+ procd_close_instance
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=git
-PKG_VERSION:=2.16.3
+PKG_VERSION:=2.19.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/scm/git/
-PKG_HASH:=d65d99e9e5b081c1f14ea018973806e942a2eb7d0da2ebc01bd2525adee62d48
+PKG_HASH:=345056aa9b8084280b1b9fe1374d232dec05a34e8849028a20bfdb56e920dbb5
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/git-http
$(call Package/git/Default)
- DEPENDS+= +git +libcurl +ca-certificates
+ DEPENDS+= +git +libcurl
TITLE:=Git HTTP commands
endef
endef
define Package/git/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/git $(1)/usr/bin
$(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
+ $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-shell
+ $(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib/git-core
- ln $(1)/usr/bin/git $(1)/usr/lib/git-core/git
- ln $(1)/usr/bin/git-shell $(1)/usr/lib/git-core/git-shell
- ln $(1)/usr/bin/git-upload-pack $(1)/usr/lib/git-core/git-upload-pack
$(INSTALL_DIR) $(1)/usr/share/git-core/templates
( cd $(PKG_INSTALL_DIR); $(TAR) \
--exclude=usr/lib/git-core/git-http-backend \
--exclude=usr/lib/git-core/git-remote-ftps \
--exclude=usr/lib/git-core/git-remote-http \
--exclude=usr/lib/git-core/git-remote-https \
- --exclude=usr/lib/git-core/git \
- --exclude=usr/lib/git-core/git-shell \
- --exclude=usr/lib/git-core/git-upload-pack \
-cf - \
usr/lib/git-core \
usr/share/git-core/templates \
) | ( cd $(1); $(TAR) -xf - )
+ ln $(1)/usr/lib/git-core/git $(1)/usr/bin/git
+ ln $(1)/usr/lib/git-core/git-shell $(1)/usr/bin/git-shell
endef
define Package/git-http/install
--- a/configure.ac
+++ b/configure.ac
-@@ -925,7 +925,8 @@ AC_RUN_IFELSE(
+@@ -929,7 +929,8 @@ AC_RUN_IFELSE(
FILE *f = fopen(".", "r");
- return f)]])],
+ return f != NULL;]])],
[ac_cv_fread_reads_directories=no],
- [ac_cv_fread_reads_directories=yes])
+ [ac_cv_fread_reads_directories=yes],
])
if test $ac_cv_fread_reads_directories = yes; then
FREAD_READS_DIRECTORIES=UnfortunatelyYes
-@@ -959,7 +960,8 @@ AC_RUN_IFELSE(
+@@ -963,7 +964,8 @@ AC_RUN_IFELSE(
if (snprintf(buf, 3, "%s", "12345") != 5
|| strcmp(buf, "12")) return 1]])],
[ac_cv_snprintf_returns_bogus=no],
])
if test $ac_cv_snprintf_returns_bogus = yes; then
SNPRINTF_RETURNS_BOGUS=UnfortunatelyYes
-@@ -982,7 +984,8 @@ yippeeyeswehaveit
+@@ -986,7 +988,8 @@ yippeeyeswehaveit
#endif
]),
[ac_cv_sane_mode_bits=yes],
--- a/Makefile
+++ b/Makefile
-@@ -1234,7 +1234,7 @@ else
+@@ -1312,7 +1312,7 @@ else
endif
curl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "072200"
include $(TOPDIR)/rules.mk
PKG_NAME:=gitolite
-PKG_VERSION:=3.6.6
+PKG_VERSION:=3.6.8
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=b2d96c36682391f45c63b21a91fbe77a969a7b362417c851dd0091a06fcc74d9
+PKG_MIRROR_HASH:=652d3b3f8ed93b8ef56153337465cc7260974e5cd2653e949da1bb97a8421ea0
+
PKG_SOURCE_URL:=https://github.com/sitaramc/gitolite.git
-PKG_SOURCE_VERSION:=908f8c6f3b8ef5b95829be7155be2557e71f4579
+PKG_SOURCE_VERSION:=e126e97a4d5575821f89ae80dac402b017db94aa
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
DEPENDS:=+perlbase-essential +perlbase-sys +perlbase-data +perlbase-digest +perlbase-env +perlbase-time +git +perlbase-findbin +perlbase-storable +perlbase-text +perlbase-getopt +perlbase-utf8 +openssh-keygen +openssh-server +openssh-moduli perl
TITLE:=Easy administration of git repositories
URL:=http://gitolite.com/gitlolite
- MAINTAINER:=Daniel Dickinson <lede@cshore.thecshore.com>
+ MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
USERID:=git=382:git=382
endef
Gitolite is a system for managing access to git repositories. Note you will need to make
sure dropbear does not interfere with OpenSSH as gitolite depends on feature not in
dropbear (to my knowledge).
+ See https://openwrt.org/docs/guide-user/services/gitolite for a guide on installation.
endef
define Package/gitolite/postinst
sed -i -e 's,/var/run/git,/srv/git,' $${IPKG_INSTROOT}/etc/passwd
sed -i -e 's,git:\(.*\):/bin/false,git:\1:/bin/ash,' $${IPKG_INSTROOT}/etc/passwd
+sed -i -e 's,git:x:0:\(.*\)$$,git:x:99999:\1,' $${IPKG_INSTROOT}/etc/shadow
endef
define Build/Configure
+++ /dev/null
-From d0409ae1164030913801d37ce5425ed93529c69d Mon Sep 17 00:00:00 2001
-From: Daniel Dickinson <gitolite@daniel.thecshore.com>
-Date: Fri, 1 Jul 2016 00:37:23 -0400
-Subject: [PATCH] Conf::Store: Fix missing hooks dir for symlink
-
-At least when doing 'gitolite setup -pk user.pub', the
-symlinking of hooks fails because the hooks directory
-does not exist. Make sure we create it if it's missing.
----
- src/lib/Gitolite/Conf/Store.pm | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/lib/Gitolite/Conf/Store.pm b/src/lib/Gitolite/Conf/Store.pm
-index 5568b3f..aac90d4 100644
---- a/src/lib/Gitolite/Conf/Store.pm
-+++ b/src/lib/Gitolite/Conf/Store.pm
-@@ -363,6 +363,7 @@ sub store_common {
- chmod 0755, "$rc{GL_ADMIN_BASE}/hooks/gitolite-admin/post-update";
- $hook_reset++;
- }
-+ _mkdir("$repo.git/hooks");
-
- # propagate user-defined (custom) hooks to all repos
- ln_sf( "$rc{LOCAL_CODE}/hooks/common", "*", "$repo.git/hooks" ) if $rc{LOCAL_CODE};
---
-2.7.4
-
include $(TOPDIR)/rules.mk
PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=b673e9c3ed4a211b974bc602b893a427533566d7
-PKG_MIRROR_HASH:=89bc8cb5813bd38e0006d91fcd091b0eef533d6ff8462c800bf37d2e19966beb
+PKG_SOURCE_VERSION:=13274f4bd2009dd928e91f0b6e056cee7f7975a5
+PKG_MIRROR_HASH:=fb80259245a496bc238117c7ac36f9338dc3612a99eef2bc5be2a042de8cdee1
-PKG_VERSION:=0.10.2-git-20180205-$(PKG_SOURCE_VERSION)
+PKG_VERSION:=0.10.2-git-20180929-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gnunet.org/git/gnunet.git
PKG_SOURCE_PROTO:=git
-PKG_LICENSE:=GPL-3.0
+PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
$(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
( for bin in arm ats cadet core config ecc identity nat nat-auto nat-server nse \
- peerinfo revocation scalarproduct statistics transport uri; do \
+ peerinfo revocation scalarproduct scrypt statistics transport uri; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \
done )
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
done )
- ( for plug in ats_proportional block_dht block_regex block_revocation \
- transport_tcp transport_udp transport_unix; do \
+ ( for plug in ats_proportional block_dht block_regex block_revocation transport_unix; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
done )
BIN_dht-cli:=dht-get dht-put dht-monitor
PLUGIN_dht-cli:=block_test
-DEPENDS_hostlist:=+libmicrohttpd +libgnurl +ca-certificates
+DEPENDS_curl:=+libgnurl +jansson
+LIB_curl:=curl
+
+DEPENDS_hostlist:=+libmicrohttpd +gnunet-curl +ca-certificates
LIBEXEC_hostlist:=daemon-hostlist
CONF_hostlist:=hostlist
-DEPENDS_transport-http_client:=+libgnurl +ca-certificates
+DEPENDS_transport-bluetooth:=+bluez-libs
+PLUGIN_transport-bluetooth:=transport_bluetooth
+LIBEXEC_transport-bluetooth:=helper-transport-bluetooth
+
+DEPENDS_transport-http_client:=+gnunet-curl +ca-certificates
PLUGIN_transport-http_client:=transport_http_client transport_https_client
DEPENDS_transport-http_server:=+libmicrohttpd
PLUGIN_transport-http_server:=transport_http_server transport_https_server
+PLUGIN_transport-tcp:=transport_tcp
+
+PLUGIN_transport-udp:=transport_udp
+
PLUGIN_transport-wlan:=transport_wlan
LIBEXEC_transport-wlan:=helper-transport-wlan
+PLUGIN_transport-xt:=transport_xt
+
+PLUGIN_transport-xu:=transport_xu
+
DEPENDS_experiments:=+libglpk
PLUGIN_experiments:=ats_mlp ats_ril
DEPENDS_gns:=+gnunet-vpn +iptables-mod-extra
USERID_gns:=gnunet=958:gnunetdns=452
-BIN_gns:=gns gns-import.sh namecache namestore resolver
+BIN_gns:=gns gns-import.sh namecache namestore resolver zoneimport
LIB_gns:=gns gnsrecord namecache namestore
PLUGIN_gns:=block_dns block_gns gnsrecord_conversation gnsrecord_dns gnsrecord_gns
LIBEXEC_gns:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster
DEPENDS_namestore-fcfsd:=+gnunet-gns +libmicrohttpd
LIBEXEC_namestore-fcfsd:=namestore-fcfsd
-DEPENDS_gns-proxy:=+gnunet-gns +libgnurl +libmicrohttpd
+DEPENDS_gns-proxy:=+gnunet-gns +gnunet-curl +libmicrohttpd
LIBEXEC_gns-proxy:=gns-proxy
DEPENDS_datastore:=+gnunet-gns
CONF_peerstore:=peerstore
DEPENDS_rest:=+gnunet-gns +gnunet-social +libmicrohttpd +jansson
-LIB_rest:=rest json jsonapi jsonapiutils
-PLUGIN_rest:=rest_gns rest_identity rest_identity_provider rest_namestore
+LIB_rest:=rest json
+PLUGIN_rest:=rest_copying rest_gns rest_identity rest_namestore rest_peerinfo rest_openid_connect rest_reclaim
LIBEXEC_rest:=rest-server
CONF_rest:=rest
LIBEXEC_rps:=service-rps
CONF_rps:=rps
-DEPENDS_social:=+gnunet-gns +libmicrohttpd +jansson
-BIN_social:=identity-token multicast social
-LIB_social:=consensus identityprovider multicast psyc psycstore psycutil secretsharing social
-LIBEXEC_social:=service-consensus service-evil-consensus service-identity-provider service-multicast service-psyc service-psycstore service-secretsharing service-social
-CONF_social:=consensus multicast psyc psycstore secretsharing social
-PLUGINS_social:=block_consensus
+DEPENDS_social:=+gnunet-gns +libmicrohttpd +jansson +libpbc +libgabe
+BIN_social:=credential identity-token multicast reclaim social
+LIB_social:=abe consensus credential identityprovider multicast psyc psycstore psycutil reclaim reclaimattribute secretsharing social
+LIBEXEC_social:=service-consensus service-credential service-evil-consensus service-identity-provider service-multicast service-psyc service-psycstore service-reclaim service-secretsharing service-social
+CONF_social:=consensus credential multicast psyc psycstore reclaim secretsharing social
+PLUGIN_social:=block_consensus gnsrecord_credential gnsrecord_reclaim reclaim_attribute_gnuid
PLUGIN_dhtcache-heap:=datacache_heap
CONFLICTS_dhtcache-heap:=gnunet-dhtcache-pgsql gnunet-dhtcache-sqlite
DEPENDS_fs-sqlite:=+gnunet-datastore +gnunet-sqlite
PLUGIN_fs-sqlite:=datastore_sqlite
-DEPENDS_social-sqlite:=+gnunet-social +gnunet-sqlite
-PLUGIN_social-sqlite:=psycstore_sqlite
+DEPENDS_social-sqlite:=+gnunet-social +gnunet-sqlite
+PLUGIN_social-sqlite:=psycstore_sqlite reclaim_sqlite
-DEPENDS_transport-bluetooth:=+bluez-libs
-PLUGIN_transport-bluetooth:=transport_bluetooth
-LIBEXEC_transport-bluetooth:=helper-transport-bluetooth
DEPENDS_utils:=+certtool +openssl-util
BIN_utils:=gns-proxy-setup-ca transport-certificate-creation
$(eval $(call BuildPackage,gnunet))
$(eval $(call BuildComponent,conversation,conversation component,))
+$(eval $(call BuildComponent,curl,cURL wrapper component,))
$(eval $(call BuildComponent,datastore,data storage components,))
$(eval $(call BuildComponent,dht-cli,DHT command line clients,))
# $(eval $(call BuildComponent,dv,distance-vector routing component,y))
$(eval $(call BuildComponent,transport-bluetooth,bluetooth transport,))
$(eval $(call BuildComponent,transport-http_client,HTTP/HTTPS client transport,y))
$(eval $(call BuildComponent,transport-http_server,HTTP/HTTPS server transport,))
+$(eval $(call BuildComponent,transport-tcp,TCP transport,y))
+$(eval $(call BuildComponent,transport-udp,UDP transport,y))
$(eval $(call BuildComponent,transport-wlan,WLAN transport,y))
+$(eval $(call BuildComponent,transport-xt,xt transport,))
+$(eval $(call BuildComponent,transport-xu,xu transport,))
$(eval $(call BuildComponent,utils,administration utililties,))
$(eval $(call BuildComponent,vpn,vpn components,y))
include $(TOPDIR)/rules.mk
PKG_NAME:=gnurl
-PKG_VERSION:=7.57.0
-PKG_RELEASE:=1
+PKG_VERSION:=7.61.1
+PKG_RELEASE:=2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://gnunet.org/sites/default/files
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://git.taler.net/gnurl
+PKG_SOURCE_VERSION:=64adbb00957f178bb7b9b1dbf0d0de1f5c45949d
-PKG_HASH:=2ccd2a641a9815df924b6a79ee47d12a27ee43bd05a3c6ba958108564580d3b7
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_MIRROR_HASH:=6f6c993a13fe30989cb918c987604ca96c178f4bb682c298ab345257e4aab284
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
$(call Package/gnurl/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libgnutls +libidn +zlib
+ DEPENDS:=+libgnutls +libidn2 +zlib
TITLE:=A client-side HTTP/HTTPS transfer library
endef
--enable-shared \
--enable-static \
--without-axtls \
+ --without-brotli \
--without-libssh2 \
--without-libmetalink \
--without-winidn \
--without-nghttp2 \
--without-nss \
--without-cyassl \
+ --without-libpsl \
--without-polarssl \
--without-ssl \
--without-winssl \
--without-darwinssl \
--disable-ares \
--disable-sspi \
+ --disable-crypto-auth \
--disable-ntlm-wb \
+ --disable-tls-srp \
--disable-ldap \
--disable-ldaps \
--disable-rtsp \
#
# Copyright (C) 2010-2016 OpenWrt.org
# Copyright (C) 2009-2016 Thomas Heil <heil@terminal-consulting.de>
+# Copyright (C) 2018 Christian Lachner <gladiac@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=haproxy
-PKG_VERSION:=1.8.4
-PKG_RELEASE:=01
+PKG_VERSION:=1.8.14
+PKG_RELEASE:=1
PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.haproxy.org/download/1.8/src/
-PKG_HASH:=e305b0a4e7dec08072841eef6ac6dcd1b5586b1eff09c2d51e152a912e8884a6
+PKG_HASH:=b17e402578be85e58af7a3eac99b1f675953bea9f67af2e964cf8bdbd1bd3fdf
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0
-MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
+MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
+ Christian Lachner <gladiac@gmail.com>
include $(INCLUDE_DIR)/package.mk
URL:=https://www.haproxy.org/
endef
-define Download/lua534
- FILE:=lua-5.3.4.tar.gz
+define Download/lua535
+ FILE:=lua-5.3.5.tar.gz
URL:=https://www.lua.org/ftp/
- HASH:=f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c
+ HASH:=0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac
endef
define Build/Prepare
$(call Build/Prepare/Default)
ifeq ($(ENABLE_LUA),y)
- tar -zxvf $(DL_DIR)/lua-5.3.4.tar.gz -C $(PKG_BUILD_DIR)
- ln -s $(PKG_BUILD_DIR)/lua-5.3.4 $(PKG_BUILD_DIR)/lua
+ tar -zxvf $(DL_DIR)/lua-5.3.5.tar.gz -C $(PKG_BUILD_DIR)
+ ln -s $(PKG_BUILD_DIR)/lua-5.3.5 $(PKG_BUILD_DIR)/lua
endif
endef
ENABLE_LUA:=y
ENABLE_REGPARM:=n
-ifeq ($(CONFIG_mips),y)
- ENABLE_LUA:=n
-endif
-ifeq ($(CONFIG_mipsel),y)
- ENABLE_LUA:=n
-endif
-
ifeq ($(CONFIG_TARGET_x86),y)
ENABLE_REGPARM:=y
endif
-ifeq ($(CONFIG_avr32),y)
- LINUX_TARGET:=linux26
-else
- LINUX_TARGET:=linux2628
-endif
+LINUX_TARGET:=linux2628
ifeq ($(BUILD_VARIANT),ssl)
ADDON+=USE_OPENSSL=1
ifeq ($(ENABLE_LUA),y)
ADDON+=USE_LUA=1
- ADDON+=LUA_LIB_NAME="lua534"
- ADDON+=LUA_INC="$(STAGING_DIR)/lua-5.3.4/include"
- ADDON+=LUA_LIB="$(STAGING_DIR)/lua-5.3.4/lib"
+ ADDON+=LUA_LIB_NAME="lua535"
+ ADDON+=LUA_INC="$(STAGING_DIR)/lua-5.3.5/include"
+ ADDON+=LUA_LIB="$(STAGING_DIR)/lua-5.3.5/lib"
endif
ifeq ($(ENABLE_REGPARM),y)
ifeq ($(ENABLE_LUA),y)
define Build/Compile/lua
$(MAKE) TARGET=$(LINUX_TARGET) -C $(PKG_BUILD_DIR)/lua \
- INSTALL_TOP="$(STAGING_DIR)/lua-5.3.4/" \
+ INSTALL_TOP="$(STAGING_DIR)/lua-5.3.5/" \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) -lncurses -lreadline" \
LD="$(TARGET_LD)" \
linux install
- mv $(STAGING_DIR)/lua-5.3.4/lib/liblua.a $(STAGING_DIR)/lua-5.3.4/lib/liblua534.a
+ mv $(STAGING_DIR)/lua-5.3.5/lib/liblua.a $(STAGING_DIR)/lua-5.3.5/lib/liblua535.a
endef
endif
SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=165530 " \
USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 USE_TFO=1 \
USE_ZLIB=yes USE_PCRE=1 USE_PCRE_JIT=1 USE_GETADDRINFO=1 \
- VERSION="$(PKG_VERSION)-patch$(PKG_RELEASE)" \
+ VERSION="$(PKG_VERSION)-$(PKG_RELEASE)" \
$(ADDON) \
+ CFLAGS="$(TARGET_CFLAGS)" \
LD="$(TARGET_CC)" \
LDFLAGS="$(TARGET_LDFLAGS) -latomic" \
IGNOREGIT=1
DESTDIR="$(PKG_INSTALL_DIR)" \
$(MAKE_FLAGS) \
ADDLIB="-lcrypto" \
- VERSION="$(PKG_VERSION)-patch$(PKG_RELEASE)" \
+ VERSION="$(PKG_VERSION)-$(PKG_RELEASE)" \
halog
endef
$(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/halog/halog $(1)/usr/bin/
endef
-$(eval $(call Download,lua534))
+$(eval $(call Download,lua535))
$(eval $(call BuildPackage,haproxy))
$(eval $(call BuildPackage,halog))
$(eval $(call BuildPackage,haproxy-nossl))
--- /dev/null
+#!/bin/bash
+
+CLONEURL=http://git.haproxy.org/git/haproxy-1.8.git
+BASE_TAG=v1.8.14
+TMP_REPODIR=tmprepo
+PATCHESDIR=patches
+
+if test -d "${TMP_REPODIR}"; then rm -rf "${TMP_REPODIR}"; fi
+
+git clone "${CLONEURL}" "${TMP_REPODIR}"
+
+printf "Cleaning patches\n"
+find ${PATCHESDIR} -type f -name "*.patch" -exec rm -f "{}" \;
+
+i=0
+for cid in $(git -C "${TMP_REPODIR}" rev-list ${BASE_TAG}..HEAD | tac); do
+ filename="$(printf "%04d" $i)-$(git -C "${TMP_REPODIR}" log --format=%s -n 1 $cid | sed -e"s/[()']//g" -e's/[^_a-zA-Z0-9+-]\+/-/g' -e's/-$//').patch"
+ printf "Creating ${filename}\n"
+ git -C "${TMP_REPODIR}" show $cid > "${PATCHESDIR}/$filename"
+ git add "${PATCHESDIR}/$filename"
+ let i++
+done
+
+rm -rf "${TMP_REPODIR}"
+
+printf "finished\n"
+
+++ /dev/null
-From 2fcd544272a5498ffa49544e9f06b51bc93e55d1 Mon Sep 17 00:00:00 2001
-From: Olivier Houchard <ohouchard@haproxy.com>
-Date: Tue, 13 Feb 2018 15:17:23 +0100
-Subject: [PATCH] BUG/MEDIUM: ssl: Don't always treat SSL_ERROR_SYSCALL as
- unrecovarable.
-
-Bart Geesink reported some random errors appearing under the form of
-termination flags SD in the logs for connections involving SSL traffic
-to reach the servers.
-
-Tomek Gacek and Mateusz Malek finally narrowed down the problem to commit
-c2aae74 ("MEDIUM: ssl: Handle early data with OpenSSL 1.1.1"). It happens
-that the special case of SSL_ERROR_SYSCALL isn't handled anymore since
-this commit.
-
-SSL_read() might return <= 0, and SSL_get_erro() return SSL_ERROR_SYSCALL,
-without meaning the connection is gone. Before flagging the connection
-as in error, check the errno value.
-
-This should be backported to 1.8.
-
-(cherry picked from commit 7e2e505006feb8f3b4a7f9e0ac5e89b5a8c4895e)
-Signed-off-by: Willy Tarreau <w@1wt.eu>
----
- src/ssl_sock.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/src/ssl_sock.c b/src/ssl_sock.c
-index aecf3dd..f118724 100644
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -5437,6 +5437,12 @@ static int ssl_sock_to_buf(struct connection *conn, struct buffer *buf, int coun
- break;
- } else if (ret == SSL_ERROR_ZERO_RETURN)
- goto read0;
-+ /* For SSL_ERROR_SYSCALL, make sure the error is
-+ * unrecoverable before flagging the connection as
-+ * in error.
-+ */
-+ if (ret == SSL_ERROR_SYSCALL && (!errno || errno == EAGAIN))
-+ goto clear_ssl_error;
- /* otherwise it's a real error */
- goto out_error;
- }
-@@ -5451,11 +5457,12 @@ static int ssl_sock_to_buf(struct connection *conn, struct buffer *buf, int coun
- conn_sock_read0(conn);
- goto leave;
- out_error:
-+ conn->flags |= CO_FL_ERROR;
-+clear_ssl_error:
- /* Clear openssl global errors stack */
- ssl_sock_dump_errors(conn);
- ERR_clear_error();
-
-- conn->flags |= CO_FL_ERROR;
- goto leave;
- }
-
---
-1.7.10.4
-
+++ /dev/null
-From f7fa1d461aa71bbc8a6c23fdcfc305f2e52ce5dd Mon Sep 17 00:00:00 2001
-From: Christopher Faulet <cfaulet@haproxy.com>
-Date: Mon, 19 Feb 2018 14:25:15 +0100
-Subject: [PATCH] BUG/MEDIUM: ssl: Shutdown the connection for reading on
- SSL_ERROR_SYSCALL
-
-When SSL_read returns SSL_ERROR_SYSCALL and errno is unset or set to EAGAIN, the
-connection must be shut down for reading. Else, the connection loops infinitly,
-consuming all the CPU.
-
-The bug was introduced in the commit 7e2e50500 ("BUG/MEDIUM: ssl: Don't always
-treat SSL_ERROR_SYSCALL as unrecovarable."). This patch must be backported in
-1.8 too.
-
-(cherry picked from commit 4ac77a98cda3d0f9b1d9de7bbbda2c91357f0767)
-Signed-off-by: Willy Tarreau <w@1wt.eu>
----
- src/ssl_sock.c | 14 ++++++++------
- 1 file changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/src/ssl_sock.c b/src/ssl_sock.c
-index f118724..a065bbb 100644
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -5437,10 +5437,9 @@ static int ssl_sock_to_buf(struct connection *conn, struct buffer *buf, int coun
- break;
- } else if (ret == SSL_ERROR_ZERO_RETURN)
- goto read0;
-- /* For SSL_ERROR_SYSCALL, make sure the error is
-- * unrecoverable before flagging the connection as
-- * in error.
-- */
-+ /* For SSL_ERROR_SYSCALL, make sure to clear the error
-+ * stack before shutting down the connection for
-+ * reading. */
- if (ret == SSL_ERROR_SYSCALL && (!errno || errno == EAGAIN))
- goto clear_ssl_error;
- /* otherwise it's a real error */
-@@ -5453,16 +5452,19 @@ static int ssl_sock_to_buf(struct connection *conn, struct buffer *buf, int coun
- conn_cond_update_sock_polling(conn);
- return done;
-
-+ clear_ssl_error:
-+ /* Clear openssl global errors stack */
-+ ssl_sock_dump_errors(conn);
-+ ERR_clear_error();
- read0:
- conn_sock_read0(conn);
- goto leave;
-+
- out_error:
- conn->flags |= CO_FL_ERROR;
--clear_ssl_error:
- /* Clear openssl global errors stack */
- ssl_sock_dump_errors(conn);
- ERR_clear_error();
--
- goto leave;
- }
-
---
-1.7.10.4
-
+++ /dev/null
-From 8a5949f2d74c3a3a6c6da25449992c312b183ef3 Mon Sep 17 00:00:00 2001
-From: Christopher Faulet <cfaulet@haproxy.com>
-Date: Fri, 2 Feb 2018 15:54:15 +0100
-Subject: [PATCH] BUG/MEDIUM: http: Switch the HTTP response in tunnel mode as
- earlier as possible
-
-When the body length is undefined (no Content-Length or Transfer-Encoding
-headers), The reponse remains in ending mode, waiting the request is done. So,
-most of time this is not a problem because the resquest is done before the
-response. But when a client sends data to a server that replies without waiting
-all the data, it is really not desirable to wait the end of the request to
-finish the response.
-
-This bug was introduced when the tunneling of the request and the reponse was
-refactored, in commit 4be980391 ("MINOR: http: Switch requests/responses in
-TUNNEL mode only by checking txn flag").
-
-This patch should be backported in 1.8 and 1.7.
-
-(cherry picked from commit fd04fcf5edb0a24cd29ce8f4d4dc2aa3a0e2e82c)
-Signed-off-by: Willy Tarreau <w@1wt.eu>
----
- src/proto_http.c | 15 +++++----------
- 1 file changed, 5 insertions(+), 10 deletions(-)
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index 64bd410..29880ea 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -4634,16 +4634,8 @@ int http_sync_res_state(struct stream *s)
- * let's enforce it now that we're not expecting any new
- * data to come. The caller knows the stream is complete
- * once both states are CLOSED.
-- *
-- * However, there is an exception if the response length
-- * is undefined. In this case, we switch in TUNNEL mode.
- */
-- if (!(txn->rsp.flags & HTTP_MSGF_XFER_LEN)) {
-- channel_auto_read(chn);
-- txn->rsp.msg_state = HTTP_MSG_TUNNEL;
-- chn->flags |= CF_NEVER_WAIT;
-- }
-- else if (!(chn->flags & (CF_SHUTW|CF_SHUTW_NOW))) {
-+ if (!(chn->flags & (CF_SHUTW|CF_SHUTW_NOW))) {
- channel_shutr_now(chn);
- channel_shutw_now(chn);
- }
-@@ -6241,6 +6233,8 @@ http_msg_forward_body(struct stream *s, struct http_msg *msg)
- /* The server still sending data that should be filtered */
- if (!(chn->flags & CF_SHUTR) && HAS_DATA_FILTERS(s, chn))
- goto missing_data_or_waiting;
-+ msg->msg_state = HTTP_MSG_TUNNEL;
-+ goto ending;
- }
-
- msg->msg_state = HTTP_MSG_ENDING;
-@@ -6262,7 +6256,8 @@ http_msg_forward_body(struct stream *s, struct http_msg *msg)
- /* default_ret */ 1,
- /* on_error */ goto error,
- /* on_wait */ goto waiting);
-- msg->msg_state = HTTP_MSG_DONE;
-+ if (msg->msg_state == HTTP_MSG_ENDING)
-+ msg->msg_state = HTTP_MSG_DONE;
- return 1;
-
- missing_data_or_waiting:
---
-1.7.10.4
-
+++ /dev/null
-From 7ccf7c9791f2b2329f3940d1347618af3a77bebc Mon Sep 17 00:00:00 2001
-From: Emeric Brun <ebrun@haproxy.com>
-Date: Mon, 19 Feb 2018 15:59:48 +0100
-Subject: [PATCH] BUG/MEDIUM: ssl/sample: ssl_bc_* fetch keywords are broken.
-
-Since the split between connections and conn-stream objects, this
-keywords are broken.
-
-This patch must be backported in 1.8
-
-(cherry picked from commit eb8def9f34c37537d56a69fcd211d4c4c8006bea)
-Signed-off-by: Willy Tarreau <w@1wt.eu>
----
- src/ssl_sock.c | 31 ++++++++++++++-----------------
- 1 file changed, 14 insertions(+), 17 deletions(-)
-
-diff --git a/src/ssl_sock.c b/src/ssl_sock.c
-index 4d0d5db..d832d76 100644
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -6580,8 +6580,8 @@ smp_fetch_ssl_x_key_alg(const struct arg *args, struct sample *smp, const char *
- static int
- smp_fetch_ssl_fc(const struct arg *args, struct sample *smp, const char *kw, void *private)
- {
-- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
-- smp->strm ? smp->strm->si[1].end : NULL);
-+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
-
- smp->data.type = SMP_T_BOOL;
- smp->data.u.sint = (conn && conn->xprt == &ssl_sock);
-@@ -6625,8 +6625,8 @@ smp_fetch_ssl_fc_is_resumed(const struct arg *args, struct sample *smp, const ch
- static int
- smp_fetch_ssl_fc_cipher(const struct arg *args, struct sample *smp, const char *kw, void *private)
- {
-- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
-- smp->strm ? smp->strm->si[1].end : NULL);
-+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
-
- smp->flags = 0;
- if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
-@@ -6651,9 +6651,8 @@ smp_fetch_ssl_fc_cipher(const struct arg *args, struct sample *smp, const char *
- static int
- smp_fetch_ssl_fc_alg_keysize(const struct arg *args, struct sample *smp, const char *kw, void *private)
- {
-- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
-- smp->strm ? smp->strm->si[1].end : NULL);
--
-+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
- int sint;
-
- smp->flags = 0;
-@@ -6676,8 +6675,8 @@ smp_fetch_ssl_fc_alg_keysize(const struct arg *args, struct sample *smp, const c
- static int
- smp_fetch_ssl_fc_use_keysize(const struct arg *args, struct sample *smp, const char *kw, void *private)
- {
-- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
-- smp->strm ? smp->strm->si[1].end : NULL);
-+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
-
- smp->flags = 0;
- if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
-@@ -6747,8 +6746,8 @@ smp_fetch_ssl_fc_alpn(const struct arg *args, struct sample *smp, const char *kw
- static int
- smp_fetch_ssl_fc_protocol(const struct arg *args, struct sample *smp, const char *kw, void *private)
- {
-- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
-- smp->strm ? smp->strm->si[1].end : NULL);
-+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
-
- smp->flags = 0;
- if (!conn || !conn->xprt_ctx || conn->xprt != &ssl_sock)
-@@ -6773,9 +6772,8 @@ static int
- smp_fetch_ssl_fc_session_id(const struct arg *args, struct sample *smp, const char *kw, void *private)
- {
- #if OPENSSL_VERSION_NUMBER > 0x0090800fL
-- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
-- smp->strm ? smp->strm->si[1].end : NULL);
--
-+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
- SSL_SESSION *ssl_sess;
-
- smp->flags = SMP_F_CONST;
-@@ -6917,9 +6915,8 @@ static int
- smp_fetch_ssl_fc_unique_id(const struct arg *args, struct sample *smp, const char *kw, void *private)
- {
- #if OPENSSL_VERSION_NUMBER > 0x0090800fL
-- struct connection *conn = objt_conn((kw[4] != 'b') ? smp->sess->origin :
-- smp->strm ? smp->strm->si[1].end : NULL);
--
-+ struct connection *conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-+ smp->strm ? cs_conn(objt_cs(smp->strm->si[1].end)) : NULL;
- int finished_len;
- struct chunk *finished_trash;
-
---
-1.7.10.4
-
include $(TOPDIR)/rules.mk
PKG_NAME:=https_dns_proxy
-PKG_VERSION:=2018-01-28
-PKG_RELEASE=1
+PKG_VERSION:=2018-04-23
+PKG_RELEASE=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=627f468230a02d8c36915978cc4dce9f1458590aa30e2df723d59cb860acb192
+PKG_MIRROR_HASH:=24b7e4238c37e646f33eee3a374f6b7beb5c167b9c5008cc13b51e5f1f3a44ea
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=843b768f0cd3aa6fa5aed4fa992776657bc18d14
+PKG_SOURCE_VERSION:=bea68401330e611f6e9b75cec84e2dc4e81e52de
PKG_MAINTAINER:=Aaron Drew <aarond10@gmail.com>
PKG_LICENSE:=MIT
config https_dns_proxy
option listen_addr '127.0.0.1'
option listen_port '5053'
+ option bootstrap_dns '8.8.8.8,8.8.4.4'
+ option url_prefix 'https://dns.google.com/resolve?'
+ option user 'nobody'
+ option group 'nogroup'
+ option subnet_addr ''
+ option proxy_server ''
+
+config https_dns_proxy
+ option listen_addr '127.0.0.1'
+ option listen_port '5054'
+ option bootstrap_dns '1.1.1.1,1.0.0.1'
+ option url_prefix 'https://cloudflare-dns.com/dns-query?ct=application/dns-json&'
option user 'nobody'
option group 'nogroup'
option subnet_addr ''
#!/bin/sh /etc/rc.common
START=80
-
USE_PROCD=1
-PROG=/usr/sbin/https_dns_proxy
-start_instance() {
- local cfg="$1"
- local listen_addr listen_port user group
+PROG=/usr/sbin/https_dns_proxy
- config_get listen_addr "$cfg" listen_addr
- config_get listen_port "$cfg" listen_port
- config_get user "$cfg" user
- config_get group "$cfg" group
- config_get subnet_addr "$cfg" subnet_addr
- config_get proxy_server "$cfg" proxy_server
+xappend() { param="$param $1"; }
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local default="$4"
+ local _loctmp
+ config_get _loctmp "$section" "$option" "$default"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch $_loctmp"
+}
- if [ -n "$subnet_addr" ]; then
- subnet_param="-e $subnet_addr"
- fi
+start_instance() {
+ local cfg="$1" param
- if [ -n "$proxy_server" ]; then
- proxy_param="-t $proxy_server"
- fi
+ append_parm "$cfg" 'listen_addr' '-a' '127.0.0.1'
+ append_parm "$cfg" 'listen_port' '-p' '5053'
+ append_parm "$cfg" 'bootstrap_dns' '-b'
+ append_parm "$cfg" 'url_prefix' '-r'
+ append_parm "$cfg" 'user' '-u' 'nobody'
+ append_parm "$cfg" 'group' '-g' 'nogroup'
+ append_parm "$cfg" 'subnet_addr' '-e'
+ append_parm "$cfg" 'proxy_server' '-t'
procd_open_instance
- procd_set_param command ${PROG} \
- -a "$listen_addr" -p "$listen_port" \
- -u "$user" -g "$group" $subnet_param $proxy_param
+ procd_set_param command ${PROG} ${param}
procd_set_param respawn
procd_close_instance
}
include $(TOPDIR)/rules.mk
PKG_NAME:=i2pd
-PKG_VERSION:=2.18.0
+PKG_VERSION:=2.21.0
PKG_RELEASE:=1
PKG_BUILD_PARALLEL:=1
-PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=1a04826b54e649ebb341d3feacdd05c0415335679d1aa787a74ea5995d419378
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/PurpleI2P/i2pd.git
-PKG_SOURCE_VERSION:=$(PKG_VERSION)
+PKG_HASH:=96c15cf7b51feacd5bb3f7032c7d961961325102574a1a4d6cb8dd794e906e5b
PKG_LICENSE:=BSD-3-clause
include $(INCLUDE_DIR)/package.mk
$(INSTALL_DIR) $(1)/usr/share/i2pd
$(CP) $(PKG_BUILD_DIR)/contrib/certificates $(1)/usr/share/i2pd
$(INSTALL_DIR) $(1)/etc/i2pd
- $(LN) /usr/share/i2pd/certificates $(1)/etc/i2pd/certificates
- $(LN) /var/lib/i2pd/peerProfiles $(1)/etc/i2pd/peerProfiles
$(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
$(SED) ' \
s/127.0.0.1/192.168.1.1/g; \
USER="i2pd"
GROUP="i2pd"
PIDFILE=/var/run/i2pd.pid
-DATADIR=/etc/i2pd
-PEERDIR=/var/lib/i2pd/peerProfiles
+DATADIR=/var/lib/i2pd
start_service() {
## RAM
- if [ ! -d $PEERDIR ]; then
- mkdir -p $PEERDIR
- chown $USER:$GROUP $PEERDIR
+ if [ ! -d $DATADIR ]; then
+ mkdir -p $DATADIR
+ ln -s /usr/share/i2pd/certificates $DATADIR/certificates
+ ln -s /etc/i2pd/tunnels.conf $DATADIR/tunnels.conf
+ # for peoples who not possible to use http reseeding
+ ln -s /etc/i2pd/addressbook $DATADIR/addressbook
fi
## We need permissions
- chown -R $USER:$GROUP $DATADIR
+ chown $USER:$GROUP $DATADIR
touch $PIDFILE
chown $USER:adm $PIDFILE
procd_open_instance
- procd_set_param command $PROG --service --conf=/etc/i2pd/i2pd.conf
+ procd_set_param command $PROG --service --conf=/etc/i2pd/i2pd.conf --pidfile $PIDFILE
## Don't know about i2pd user's HOME
procd_set_param env HOME=$DATADIR
procd_set_param limits nofile=4096
PKG_NAME:=ibrdtnd
PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
PKG_MAINTAINER:=Johannes Morgenroth <jm@m-network.de>
PKG_LICENSE:=Apache-2.0
+PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
--without-vmime \
--disable-libdaemon
+TARGET_CXXFLAGS += -std=gnu++03
+
define Package/ibrdtnd/install
$(INSTALL_DIR) $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dtnd $(1)/usr/sbin/
--- /dev/null
+From c794bbd16d2f39c656478608eb1314055e877370 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Sat, 26 May 2018 23:44:54 -0300
+Subject: [PATCH] ibrdtnd: added openssl compatibility
+
+This patch adds compatibility with openssl 1.1.0 to ibrdtnd.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+---
+ ibrdtn/daemon/src/security/exchange/DHProtocol.cpp | 36 ++++++++++---
+ ibrdtn/daemon/src/security/exchange/Makefile.am | 2 +
+ .../src/security/exchange/openssl_compat.cpp | 62 ++++++++++++++++++++++
+ .../daemon/src/security/exchange/openssl_compat.h | 13 +++++
+ 4 files changed, 107 insertions(+), 6 deletions(-)
+ create mode 100644 ibrdtn/daemon/src/security/exchange/openssl_compat.cpp
+ create mode 100644 ibrdtn/daemon/src/security/exchange/openssl_compat.h
+
+diff --git a/src/security/exchange/DHProtocol.cpp b/src/security/exchange/DHProtocol.cpp
+index e94c5026..3e0ad717 100644
+--- a/src/security/exchange/DHProtocol.cpp
++++ b/src/security/exchange/DHProtocol.cpp
+@@ -30,6 +30,7 @@
+
+ #include <openssl/rand.h>
+ #include <openssl/pem.h>
++#include "openssl_compat.h"
+
+ #define DH_KEY_LENGTH 1024
+
+@@ -132,6 +133,7 @@ namespace dtn
+
+ void DHProtocol::begin(KeyExchangeSession &session, KeyExchangeData &data)
+ {
++ const BIGNUM *pub_key, *p, *g;
+ // get session state
+ DHState &state = session.getState<DHState>();
+
+@@ -159,9 +161,12 @@ namespace dtn
+ // prepare request
+ KeyExchangeData request(KeyExchangeData::REQUEST, session);
+
+- write(request, state.dh->pub_key);
+- write(request, state.dh->p);
+- write(request, state.dh->g);
++ DH_get0_pqg(state.dh, &p, NULL, &g);
++ DH_get0_key(state.dh, &pub_key, NULL);
++
++ write(request, pub_key);
++ write(request, p);
++ write(request, g);
+
+ manager.submit(session, request);
+ }
+@@ -177,6 +182,15 @@ namespace dtn
+ {
+ if (data.getAction() == KeyExchangeData::REQUEST)
+ {
++ BIGNUM *p = BN_new();
++ BIGNUM *g = BN_new();
++ if (p == NULL || g == NULL)
++ {
++ BN_free(p);
++ BN_free(g);
++ throw ibrcommon::Exception("Error while allocating space for DH parameters");
++ }
++
+ BIGNUM* pub_key = BN_new();
+ read(data, &pub_key);
+
+@@ -184,8 +198,16 @@ namespace dtn
+ state.dh = DH_new();
+
+ // read p and g paramter from message
+- read(data, &state.dh->p);
+- read(data, &state.dh->g);
++ read(data, &p);
++ read(data, &g);
++
++ if (DH_set0_pqg(state.dh, p, NULL, g))
++ {
++ BN_free(p);
++ BN_free(g);
++ BN_free(pub_key);
++ throw ibrcommon::Exception("Error while setting DH parameters");
++ }
+
+ int codes;
+ if (!DH_check(state.dh, &codes))
+@@ -213,7 +235,9 @@ namespace dtn
+ state.secret.assign((const char*)secret, length);
+
+ KeyExchangeData response(KeyExchangeData::RESPONSE, session);
+- write(response, state.dh->pub_key);
++ const BIGNUM *state_dh_pub_key;
++ DH_get0_key(state.dh, &state_dh_pub_key, NULL);
++ write(response, state_dh_pub_key);
+
+ manager.submit(session, response);
+
+diff --git a/src/security/exchange/Makefile.am b/src/security/exchange/Makefile.am
+index a6b2f832..71ed8365 100644
+--- a/src/security/exchange/Makefile.am
++++ b/src/security/exchange/Makefile.am
+@@ -22,6 +22,8 @@ exchange_SOURCES += \
+ NFCProtocol.cpp \
+ NoneProtocol.h \
+ NoneProtocol.cpp \
++ openssl_compat.h \
++ openssl_compat.cpp \
+ QRCodeProtocol.h \
+ QRCodeProtocol.cpp
+
+diff --git a/src/security/exchange/openssl_compat.cpp b/src/security/exchange/openssl_compat.cpp
+new file mode 100644
+index 00000000..e3baba0f
+--- /dev/null
++++ b/src/security/exchange/openssl_compat.cpp
+@@ -0,0 +1,62 @@
++/*
++ * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
++ *
++ * Licensed under the OpenSSL license (the "License"). You may not use
++ * this file except in compliance with the License. You can obtain a copy
++ * in the file LICENSE in the source distribution or at
++ * https://www.openssl.org/source/license.html
++ */
++
++#include "openssl_compat.h"
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
++void DH_get0_pqg(const DH *dh,
++ const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
++{
++ if (p != NULL)
++ *p = dh->p;
++ if (q != NULL)
++ *q = dh->q;
++ if (g != NULL)
++ *g = dh->g;
++}
++
++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
++{
++ /* If the fields p and g in d are NULL, the corresponding input
++ * parameters MUST be non-NULL. q may remain NULL.
++ */
++ if ((dh->p == NULL && p == NULL)
++ || (dh->g == NULL && g == NULL))
++ return 0;
++
++ if (p != NULL) {
++ BN_free(dh->p);
++ dh->p = p;
++ }
++ if (q != NULL) {
++ BN_free(dh->q);
++ dh->q = q;
++ }
++ if (g != NULL) {
++ BN_free(dh->g);
++ dh->g = g;
++ }
++
++ if (q != NULL) {
++ dh->length = BN_num_bits(q);
++ }
++
++ return 1;
++}
++
++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
++{
++ if (pub_key != NULL)
++ *pub_key = dh->pub_key;
++ if (priv_key != NULL)
++ *priv_key = dh->priv_key;
++}
++
++#endif /* OPENSSL_VERSION_NUMBER */
+diff --git a/src/security/exchange/openssl_compat.h b/src/security/exchange/openssl_compat.h
+new file mode 100644
+index 00000000..29e7d415
+--- /dev/null
++++ b/src/security/exchange/openssl_compat.h
+@@ -0,0 +1,13 @@
++#ifndef LIBCRYPTO_COMPAT_H\r
++#define LIBCRYPTO_COMPAT_H\r
++\r
++#if OPENSSL_VERSION_NUMBER < 0x10100000L\r
++\r
++#include <openssl/dh.h>\r
++\r
++void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);\r
++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);\r
++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);\r
++\r
++#endif /* OPENSSL_VERSION_NUMBER */\r
++#endif /* LIBCRYPTO_COMPAT_H */\r
+--
+2.16.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=inadyn
-PKG_VERSION:=2.3
+PKG_VERSION:=2.3.1
PKG_RELEASE:=1
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/troglobit/inadyn/releases/download/v$(PKG_VERSION)
-PKG_HASH:=4a98b80d8565b9e4cb32b19b7a8b06a22a7d9a6f4f03a5298a8d441b6187c760
+PKG_HASH:=81c942db6eab27fa16e868175bdb7aff963eeee06d48bc5443e0dcd6f7c2da40
PKG_FIXUP:=autoreconf
PKG_NAME:=ipsec-tools
PKG_VERSION:=0.8.2
-PKG_RELEASE:=7
+PKG_RELEASE:=8
PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>, \
Vitaly Protsko <villy@sft.ru>
PKG_LICENSE := BSD-3-Clause
--- /dev/null
+--- a/src/racoon/isakmp_xauth.c
++++ b/src/racoon/isakmp_xauth.c
+@@ -376,6 +376,7 @@ xauth_reply(iph1, port, id, res)
+ struct ph1handle *iph1;
+ int port;
+ int id;
++ int res;
+ {
+ struct xauth_state *xst = &iph1->mode_cfg->xauth;
+ char *usr = xst->authdata.generic.usr;
+
--- /dev/null
+From 071fec7181255b9234add44865a435dfdefee520 Mon Sep 17 00:00:00 2001
+In-Reply-To: <20180528120513.560-1-cote2004-github@yahoo.com>
+References: <20180528120513.560-1-cote2004-github@yahoo.com>
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Wed, 30 May 2018 15:42:20 -0300
+Subject: [PATCH v2 1/1] ipsec-tools: add openssl 1.1 support
+To: equeiroz@troianet.com.br
+
+This patch updates the calls to openssl 1.1 API, and adds a
+compatibility layer so it compiles with (at least) openssl 1.0.2, I
+haven't tested it with lower versions, but all that's needed is to edit
+the openssl_compat.* files and add the missing functions there--they're
+usually trivial.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+---
+ src/racoon/Makefile.am | 10 +--
+ src/racoon/algorithm.c | 6 +-
+ src/racoon/cfparse.y | 2 +-
+ src/racoon/crypto_openssl.c | 197 +++++++++++++++++++++-------------------
+ src/racoon/crypto_openssl.h | 2 +-
+ src/racoon/eaytest.c | 7 +-
+ src/racoon/ipsec_doi.c | 2 +-
+ src/racoon/openssl_compat.c | 213 ++++++++++++++++++++++++++++++++++++++++++++
+ src/racoon/openssl_compat.h | 45 ++++++++++
+ src/racoon/plainrsa-gen.c | 41 +++++----
+ src/racoon/prsa_par.y | 28 ++++--
+ src/racoon/rsalist.c | 5 +-
+ 12 files changed, 431 insertions(+), 127 deletions(-)
+ create mode 100644 src/racoon/openssl_compat.c
+ create mode 100644 src/racoon/openssl_compat.h
+
+diff --git a/src/racoon/Makefile.am b/src/racoon/Makefile.am
+index dbaded9..4c585f3 100644
+--- a/src/racoon/Makefile.am
++++ b/src/racoon/Makefile.am
+@@ -4,7 +4,7 @@ sbin_PROGRAMS = racoon racoonctl plainrsa-gen
+ noinst_PROGRAMS = eaytest
+ include_racoon_HEADERS = racoonctl.h var.h vmbuf.h misc.h gcmalloc.h admin.h \
+ schedule.h sockmisc.h isakmp_var.h isakmp.h isakmp_xauth.h \
+- isakmp_cfg.h isakmp_unity.h ipsec_doi.h evt.h
++ isakmp_cfg.h isakmp_unity.h ipsec_doi.h evt.h openssl_compat.h
+ lib_LTLIBRARIES = libracoon.la
+
+ adminsockdir=${localstatedir}/racoon
+@@ -32,7 +32,7 @@ racoon_SOURCES = \
+ gssapi.c dnssec.c getcertsbyname.c privsep.c \
+ pfkey.c admin.c evt.c ipsec_doi.c oakley.c grabmyaddr.c vendorid.c \
+ policy.c localconf.c remoteconf.c crypto_openssl.c algorithm.c \
+- proposal.c sainfo.c strnames.c \
++ openssl_compat.c proposal.c sainfo.c strnames.c \
+ plog.c logger.c schedule.c str2val.c \
+ safefile.c backupsa.c genlist.c rsalist.c \
+ cftoken.l cfparse.y prsa_tok.l prsa_par.y
+@@ -51,12 +51,12 @@ libracoon_la_SOURCES = kmpstat.c vmbuf.c sockmisc.c misc.c
+ libracoon_la_CFLAGS = -DNOUSE_PRIVSEP $(AM_CFLAGS)
+
+ plainrsa_gen_SOURCES = plainrsa-gen.c plog.c \
+- crypto_openssl.c logger.c
++ crypto_openssl.c logger.c openssl_compat.c
+ EXTRA_plainrsa_gen_SOURCES = $(MISSING_ALGOS)
+ plainrsa_gen_LDADD = $(CRYPTOBJS) vmbuf.o misc.o
+ plainrsa_gen_DEPENDENCIES = $(CRYPTOBJS) vmbuf.o misc.o
+
+-eaytest_SOURCES = eaytest.c plog.c logger.c
++eaytest_SOURCES = eaytest.c plog.c logger.c openssl_compat.c
+ EXTRA_eaytest_SOURCES = missing/crypto/sha2/sha2.c
+ eaytest_LDADD = crypto_openssl_test.o vmbuf.o str2val.o misc_noplog.o \
+ $(CRYPTOBJS)
+@@ -75,7 +75,7 @@ noinst_HEADERS = \
+ debugrm.h isakmp.h misc.h sainfo.h \
+ dhgroup.h isakmp_agg.h netdb_dnssec.h schedule.h \
+ isakmp_cfg.h isakmp_xauth.h isakmp_unity.h isakmp_frag.h \
+- throttle.h privsep.h \
++ throttle.h privsep.h openssl_compat.h \
+ cfparse_proto.h cftoken_proto.h genlist.h rsalist.h \
+ missing/crypto/sha2/sha2.h missing/crypto/rijndael/rijndael_local.h \
+ missing/crypto/rijndael/rijndael-api-fst.h \
+diff --git a/src/racoon/algorithm.c b/src/racoon/algorithm.c
+index 3fd50f6..66c874b 100644
+--- a/src/racoon/algorithm.c
++++ b/src/racoon/algorithm.c
+@@ -128,7 +128,7 @@ static struct enc_algorithm oakley_encdef[] = {
+ { "aes", algtype_aes, OAKLEY_ATTR_ENC_ALG_AES, 16,
+ eay_aes_encrypt, eay_aes_decrypt,
+ eay_aes_weakkey, eay_aes_keylen, },
+-#ifdef HAVE_OPENSSL_CAMELLIA_H
++#if defined(HAVE_OPENSSL_CAMELLIA_H) && ! defined(OPENSSL_NO_CAMELLIA)
+ { "camellia", algtype_camellia, OAKLEY_ATTR_ENC_ALG_CAMELLIA, 16,
+ eay_camellia_encrypt, eay_camellia_decrypt,
+ eay_camellia_weakkey, eay_camellia_keylen, },
+@@ -168,7 +168,7 @@ static struct enc_algorithm ipsec_encdef[] = {
+ { "twofish", algtype_twofish, IPSECDOI_ESP_TWOFISH, 16,
+ NULL, NULL,
+ NULL, eay_twofish_keylen, },
+-#ifdef HAVE_OPENSSL_IDEA_H
++#if defined(HAVE_OPENSSL_IDEA_H) && ! defined(OPENSSL_NO_IDEA)
+ { "3idea", algtype_3idea, IPSECDOI_ESP_3IDEA, 8,
+ NULL, NULL,
+ NULL, NULL, },
+@@ -179,7 +179,7 @@ static struct enc_algorithm ipsec_encdef[] = {
+ { "rc4", algtype_rc4, IPSECDOI_ESP_RC4, 8,
+ NULL, NULL,
+ NULL, NULL, },
+-#ifdef HAVE_OPENSSL_CAMELLIA_H
++#if defined(HAVE_OPENSSL_CAMELLIA_H) && ! defined(OPENSSL_NO_CAMELLIA)
+ { "camellia", algtype_camellia, IPSECDOI_ESP_CAMELLIA, 16,
+ NULL, NULL,
+ NULL, eay_camellia_keylen, },
+diff --git a/src/racoon/cfparse.y b/src/racoon/cfparse.y
+index 0d9bd67..8415752 100644
+--- a/src/racoon/cfparse.y
++++ b/src/racoon/cfparse.y
+@@ -2564,7 +2564,7 @@ set_isakmp_proposal(rmconf)
+ plog(LLV_DEBUG2, LOCATION, NULL,
+ "encklen=%d\n", s->encklen);
+
+- memset(types, 0, ARRAYLEN(types));
++ memset(types, 0, sizeof types);
+ types[algclass_isakmp_enc] = s->algclass[algclass_isakmp_enc];
+ types[algclass_isakmp_hash] = s->algclass[algclass_isakmp_hash];
+ types[algclass_isakmp_dh] = s->algclass[algclass_isakmp_dh];
+diff --git a/src/racoon/crypto_openssl.c b/src/racoon/crypto_openssl.c
+index 55b076a..8fb358f 100644
+--- a/src/racoon/crypto_openssl.c
++++ b/src/racoon/crypto_openssl.c
+@@ -90,6 +90,7 @@
+ #endif
+ #endif
+ #include "plog.h"
++#include "openssl_compat.h"
+
+ #define USE_NEW_DES_API
+
+@@ -316,9 +317,12 @@ eay_cmp_asn1dn(n1, n2)
+ i = idx+1;
+ goto end;
+ }
+- if ((ea->value->length == 1 && ea->value->data[0] == '*') ||
+- (eb->value->length == 1 && eb->value->data[0] == '*')) {
+- if (OBJ_cmp(ea->object,eb->object)) {
++ ASN1_STRING *sa = X509_NAME_ENTRY_get_data(ea);
++ ASN1_STRING *sb = X509_NAME_ENTRY_get_data(eb);
++ if ((ASN1_STRING_length(sa) == 1 && ASN1_STRING_get0_data(sa)[0] == '*') ||
++ (ASN1_STRING_length(sb) == 1 && ASN1_STRING_get0_data(sb)[0] == '*')) {
++ if (OBJ_cmp(X509_NAME_ENTRY_get_object(ea),
++ X509_NAME_ENTRY_get_object(eb))) {
+ i = idx+1;
+ goto end;
+ }
+@@ -430,7 +434,7 @@ cb_check_cert_local(ok, ctx)
+
+ if (!ok) {
+ X509_NAME_oneline(
+- X509_get_subject_name(ctx->current_cert),
++ X509_get_subject_name(X509_STORE_CTX_get_current_cert(ctx)),
+ buf,
+ 256);
+ /*
+@@ -438,7 +442,8 @@ cb_check_cert_local(ok, ctx)
+ * ok if they are self signed. But we should still warn
+ * the user.
+ */
+- switch (ctx->error) {
++ int ctx_error = X509_STORE_CTX_get_error(ctx);
++ switch (ctx_error) {
+ case X509_V_ERR_CERT_HAS_EXPIRED:
+ case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
+ case X509_V_ERR_INVALID_CA:
+@@ -453,9 +458,9 @@ cb_check_cert_local(ok, ctx)
+ }
+ plog(log_tag, LOCATION, NULL,
+ "%s(%d) at depth:%d SubjectName:%s\n",
+- X509_verify_cert_error_string(ctx->error),
+- ctx->error,
+- ctx->error_depth,
++ X509_verify_cert_error_string(ctx_error),
++ ctx_error,
++ X509_STORE_CTX_get_error_depth(ctx),
+ buf);
+ }
+ ERR_clear_error();
+@@ -477,10 +482,11 @@ cb_check_cert_remote(ok, ctx)
+
+ if (!ok) {
+ X509_NAME_oneline(
+- X509_get_subject_name(ctx->current_cert),
++ X509_get_subject_name(X509_STORE_CTX_get_current_cert(ctx)),
+ buf,
+ 256);
+- switch (ctx->error) {
++ int ctx_error=X509_STORE_CTX_get_error(ctx);
++ switch (ctx_error) {
+ case X509_V_ERR_UNABLE_TO_GET_CRL:
+ ok = 1;
+ log_tag = LLV_WARNING;
+@@ -490,9 +496,9 @@ cb_check_cert_remote(ok, ctx)
+ }
+ plog(log_tag, LOCATION, NULL,
+ "%s(%d) at depth:%d SubjectName:%s\n",
+- X509_verify_cert_error_string(ctx->error),
+- ctx->error,
+- ctx->error_depth,
++ X509_verify_cert_error_string(ctx_error),
++ ctx_error,
++ X509_STORE_CTX_get_error_depth(ctx),
+ buf);
+ }
+ ERR_clear_error();
+@@ -516,14 +522,15 @@ eay_get_x509asn1subjectname(cert)
+ if (x509 == NULL)
+ goto error;
+
++ X509_NAME *subject_name = X509_get_subject_name(x509);
+ /* get the length of the name */
+- len = i2d_X509_NAME(x509->cert_info->subject, NULL);
++ len = i2d_X509_NAME(subject_name, NULL);
+ name = vmalloc(len);
+ if (!name)
+ goto error;
+ /* get the name */
+ bp = (unsigned char *) name->v;
+- len = i2d_X509_NAME(x509->cert_info->subject, &bp);
++ len = i2d_X509_NAME(subject_name, &bp);
+
+ X509_free(x509);
+
+@@ -661,15 +668,16 @@ eay_get_x509asn1issuername(cert)
+ if (x509 == NULL)
+ goto error;
+
++ X509_NAME *issuer_name = X509_get_issuer_name(x509);
+ /* get the length of the name */
+- len = i2d_X509_NAME(x509->cert_info->issuer, NULL);
++ len = i2d_X509_NAME(issuer_name, NULL);
+ name = vmalloc(len);
+ if (name == NULL)
+ goto error;
+
+ /* get the name */
+ bp = (unsigned char *) name->v;
+- len = i2d_X509_NAME(x509->cert_info->issuer, &bp);
++ len = i2d_X509_NAME(issuer_name, &bp);
+
+ X509_free(x509);
+
+@@ -850,7 +858,7 @@ eay_check_x509sign(source, sig, cert)
+ return -1;
+ }
+
+- res = eay_rsa_verify(source, sig, evp->pkey.rsa);
++ res = eay_rsa_verify(source, sig, EVP_PKEY_get0_RSA(evp));
+
+ EVP_PKEY_free(evp);
+ X509_free(x509);
+@@ -992,7 +1000,7 @@ eay_get_x509sign(src, privkey)
+ if (evp == NULL)
+ return NULL;
+
+- sig = eay_rsa_sign(src, evp->pkey.rsa);
++ sig = eay_rsa_sign(src, EVP_PKEY_get0_RSA(evp));
+
+ EVP_PKEY_free(evp);
+
+@@ -1079,7 +1087,11 @@ eay_strerror()
+ int line, flags;
+ unsigned long es;
+
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++ es = 0; /* even when allowed by OPENSSL_API_COMPAT, it is defined as 0 */
++#else
+ es = CRYPTO_thread_id();
++#endif
+
+ while ((l = ERR_get_error_line_data(&file, &line, &data, &flags)) != 0){
+ n = snprintf(ebuf + len, sizeof(ebuf) - len,
+@@ -1100,7 +1112,7 @@ vchar_t *
+ evp_crypt(vchar_t *data, vchar_t *key, vchar_t *iv, const EVP_CIPHER *e, int enc)
+ {
+ vchar_t *res;
+- EVP_CIPHER_CTX ctx;
++ EVP_CIPHER_CTX *ctx;
+
+ if (!e)
+ return NULL;
+@@ -1111,7 +1123,7 @@ evp_crypt(vchar_t *data, vchar_t *key, vchar_t *iv, const EVP_CIPHER *e, int enc
+ if ((res = vmalloc(data->l)) == NULL)
+ return NULL;
+
+- EVP_CIPHER_CTX_init(&ctx);
++ ctx = EVP_CIPHER_CTX_new();
+
+ switch(EVP_CIPHER_nid(e)){
+ case NID_bf_cbc:
+@@ -1125,54 +1137,41 @@ evp_crypt(vchar_t *data, vchar_t *key, vchar_t *iv, const EVP_CIPHER *e, int enc
+ /* XXX: can we do that also for algos with a fixed key size ?
+ */
+ /* init context without key/iv
+- */
+- if (!EVP_CipherInit(&ctx, e, NULL, NULL, enc))
+- {
+- OpenSSL_BUG();
+- vfree(res);
+- return NULL;
+- }
++ */
++ if (!EVP_CipherInit(ctx, e, NULL, NULL, enc))
++ goto out;
+
+- /* update key size
+- */
+- if (!EVP_CIPHER_CTX_set_key_length(&ctx, key->l))
+- {
+- OpenSSL_BUG();
+- vfree(res);
+- return NULL;
+- }
+-
+- /* finalize context init with desired key size
+- */
+- if (!EVP_CipherInit(&ctx, NULL, (u_char *) key->v,
++ /* update key size
++ */
++ if (!EVP_CIPHER_CTX_set_key_length(ctx, key->l))
++ goto out;
++
++ /* finalize context init with desired key size
++ */
++ if (!EVP_CipherInit(ctx, NULL, (u_char *) key->v,
+ (u_char *) iv->v, enc))
+- {
+- OpenSSL_BUG();
+- vfree(res);
+- return NULL;
+- }
++ goto out;
+ break;
+ default:
+- if (!EVP_CipherInit(&ctx, e, (u_char *) key->v,
+- (u_char *) iv->v, enc)) {
+- OpenSSL_BUG();
+- vfree(res);
+- return NULL;
+- }
++ if (!EVP_CipherInit(ctx, e, (u_char *) key->v,
++ (u_char *) iv->v, enc))
++ goto out;
+ }
+
+ /* disable openssl padding */
+- EVP_CIPHER_CTX_set_padding(&ctx, 0);
++ EVP_CIPHER_CTX_set_padding(ctx, 0);
+
+- if (!EVP_Cipher(&ctx, (u_char *) res->v, (u_char *) data->v, data->l)) {
+- OpenSSL_BUG();
+- vfree(res);
+- return NULL;
+- }
++ if (!EVP_Cipher(ctx, (u_char *) res->v, (u_char *) data->v, data->l))
++ goto out;
+
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_free(ctx);
+
+ return res;
++out:
++ EVP_CIPHER_CTX_free(ctx);
++ OpenSSL_BUG();
++ vfree(res);
++ return NULL;
+ }
+
+ int
+@@ -1230,7 +1229,7 @@ eay_des_keylen(len)
+ return evp_keylen(len, EVP_des_cbc());
+ }
+
+-#ifdef HAVE_OPENSSL_IDEA_H
++#if defined(HAVE_OPENSSL_IDEA_H) && ! defined(OPENSSL_NO_IDEA)
+ /*
+ * IDEA-CBC
+ */
+@@ -1587,7 +1586,7 @@ eay_aes_keylen(len)
+ return len;
+ }
+
+-#if defined(HAVE_OPENSSL_CAMELLIA_H)
++#if defined(HAVE_OPENSSL_CAMELLIA_H) && ! defined(OPENSSL_NO_CAMELLIA)
+ /*
+ * CAMELLIA-CBC
+ */
+@@ -1680,9 +1679,9 @@ eay_hmac_init(key, md)
+ vchar_t *key;
+ const EVP_MD *md;
+ {
+- HMAC_CTX *c = racoon_malloc(sizeof(*c));
++ HMAC_CTX *c = HMAC_CTX_new();
+
+- HMAC_Init(c, key->v, key->l, md);
++ HMAC_Init_ex(c, key->v, key->l, md, NULL);
+
+ return (caddr_t)c;
+ }
+@@ -1761,8 +1760,7 @@ eay_hmacsha2_512_final(c)
+
+ HMAC_Final((HMAC_CTX *)c, (unsigned char *) res->v, &l);
+ res->l = l;
+- HMAC_cleanup((HMAC_CTX *)c);
+- (void)racoon_free(c);
++ HMAC_CTX_free((HMAC_CTX *)c);
+
+ if (SHA512_DIGEST_LENGTH != res->l) {
+ plog(LLV_ERROR, LOCATION, NULL,
+@@ -1811,8 +1809,7 @@ eay_hmacsha2_384_final(c)
+
+ HMAC_Final((HMAC_CTX *)c, (unsigned char *) res->v, &l);
+ res->l = l;
+- HMAC_cleanup((HMAC_CTX *)c);
+- (void)racoon_free(c);
++ HMAC_CTX_free((HMAC_CTX *)c);
+
+ if (SHA384_DIGEST_LENGTH != res->l) {
+ plog(LLV_ERROR, LOCATION, NULL,
+@@ -1861,8 +1858,7 @@ eay_hmacsha2_256_final(c)
+
+ HMAC_Final((HMAC_CTX *)c, (unsigned char *) res->v, &l);
+ res->l = l;
+- HMAC_cleanup((HMAC_CTX *)c);
+- (void)racoon_free(c);
++ HMAC_CTX_free((HMAC_CTX *)c);
+
+ if (SHA256_DIGEST_LENGTH != res->l) {
+ plog(LLV_ERROR, LOCATION, NULL,
+@@ -1912,8 +1908,7 @@ eay_hmacsha1_final(c)
+
+ HMAC_Final((HMAC_CTX *)c, (unsigned char *) res->v, &l);
+ res->l = l;
+- HMAC_cleanup((HMAC_CTX *)c);
+- (void)racoon_free(c);
++ HMAC_CTX_free((HMAC_CTX *)c);
+
+ if (SHA_DIGEST_LENGTH != res->l) {
+ plog(LLV_ERROR, LOCATION, NULL,
+@@ -1962,8 +1957,7 @@ eay_hmacmd5_final(c)
+
+ HMAC_Final((HMAC_CTX *)c, (unsigned char *) res->v, &l);
+ res->l = l;
+- HMAC_cleanup((HMAC_CTX *)c);
+- (void)racoon_free(c);
++ HMAC_CTX_free((HMAC_CTX *)c);
+
+ if (MD5_DIGEST_LENGTH != res->l) {
+ plog(LLV_ERROR, LOCATION, NULL,
+@@ -2266,6 +2260,7 @@ eay_dh_generate(prime, g, publen, pub, priv)
+ u_int32_t g;
+ {
+ BIGNUM *p = NULL;
++ BIGNUM *BNg = NULL;
+ DH *dh = NULL;
+ int error = -1;
+
+@@ -2276,25 +2271,28 @@ eay_dh_generate(prime, g, publen, pub, priv)
+
+ if ((dh = DH_new()) == NULL)
+ goto end;
+- dh->p = p;
+- p = NULL; /* p is now part of dh structure */
+- dh->g = NULL;
+- if ((dh->g = BN_new()) == NULL)
++ if ((BNg = BN_new()) == NULL)
+ goto end;
+- if (!BN_set_word(dh->g, g))
++ if (!BN_set_word(BNg, g))
+ goto end;
++ if (! DH_set0_pqg(dh, p, NULL, BNg))
++ goto end;
++ BNg = NULL;
++ p = NULL; /* p is now part of dh structure */
+
+ if (publen != 0)
+- dh->length = publen;
++ DH_set_length(dh, publen);
+
+ /* generate public and private number */
+ if (!DH_generate_key(dh))
+ goto end;
+
+ /* copy results to buffers */
+- if (eay_bn2v(pub, dh->pub_key) < 0)
++ BIGNUM *pub_key, *priv_key;
++ DH_get0_key(dh, (const BIGNUM**) &pub_key, (const BIGNUM**) &priv_key);
++ if (eay_bn2v(pub, pub_key) < 0)
+ goto end;
+- if (eay_bn2v(priv, dh->priv_key) < 0) {
++ if (eay_bn2v(priv, priv_key) < 0) {
+ vfree(*pub);
+ goto end;
+ }
+@@ -2306,6 +2304,8 @@ end:
+ DH_free(dh);
+ if (p != 0)
+ BN_free(p);
++ if (BNg != 0)
++ BN_free(BNg);
+ return(error);
+ }
+
+@@ -2319,6 +2319,10 @@ eay_dh_compute(prime, g, pub, priv, pub2, key)
+ int l;
+ unsigned char *v = NULL;
+ int error = -1;
++ BIGNUM *p = BN_new();
++ BIGNUM *BNg = BN_new();
++ BIGNUM *pub_key = BN_new();
++ BIGNUM *priv_key = BN_new();
+
+ /* make public number to compute */
+ if (eay_v2bn(&dh_pub, pub2) < 0)
+@@ -2327,19 +2331,21 @@ eay_dh_compute(prime, g, pub, priv, pub2, key)
+ /* make DH structure */
+ if ((dh = DH_new()) == NULL)
+ goto end;
+- if (eay_v2bn(&dh->p, prime) < 0)
++ if (p == NULL || BNg == NULL || pub_key == NULL || priv_key == NULL)
+ goto end;
+- if (eay_v2bn(&dh->pub_key, pub) < 0)
++
++ if (eay_v2bn(&p, prime) < 0)
+ goto end;
+- if (eay_v2bn(&dh->priv_key, priv) < 0)
++ if (eay_v2bn(&pub_key, pub) < 0)
+ goto end;
+- dh->length = pub2->l * 8;
+-
+- dh->g = NULL;
+- if ((dh->g = BN_new()) == NULL)
++ if (eay_v2bn(&priv_key, priv) < 0)
+ goto end;
+- if (!BN_set_word(dh->g, g))
++ if (!BN_set_word(BNg, g))
+ goto end;
++ DH_set0_key(dh, pub_key, priv_key);
++ DH_set_length(dh, pub2->l * 8);
++ DH_set0_pqg(dh, p, NULL, BNg);
++ pub_key = priv_key = p = BNg = NULL;
+
+ if ((v = racoon_calloc(prime->l, sizeof(u_char))) == NULL)
+ goto end;
+@@ -2350,6 +2356,14 @@ eay_dh_compute(prime, g, pub, priv, pub2, key)
+ error = 0;
+
+ end:
++ if (p != NULL)
++ BN_free(p);
++ if (BNg != NULL)
++ BN_free(BNg);
++ if (pub_key != NULL)
++ BN_free(pub_key);
++ if (priv_key != NULL)
++ BN_free(priv_key);
+ if (dh_pub != NULL)
+ BN_free(dh_pub);
+ if (dh != NULL)
+@@ -2400,12 +2414,14 @@ eay_bn2v(var, bn)
+ void
+ eay_init()
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ OpenSSL_add_all_algorithms();
+ ERR_load_crypto_strings();
+ #ifdef HAVE_OPENSSL_ENGINE_H
+ ENGINE_load_builtin_engines();
+ ENGINE_register_all_complete();
+ #endif
++#endif
+ }
+
+ vchar_t *
+@@ -2504,8 +2520,7 @@ binbuf_pubkey2rsa(vchar_t *binbuf)
+ goto out;
+ }
+
+- rsa_pub->n = mod;
+- rsa_pub->e = exp;
++ RSA_set0_key(rsa_pub, mod, exp, NULL);
+
+ out:
+ return rsa_pub;
+@@ -2582,5 +2597,5 @@ eay_random()
+ const char *
+ eay_version()
+ {
+- return SSLeay_version(SSLEAY_VERSION);
++ return OpenSSL_version(OPENSSL_VERSION);
+ }
+diff --git a/src/racoon/crypto_openssl.h b/src/racoon/crypto_openssl.h
+index 66fac73..ee5b765 100644
+--- a/src/racoon/crypto_openssl.h
++++ b/src/racoon/crypto_openssl.h
+@@ -124,7 +124,7 @@ extern vchar_t *eay_aes_decrypt __P((vchar_t *, vchar_t *, vchar_t *));
+ extern int eay_aes_weakkey __P((vchar_t *));
+ extern int eay_aes_keylen __P((int));
+
+-#if defined(HAVE_OPENSSL_CAMELLIA_H)
++#if defined(HAVE_OPENSSL_CAMELLIA_H) && ! defined(OPENSSL_NO_CAMELLIA)
+ /* Camellia */
+ extern vchar_t *eay_camellia_encrypt __P((vchar_t *, vchar_t *, vchar_t *));
+ extern vchar_t *eay_camellia_decrypt __P((vchar_t *, vchar_t *, vchar_t *));
+diff --git a/src/racoon/eaytest.c b/src/racoon/eaytest.c
+index 1474bdc..ae09db3 100644
+--- a/src/racoon/eaytest.c
++++ b/src/racoon/eaytest.c
+@@ -62,6 +62,7 @@
+ #include "dhgroup.h"
+ #include "crypto_openssl.h"
+ #include "gnuc.h"
++#include "openssl_compat.h"
+
+ #include "package_version.h"
+
+@@ -103,7 +104,7 @@ rsa_verify_with_pubkey(src, sig, pubkey_txt)
+ printf ("PEM_read_PUBKEY(): %s\n", eay_strerror());
+ return -1;
+ }
+- error = eay_check_rsasign(src, sig, evp->pkey.rsa);
++ error = eay_check_rsasign(src, sig, EVP_PKEY_get0_RSA(evp));
+
+ return error;
+ }
+@@ -698,7 +699,7 @@ ciphertest(ac, av)
+ eay_cast_encrypt, eay_cast_decrypt) < 0)
+ return -1;
+
+-#ifdef HAVE_OPENSSL_IDEA_H
++#if defined(HAVE_OPENSSL_IDEA_H) && ! defined(OPENSSL_NO_IDEA)
+ if (ciphertest_1 ("IDEA",
+ &data, 8,
+ &key, key.l,
+@@ -715,7 +716,7 @@ ciphertest(ac, av)
+ eay_rc5_encrypt, eay_rc5_decrypt) < 0)
+ return -1;
+ #endif
+-#if defined(HAVE_OPENSSL_CAMELLIA_H)
++#if defined(HAVE_OPENSSL_CAMELLIA_H) && ! defined(OPENSSL_NO_CAMELLIA)
+ if (ciphertest_1 ("CAMELLIA",
+ &data, 16,
+ &key, key.l,
+diff --git a/src/racoon/ipsec_doi.c b/src/racoon/ipsec_doi.c
+index 84a4c71..b52469f 100644
+--- a/src/racoon/ipsec_doi.c
++++ b/src/racoon/ipsec_doi.c
+@@ -715,7 +715,7 @@ out:
+ /* key length must not be specified on some algorithms */
+ if (keylen) {
+ if (sa->enctype == OAKLEY_ATTR_ENC_ALG_DES
+-#ifdef HAVE_OPENSSL_IDEA_H
++#if defined(HAVE_OPENSSL_IDEA_H) && ! defined(OPENSSL_NO_IDEA)
+ || sa->enctype == OAKLEY_ATTR_ENC_ALG_IDEA
+ #endif
+ || sa->enctype == OAKLEY_ATTR_ENC_ALG_3DES) {
+diff --git a/src/racoon/openssl_compat.c b/src/racoon/openssl_compat.c
+new file mode 100644
+index 0000000..864b5fb
+--- /dev/null
++++ b/src/racoon/openssl_compat.c
+@@ -0,0 +1,213 @@
++/*
++ * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
++ *
++ * Licensed under the OpenSSL license (the "License"). You may not use
++ * this file except in compliance with the License. You can obtain a copy
++ * in the file LICENSE in the source distribution or at
++ * https://www.openssl.org/source/license.html
++ */
++
++#include "openssl_compat.h"
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
++#include <string.h>
++
++static void *OPENSSL_zalloc(size_t num)
++{
++ void *ret = OPENSSL_malloc(num);
++
++ if (ret != NULL)
++ memset(ret, 0, num);
++ return ret;
++}
++
++int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
++{
++ /* If the fields n and e in r are NULL, the corresponding input
++ * parameters MUST be non-NULL for n and e. d may be
++ * left NULL (in case only the public key is used).
++ */
++ if ((r->n == NULL && n == NULL)
++ || (r->e == NULL && e == NULL))
++ return 0;
++
++ if (n != NULL) {
++ BN_free(r->n);
++ r->n = n;
++ }
++ if (e != NULL) {
++ BN_free(r->e);
++ r->e = e;
++ }
++ if (d != NULL) {
++ BN_free(r->d);
++ r->d = d;
++ }
++
++ return 1;
++}
++
++int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q)
++{
++ /* If the fields p and q in r are NULL, the corresponding input
++ * parameters MUST be non-NULL.
++ */
++ if ((r->p == NULL && p == NULL)
++ || (r->q == NULL && q == NULL))
++ return 0;
++
++ if (p != NULL) {
++ BN_free(r->p);
++ r->p = p;
++ }
++ if (q != NULL) {
++ BN_free(r->q);
++ r->q = q;
++ }
++
++ return 1;
++}
++
++int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp)
++{
++ /* If the fields dmp1, dmq1 and iqmp in r are NULL, the corresponding input
++ * parameters MUST be non-NULL.
++ */
++ if ((r->dmp1 == NULL && dmp1 == NULL)
++ || (r->dmq1 == NULL && dmq1 == NULL)
++ || (r->iqmp == NULL && iqmp == NULL))
++ return 0;
++
++ if (dmp1 != NULL) {
++ BN_free(r->dmp1);
++ r->dmp1 = dmp1;
++ }
++ if (dmq1 != NULL) {
++ BN_free(r->dmq1);
++ r->dmq1 = dmq1;
++ }
++ if (iqmp != NULL) {
++ BN_free(r->iqmp);
++ r->iqmp = iqmp;
++ }
++
++ return 1;
++}
++
++void RSA_get0_key(const RSA *r,
++ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
++{
++ if (n != NULL)
++ *n = r->n;
++ if (e != NULL)
++ *e = r->e;
++ if (d != NULL)
++ *d = r->d;
++}
++
++void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q)
++{
++ if (p != NULL)
++ *p = r->p;
++ if (q != NULL)
++ *q = r->q;
++}
++
++void RSA_get0_crt_params(const RSA *r,
++ const BIGNUM **dmp1, const BIGNUM **dmq1,
++ const BIGNUM **iqmp)
++{
++ if (dmp1 != NULL)
++ *dmp1 = r->dmp1;
++ if (dmq1 != NULL)
++ *dmq1 = r->dmq1;
++ if (iqmp != NULL)
++ *iqmp = r->iqmp;
++}
++
++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
++{
++ /* If the fields p and g in d are NULL, the corresponding input
++ * parameters MUST be non-NULL. q may remain NULL.
++ */
++ if ((dh->p == NULL && p == NULL)
++ || (dh->g == NULL && g == NULL))
++ return 0;
++
++ if (p != NULL) {
++ BN_free(dh->p);
++ dh->p = p;
++ }
++ if (q != NULL) {
++ BN_free(dh->q);
++ dh->q = q;
++ }
++ if (g != NULL) {
++ BN_free(dh->g);
++ dh->g = g;
++ }
++
++ if (q != NULL) {
++ dh->length = BN_num_bits(q);
++ }
++
++ return 1;
++}
++
++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
++{
++ if (pub_key != NULL)
++ *pub_key = dh->pub_key;
++ if (priv_key != NULL)
++ *priv_key = dh->priv_key;
++}
++
++int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
++{
++ /* If the field pub_key in dh is NULL, the corresponding input
++ * parameters MUST be non-NULL. The priv_key field may
++ * be left NULL.
++ */
++ if (dh->pub_key == NULL && pub_key == NULL)
++ return 0;
++
++ if (pub_key != NULL) {
++ BN_free(dh->pub_key);
++ dh->pub_key = pub_key;
++ }
++ if (priv_key != NULL) {
++ BN_free(dh->priv_key);
++ dh->priv_key = priv_key;
++ }
++
++ return 1;
++}
++
++int DH_set_length(DH *dh, long length)
++{
++ dh->length = length;
++ return 1;
++}
++
++HMAC_CTX *HMAC_CTX_new(void)
++{
++ return OPENSSL_zalloc(sizeof(HMAC_CTX));
++}
++
++void HMAC_CTX_free(HMAC_CTX *ctx)
++{
++ HMAC_CTX_cleanup(ctx);
++ OPENSSL_free(ctx);
++}
++
++RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey)
++{
++ if (pkey->type != EVP_PKEY_RSA) {
++ return NULL;
++ }
++ return pkey->pkey.rsa;
++}
++
++
++#endif /* OPENSSL_VERSION_NUMBER */
+diff --git a/src/racoon/openssl_compat.h b/src/racoon/openssl_compat.h
+new file mode 100644
+index 0000000..9e152c2
+--- /dev/null
++++ b/src/racoon/openssl_compat.h
+@@ -0,0 +1,45 @@
++#ifndef OPENSSL_COMPAT_H
++#define OPENSSL_COMPAT_H
++
++#include <openssl/opensslv.h>
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
++#include <openssl/rsa.h>
++#include <openssl/dh.h>
++#include <openssl/evp.h>
++#include <openssl/hmac.h>
++
++int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
++int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
++int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp);
++void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d);
++void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q);
++void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp);
++
++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);
++int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
++int DH_set_length(DH *dh, long length);
++
++HMAC_CTX *HMAC_CTX_new(void);
++void HMAC_CTX_free(HMAC_CTX* ctx);
++
++RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey);
++
++#define ASN1_STRING_length(s) s->length
++#define ASN1_STRING_get0_data(s) s->data
++
++#define X509_get_subject_name(x) x->cert_info->subject
++#define X509_get_issuer_name(x) x->cert_info->issuer
++#define X509_NAME_ENTRY_get_data(n) n->value
++#define X509_NAME_ENTRY_get_object(n) n->object
++#define X509_STORE_CTX_get_current_cert(ctx) ctx->current_cert
++#define X509_STORE_CTX_get_error(ctx) ctx->error
++#define X509_STORE_CTX_get_error_depth(ctx) ctx->error_depth
++
++#define OPENSSL_VERSION SSLEAY_VERSION
++#define OpenSSL_version SSLeay_version
++
++#endif /* OPENSSL_VERSION_NUMBER */
++
++#endif /* OPENSSL_COMPAT_H */
+diff --git a/src/racoon/plainrsa-gen.c b/src/racoon/plainrsa-gen.c
+index cad1861..b949b08 100644
+--- a/src/racoon/plainrsa-gen.c
++++ b/src/racoon/plainrsa-gen.c
+@@ -60,6 +60,7 @@
+ #include "vmbuf.h"
+ #include "plog.h"
+ #include "crypto_openssl.h"
++#include "openssl_compat.h"
+
+ #include "package_version.h"
+
+@@ -90,12 +91,14 @@ mix_b64_pubkey(const RSA *key)
+ char *binbuf;
+ long binlen, ret;
+ vchar_t *res;
+-
+- binlen = 1 + BN_num_bytes(key->e) + BN_num_bytes(key->n);
++ const BIGNUM *e, *n;
++
++ RSA_get0_key(key, &n, &e, NULL);
++ binlen = 1 + BN_num_bytes(e) + BN_num_bytes(n);
+ binbuf = malloc(binlen);
+ memset(binbuf, 0, binlen);
+- binbuf[0] = BN_bn2bin(key->e, (unsigned char *) &binbuf[1]);
+- ret = BN_bn2bin(key->n, (unsigned char *) (&binbuf[binbuf[0] + 1]));
++ binbuf[0] = BN_bn2bin(e, (unsigned char *) &binbuf[1]);
++ ret = BN_bn2bin(n, (unsigned char *) (&binbuf[binbuf[0] + 1]));
+ if (1 + binbuf[0] + ret != binlen) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "Pubkey generation failed. This is really strange...\n");
+@@ -131,16 +134,20 @@ print_rsa_key(FILE *fp, const RSA *key)
+
+ fprintf(fp, "# : PUB 0s%s\n", pubkey64->v);
+ fprintf(fp, ": RSA\t{\n");
+- fprintf(fp, "\t# RSA %d bits\n", BN_num_bits(key->n));
++ const BIGNUM *n, *e, *d, *p, *q, *dmp1, *dmq1, *iqmp;
++ RSA_get0_key(key, &n, &e, &d);
++ RSA_get0_factors(key, &p, &q);
++ RSA_get0_crt_params(key, &dmp1, &dmq1, &iqmp);
++ fprintf(fp, "\t# RSA %d bits\n", BN_num_bits(n));
+ fprintf(fp, "\t# pubkey=0s%s\n", pubkey64->v);
+- fprintf(fp, "\tModulus: 0x%s\n", lowercase(BN_bn2hex(key->n)));
+- fprintf(fp, "\tPublicExponent: 0x%s\n", lowercase(BN_bn2hex(key->e)));
+- fprintf(fp, "\tPrivateExponent: 0x%s\n", lowercase(BN_bn2hex(key->d)));
+- fprintf(fp, "\tPrime1: 0x%s\n", lowercase(BN_bn2hex(key->p)));
+- fprintf(fp, "\tPrime2: 0x%s\n", lowercase(BN_bn2hex(key->q)));
+- fprintf(fp, "\tExponent1: 0x%s\n", lowercase(BN_bn2hex(key->dmp1)));
+- fprintf(fp, "\tExponent2: 0x%s\n", lowercase(BN_bn2hex(key->dmq1)));
+- fprintf(fp, "\tCoefficient: 0x%s\n", lowercase(BN_bn2hex(key->iqmp)));
++ fprintf(fp, "\tModulus: 0x%s\n", lowercase(BN_bn2hex(n)));
++ fprintf(fp, "\tPublicExponent: 0x%s\n", lowercase(BN_bn2hex(e)));
++ fprintf(fp, "\tPrivateExponent: 0x%s\n", lowercase(BN_bn2hex(d)));
++ fprintf(fp, "\tPrime1: 0x%s\n", lowercase(BN_bn2hex(p)));
++ fprintf(fp, "\tPrime2: 0x%s\n", lowercase(BN_bn2hex(q)));
++ fprintf(fp, "\tExponent1: 0x%s\n", lowercase(BN_bn2hex(dmp1)));
++ fprintf(fp, "\tExponent2: 0x%s\n", lowercase(BN_bn2hex(dmq1)));
++ fprintf(fp, "\tCoefficient: 0x%s\n", lowercase(BN_bn2hex(iqmp)));
+ fprintf(fp, " }\n");
+
+ vfree(pubkey64);
+@@ -203,11 +210,13 @@ int
+ gen_rsa_key(FILE *fp, size_t bits, unsigned long exp)
+ {
+ int ret;
+- RSA *key;
++ RSA *key = RSA_new();
++ BIGNUM *e = BN_new();
+
+- key = RSA_generate_key(bits, exp, NULL, NULL);
+- if (!key) {
++ BN_set_word(e, exp);
++ if (! RSA_generate_key_ex(key, bits, e, NULL)) {
+ fprintf(stderr, "RSA_generate_key(): %s\n", eay_strerror());
++ RSA_free(key);
+ return -1;
+ }
+
+diff --git a/src/racoon/prsa_par.y b/src/racoon/prsa_par.y
+index 1987e4d..27ce4c6 100644
+--- a/src/racoon/prsa_par.y
++++ b/src/racoon/prsa_par.y
+@@ -68,6 +68,7 @@
+ #include "isakmp_var.h"
+ #include "handler.h"
+ #include "crypto_openssl.h"
++#include "openssl_compat.h"
+ #include "sockmisc.h"
+ #include "rsalist.h"
+
+@@ -85,7 +86,18 @@ char *prsa_cur_fname = NULL;
+ struct genlist *prsa_cur_list = NULL;
+ enum rsa_key_type prsa_cur_type = RSA_TYPE_ANY;
+
+-static RSA *rsa_cur;
++struct my_rsa_st {
++ BIGNUM *n;
++ BIGNUM *e;
++ BIGNUM *d;
++ BIGNUM *p;
++ BIGNUM *q;
++ BIGNUM *dmp1;
++ BIGNUM *dmq1;
++ BIGNUM *iqmp;
++};
++
++static struct my_rsa_st *rsa_cur;
+
+ void
+ prsaerror(const char *s, ...)
+@@ -201,8 +213,12 @@ rsa_statement:
+ rsa_cur->iqmp = NULL;
+ }
+ }
+- $$ = rsa_cur;
+- rsa_cur = RSA_new();
++ RSA * rsa_tmp = RSA_new();
++ RSA_set0_key(rsa_tmp, rsa_cur->n, rsa_cur->e, rsa_cur->d);
++ RSA_set0_factors(rsa_tmp, rsa_cur->p, rsa_cur->q);
++ RSA_set0_crt_params(rsa_tmp, rsa_cur->dmp1, rsa_cur->dmq1, rsa_cur->iqmp);
++ $$ = rsa_tmp;
++ memset(rsa_cur, 0, sizeof(struct my_rsa_st));
+ }
+ | TAG_PUB BASE64
+ {
+@@ -351,10 +367,12 @@ prsa_parse_file(struct genlist *list, char *fname, enum rsa_key_type type)
+ prsa_cur_fname = fname;
+ prsa_cur_list = list;
+ prsa_cur_type = type;
+- rsa_cur = RSA_new();
++ rsa_cur = malloc(sizeof(struct my_rsa_st));
++ memset(rsa_cur, 0, sizeof(struct my_rsa_st));
+ ret = prsaparse();
+ if (rsa_cur) {
+- RSA_free(rsa_cur);
++ memset(rsa_cur, 0, sizeof(struct my_rsa_st));
++ free(rsa_cur);
+ rsa_cur = NULL;
+ }
+ fclose (fp);
+diff --git a/src/racoon/rsalist.c b/src/racoon/rsalist.c
+index f152c82..96e8363 100644
+--- a/src/racoon/rsalist.c
++++ b/src/racoon/rsalist.c
+@@ -52,6 +52,7 @@
+ #include "genlist.h"
+ #include "remoteconf.h"
+ #include "crypto_openssl.h"
++#include "openssl_compat.h"
+
+ #ifndef LIST_FIRST
+ #define LIST_FIRST(head) ((head)->lh_first)
+@@ -98,7 +99,9 @@ rsa_key_dup(struct rsa_key *key)
+ return NULL;
+
+ if (key->rsa) {
+- new->rsa = key->rsa->d != NULL ? RSAPrivateKey_dup(key->rsa) : RSAPublicKey_dup(key->rsa);
++ const BIGNUM *d;
++ RSA_get0_key(key->rsa, NULL, NULL, &d);
++ new->rsa = (d != NULL ? RSAPrivateKey_dup(key->rsa) : RSAPublicKey_dup(key->rsa));
+ if (new->rsa == NULL)
+ goto dup_error;
+ }
+--
+2.16.1
+
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://fedorahosted.org/releases/i/p/iptraf-ng/
+PKG_SOURCE_URL:=https://infrastructure.fedoraproject.org/infra/hosted-content/$(PKG_NAME)/$(PKG_NAME)
PKG_HASH:=79140cf07c0cceb1b5723242847a73aa86f5e4f9dccfe8970fda6801d347eb09
PKG_LICENSE:=GPL-2.0
CATEGORY:=Network
DEPENDS:=+libncurses
TITLE:=A console-based network monitoring program
- URL:=https://fedorahosted.org/iptraf-ng/
+ URL:=https://infrastructure.fedoraproject.org/infra/hosted-content/iptraf-ng/
endef
define Package/iptraf-ng/description
--- /dev/null
+#
+# Copyright (C) 2016-2017 Mauro Mozzarelli
+#
+# This is free software, licensed under the GNU General Public License
+# See /LICENSE for more information.
+#
+# AUTHOR: Mauro Mozzarelli <mauro@ezplanet.org>
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ipvsadm
+PKG_VERSION:=1.29
+PKG_MAINTAINER:=Mauro Mozzarelli <mauro@ezplanet.org>, \
+ Florian Eckert <fe@dev.tdt.de>
+PKG_LICENSE:=GPL-2.0+
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://www.kernel.org/pub/linux/utils/kernel/ipvsadm/
+PKG_HASH:=c3de4a21d90a02c621f0c72ee36a7aa27374b6f29fd4178f33fbf71b4c66c149
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ipvsadm
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=IP Virtual Server Configuration Manager
+ URL:=http://www.linuxvirtualserver.org
+ DEPENDS:= +kmod-nf-ipvs +libnl-tiny +libpopt
+endef
+
+define Package/ipvsadm/description
+ IPVS (IP Virtual Server) implements transport-layer load balancing
+ inside the Linux kernel, so called Layer-4 switching. The command line tool
+ ipvsadm is used to set up, maintain or inspect the virtual server table
+ in the Linux kernel. The Linux Virtual Server can be used to build scalable
+ network services based on a cluster of two or more nodes.
+endef
+
+TARGET_CFLAGS += \
+ -D_GNU_SOURCE \
+ -I$(STAGING_DIR)/usr/include/libnl-tiny
+
+define Build/Compile
+ CFLAGS="$(TARGET_CFLAGS)" \
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CC="$(TARGET_CC)" \
+ LIBS="$(TARGET_LDFLAGS) -lnl-tiny -lpopt"
+endef
+
+define Package/ipvsadm/install
+ $(INSTALL_DIR) $(1)/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipvsadm $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipvsadm-save $(1)/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipvsadm-restore $(1)/sbin/
+endef
+
+$(eval $(call BuildPackage,ipvsadm))
--- /dev/null
+--- a/Makefile
++++ b/Makefile
+@@ -35,7 +35,7 @@ ARCH = $(shell uname -m)
+ RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir')
+ RPMSPECDIR = $(shell rpm --eval '%_specdir')
+
+-CC = gcc
++BUILD_ROOT = $(DESTDIR)
+ INCLUDE =
+ SBIN = $(BUILD_ROOT)/sbin
+ MANDIR = usr/man
+@@ -46,9 +46,9 @@ INSTALL = install
+ STATIC_LIBS = libipvs/libipvs.a
+
+ ifeq "${ARCH}" "sparc64"
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
++ CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
+ else
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
++ CFLAGS += -Wall -Wunused -Wstrict-prototypes -g
+ endif
+
+
+@@ -83,8 +83,9 @@ DEFINES += $(shell if [ ! -f ../ip_vs.h
+
+ all: libs ipvsadm
+
++$(STATIC_LIBS): libs
+ libs:
+- make -C libipvs
++ $(MAKE) -C libipvs
+
+ ipvsadm: $(OBJS) $(STATIC_LIBS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
+@@ -106,7 +107,7 @@ clean:
+ rm -rf debian/tmp
+ find . -name '*.[ao]' -o -name "*~" -o -name "*.orig" \
+ -o -name "*.rej" -o -name core | xargs rm -f
+- make -C libipvs clean
++ $(MAKE) -C libipvs clean
+
+ distclean: clean
+
+--- a/libipvs/Makefile
++++ b/libipvs/Makefile
+@@ -1,7 +1,6 @@
+ # Makefile for libipvs
+
+-CC = gcc
+-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
++CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -fPIC
+ ifneq (0,$(HAVE_NL))
+ CFLAGS += -DLIBIPVS_USE_NL
+ CFLAGS += $(shell \
--- /dev/null
+--- a/ipvsadm-restore
++++ b/ipvsadm-restore
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # ipvsadm-restore - Restore IPVS rules
+ #
+ # A very simple wrapper to restore IPVS rules
+@@ -11,6 +11,8 @@
+ # This file:
+ #
+ # ChangeLog
++# M. Mozzarelli : Amended to use /bin/sh for compatibility
++# : with embedded systems using busybox
+ # Horms : Clear IPVS rules before adding from STDIN
+ # Horms : Filter out "^#"
+ #
+--- a/ipvsadm-save
++++ b/ipvsadm-save
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # ipvsadm-save - Save IPVS rules
+ #
+ # A very simple wrapper to save IPVS rules
+@@ -12,6 +12,8 @@
+ #
+ # ChangeLog
+ #
++# M. Mozzarelli : Amended to use /bin/sh for compatibility
++# : with embedded systems using busybox
+ # Wensong Zhang : Added the "-n" option and the help()
+ #
+
PKG_NAME:=isc-dhcp
UPSTREAM_NAME:=dhcp
-PKG_VERSION:=4.4.0
-PKG_RELEASE:=1
+PKG_VERSION:=4.4.1
+PKG_RELEASE:=2
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/$(PKG_VERSION) \
http://ftp.funet.fi/pub/mirrors/ftp.isc.org/isc/dhcp/$(PKG_VERSION) \
http://ftp.iij.ad.jp/pub/network/isc/dhcp/$(PKG_VERSION)
-PKG_HASH:=4a90be0f22ad81c987f5584661b60a594f1b21c581b82bfba3ae60f89ae44397
+PKG_HASH:=2a22508922ab367b4af4664a0472dc220cc9603482cf3c16d9aff14f3a76b608
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_DATA) ./files/etc/config/dhcrelay $(1)/etc/config
+ $(INSTALL_DATA) ./files/dhcrelay.conf $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/dhcrelay4.init $(1)/etc/init.d/dhcrelay4
endef
if [ -n "$gateway" ] ; then
echo " option routers $gateway;"
fi
+ config_list_foreach "$cfg" "dhcp_option" append_dhcp_options
echo "}"
done
}
typeof() {
echo "$1" | awk '
-/^\d+\.\d+\.\d+\.d+$/ { print "ip\n"; next; }
+/^\d+\.\d+\.\d+\.\d+$/ { print "ip\n"; next; }
/^(true|false)$/ { print "bool\n"; next; }
/^\d+$/ { print "integer\n"; next; }
/^"[^"]*"$/ { print "string\n"; next; }
echo "max-lease-time $max_lease_time;"
[ -n "$domain" ] && echo "option domain-name \"$domain\";"
+
+ rm -f /tmp/resolv.conf
+ echo "# This file is generated by the DHCPD service" > /tmp/resolv.conf
+ [ -n "$domain" ] && echo "domain $domain" >> /tmp/resolv.conf
+ echo "nameserver 127.0.0.1" >> /tmp/resolv.conf
}
start_service() {
--- /dev/null
+
+config dhcrelay ipv4
+ option 'enabled' '0'
+
+ # IP address of the server
+ option 'dhcpserver' '192.0.2.10'
+
+ # network interfaces to listen on (e.g. lan or wan)
+ option 'interfaces' ''
+ option 'upstream_interfaces' ''
+ option 'downstream_interfaces' ''
+
+ # What to do about packets that already have a relay option:
+ # 'append': Forward and append our own relay option
+ # 'replace': Forward, but replace theirs with ours (default)
+ # 'forward': Forward without changes
+ # 'discard': Don't forward
+ option 'relay_mode' ''
+
+ # enable RFC3527 link selection sub-option and use the IP address of
+ # the specified network interface as "uplink" IP address (e.g. wan)
+ option 'link_selection' ''
+
+config dhcrelay ipv6
+# option dhcpserver '2001:db8:1::1'
+ option upper 'eth1'
+ list lower 'eth0.2'
+ list lower 'eth0.3'
+
append args "-i $ifname"
fi
done
+ config_get interfaces ipv4 upstream_interfaces
+ for net in $interfaces; do
+ if network_get_device ifname "$net"; then
+ append args "-iu $ifname"
+ fi
+ done
+ config_get interfaces ipv4 downstream_interfaces
+ for net in $interfaces; do
+ if network_get_device ifname "$net"; then
+ append args "-id $ifname"
+ fi
+ done
# link selection sub-option (RFC3527)
local link_selection
+++ /dev/null
-
-config dhcrelay ipv4
- option 'enabled' '0'
-
- # IP address of the server
- option 'dhcpserver' '192.0.2.10'
-
- # network interfaces to listen on (e.g. lan or wan)
- option 'interfaces' ''
-
- # What to do about packets that already have a relay option:
- # 'append': Forward and append our own relay option
- # 'replace': Forward, but replace theirs with ours (default)
- # 'forward': Forward without changes
- # 'discard': Don't forward
- option 'relay_mode' ''
-
- # enable RFC3527 link selection sub-option and use the IP address of
- # the specified network interface as "uplink" IP address (e.g. wan)
- option 'link_selection' ''
-
-config dhcrelay ipv6
-# option dhcpserver '2001:db8:1::1'
- option upper 'eth1'
- list lower 'eth0.2'
- list lower 'eth0.3'
-
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=jool
-PKG_VERSION:=2018.01.17
-PKG_RELEASE:=2
+PKG_VERSION:=3.5.7
+PKG_RELEASE:=1
-PKG_LICENSE:=GPL-3.0
-PKG_LICENSE_FILES:=COPYING
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/NICMx/Jool/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=b8e95d1526cd2434dedbae292afd2d17f0780ac2dca2be21264712b41eb76a3d
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/Jool-$(PKG_VERSION)
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/NICMx/Jool.git
-PKG_SOURCE_VERSION:=9dfaf22e49f7905d94af9b73f9bee22c26d7dd4a
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=79b558561f06f3df01a541b1d39b7d3d88f91d0ee6b8ce3abf91ebbed737225a
+PKG_MAINTAINER:=Dan Luedtke <mail@danrl.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
-PKG_BUILD_DIR=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
PKG_FIXUP:=autoreconf
-include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk
MAKE_PATH:=usr
SECTION:=net
CATEGORY:=Network
URL:=https://www.jool.mx
- MAINTAINER:=Dan Luedtke <mail@danrl.com>
endef
define Package/jool/Default/description
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
include $(TOPDIR)/rules.mk
PKG_NAME:=kadnode
-PKG_VERSION:=2.2.0
+PKG_VERSION:=2.2.5
PKG_RELEASE:=1
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/mwarning/KadNode
-PKG_SOURCE_VERSION:=c63e734950787d35c8bf1363448430942d1bb39d
-PKG_MIRROR_HASH:=dcecfb14169ac5c4c28bcf147681f6823aa2d8a37d29d35ab3e76b613cce085c
PKG_LICENSE:=MIT
+PKG_SOURCE_URL:=https://codeload.github.com/mwarning/KadNode/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=kadnode-$(PKG_VERSION).tar.gz
+PKG_HASH:=a72dc54d1869e47e374935cf44aa888a9b13c9dc017ae22e29cf13ead38a506b
+PKG_BUILD_DIR:=$(BUILD_DIR)/KadNode-$(PKG_VERSION)
+
+
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
MAKE_FLAGS += FEATURES="$(FEATURES)"
+# Make binary smaller
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections
+
define Package/kadnode/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build/kadnode $(1)/usr/bin/
include $(TOPDIR)/rules.mk
PKG_NAME:=keepalived
-PKG_VERSION:=1.3.9
-PKG_RELEASE:=2
+PKG_VERSION:=2.0.7
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:= http://www.keepalived.org/software
-PKG_HASH:=d5bdd25530acf60989222fd92fbfd596e06ecc356a820f4c1015708b76a8d4f3
+PKG_SOURCE_URL:=http://www.keepalived.org/software
+PKG_HASH:=bce45d6d5cf3620bfd88472ec839a75b5a14a54fda12d09e890670244873b8ab
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
TITLE:=Failover and monitoring daemon for LVS clusters
URL:=http://www.keepalived.org/
DEPENDS:= \
- +PACKAGE_libnl-genl:libnl-genl \
+libopenssl \
+libip4tc \
+IPV6:libip6tc \
+libxtables \
- +kmod-macvlan
+ +kmod-macvlan \
+ +libmagic \
+ +libnl-route \
+ +libnfnetlink \
+ +kmod-nf-ipvs
endef
define Package/keepalived/description
endef
CONFIGURE_ARGS+= \
+ --disable-libnl \
--enable-sha1 \
- --disable-lvs \
- --disable-lvs-syncd \
--disable-snmp \
--with-kernel-dir="$(LINUX_DIR)/$(LINUX_UAPI_DIR)"
--- /dev/null
+From 6c7a281473083f7ac47b426b2127a8c8e76caca5 Mon Sep 17 00:00:00 2001
+From: Quentin Armitage <quentin@armitage.org.uk>
+Date: Sat, 25 Aug 2018 11:36:11 +0100
+Subject: [PATCH] Include stdbool.h in process.c
+
+Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
+---
+ keepalived/core/process.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/keepalived/core/process.c b/keepalived/core/process.c
+index f11c32a3..22bcf254 100644
+--- a/keepalived/core/process.c
++++ b/keepalived/core/process.c
+@@ -30,6 +30,7 @@
+ #ifdef _HAVE_SCHED_RT_
+ #include <sched.h>
+ #endif
++#include <stdbool.h>
+
+ #include "process.h"
+ #include "logger.h"
+--
+2.11.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=knot
-PKG_VERSION:=2.6.5
+PKG_VERSION:=2.7.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
-PKG_HASH:=33cd676706e2baeb37cf3879ccbc91a1e1cd1ee5d7a082adff4d1e753ce49d46
+PKG_HASH:=8717c0f34e441e96bc32bc93b48333ea9c094c5075f91575e40ac30fcf6692df
PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
-PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD MIT OLDAP-2.8
+PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD BSD-3-Clause OLDAP-2.8
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)
- $(MAKE) -C $(PKG_BUILD_DIR)/libtap check
- $(MAKE) -C $(PKG_BUILD_DIR)/src/dnssec/tests check-compile
$(MAKE) -C $(PKG_BUILD_DIR)/tests check-compile
- $(MAKE) -C $(PKG_BUILD_DIR)/src/zscanner check-compile
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/libknot
$(CP) $(PKG_INSTALL_DIR)/usr/include/libknot/* $(1)/usr/include/libknot/
- $(INSTALL_DIR) $(1)/usr/include/dnssec
- $(CP) $(PKG_INSTALL_DIR)/usr/include/dnssec/* $(1)/usr/include/dnssec/
+ $(INSTALL_DIR) $(1)/usr/include/libdnssec
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libdnssec/* $(1)/usr/include/libdnssec/
- $(INSTALL_DIR) $(1)/usr/include/zscanner
- $(CP) $(PKG_INSTALL_DIR)/usr/include/zscanner/* $(1)/usr/include/zscanner/
+ $(INSTALL_DIR) $(1)/usr/include/libzscanner
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libzscanner/* $(1)/usr/include/libzscanner/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
$(INSTALL_BIN) ./files/runtests.sh $(1)/usr/share/knot/
$(INSTALL_DIR) $(1)/usr/share/knot/tap
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/runtests $(1)/usr/share/knot/tap/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/libtap/tap/libtap.sh $(1)/usr/share/knot/tap/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/runtests $(1)/usr/share/knot/tap/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/libtap.sh $(1)/usr/share/knot/tap/
$(INSTALL_DIR) $(1)/usr/share/knot/tests
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/.libs/zscanner-tool $(1)/usr/share/knot/tests/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/zscanner/tests/unittests $(1)/usr/share/knot/tests/test_zscanner
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/zscanner/tests/TESTS $(1)/usr/share/knot/tests/
- cp -a $(PKG_BUILD_DIR)/src/zscanner/tests/data $(1)/usr/share/knot/tests/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/libzscanner/.libs/zscanner-tool $(1)/usr/share/knot/tests/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/libzscanner/test_zscanner $(1)/usr/share/knot/tests/
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/tests/libzscanner/TESTS $(1)/usr/share/knot/tests/
+ cp -a $(PKG_BUILD_DIR)/tests/libzscanner/data $(1)/usr/share/knot/tests/
- find $(PKG_BUILD_DIR)/src/dnssec/tests -maxdepth 1 -executable -type f | \
- xargs -I{} basename {} | \
- xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/src/dnssec/tests/{} $(1)/usr/share/knot/tests/dnssec_test_{}
-
- find $(PKG_BUILD_DIR)/tests/.libs -maxdepth 1 -executable -type f | \
- xargs -I{} basename {} | \
- xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/.libs/{} $(1)/usr/share/knot/tests/{}
-
- for module in contrib libknot modules utils; do \
+ for module in contrib knot libdnssec libknot modules utils; do \
find $(PKG_BUILD_DIR)/tests/$$$${module}/.libs -maxdepth 1 -executable -type f | \
xargs -I{} basename {} | \
xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/$$$${module}/.libs/{} \
-diff --git a/src/zscanner/tests/unittests.in b/src/zscanner/tests/unittests.in
-index 9a4af53..f9b45bf 100644
---- a/src/zscanner/tests/unittests.in
-+++ b/src/zscanner/tests/unittests.in
+diff --git a/tests/libzscanner/test_zscanner.in b/tests/libzscanner/test_zscanner.in
+index 2c0c27526..72b2124c7 100644
+--- a/tests/libzscanner/test_zscanner.in
++++ b/tests/libzscanner/test_zscanner.in
@@ -1,15 +1,14 @@
#!/bin/sh
--SOURCE=@top_srcdir@/src/zscanner/tests
--BUILD=@top_builddir@/src/zscanner/tests
+-SOURCE=@top_srcdir@/tests/libzscanner
+-BUILD=@top_builddir@/tests/libzscanner
+SOURCE="."
+BUILD="/tmp/knot-test"
+mkdir -p "$BUILD"
--. @top_srcdir@/libtap/tap/libtap.sh
+-. @top_srcdir@/tests/tap/libtap.sh
-
-cd "$BUILD"
+. ../tap/libtap.sh
TMPDIR=$(test_tmpdir)
TESTS_DIR="$SOURCE"/data
-ZSCANNER_TOOL="$BUILD"/zscanner-tool
-+ZSCANNER_TOOL=./zscanner-tool
++ZSCANNER_TOOL="$SOURCE"/zscanner-tool
- plan 71
+ plan 80
diff --git a/samples/knot.sample.conf.in b/samples/knot.sample.conf.in
-index e07c8a7..8e057b0 100644
+index 10302f958..75082f537 100644
--- a/samples/knot.sample.conf.in
+++ b/samples/knot.sample.conf.in
-@@ -9,7 +9,7 @@ server:
- # Listen on all configured IPv6 interfaces.
- listen: ::@53
- # User for running the server.
-- # user: knot:knot
-+ user: knot:knot
-
- log:
- # Log info and more serious events to syslog.
-@@ -33,7 +33,9 @@ acl:
- # action: notify
-
- template:
--# - id: default
-+ - id: default
-+ max-journal-db-size: 20M
-+ max-timer-db-size: 5M
- # storage: "@storage_dir@"
+@@ -30,6 +30,8 @@ template:
+ - id: default
+ storage: "@storage_dir@"
+ file: "%s.zone"
++ max-journal-db-size: 20M
++ max-timer-db-size: 5M
zone:
+ # # Master zone
include $(TOPDIR)/rules.mk
PKG_NAME:=knxd
-PKG_VERSION:=0.14.24
-PKG_RELEASE:=2
+PKG_VERSION:=0.14.25
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/knxd/knxd.git
-PKG_SOURCE_VERSION:=d29f7047a8b20a7ac57c3c9ad349c12be60f9fee
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=07857ce8c7c8be965b1baf81566671ab89c3ae8bbcd8f1fe05df0c38a4465664
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/knxd/knxd/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=c9b7d97328da1682bcae1330163e56e1ea2fba0b85de769feb6f5b7aff925a83
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_BUILD_DEPENDS:=argp-standalone
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=krb5
-PKG_VERSION:=1.16
-PKG_RELEASE:=1
+PKG_VERSION:=1.16.1
+PKG_RELEASE:=4
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://web.mit.edu/kerberos/dist/krb5/1.16/
-PKG_HASH:=faeb125f83b0fb4cdb2f99f088140631bb47d975982de0956d18c85842969e08
+PKG_HASH:=214ffe394e3ad0c730564074ec44f1da119159d94281bbec541dc29168d21117
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
SECTION:=net
CATEGORY:=Network
TITLE:=Kerberos
- DEPENDS:=+libncurses
+ DEPENDS:=+libncurses +libss +libcomerr
TITLE:=Kerberos 5 Shared Libraries
URL:=http://web.mit.edu/kerberos/
endef
endef
define Package/krb5/description
- Kerberos
+ Kerberos is a network authentication protocol.
+ It is designed to provide strong authentication for client/server applications by using secret-key cryptography.
endef
CONFIGURE_PATH = ./src
CONFIGURE_VARS += \
cross_compiling=yes \
krb5_cv_attr_constructor_destructor=yes,yes \
+ krb5_cv_sys_rcdir=/tmp \
ac_cv_func_regcomp=yes \
ac_cv_printf_positional=yes \
ac_cv_file__etc_environment=no \
- ac_cv_file__etc_TIMEZONE=no
+ ac_cv_file__etc_TIMEZONE=no \
+ ac_cv_header_keyutils_h=no
CONFIGURE_ARGS += \
+ --localstatedir=/etc \
+ --with-system-ss \
+ --with-system-et \
--without-system-verto \
--without-tcl \
+ --without-tls-impl \
--without-libedit \
- --localstatedir=/etc \
- --with-size-optimizations \
+ --without-readline \
--disable-rpath \
- --without-krb5-config
+ --disable-pkinit \
+ --with-size-optimizations \
+ --with-crypto-impl=builtin
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
include $(TOPDIR)/rules.mk
PKG_NAME:=lftp
-PKG_VERSION:=4.8.2
-PKG_RELEASE:=2
+PKG_VERSION:=4.8.3
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://lftp.tech/ftp/ \
https://mirror.csclub.uwaterloo.ca/gentoo-distfiles/distfiles/
-PKG_HASH:=5c875b8476e05e856ebc8eec458e43317b2bebd6ed5f7725a733d4591548cd9c
+PKG_HASH:=de7aee451afaa1aa391f7076b5f602922c2da0e05524a8d8fea413eda83cc78b
PKG_LICENSE:=GPL-3.0+
--without-libiconv-prefix \
--without-libintl-prefix \
--without-gnutls \
- --without-libidn \
+ --without-libidn2 \
--without-libresolv \
--with-openssl="$(STAGING_DIR)/usr" \
--with-readline="$(STAGING_DIR)/usr" \
#
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=lighttpd
-PKG_VERSION:=1.4.48
+PKG_VERSION:=1.4.49
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://download.lighttpd.net/lighttpd/releases-1.4.x
-PKG_HASH:=0f8ad5aac7529d7b948b9d7e8cd0b4a9e177309d85d6bf6516e28e6e40d74f36
+PKG_HASH:=aedf49d7127d9e4c0ea56618e9e945a17674dc46a37ac7990120f87dd939ce09
PKG_LICENSE:=BSD-3c
PKG_LICENSE_FILES:=COPYING
PKG_CONFIG_DEPENDS:=CONFIG_LIGHTTPD_SSL $(patsubst %,CONFIG_PACKAGE_lighttpd-mod-%,$(REBUILD_MODULES))
include $(INCLUDE_DIR)/package.mk
+# iconv is required for lighttpd's mysql plugin
+include $(INCLUDE_DIR)/nls.mk
define Package/lighttpd/Default
SUBMENU:=Web Servers/Proxies
CONFIGURE_ARGS+= --without-ldap
endif
-ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-authn_mysql),)
+ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-authn_mysql)$(CONFIG_PACKAGE_lighttpd-mod-mysql_vhost),)
CONFIGURE_ARGS+= --with-mysql
else
CONFIGURE_ARGS+= --without-mysql
CONFIGURE_ARGS+= --without-lua
endif
-ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-mysql_vhost),)
- CONFIGURE_ARGS+= --with-mysql
-else
- CONFIGURE_ARGS+= --without-mysql
-endif
-
#ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-cml)$(CONFIG_PACKAGE_lighttpd-mod-trigger_b4_dl),)
# CONFIGURE_ARGS+= --with-memcached
#else
$(eval $(call BuildPlugin,userdir,User directory,,30))
$(eval $(call BuildPlugin,usertrack,User tracking,,30))
$(eval $(call BuildPlugin,webdav,WebDAV,+PACKAGE_lighttpd-mod-webdav:libsqlite3 +PACKAGE_lighttpd-mod-webdav:libuuid +PACKAGE_lighttpd-mod-webdav:libxml2,30))
-
+$(eval $(call BuildPlugin,wstunnel,Websocket tunneling,,30))
include $(TOPDIR)/rules.mk
PKG_NAME:=linknx
-PKG_VERSION:=0.0.1.34
+PKG_VERSION:=0.0.1.36
PKG_RELEASE:=1
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_LICENSE:=GPL-2.0+
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/linknx/linknx.git
-PKG_SOURCE_VERSION:=831ed395e232ead88e92cdf19f12e227e80e22cf
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)
-PKG_SOURCE:=$(PKG_NAME)-${PKG_VERSION}.tar.xz
-PKG_MIRROR_HASH:=1c53d181b5577d759b4d0faa5a267dd0a040d9fee1bfc6ad9545374b9002900f
+PKG_SOURCE:=$(PKG_NAME)-${PKG_VERSION}.tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/linknx/linknx/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=e271ae32e2b68dff67864812c67e891d361f02960777bfb13f199dee0884f38f
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_BUILD_DEPENDS:=argp-standalone
PKG_FORTIFY_SOURCE:=1
SECTION:=net
CATEGORY:=Network
TITLE:=KNX home automation platform
- URL:=http://sourceforge.net/projects/linknx/
+ URL:=https://github.com/linknx/linknx
DEPENDS:=+pthsem +lua +luac +libstdcpp +libcurl +libesmtp
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=linuxptp
-PKG_VERSION:=1.9
+PKG_VERSION:=2.0
PKG_RELEASE:=1
PKG_MAINTAINER:=Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)/v$(PKG_VERSION)
-PKG_HASH:=5fb1e4889ccb06f887fc2972fc8b89d17a4cb6355406854f916ebc8d7f51580e
+PKG_HASH:=0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+++ /dev/null
-From d14f11fd329a7da94c0d0190a169f743eb91031b Mon Sep 17 00:00:00 2001
-From: Richard Cochran <richardcochran@gmail.com>
-Date: Mon, 2 Apr 2018 20:19:51 -0700
-Subject: [PATCH] msg: Append multiple TLVs correctly.
-
-The logic that adds TLVs to the end of a message mixes up the 'L'
-length in "TLV" with the total TLV length. As a result, the second
-and subsequent TLVs will corrupt the previous TLV in the buffer. This
-patch corrects the code to find the correct offset for the second and
-following appended TLVs.
-
-Note that the stack does not currently trigger this latent bug because
-only single TLVs are appended.
-
-Fixes: 4a8877f90462 ("msg: Introduce method for appending multiple TLVs on transmit.")
-
-Signed-off-by: Richard Cochran <richardcochran@gmail.com>
----
- msg.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/msg.c b/msg.c
-index b7e1053..c004568 100644
---- a/msg.c
-+++ b/msg.c
-@@ -151,6 +151,8 @@ static struct tlv_extra *msg_tlv_prepare(struct ptp_message *msg, int length)
- tmp = TAILQ_LAST(&msg->tlv_list, tlv_list);
- if (tmp) {
- ptr = (uint8_t *) tmp->tlv;
-+ ptr += sizeof(tmp->tlv->type);
-+ ptr += sizeof(tmp->tlv->length);
- ptr += tmp->tlv->length;
- }
-
---
-2.7.4
-
--- /dev/null
+#
+# Copyright (C) 2006-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=miniupnpd
+PKG_VERSION:=2.1.20180706
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=fc2d2fd044d8c3f8d02b63d70489bb35ece836a4fc1b6386865ac8fbe8d8b006
+
+PKG_LICENSE:=BSD-3-Clause
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/version.mk
+
+define Package/miniupnpd
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+iptables +libip4tc +IPV6:libip6tc +IPV6:ip6tables +libuuid
+ TITLE:=Lightweight UPnP IGD, NAT-PMP & PCP daemon
+ SUBMENU:=Firewall
+ URL:=https://miniupnp.tuxfamily.org/
+endef
+
+define Package/miniupnpd/conffiles
+/etc/config/upnpd
+endef
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ echo "$(VERSION_NUMBER)" | tr '() ' '_' >$(PKG_BUILD_DIR)/os.openwrt
+endef
+
+TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
+TARGET_CFLAGS += -flto -ffunction-sections -fdata-sections -O2
+TARGET_LDFLAGS += $(FPIC) -flto -Wl,--gc-sections
+MAKE_FLAGS += \
+ TARGET_OPENWRT=1 TEST=0 LIBS="" \
+ CC="$(TARGET_CC) -DIPTABLES_143 -lip4tc -luuid \
+ $(if $(CONFIG_IPV6),-lip6tc)" \
+ CONFIG_OPTIONS="--portinuse --leasefile --igd2 \
+ $(if $(CONFIG_IPV6),--ipv6)" \
+ -f Makefile.linux miniupnpd
+
+define Package/miniupnpd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_DIR) $(1)/usr/share/miniupnpd
+
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/sbin/miniupnpd
+ $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
+ $(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd
+ $(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/iface/50-miniupnpd
+ $(INSTALL_BIN) ./files/miniupnpd.defaults $(1)/etc/uci-defaults/99-miniupnpd
+ $(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/miniupnpd/firewall.include
+endef
+
+$(eval $(call BuildPackage,miniupnpd))
--- /dev/null
+#!/bin/sh
+# miniupnpd integration for firewall3
+
+IPTABLES=/usr/sbin/iptables
+IP6TABLES=/usr/sbin/ip6tables
+
+$IPTABLES -t filter -N MINIUPNPD 2>/dev/null
+$IPTABLES -t nat -N MINIUPNPD 2>/dev/null
+$IPTABLES -t nat -N MINIUPNPD-POSTROUTING 2>/dev/null
+
+[ -x $IP6TABLES ] && $IP6TABLES -t filter -N MINIUPNPD 2>/dev/null
+
+. /lib/functions/network.sh
+
+# helper to insert in chain as penultimate
+iptables_prepend_rule() {
+ local iptables="$1"
+ local table="$2"
+ local chain="$3"
+ local target="$4"
+
+ $iptables -t "$table" -I "$chain" $($iptables -t "$table" --line-numbers -nL "$chain" | \
+ sed -ne '$s/[^0-9].*//p') -j "$target"
+}
+
+ADDED=0
+
+add_extzone_rules() {
+ local ext_zone="$1"
+
+ [ -z "$ext_zone" ] && return
+
+ # IPv4 - due to NAT, need to add both to nat and filter table
+ # need to insert as penultimate rule for forward & postrouting since final rule might be a fw3 REJECT
+ iptables_prepend_rule "$IPTABLES" filter "zone_${ext_zone}_forward" MINIUPNPD
+ $IPTABLES -t nat -A "zone_${ext_zone}_prerouting" -j MINIUPNPD
+ iptables_prepend_rule "$IPTABLES" nat "zone_${ext_zone}_postrouting" MINIUPNPD-POSTROUTING
+
+ # IPv6 if available - filter only
+ [ -x $IP6TABLES ] && {
+ iptables_prepend_rule "$IP6TABLES" filter "zone_${ext_zone}_forward" MINIUPNPD
+ }
+ ADDED=$(($ADDED + 1))
+}
+
+# By default, user configuration is king.
+
+for ext_iface in $(uci -q get upnpd.config.external_iface); do
+ add_extzone_rules $(fw3 -q network "$ext_iface")
+done
+
+add_extzone_rules $(uci -q get upnpd.config.external_zone)
+
+[ "$ADDED" -ne 0 ] && exit 0
+
+# If really nothing is available, resort to network_find_wan{,6} and
+# assume external interfaces all have same firewall zone.
+
+# (This heuristic may fail horribly, in case of e.g. multihoming, so
+# please set external_zone in that case!)
+
+network_find_wan wan_iface
+network_find_wan6 wan6_iface
+
+for ext_iface in $wan_iface $wan6_iface; do
+ # fw3 -q network fails on sub-interfaces => map to device first
+ network_get_device ext_device $ext_iface
+ add_extzone_rules $(fw3 -q device "$ext_device")
+done
--- /dev/null
+#!/bin/sh
+
+uci -q batch <<-EOT
+ delete firewall.miniupnpd
+ set firewall.miniupnpd=include
+ set firewall.miniupnpd.type=script
+ set firewall.miniupnpd.path=/usr/share/miniupnpd/firewall.include
+ set firewall.miniupnpd.family=any
+ set firewall.miniupnpd.reload=1
+ commit firewall
+EOT
+
+exit 0
--- /dev/null
+#!/bin/sh
+
+/etc/init.d/miniupnpd enabled || exit 0
+
+. /lib/functions/service.sh
+
+# If miniupnpd is not running:
+# - check on _any_ event (even updates may contribute to network_find_wan*)
+
+# If miniupnpd _is_ running:
+# - check only on ifup (otherwise lease updates etc would cause
+# miniupnpd state loss)
+
+[ "$ACTION" != "ifup" ] && service_check /usr/sbin/miniupnpd && exit 0
+
+tmpconf="/var/etc/miniupnpd.conf"
+extiface=$(uci get upnpd.config.external_iface)
+extzone=$(uci get upnpd.config.external_zone)
+
+. /lib/functions/network.sh
+
+if [ -z "$extiface" ] ; then
+ # manual external zone (if dynamically find interfaces
+ # belonging to it) overrides network_find_wan*
+ if [ -n "$extzone" ] ; then
+ ifname=$(fw3 -q zone $extzone | head -1)
+ fi
+ [ -n "$extiface" ] || network_find_wan extiface
+ [ -n "$extiface" ] || network_find_wan6 extiface
+fi
+
+[ -n "$ifname" ] || network_get_device ifname "$extiface"
+grep -q "ext_ifname=$ifname" "$tmpconf" || /etc/init.d/miniupnpd restart
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2014 OpenWrt.org
+
+START=94
+STOP=15
+
+SERVICE_USE_PID=1
+
+upnpd_get_port_range() {
+ local var="$1"; shift
+ local val
+
+ config_get val "$@"
+
+ case "$val" in
+ [0-9]*[:-][0-9]*)
+ export -n -- "${var}_start=${val%%[:-]*}"
+ export -n -- "${var}_end=${val##*[:-]}"
+ ;;
+ [0-9]*)
+ export -n -- "${var}_start=$val"
+ export -n -- "${var}_end="
+ ;;
+ esac
+}
+
+conf_rule_add() {
+ local cfg="$1"
+ local tmpconf="$2"
+ local action external_port_start external_port_end int_addr
+ local internal_port_start internal_port_end comment
+
+ config_get action "$cfg" action "deny" # allow or deny
+ upnpd_get_port_range "ext" "$cfg" ext_ports "0-65535" # external ports: x, x-y, x:y
+ config_get int_addr "$cfg" int_addr "0.0.0.0/0" # ip or network and subnet mask (internal)
+ upnpd_get_port_range "int" "$cfg" int_ports "0-65535" # internal ports: x, x-y, x:y or range
+ config_get comment "$cfg" comment "ACL" # comment
+
+ # Make a single IP IP/32 so that miniupnpd.conf can use it.
+ [ "${int_addr%/*}" = "$int_addr" ] && int_addr="$int_addr/32"
+
+ echo "$action $ext_start${ext_end:+-}$ext_end $int_addr $int_start${int_end:+-}$int_end #$comment" >>$tmpconf
+}
+
+upnpd_write_bool() {
+ local opt="$1"
+ local def="${2:-0}"
+ local alt="${3:-$opt}"
+ local val
+
+ config_get_bool val config "$opt" "$def"
+ if [ "$val" -eq 0 ]; then
+ echo "$alt=no" >> $tmpconf
+ else
+ echo "$alt=yes" >> $tmpconf
+ fi
+}
+
+boot() {
+ return
+}
+
+start() {
+ config_load "upnpd"
+ local extiface intiface upload download logging secure enabled natpmp
+ local extip port usesysuptime conffile serial_number model_number
+ local uuid notify_interval presentation_url enable_upnp
+ local upnp_lease_file clean_ruleset_threshold clean_ruleset_interval
+ local ipv6_listening_ip enabled
+
+ config_get_bool enabled config enabled 1
+
+ [ "$enabled" -eq 0 ] && return 1
+
+ config_get extiface config external_iface
+ config_get extzone config external_zone
+ config_get intiface config internal_iface
+ config_get extip config external_ip
+ config_get port config port 5000
+ config_get upload config upload
+ config_get download config download
+ config_get_bool logging config log_output 0
+ config_get conffile config config_file
+ config_get serial_number config serial_number
+ config_get model_number config model_number
+ config_get uuid config uuid
+ config_get notify_interval config notify_interval
+ config_get presentation_url config presentation_url
+ config_get upnp_lease_file config upnp_lease_file
+ config_get clean_ruleset_threshold config clean_ruleset_threshold
+ config_get clean_ruleset_interval config clean_ruleset_interval
+ config_get ipv6_listening_ip config ipv6_listening_ip
+
+ local args ifname
+
+ . /lib/functions/network.sh
+
+ # manual external interface overrides everything
+ if [ -z "$extiface" ] ; then
+ # manual external zone (if dynamically find interfaces
+ # belonging to it) overrides network_find_wan*
+ if [ -n "$extzone" ] ; then
+ ifname=$(fw3 -q zone $extzone | head -1)
+ fi
+ [ -n "$extiface" ] || network_find_wan extiface
+ [ -n "$extiface" ] || network_find_wan6 extiface
+ fi
+
+ [ -n "$ifname" ] || network_get_device ifname $extiface
+
+ if [ -n "$conffile" ]; then
+ args="-f $conffile"
+ else
+ local tmpconf="/var/etc/miniupnpd.conf"
+ args="-f $tmpconf"
+ mkdir -p /var/etc
+
+ echo "ext_ifname=$ifname" >$tmpconf
+
+ [ -n "$extip" ] && \
+ echo "ext_ip=$extip" >>$tmpconf
+
+ local iface
+ for iface in ${intiface:-lan}; do
+ local device
+ network_get_device device "$iface" && {
+ echo "listening_ip=$device" >>$tmpconf
+ }
+ done
+
+ [ "$port" != "auto" ] && \
+ echo "port=$port" >>$tmpconf
+
+ config_load "upnpd"
+ upnpd_write_bool enable_natpmp 1
+ upnpd_write_bool enable_upnp 1
+ upnpd_write_bool secure_mode 1
+ upnpd_write_bool pcp_allow_thirdparty 0
+ upnpd_write_bool system_uptime 1
+ upnpd_write_bool igdv1 0 force_igd_desc_v1
+
+ [ -n "$upnp_lease_file" ] && \
+ echo "lease_file=$upnp_lease_file" >>$tmpconf
+
+ [ -n "$upload" -a -n "$download" ] && {
+ echo "bitrate_down=$(($download * 1024 * 8))" >>$tmpconf
+ echo "bitrate_up=$(($upload * 1024 * 8))" >>$tmpconf
+ }
+
+ [ -n "${presentation_url}" ] && \
+ echo "presentation_url=${presentation_url}" >>$tmpconf
+
+ [ -n "${notify_interval}" ] && \
+ echo "notify_interval=${notify_interval}" >>$tmpconf
+
+ [ -n "${clean_ruleset_threshold}" ] && \
+ echo "clean_ruleset_threshold=${clean_ruleset_threshold}" >>$tmpconf
+
+ [ -n "${clean_ruleset_interval}" ] && \
+ echo "clean_ruleset_interval=${clean_ruleset_interval}" >>$tmpconf
+
+ [ -n "${ipv6_listening_ip}" ] && \
+ echo "ipv6_listening_ip=${ipv6_listening_ip}" >>$tmpconf
+
+ [ -z "$uuid" ] && {
+ uuid="$(cat /proc/sys/kernel/random/uuid)"
+ uci set upnpd.config.uuid=$uuid
+ uci commit upnpd
+ }
+
+ [ "$uuid" = "nocli" ] || \
+ echo "uuid=$uuid" >>$tmpconf
+
+ [ -n "${serial_number}" ] && \
+ echo "serial=${serial_number}" >>$tmpconf
+
+ [ -n "${model_number}" ] && \
+ echo "model_number=${model_number}" >>$tmpconf
+
+ config_foreach conf_rule_add perm_rule "$tmpconf"
+ fi
+
+
+ if [ -n "$ifname" ]; then
+ # start firewall
+ iptables -L MINIUPNPD >/dev/null 2>&1 || fw3 reload
+
+ if [ "$logging" = "1" ]; then
+ SERVICE_DAEMONIZE=1 \
+ service_start /usr/sbin/miniupnpd $args -d
+ else
+ SERVICE_DAEMONIZE= \
+ service_start /usr/sbin/miniupnpd $args
+ fi
+ else
+ logger -t "upnp daemon" "external interface not found, not starting"
+ fi
+}
+
+stop() {
+ service_stop /usr/sbin/miniupnpd
+
+ iptables -t nat -F MINIUPNPD 2>/dev/null
+ iptables -t nat -F MINIUPNPD-POSTROUTING 2>/dev/null
+ iptables -t filter -F MINIUPNPD 2>/dev/null
+
+ [ -x /usr/sbin/ip6tables ] && {
+ ip6tables -t filter -F MINIUPNPD 2>/dev/null
+ }
+}
--- /dev/null
+config upnpd config
+ option enabled 0
+ option enable_natpmp 1
+ option enable_upnp 1
+ option secure_mode 1
+ option log_output 0
+ option download 1024
+ option upload 512
+#by default, looked up dynamically from ubus
+# option external_iface wan
+ option internal_iface lan
+ option port 5000
+ option upnp_lease_file /var/run/miniupnpd.leases
+ option igdv1 0
+
+config perm_rule
+ option action allow
+ option ext_ports 1024-65535
+ option int_addr 0.0.0.0/0 # Does not override secure_mode
+ option int_ports 1024-65535
+ option comment "Allow high ports"
+
+config perm_rule
+ option action deny
+ option ext_ports 0-65535
+ option int_addr 0.0.0.0/0
+ option int_ports 0-65535
+ option comment "Default deny"
--- /dev/null
+--- a/genconfig.sh
++++ b/genconfig.sh
+@@ -379,12 +379,19 @@ case $FW in
+ esac
+
+ # UUID API
+-if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then
+- echo "#define BSD_UUID" >> ${CONFIGFILE}
+-fi
+-if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
+- echo "#define LIB_UUID" >> ${CONFIGFILE}
+-fi
++case $OS_NAME in
++ OpenWRT)
++ echo "#define LIB_UUID" >> ${CONFIGFILE}
++ ;;
++ *)
++ if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then
++ echo "#define BSD_UUID" >> ${CONFIGFILE}
++ fi
++ if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
++ echo "#define LIB_UUID" >> ${CONFIGFILE}
++ fi
++ ;;
++esac
+
+ # set V6SOCKETS_ARE_V6ONLY to 0 if it was not set above
+ if [ -z "$V6SOCKETS_ARE_V6ONLY" ] ; then
+--- a/Makefile.linux
++++ b/Makefile.linux
+@@ -74,7 +74,10 @@ CPPFLAGS += -DIPTABLES_143
+ endif
+
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libiptc)
++#OpenWrt packager passes correct libraries
++ifeq ($(TARGET_OPENWRT),)
+ LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libiptc)
++endif
+ LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libiptc)
+ LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other libiptc)
+ else
+@@ -154,6 +157,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
+ LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack)
+ endif # ($(TEST),1)
+
++# OpenWrt packager disables https server for IGD v2 and hardcodes libuuid support
++ifeq ($(TARGET_OPENWRT),)
+ LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
+
+ TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
+@@ -162,6 +167,7 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
+ else
+ $(info please install uuid-dev package / libuuid)
+ endif # ($(TEST),1)
++endif # ($(TARGET_OPENWRT,)
+
+ TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
+
include $(TOPDIR)/rules.mk
PKG_NAME:=mosquitto
-PKG_VERSION:=1.4.15
+PKG_VERSION:=1.5.3
PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.txt
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://mosquitto.org/files/source/
-PKG_HASH:=7d3b3e245a3b4ec94b05678c8199c806359737949f4cfe0bf936184f6ca89a83
+PKG_SOURCE_URL:=https://mosquitto.org/files/source/
+PKG_HASH:=3081a998d303a883b1cd064009beabc88aa9159e26f5258a4ae6007160491d10
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
$(CP) $(PKG_BUILD_DIR)/lib/cpp/libmosquittopp.so.1 $(1)/usr/lib/
$(LN) libmosquitto.so.1 $(1)/usr/lib/libmosquitto.so
$(LN) libmosquittopp.so.1 $(1)/usr/lib/libmosquittopp.so
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/libmosquitto.pc.in $(1)/usr/lib/pkgconfig/libmosquitto.pc
+ sed -i -e "s#@CMAKE_INSTALL_PREFIX@#/usr#" \
+ -e "s#@VERSION@#$(PKG_VERSION)#" \
+ $(1)/usr/lib/pkgconfig/libmosquitto.pc
+ $(CP) $(PKG_BUILD_DIR)/libmosquittopp.pc.in $(1)/usr/lib/pkgconfig/libmosquittopp.pc
+ sed -i -e "s#@CMAKE_INSTALL_PREFIX@#/usr#" \
+ -e "s#@VERSION@#$(PKG_VERSION)#" \
+ $(1)/usr/lib/pkgconfig/libmosquittopp.pc
endef
# This installs files on the target. Compare with Build/InstallDev
START=80
USE_PROCD=1
TCONF=/tmp/mosquitto.generated.conf
+CONF_WATCH=/etc/config/mosquitto
# Usage: append_if cfg uci_name output_name
# add a config line of the form "output_name <value>"
local cfg="$1"
local uci_name="$2"
local out_name="$3"
+ if [ -z "$out_name" ]; then
+ out_name=$uci_name
+ fi
config_get val $cfg $uci_name
if [ -n "$val" ]; then
config_get_bool real $cfg $uci_name
config_get port "$1" port 1883
echo "port $port" >> $TCONF
- append_if "$1" protocol
+ append_if "$1" acl_file
+ append_optional_bool "$1" allow_anonymous
+ append_optional_bool "$1" allow_duplicate_messages
+ append_if "$1" clientid_prefixes
+ append_optional_bool "$1" connection_messages
+ append_if "$1" include_dir
+ append_if "$1" log_facility
+ append_optional_bool "$1" log_timestamp
+ config_get log_types "$1" log_types
+ for log_type in $log_types; do
+ echo "log_dest $log_type" >> $TCONF
+ done
+ append_if "$1" max_inflight_bytes
append_if "$1" max_inflight_messages
+ append_if "$1" max_queued_bytes
append_if "$1" max_queued_messages
+ append_if "$1" message_size_limit
+ append_if "$1" passwd_file
+ append_if "$1" pid_file
+ append_if "$1" psk_file
+ append_optional_bool "$1" queue_qos0_messages
+ append_optional_bool "$1" set_tcp_nodelay
+ append_if "$1" protocol
append_if "$1" sys_interval
+ append_if "$1" upgrade_outgoing_qos
+ append_if "$1" user
}
convert_persistence() {
append_if "$cfg" client_expiration persistent_client_expiration
append_if "$cfg" autosave_interval
- append_optional_bool "$cfg" autosave_on_changes autosave_on_changes
- append_optional_bool "$cfg" persistence persistence
+ append_optional_bool "$cfg" autosave_on_changes
+ append_optional_bool "$cfg" persistence
append_if "$cfg" file persistence_file
+ append_if "$cfg" store_clean_interval
config_get loc "$cfg" location
if [ -n "$loc" ]; then
[ -d "$loc" ] || {
echo "listener $port" >> $TCONF
fi
- append_if "$1" protocol
append_if "$1" http_dir
- append_optional_bool "$1" use_username_as_clientid use_username_as_clientid
+ append_if "$1" max_connections
+ append_if "$1" mount_point
+ append_if "$1" protocol
+ append_optional_bool "$1" use_username_as_clientid
+ append_if "$1" websockets_log_level
+
append_if "$1" cafile
append_if "$1" capath
append_if "$1" certfile
+ append_if "$1" ciphers
+ append_if "$1" crlfile
append_if "$1" keyfile
+ append_optional_bool "$1" require_certificate
append_if "$1" tls_version
- append_optional_bool "$1" require_certificate require_certificate
- append_optional_bool "$1" use_identity_as_username use_identity_as_username
- append_if "$1" crlfile
- append_if "$1" ciphers
+ append_optional_bool "$1" use_identity_as_username
+ append_optional_bool "$1" use_subject_as_username
append_if "$1" psk_hint
}
config_get conn "$1" connection
config_get addr "$1" address
if [ -z "$conn" -o -z "$addr" ]; then
- echo "Ignoring bridge section, misisng connection/address"
+ echo "Ignoring bridge section with missing connection/address"
return
fi
+ # Also invalid if no topics are defined, mosquitto will not start!
+ config_get tlen "$1" "topic_LENGTH"
+ if [ -z "$tlen" ]; then
+ echo "Ignoring bridge section with no topics defined"
+ return
+ fi
+
echo "" >> $TCONF
echo "# Bridge connection from UCI section" >> $TCONF
append_if "$1" connection
append_if "$1" address
- config_list_foreach "$1" topic add_topic
- append_optional_bool "$1" cleansession cleansession
- append_optional_bool "$1" try_private try_private
- append_optional_bool "$1" notifications notifications
- append_optional_bool "$1" round_robin round_robin
-
+ append_optional_bool "$1" attempt_unsubscribe bridge_attempt_unsubscribe
+ append_if "$1" protocol_version bridge_protocol_version
+ append_optional_bool "$1" cleansession
+ append_if "$1" keepalive_interval
+ append_if "$1" idle_timeout
+ append_if "$1" local_clientid
+ append_if "$1" local_password
+ append_if "$1" local_username
+ append_optional_bool "$1" notifications
+ append_optional_bool "$1" notifications_local_only
+ append_if "$1" notification_topic
# Note, deprecated upstream, preserve old uci configs
append_if "$1" clientid remote_clientid
append_if "$1" remote_clientid
- append_if "$1" local_clientid
- append_if "$1" notification_topic
- append_if "$1" keepalive_interval
- append_if "$1" start_type
+ # Note, deprecated upstream, preserve old uci configs
+ append_if "$1" password remote_password
+ append_if "$1" remote_password
+ # Note, deprecated upstream, preserve old uci configs
+ append_if "$1" username remote_username
+ append_if "$1" remote_username
append_if "$1" restart_timeout
- append_if "$1" idle_timeout
+ append_optional_bool "$1" round_robin
+ append_if "$1" start_type
append_if "$1" threshold
- append_if "$1" protocol_version bridge_protocol_version
- append_optional_bool "$1" attempt_unsubscribe bridge_attempt_unsubscribe
- append_if "$1" identity bridge_identity
- append_if "$1" psk bridge_psk
- append_if "$1" tls_version bridge_tls_version
+ config_list_foreach "$1" topic add_topic
+ append_optional_bool "$1" try_private
- append_if "$1" restart_timeout
- append_if "$1" capath bridge_capath
append_if "$1" cafile bridge_cafile
+ append_if "$1" capath bridge_capath
append_if "$1" certfile bridge_certfile
+ append_if "$1" identity bridge_identity
+ append_optional_bool "$1" insecure bridge_insecure
append_if "$1" keyfile bridge_keyfile
- # Note, deprecated upstream, preserve old uci configs
- append_if "$1" username remote_username
- # Note, deprecated upstream, preserve old uci configs
- append_if "$1" password remote_password
- append_if "$1" remote_username
- append_if "$1" remote_password
+ append_if "$1" psk bridge_psk
+ append_if "$1" tls_version bridge_tls_version
}
convert_uci
else
CONF=/etc/mosquitto/mosquitto.conf
+ CONF_WATCH=$CONF
fi
config_get write_pid "$cfg" write_pid 0
procd_set_param command mosquitto
procd_append_param command -c $CONF
# Makes /etc/init.d/mosquitto reload work if you edit the final file.
- procd_set_param file $CONF
+ procd_set_param file $CONF_WATCH
[ "$write_pid" -eq 1 ] && procd_set_param pidfile /var/run/mosquitto.pid
procd_close_instance
}
+++ /dev/null
-diff --git a/config.mk b/config.mk
-index bfaa208..2a3e2bf 100644
---- a/config.mk
-+++ b/config.mk
-@@ -87,7 +87,6 @@ WITH_SOCKS:=yes
- # Also bump lib/mosquitto.h, CMakeLists.txt,
- # installer/mosquitto.nsi, installer/mosquitto-cygwin.nsi
- VERSION=1.4.15
--TIMESTAMP:=$(shell date "+%F %T%z")
-
- # Client library SO version. Bump if incompatible API/ABI changes are made.
- SOVERSION=1
-@@ -115,7 +114,7 @@ LIB_CFLAGS:=${CFLAGS} ${CPPFLAGS} -I. -I.. -I../lib
- LIB_CXXFLAGS:=$(LIB_CFLAGS) ${CPPFLAGS}
- LIB_LDFLAGS:=${LDFLAGS}
-
--BROKER_CFLAGS:=${LIB_CFLAGS} ${CPPFLAGS} -DVERSION="\"${VERSION}\"" -DTIMESTAMP="\"${TIMESTAMP}\"" -DWITH_BROKER
-+BROKER_CFLAGS:=${LIB_CFLAGS} ${CPPFLAGS} -DVERSION="\"${VERSION}\"" -DWITH_BROKER
- CLIENT_CFLAGS:=${CFLAGS} ${CPPFLAGS} -I../lib -DVERSION="\"${VERSION}\""
-
- ifneq ($(or $(findstring $(UNAME),FreeBSD), $(findstring $(UNAME),OpenBSD)),)
-diff --git a/src/conf.c b/src/conf.c
-index 25d80a6..9ab0599 100644
---- a/src/conf.c
-+++ b/src/conf.c
-@@ -338,7 +338,7 @@ void mqtt3_config_cleanup(struct mqtt3_config *config)
-
- static void print_usage(void)
- {
-- printf("mosquitto version %s (build date %s)\n\n", VERSION, TIMESTAMP);
-+ printf("mosquitto version %s\n\n", VERSION);
- printf("mosquitto is an MQTT v3.1.1/v3.1 broker.\n\n");
- printf("Usage: mosquitto [-c config_file] [-d] [-h] [-p port]\n\n");
- printf(" -c : specify the broker config file.\n");
-diff --git a/src/mosquitto.c b/src/mosquitto.c
-index 22b6372..b581f45 100644
---- a/src/mosquitto.c
-+++ b/src/mosquitto.c
-@@ -291,7 +291,7 @@ int main(int argc, char *argv[])
- rc = 1;
- return rc;
- }
-- _mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "mosquitto version %s (build date %s) starting", VERSION, TIMESTAMP);
-+ _mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "mosquitto version %s starting", VERSION);
- if(int_db.config_file){
- _mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "Config loaded from %s.", int_db.config_file);
- }else{
-@@ -308,8 +308,6 @@ int main(int argc, char *argv[])
- /* Set static $SYS messages */
- snprintf(buf, 1024, "mosquitto version %s", VERSION);
- mqtt3_db_messages_easy_queue(&int_db, NULL, "$SYS/broker/version", 2, strlen(buf), buf, 1);
-- snprintf(buf, 1024, "%s", TIMESTAMP);
-- mqtt3_db_messages_easy_queue(&int_db, NULL, "$SYS/broker/timestamp", 2, strlen(buf), buf, 1);
- }
- #endif
-
include $(TOPDIR)/rules.mk
PKG_NAME:=mtr
-PKG_REV:=dd2b75080bc5406ba0b438953b36b72204ba114b
-PKG_VERSION:=0.85+newdns-$(PKG_REV)
-PKG_RELEASE:=2
+PKG_VERSION:=0.92
+PKG_RELEASE:=4
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/traviscross/mtr.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=4911c96ee4b3c31692664a845dccddabdfef107646d4861b21fd4053bd2b76e8
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.bitwizard.nl/mtr/files
+PKG_HASH:=f2979db9e2f41aa8e6574e7771767c9afe111d9213814eb47f5e1e71876e4382
+PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
CATEGORY:=Network
DEPENDS:=+libncurses
TITLE:=Full screen ncurses traceroute tool
- URL:=http://www.bitwizard.nl/mtr/
- PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
+ URL:=https://www.bitwizard.nl/mtr/
endef
define Package/mtr/description
CONFIGURE_ARGS += \
--without-gtk \
- --without-glib \
$(call autoconf_bool,CONFIG_IPV6,ipv6)
-define Build/Configure
- (cd $(PKG_BUILD_DIR); touch \
- configure.in \
- aclocal.m4 \
- Makefile.in \
- img/Makefile.in \
- stamp-h.in \
- config.h.in \
- configure \
- );
- $(call Build/Configure/Default)
-endef
+CONFIGURE_VARS += ac_cv_lib_cap_cap_set_proc=no
define Package/mtr/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr-packet $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,mtr))
+++ /dev/null
---- a/net.c
-+++ b/net.c
-@@ -307,9 +307,11 @@ void net_send_tcp(int index)
- struct sockaddr_storage local;
- struct sockaddr_storage remote;
- struct sockaddr_in *local4 = (struct sockaddr_in *) &local;
-- struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) &local;
- struct sockaddr_in *remote4 = (struct sockaddr_in *) &remote;
-+#ifdef ENABLE_IPV6
-+ struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) &local;
- struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) &remote;
-+#endif
- socklen_t len;
-
- ttl = index + 1;
-@@ -566,8 +568,10 @@ void net_send_query(int index)
-
- /* sendto() assumes packet length includes the IPv4 header but not the
- IPv6 header. */
-- spacketsize = abs(packetsize) -
-- ( ( af == AF_INET ) ? 0 : sizeof (struct ip6_hdr) );
-+ spacketsize = abs(packetsize);
-+#ifdef ENABLE_IPV6
-+ spacketsize -= ( ( af == AF_INET ) ? 0 : sizeof (struct ip6_hdr) );
-+#endif
- rv = sendto(sendsock, packet, spacketsize, 0, remotesockaddr, salen);
- if (first && (rv < 0) && ((errno == EINVAL) || (errno == EMSGSIZE))) {
- /* Try the first packet again using host byte order. */
---- a/dns.c
-+++ b/dns.c
-@@ -49,7 +49,7 @@
- #include <unistd.h>
- #include <fcntl.h>
- //#include <ctype.h>
--//#include <string.h>
-+#include <string.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <signal.h>
---- a/net.h
-+++ b/net.h
-@@ -20,6 +20,7 @@
- #include <netdb.h>
- #include <arpa/inet.h>
- #include <netinet/in.h>
-+#include <sys/select.h>
- #include <sys/socket.h>
- #ifdef ENABLE_IPV6
- #include <netinet/ip6.h>
include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3
-PKG_VERSION:=2.6.12
-PKG_RELEASE:=2
+PKG_VERSION:=2.7.4
+PKG_RELEASE:=1
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
PKG_LICENSE:=GPLv2
config globals 'globals'
option mmx_mask '0x3F00'
- option local_source 'lan'
+ option local_source 'none'
+ option rtmon_interval '5'
config interface 'wan'
option enabled '1'
option reliability '2'
option count '1'
option timeout '2'
+ option failure_latency '1000'
+ option recovery_latency '500'
+ option failure_loss '20'
+ option recovery_loss '5'
option interval '5'
option down '3'
option up '8'
config_get_bool enabled globals 'enabled' '0'
[ ${enabled} -gt 0 ] || exit 0
-config_get enabled $INTERFACE enabled 0
-config_get initial_state $INTERFACE initial_state "online"
-[ "$enabled" == "1" ] || exit 0
-
mwan3_lock
mwan3_init
mwan3_set_connected_iptables
mwan3_unlock
+config_get enabled $INTERFACE enabled 0
+config_get initial_state $INTERFACE initial_state "online"
+[ "$enabled" == "1" ] || exit 0
+
if [ "$ACTION" == "ifup" ]; then
config_get family $INTERFACE family ipv4
if [ "$family" = "ipv4" ]; then
--- /dev/null
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/functions/network.sh
+. /lib/mwan3/mwan3.sh
+
+config_load mwan3
+config_get_bool enabled globals 'enabled' '0'
+[ ${enabled} -gt 0 ] || exit 0
+
+if [ "$ACTION" == "ifup" ]; then
+ mwan3_lock
+ mwan3_rtmon
+ mwan3_unlock
+fi
+
+exit 0
START=19
reload() {
- local enabled
-
- config_load mwan3
- config_get_bool enabled globals 'enabled' 0
- [ ${enabled} -gt 0 ] || {
- echo "Warning: mwan3 is global disabled. Usage: /etc/init.d/mwan3 start"
- exit 0
- }
- mwan3 restart
+ /usr/sbin/mwan3 restart
}
boot() {
}
start() {
- . /lib/config/uci.sh
- uci_toggle_state mwan3 globals enabled "1"
- mwan3 start
+ /usr/sbin/mwan3 start
}
stop() {
- . /lib/config/uci.sh
- uci_toggle_state mwan3 globals enabled "0"
- mwan3 stop
+ /usr/sbin/mwan3 stop
}
MMX_UNREACHABLE=""
MM_UNREACHABLE=""
+mwan3_rtmon_ipv4()
+{
+ local tid=1
+ local idx=0
+ local ret=1
+ mkdir -p /tmp/mwan3rtmon
+ ($IP4 route list table main | grep -v "^default\|linkdown" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv4.main
+ while uci get mwan3.@interface[$idx] >/dev/null 2>&1 ; do
+ idx=$((idx+1))
+ tid=$idx
+ [ "$(uci get mwan3.@interface[$((idx-1))].family)" = "ipv4" ] && {
+ if $IP4 route list table $tid | grep -q ^default; then
+ ($IP4 route list table $tid | grep -v "^default\|linkdown" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv4.$tid
+ cat /tmp/mwan3rtmon/ipv4.$tid | grep -v -x -F -f /tmp/mwan3rtmon/ipv4.main | while read line; do
+ $IP4 route del table $tid $line
+ done
+ cat /tmp/mwan3rtmon/ipv4.main | grep -v -x -F -f /tmp/mwan3rtmon/ipv4.$tid | while read line; do
+ $IP4 route add table $tid $line
+ done
+ fi
+ }
+ if [ "$(uci get mwan3.@interface[$((idx-1))].enabled)" = "1" ]; then
+ ret=0
+ fi
+ done
+ rm -f /tmp/mwan3rtmon/ipv4.*
+ return $ret
+}
+
+mwan3_rtmon_ipv6()
+{
+ local tid=1
+ local idx=0
+ local ret=1
+ mkdir -p /tmp/mwan3rtmon
+ ($IP6 route list table main | grep -v "^default\|^::/0\|^unreachable" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv6.main
+ while uci get mwan3.@interface[$idx] >/dev/null 2>&1 ; do
+ idx=$((idx+1))
+ tid=$idx
+ [ "$(uci get mwan3.@interface[$((idx-1))].family)" = "ipv6" ] && {
+ if $IP6 route list table $tid | grep -q "^default\|^::/0"; then
+ ($IP6 route list table $tid | grep -v "^default\|^::/0\|^unreachable" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv6.$tid
+ cat /tmp/mwan3rtmon/ipv6.$tid | grep -v -x -F -f /tmp/mwan3rtmon/ipv6.main | while read line; do
+ $IP6 route del table $tid $line
+ done
+ cat /tmp/mwan3rtmon/ipv6.main | grep -v -x -F -f /tmp/mwan3rtmon/ipv6.$tid | while read line; do
+ $IP6 route add table $tid $line
+ done
+ fi
+ }
+ if [ "$(uci get mwan3.@interface[$((idx-1))].enabled)" = "1" ]; then
+ ret=0
+ fi
+ done
+ rm -f /tmp/mwan3rtmon/ipv6.*
+ return $ret
+}
# counts how many bits are set to 1
# n&(n-1) clears the lowest bit set to 1
$IPT -A mwan3_connected -m set --match-set mwan3_connected dst -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
fi
- if ! $IPT -S mwan3_ifaces_out &> /dev/null; then
- $IPT -N mwan3_ifaces_out
- fi
-
if ! $IPT -S mwan3_rules &> /dev/null; then
$IPT -N mwan3_rules
fi
if ! $IPT -S mwan3_hook &> /dev/null; then
$IPT -N mwan3_hook
+ # do not mangle ipv6 ra service
+ if [ "$IPT" = "$IPT6" ]; then
+ $IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 133 -j RETURN
+ $IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 134 -j RETURN
+ $IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 135 -j RETURN
+ $IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 136 -j RETURN
+ $IPT6 -A mwan3_hook -p ipv6-icmp -m icmp6 --icmpv6-type 137 -j RETURN
+ fi
$IPT -A mwan3_hook -j CONNMARK --restore-mark --nfmask $MMX_MASK --ctmask $MMX_MASK
$IPT -A mwan3_hook -m mark --mark 0x0/$MMX_MASK -j mwan3_ifaces_in
$IPT -A mwan3_hook -m mark --mark 0x0/$MMX_MASK -j mwan3_connected
- $IPT -A mwan3_hook -m mark --mark 0x0/$MMX_MASK -j mwan3_ifaces_out
$IPT -A mwan3_hook -m mark --mark 0x0/$MMX_MASK -j mwan3_rules
$IPT -A mwan3_hook -j CONNMARK --save-mark --nfmask $MMX_MASK --ctmask $MMX_MASK
$IPT -A mwan3_hook -m mark ! --mark $MMX_DEFAULT/$MMX_MASK -j mwan3_connected
$IPT4 -N mwan3_ifaces_in
fi
- if ! $IPT4 -S mwan3_ifaces_out &> /dev/null; then
- $IPT4 -N mwan3_ifaces_out
- fi
-
if ! $IPT4 -S mwan3_iface_in_$1 &> /dev/null; then
$IPT4 -N mwan3_iface_in_$1
fi
- if ! $IPT4 -S mwan3_iface_out_$1 &> /dev/null; then
- $IPT4 -N mwan3_iface_out_$1
- fi
-
$IPT4 -F mwan3_iface_in_$1
$IPT4 -A mwan3_iface_in_$1 -i $2 -m set --match-set mwan3_connected src -m mark --mark 0x0/$MMX_MASK -m comment --comment "default" -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
$IPT4 -A mwan3_iface_in_$1 -i $2 -m mark --mark 0x0/$MMX_MASK -m comment --comment "$1" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
$IPT4 -D mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1 &> /dev/null
$IPT4 -A mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1
-
- $IPT4 -F mwan3_iface_out_$1
- $IPT4 -A mwan3_iface_out_$1 -o $2 -m mark --mark 0x0/$MMX_MASK -m comment --comment "$1" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
-
- $IPT4 -D mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1 &> /dev/null
- $IPT4 -A mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1
fi
if [ "$family" == "ipv6" ]; then
$IPT6 -N mwan3_ifaces_in
fi
- if ! $IPT6 -S mwan3_ifaces_out &> /dev/null; then
- $IPT6 -N mwan3_ifaces_out
- fi
-
if ! $IPT6 -S mwan3_iface_in_$1 &> /dev/null; then
$IPT6 -N mwan3_iface_in_$1
fi
- if ! $IPT6 -S mwan3_iface_out_$1 &> /dev/null; then
- $IPT6 -N mwan3_iface_out_$1
- fi
-
$IPT6 -F mwan3_iface_in_$1
$IPT6 -A mwan3_iface_in_$1 -i $2 -m set --match-set mwan3_connected_v6 src -m mark --mark 0x0/$MMX_MASK -m comment --comment "default" -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
$IPT6 -A mwan3_iface_in_$1 -i $2 -m mark --mark 0x0/$MMX_MASK -m comment --comment "$1" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
$IPT6 -D mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1 &> /dev/null
$IPT6 -A mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1
-
- $IPT6 -F mwan3_iface_out_$1
- $IPT6 -A mwan3_iface_out_$1 -o $2 -m mark --mark 0x0/$MMX_MASK -m comment --comment "$1" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
-
- $IPT6 -D mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1 &> /dev/null
- $IPT6 -A mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1
fi
}
$IPT4 -D mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1 &> /dev/null
$IPT4 -F mwan3_iface_in_$1 &> /dev/null
$IPT4 -X mwan3_iface_in_$1 &> /dev/null
-
- $IPT4 -D mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1 &> /dev/null
- $IPT4 -F mwan3_iface_out_$1 &> /dev/null
- $IPT4 -X mwan3_iface_out_$1 &> /dev/null
fi
if [ "$family" == "ipv6" ]; then
$IPT6 -D mwan3_ifaces_in -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_in_$1 &> /dev/null
$IPT6 -F mwan3_iface_in_$1 &> /dev/null
$IPT6 -X mwan3_iface_in_$1 &> /dev/null
-
- $IPT6 -D mwan3_ifaces_out -m mark --mark 0x0/$MMX_MASK -j mwan3_iface_out_$1 &> /dev/null
- $IPT6 -F mwan3_iface_out_$1 &> /dev/null
- $IPT6 -X mwan3_iface_out_$1 &> /dev/null
fi
}
mwan3_create_iface_route()
{
- local id route_args
+ local id route_args metric
config_get family $1 family ipv4
mwan3_get_iface_id id $1
route_args=""
fi
+ network_get_metric metric $1
+ if [ -n "$metric" -a "$metric" != "0" ]; then
+ route_args="$route_args metric $metric"
+ fi
+
$IP4 route flush table $id
$IP4 route add table $id default $route_args dev $2
+ mwan3_rtmon_ipv4
fi
if [ "$family" == "ipv6" ]; then
route_args=""
fi
+ network_get_metric metric $1
+ if [ -n "$metric" -a "$metric" != "0" ]; then
+ route_args="$route_args metric $metric"
+ fi
+
$IP6 route flush table $id
$IP6 route add table $id default $route_args dev $2
+ mwan3_rtmon_ipv6
fi
}
$IP4 rule del pref $(($id+2000))
done
- $IP4 rule add pref $(($id+1000)) iif $2 lookup main
+ $IP4 rule add pref $(($id+1000)) iif $2 lookup $id
$IP4 rule add pref $(($id+2000)) fwmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK lookup $id
fi
$IP6 rule del pref $(($id+2000))
done
- $IP6 rule add pref $(($id+1000)) iif $2 lookup main
+ $IP6 rule add pref $(($id+1000)) iif $2 lookup $id
$IP6 rule add pref $(($id+2000)) fwmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK lookup $id
fi
}
done
}
+mwan3_rtmon()
+{
+ pid="$(pgrep -f mwan3rtmon)"
+ if [ "${pid}" != "" ]; then
+ kill -USR1 "${pid}"
+ else
+ [ -x /usr/sbin/mwan3rtmon ] && /usr/sbin/mwan3rtmon &
+ fi
+}
+
mwan3_track()
{
local track_ip track_ips pid
local pid
pid="$(pgrep -f "mwan3track $1 $2")"
- if [ "${pid}" != "" ]; then
+ [ "${pid}" != "" ] && {
kill -USR1 "${pid}"
- else
- $LOG warn "Unable to send signal USR1 to mwan3track on interface $1 with pid ${pid}"
- fi
+ }
}
mwan3_set_policy()
{
- local iface_count id iface family metric probability weight
+ local iface_count id iface family metric probability weight device
config_get iface $1 interface
config_get metric $1 metric 1
config_get weight $1 weight 1
[ -n "$iface" ] || return 0
+ network_get_device device $iface
[ "$metric" -gt $DEFAULT_LOWEST_METRIC ] && $LOG warn "Member interface $iface has >$DEFAULT_LOWEST_METRIC metric. Not appending to policy" && return 0
mwan3_get_iface_id id $iface
$IPT4 -I mwan3_policy_$policy -m mark --mark 0x0/$MMX_MASK $probability -m comment --comment "$iface $weight $total_weight_v4" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
fi
+ else
+ [ -n "$device" ] && {
+ $IPT4 -S mwan3_policy_$policy | grep -q '.*--comment ".* [0-9]* [0-9]*"' || \
+ $IPT4 -I mwan3_policy_$policy -o $device -m mark --mark 0x0/$MMX_MASK -m comment --comment "out $iface $device" -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
+ }
fi
fi
$IPT6 -I mwan3_policy_$policy -m mark --mark 0x0/$MMX_MASK $probability -m comment --comment "$iface $weight $total_weight_v6" -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
fi
+ else
+ [ -n "$device" ] && {
+ $IPT6 -S mwan3_policy_$policy | grep -q '.*--comment ".* [0-9]* [0-9]*"' || \
+ $IPT6 -I mwan3_policy_$policy -o $device -m mark --mark 0x0/$MMX_MASK -m comment --comment "out $iface $device" -j MARK --set-xmark $MMX_DEFAULT/$MMX_MASK
+ }
fi
fi
}
[ -n "$id" ] || return 0
for IPT in "$IPT4" "$IPT6"; do
- if [ -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" -a -n "$($IPT -S mwan3_iface_out_$1 2> /dev/null)" ]; then
+ if [ -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" ]; then
$IPT -I mwan3_rule_$rule -m mark --mark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK -m set ! --match-set mwan3_sticky_$rule src,src -j MARK --set-xmark 0x0/$MMX_MASK
$IPT -I mwan3_rule_$rule -m mark --mark 0/$MMX_MASK -j MARK --set-xmark $(mwan3_id2mask id MMX_MASK)/$MMX_MASK
fi
if [ -z "$id" -o -z "$device" ]; then
result="unknown"
- elif [ -n "$($IP rule | awk '$1 == "'$(($id+1000)):'"')" -a -n "$($IP rule | awk '$1 == "'$(($id+2000)):'"')" -a -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" -a -n "$($IPT -S mwan3_iface_out_$1 2> /dev/null)" -a -n "$($IP route list table $id default dev $device 2> /dev/null)" ]; then
+ elif [ -n "$($IP rule | awk '$1 == "'$(($id+1000)):'"')" -a -n "$($IP rule | awk '$1 == "'$(($id+2000)):'"')" -a -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" -a -n "$($IP route list table $id default dev $device 2> /dev/null)" ]; then
result="$(mwan3_get_iface_hotplug_state $1)"
- elif [ -n "$($IP rule | awk '$1 == "'$(($id+1000)):'"')" -o -n "$($IP rule | awk '$1 == "'$(($id+2000)):'"')" -o -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" -o -n "$($IPT -S mwan3_iface_out_$1 2> /dev/null)" -o -n "$($IP route list table $id default dev $device 2> /dev/null)" ]; then
+ elif [ -n "$($IP rule | awk '$1 == "'$(($id+1000)):'"')" -o -n "$($IP rule | awk '$1 == "'$(($id+2000)):'"')" -o -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" -o -n "$($IP route list table $id default dev $device 2> /dev/null)" ]; then
result="error"
elif [ "$enabled" == "1" ]; then
result="offline"
for policy in $($IPT4 -S | awk '{print $2}' | grep mwan3_policy_ | sort -u); do
echo "$policy:" | sed 's/mwan3_policy_//'
- [ -n "$total_weight" ] || total_weight=$($IPT4 -S $policy | cut -s -d'"' -f2 | head -1 | awk '{print $3}')
+ [ -n "$total_weight" ] || total_weight=$($IPT4 -S $policy | grep -v '.*--comment "out .*" .*$' | cut -s -d'"' -f2 | head -1 | awk '{print $3}')
if [ ! -z "${total_weight##*[!0-9]*}" ]; then
- for iface in $($IPT4 -S $policy | cut -s -d'"' -f2 | awk '{print $1}'); do
- weight=$($IPT4 -S $policy | cut -s -d'"' -f2 | awk '$1 == "'$iface'"' | awk '{print $2}')
+ for iface in $($IPT4 -S $policy | grep -v '.*--comment "out .*" .*$' | cut -s -d'"' -f2 | awk '{print $1}'); do
+ weight=$($IPT4 -S $policy | grep -v '.*--comment "out .*" .*$' | cut -s -d'"' -f2 | awk '$1 == "'$iface'"' | awk '{print $2}')
percent=$(($weight*100/$total_weight))
echo " $iface ($percent%)"
done
else
- echo " $($IPT4 -S $policy | sed '/.*--comment \([^ ]*\) .*$/!d;s//\1/;q')"
+ echo " $($IPT4 -S $policy | grep -v '.*--comment "out .*" .*$' | sed '/.*--comment \([^ ]*\) .*$/!d;s//\1/;q')"
fi
unset total_weight
for policy in $($IPT6 -S | awk '{print $2}' | grep mwan3_policy_ | sort -u); do
echo "$policy:" | sed 's/mwan3_policy_//'
- [ -n "$total_weight" ] || total_weight=$($IPT6 -S $policy | cut -s -d'"' -f2 | head -1 | awk '{print $3}')
+ [ -n "$total_weight" ] || total_weight=$($IPT6 -S $policy | grep -v '.*--comment "out .*" .*$' | cut -s -d'"' -f2 | head -1 | awk '{print $3}')
if [ ! -z "${total_weight##*[!0-9]*}" ]; then
- for iface in $($IPT6 -S $policy | cut -s -d'"' -f2 | awk '{print $1}'); do
- weight=$($IPT6 -S $policy | cut -s -d'"' -f2 | awk '$1 == "'$iface'"' | awk '{print $2}')
+ for iface in $($IPT6 -S $policy | grep -v '.*--comment "out .*" .*$' | cut -s -d'"' -f2 | awk '{print $1}'); do
+ weight=$($IPT6 -S $policy | grep -v '.*--comment "out .*" .*$' | cut -s -d'"' -f2 | awk '$1 == "'$iface'"' | awk '{print $2}')
percent=$(($weight*100/$total_weight))
echo " $iface ($percent%)"
done
else
- echo " $($IPT6 -S $policy | sed '/.*--comment \([^ ]*\) .*$/!d;s//\1/;q')"
+ echo " $($IPT6 -S $policy | grep -v '.*--comment "out .*" .*$' | sed '/.*--comment \([^ ]*\) .*$/!d;s//\1/;q')"
fi
unset total_weight
local iface_select="${2}"
local running="0"
local age=0
- local pid device time_p time_n
+ local uptime=0
+ local downtime=0
+ local pid device time_p time_n time_u time_d
network_get_device device $1
let age=time_n-time_p
}
+ time_u="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/UPTIME")"
+ [ -z "${time_u}" ] || [ "${time_u}" = "0" ] || {
+ time_n="$(get_uptime)"
+ let uptime=time_n-time_u
+ }
+
+ time_d="$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/DOWNTIME")"
+ [ -z "${time_d}" ] || [ "${time_d}" = "0" ] || {
+ time_n="$(get_uptime)"
+ let downtime=time_n-time_d
+ }
+
json_add_object "${iface}"
json_add_int age "$age"
+ json_add_int uptime "${uptime}"
+ json_add_int downtime "${downtime}"
json_add_int "score" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/SCORE")"
json_add_int "lost" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/LOST")"
json_add_int "turn" "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/TURN")"
json_add_object
json_add_string ip "${track}"
json_add_string status "$(cat "${file}")"
+ json_add_int latency "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/LATENCY_${track}")"
+ json_add_int packetloss "$(cat "$MWAN3TRACK_STATUS_DIR/${iface}/LOSS_${track}")"
json_close_object
fi
done
fi
}
-case "$1" in
- list)
- json_init
- json_add_object "status"
- json_add_string "section" "x"
- json_add_string "interface" "x"
- json_close_object
- json_dump
- ;;
- call)
- case "$2" in
- status)
- local section iface
- read input;
- json_load "$input"
- json_get_var section section
- json_get_var iface interface
-
- config_load mwan3
+main () {
+
+ case "$1" in
+ list)
json_init
- case "$section" in
- interfaces)
- json_add_object interfaces
- config_foreach get_mwan3_status interface "${iface}"
- json_close_object
- ;;
- connected)
- json_add_object connected
- json_add_array ipv4
- report_connected_v4
- json_close_array
- json_add_array ipv6
- report_connected_v6
- json_close_array
- json_close_object
- ;;
- *)
- # interfaces
- json_add_object interfaces
- config_foreach get_mwan3_status interface
- json_close_object
- # connected
- json_add_object connected
- json_add_array ipv4
- report_connected_v4
- json_close_array
- json_add_array ipv6
- report_connected_v6
- json_close_array
- json_close_object
- ;;
- esac
+ json_add_object "status"
+ json_add_string "section" "x"
+ json_add_string "interface" "x"
+ json_close_object
json_dump
;;
- esac
- ;;
-esac
+ call)
+ case "$2" in
+ status)
+ local section iface
+ read input;
+ json_load "$input"
+ json_get_var section section
+ json_get_var iface interface
+
+ config_load mwan3
+ json_init
+ case "$section" in
+ interfaces)
+ json_add_object interfaces
+ config_foreach get_mwan3_status interface "${iface}"
+ json_close_object
+ ;;
+ connected)
+ json_add_object connected
+ json_add_array ipv4
+ report_connected_v4
+ json_close_array
+ json_add_array ipv6
+ report_connected_v6
+ json_close_array
+ json_close_object
+ ;;
+ *)
+ # interfaces
+ json_add_object interfaces
+ config_foreach get_mwan3_status interface
+ json_close_object
+ # connected
+ json_add_object connected
+ json_add_array ipv4
+ report_connected_v4
+ json_close_array
+ json_add_array ipv6
+ report_connected_v6
+ json_close_array
+ json_close_object
+ ;;
+ esac
+ json_dump
+ ;;
+ esac
+ ;;
+ esac
+}
+
+main "$@"
#!/bin/sh
. /lib/functions.sh
+. /usr/share/libubox/jshn.sh
. /lib/functions/network.sh
. /lib/mwan3/mwan3.sh
ifup()
{
- local device enabled
+ local device enabled up l3_device status
config_load mwan3
+ config_get_bool enabled globals 'enabled' 0
+ [ ${enabled} -gt 0 ] || {
+ echo "The service mwan3 is global disabled."
+ echo "Please execute \"/etc/init.d/mwan3 start\" first."
+ exit 1
+ }
if [ -z "$1" ]; then
echo "Expecting interface. Usage: mwan3 ifup <interface>" && exit 0
exit 0
}
+ status=$(ubus -S call network.interface.$1 status)
+ [ -n "$status" ] && {
+ json_load $status
+ json_get_vars up l3_device
+ }
+
config_get enabled "$1" enabled 0
- device=$(uci -p /var/state get network.$1.ifname) &> /dev/null
- if [ -n "$device" ] ; then
- [ "$enabled" -eq 1 ] && ACTION=ifup INTERFACE=$1 DEVICE=$device /sbin/hotplug-call iface
+ if [ "$up" = "1" ] \
+ && [ -n "$l3_device" ] \
+ && [ "$enabled" = "1" ]; then
+ ACTION=ifup INTERFACE=$1 DEVICE=$l3_device /sbin/hotplug-call iface
fi
}
start()
{
- local enabled
-
- config_load mwan3
- config_get_bool enabled globals 'enabled' 0
- [ ${enabled} -gt 0 ] || {
- echo "Warning: mwan3 is global disabled. Usage: /etc/init.d/mwan3 start"
- exit 0
+ local enabled src_ip local_source
+
+ uci_toggle_state mwan3 globals enabled "1"
+
+ config_get local_source globals local_source 'none'
+ [ "${local_source}" = "none" ] || {
+ src_ip=$(uci_get_state mwan3 globals src_ip)
+ [ "${src_ip}" != "" ] && {
+ ip route del default via "${src_ip}" dev lo 1>/dev/null 2>&1
+ ip addr del "${src_ip}/32" dev lo 1>/dev/null 2>&1
+ }
+
+ network_get_ipaddr src_ip "${local_source}"
+ if [ "${src_ip}" = "" ]; then
+ $LOG warn "Unable to set source ip for own initiated traffic (${local_source})"
+ else
+ ip addr add "${src_ip}/32" dev lo
+ ip route add default via "${src_ip}" dev lo
+ uci_toggle_state mwan3 globals src_ip "${src_ip}"
+ fi
}
config_foreach ifup interface
stop()
{
- local ipset route rule table IP IPT pid
+ local ipset route rule table IP IPT pid src_ip
+
+ for pid in $(pgrep -f "mwan3rtmon"); do
+ kill -TERM "$pid" > /dev/null 2>&1
+ sleep 1
+ kill -KILL "$pid" > /dev/null 2>&1
+ done
for pid in $(pgrep -f "mwan3track"); do
kill -TERM "$pid" > /dev/null 2>&1
mwan3_lock_clean
rm -rf $MWAN3_STATUS_DIR $MWAN3TRACK_STATUS_DIR
+
+ src_ip=$(uci_get_state mwan3 globals src_ip)
+ [ "${src_ip}" = "" ] || {
+ ip route del default via "${src_ip}" dev lo 1>/dev/null 2>&1
+ ip addr del "${src_ip}/32" dev lo 1>/dev/null 2>&1
+ }
+
+ uci_toggle_state mwan3 globals enabled "0"
}
restart() {
--- /dev/null
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/mwan3/mwan3.sh
+
+LOG="logger -t $(basename "$0")[$$] -p"
+
+clean_up() {
+ $LOG notice "Stopping mwan3rtmon..."
+ exit 0
+}
+
+rtchange() {
+ $LOG info "Detect rtchange event."
+}
+
+main() {
+ local rtmon_interval
+ trap clean_up TERM
+ trap rtchange USR1
+
+ config_load mwan3
+ config_get rtmon_interval globals rtmon_interval '5'
+
+ sleep 3
+ while mwan3_rtmon_ipv4 || mwan3_rtmon_ipv6; do
+ [ "$rtmon_interval" = "0" ] && break
+ sleep $rtmon_interval
+ done
+}
+
+main "$@"
main() {
local reliability count timeout interval failure_interval
local recovery_interval down up size
- local keep_failure_interval
+ local keep_failure_interval check_quality failure_latency
+ local recovery_latency failure_loss recovery_loss
+ local max_ttl
[ -z "$5" ] && echo "Error: should not be started manually" && exit 0
config_get down $1 down 5
config_get up $1 up 5
config_get size $1 size 56
+ config_get max_ttl $1 max_ttl 60
config_get failure_interval $1 failure_interval $interval
config_get_bool keep_failure_interval $1 keep_failure_interval 0
config_get recovery_interval $1 recovery_interval $interval
+ config_get_bool check_quality $1 check_quality 0
+ config_get failure_latency $1 failure_latency 1000
+ config_get recovery_latency $1 recovery_latency 500
+ config_get failure_loss $1 failure_loss 40
+ config_get recovery_loss $1 recovery_loss 10
local score=$(($down+$up))
local track_ips=$(echo $* | cut -d ' ' -f 5-99)
local lost=0
local sleep_time=0
local turn=0
+ local result
+ local ping_result
+ local loss=0
+ local latency=0
if [ "$STATUS" = "unknown" ]; then
echo "unknown" > /var/run/mwan3track/$1/STATUS
+ echo "0" > /var/run/mwan3track/$1/UPTIME
+ echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
score=0
else
echo "online" > /var/run/mwan3track/$1/STATUS
+ echo "0" > /var/run/mwan3track/$1/DOWNTIME
+ echo "$(get_uptime)" > /var/run/mwan3track/$1/UPTIME
+ env -i ACTION="connected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
fi
while true; do
if [ $host_up_count -lt $reliability ]; then
case "$track_method" in
ping)
- ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip &> /dev/null ;;
+ if [ $check_quality -eq 0 ]; then
+ ping -I $DEVICE -c $count -W $timeout -s $size -t $max_ttl -q $track_ip &> /dev/null
+ result=$?
+ else
+ ping_result="$(ping -I $DEVICE -c $count -W $timeout -s $size -t $max_ttl -q $track_ip | tail -2)"
+ loss="$(echo "$ping_result" | grep "packet loss" | cut -d "," -f3 | awk '{print $1}' | sed -e 's/%//')"
+ if [ "$loss" -eq 100 ]; then
+ latency=999999
+ else
+ latency="$(echo "$ping_result" | grep -E 'rtt|round-trip' | cut -d "=" -f2 | cut -d "/" -f2 | cut -d "." -f1)"
+ fi
+ fi
+ ;;
arping)
- arping -I $DEVICE -c $count -w $timeout -q $track_ip &> /dev/null ;;
+ arping -I $DEVICE -c $count -w $timeout -q $track_ip &> /dev/null
+ result=$?
+ ;;
httping)
- httping -y $SRC_IP -c $count -t $timeout -q $track_ip &> /dev/null ;;
+ httping -y $SRC_IP -c $count -t $timeout -q $track_ip &> /dev/null
+ result=$?
+ ;;
esac
- if [ $? -eq 0 ]; then
- let host_up_count++
- echo "up" > /var/run/mwan3track/$1/TRACK_${track_ip}
+ if [ $check_quality -eq 0 ]; then
+ if [ $result -eq 0 ]; then
+ let host_up_count++
+ echo "up" > /var/run/mwan3track/$1/TRACK_${track_ip}
+ if [ $score -le $up ]; then
+ $LOG info "Check ($track_method) success for target \"$track_ip\" on interface $1 ($2)"
+ fi
+ else
+ let lost++
+ echo "down" > /var/run/mwan3track/$1/TRACK_${track_ip}
+ if [ $score -gt $up ]; then
+ $LOG info "Check ($track_method) failed for target \"$track_ip\" on interface $1 ($2)"
+ fi
+ fi
else
- let lost++
- echo "down" > /var/run/mwan3track/$1/TRACK_${track_ip}
+ if [ "$loss" -ge "$failure_loss" -o "$latency" -ge "$failure_latency" ]; then
+ let lost++
+ echo "down" > /var/run/mwan3track/$1/TRACK_${track_ip}
+ echo "$latency" > /var/run/mwan3track/$1/LATENCY_${track_ip}
+ echo "$loss" > /var/run/mwan3track/$1/LOSS_${track_ip}
+
+ if [ $score -gt $up ]; then
+ $LOG info "Check (${track_method}: latency=${latency}ms loss=${loss}%) failed for target \"$track_ip\" on interface $1 ($2)"
+ fi
+ elif [ "$loss" -le "$recovery_loss" -a "$latency" -le "$recovery_latency" ]; then
+ let host_up_count++
+ echo "up" > /var/run/mwan3track/$1/TRACK_${track_ip}
+ echo "$latency" > /var/run/mwan3track/$1/LATENCY_${track_ip}
+ echo "$loss" > /var/run/mwan3track/$1/LOSS_${track_ip}
+
+ if [ $score -le $up ]; then
+ $LOG info "Check (${track_method}: latency=${latency}ms loss=${loss}%) success for target \"$track_ip\" on interface $1 ($2)"
+ fi
+ else
+ echo "skipped" > /var/run/mwan3track/$1/TRACK_${track_ip}
+ fi
fi
else
echo "skipped" > /var/run/mwan3track/$1/TRACK_${track_ip}
if [ $score -eq $up ]; then
echo "offline" > /var/run/mwan3track/$1/STATUS
+ echo "0" > /var/run/mwan3track/$1/UPTIME
+ echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
$LOG notice "Interface $1 ($2) is offline"
env -i ACTION=ifdown INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface
env -i ACTION="disconnected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
if [ $score -eq $up ]; then
$LOG notice "Interface $1 ($2) is online"
echo "online" > /var/run/mwan3track/$1/STATUS
- env -i ACTION="connected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
env -i ACTION=ifup INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface
exit 0
fi
wait
if [ "${IFDOWN_EVENT}" -eq 1 ]; then
- score=0
echo "offline" > /var/run/mwan3track/$1/STATUS
+ echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
+ echo "0" > /var/run/mwan3track/$1/UPTIME
+ $LOG notice "Interface $1 ($2) is offline"
+ env -i ACTION="disconnected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
+ score=0
IFDOWN_EVENT=0
fi
done
PKG_NAME:=net-snmp
PKG_VERSION:=5.7.3
-PKG_RELEASE:=9
+PKG_RELEASE:=10
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/net-snmp
echo "exec $miboid $name $prog $args" >> $CONFIGFILE
}
+snmpd_extend_add() {
+ local cfg="$1"
+
+ config_get name "$cfg" name
+ [ -n "$name" ] || return 0
+ config_get prog "$cfg" prog
+ [ -n "$prog" ] || return 0
+ config_get args "$cfg" args
+ config_get miboid "$cfg" miboid
+ echo "extend $miboid $name $prog $args" >> $CONFIGFILE
+}
+
snmpd_disk_add() {
local cfg="$1"
local disk='disk'
config_foreach snmpd_access_HostIP_add access_HostIP
config_foreach snmpd_pass_add pass
config_foreach snmpd_exec_add exec
+ config_foreach snmpd_extend_add extend
config_foreach snmpd_disk_add disk
config_foreach snmpd_engineid_add engineid
append_parm trapcommunity community trapcommunity
stop_service() {
[ -f "$CONFIGFILE" ] && rm -f "$CONFIGFILE"
+ procd_set_config_changed firewall
}
service_triggers(){
procd_add_reload_trigger 'snmpd'
}
+
+service_started() {
+ procd_set_config_changed firewall
+}
PKG_NAME:=netatalk
PKG_VERSION:=3.1.11
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/netatalk
SECTION:=net
CATEGORY:=Network
SUBMENU:=Filesystem
- DEPENDS:=+libattr +libdb47 +libgcrypt +libopenssl $(LIBRPC_DEPENDS)
+ DEPENDS:=+libattr +libdb47 +libgcrypt +libopenssl
TITLE:=netatalk
URL:=http://netatalk.sourceforge.net
MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
endef
TARGET_CFLAGS += -std=gnu99
-TARGET_LDFLAGS += $(LIBRPC)
CONFIGURE_ARGS += \
--disable-afs \
+++ /dev/null
-if PACKAGE_netopeer2-keystored
-
-config SSH_KEYS
- bool "Generate default ssh keys"
- default y
-
-endif
+++ /dev/null
-#
-# Copyright (C) 2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-# Warning by default OpenWrt does not have a root password which is necessery for NETCONF server.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=netopeer2
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-
-PKG_VERSION:=0.4.13
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=ae560bef2e70d274f6d028b59e3cb398ea2a621d
-PKG_MIRROR_HASH:=43b7f9c436afc76de539a7426b1462249326318b9b836f1d49282106a730a6b8
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/CESNET/Netopeer2.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
-
-PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
-
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-CMAKE_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/cmake.mk
-
-define Package/netopeer2-keystored/config
- source "$(SOURCE)/Config_keystored.in"
-endef
-
-define Package/netopeer2-server
- SECTION:=utils
- CATEGORY:=Utilities
- TITLE:=NETCONF server
- URL:=$(PKG_SOURCE_URL)
- DEPENDS:=+libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl +sysrepo
- MENU:=1
-endef
-
-define Package/netopeer2-cli
- SECTION:=utils
- CATEGORY:=Utilities
- TITLE:=Netopeer2 cli tool
- URL:=$(PKG_SOURCE_URL)
- DEPENDS:=+libpthread +libyang +libnetconf2 +libopenssl
-endef
-
-define Package/netopeer2-keystored
- SECTION:=utils
- CATEGORY:=Utilities
- TITLE:=Netopeer2 key store management
- URL:=$(PKG_SOURCE_URL)
- DEPENDS:=+libopenssl +libsysrepo +sysrepo +sysrepocfg +sysrepoctl +SSH_KEYS:openssh-keygen +SSH_KEYS:openssl-util
- MENU:=1
-endef
-
-define Package/netopeer2/description
- Netopeer2 is a set of tools implementing network configuration tools based on the NETCONF
- Protocol. This is the second generation of the toolset, originally available as the Netopeer
- project. Netopeer2 is based on the new generation of the NETCONF and YANG libraries -
- libyang and libnetconf2. The Netopeer server uses sysrepo as a NETCONF datastore implementation.
-endef
-
-CMAKE_OPTIONS += \
- -DCMAKE_INSTALL_PREFIX:PATH=/usr \
- -DCMAKE_BUILD_TYPE:STRING=Release \
- -DKEYSTORED_KEYS_DIR:STRING=/etc/keystored/keys
-
-define Package/netopeer2-server/install
- $(INSTALL_DIR) $(1)/bin
- $(INSTALL_BIN) $(PKG_BUILD_ROOT)/server/netopeer2-server $(1)/bin/
-
- $(INSTALL_DIR) $(1)/etc/sysrepo/yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-ssh-server.yang $(1)/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-tls-server.yang $(1)/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/iana-crypt-hash.yang $(1)/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-x509-cert-to-name.yang $(1)/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-netconf-server.yang $(1)/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-system.yang $(1)/etc/sysrepo/yang/ietf-system@2014-08-06.yang
-
- $(INSTALL_DIR) $(1)/etc/uci-defaults
- $(INSTALL_BIN) ./files/netopeer2-server.default $(1)/etc/uci-defaults/99_netopeer2-server
-
- $(INSTALL_DIR) $(1)/etc/init.d/
- $(INSTALL_BIN) ./files/netopeer2-server.init $(1)/etc/init.d/netopeer2-server
-
- $(INSTALL_DIR) $(1)/usr/share/netopeer2-server
- $(INSTALL_DATA) ./files/stock_config.xml $(1)/usr/share/netopeer2-server
-endef
-
-define Package/netopeer2-cli/install
- $(INSTALL_DIR) $(1)/bin
- $(INSTALL_BIN) $(PKG_BUILD_ROOT)/cli/netopeer2-cli $(1)/bin/
-endef
-
-define Package/netopeer2-keystored/install
- $(INSTALL_DIR) $(1)/usr/lib/sysrepo/plugins/
- $(INSTALL_BIN) $(PKG_BUILD_ROOT)/keystored/libkeystored.so $(1)/usr/lib/sysrepo/plugins/
-
- $(INSTALL_DIR) $(1)/etc/sysrepo/yang
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/modules/ietf-keystore.yang $(1)/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang
-
- $(INSTALL_DIR) $(1)/etc/uci-defaults
-
- $(INSTALL_DIR) $(1)/etc/keystored/keys
-ifeq ($(CONFIG_SSH_KEYS),y)
- $(INSTALL_BIN) ./files/netopeer2-keystored-keygen.default $(1)/etc/uci-defaults/97_netopeer2-keystored
-else
- $(INSTALL_BIN) ./files/netopeer2-keystored.default $(1)/etc/uci-defaults/97_netopeer2-keystored
- #ssh key name is specified in ./files/stock_config.xml file, you will need to provide the ssh keys yourself.
- $(INSTALL_DATA) ./files/ssh_host_rsa_key.pem $(1)/etc/keystored/keys
- $(INSTALL_DATA) ./files/ssh_host_rsa_key.pub.pem $(1)/etc/keystored/keys
-endif
-
- $(INSTALL_DIR) $(1)/usr/share/netopeer2-keystored
- $(INSTALL_DATA) $(PKG_BUILD_ROOT)/keystored/stock_key_config.xml $(1)/usr/share/netopeer2-keystored
-endef
-
-$(eval $(call BuildPackage,netopeer2-server))
-$(eval $(call BuildPackage,netopeer2-cli))
-$(eval $(call BuildPackage,netopeer2-keystored))
+++ /dev/null
-#!/bin/sh
-
-# Warning, problems can occur if the device restarts in the middle of this uci-default script
-
-if [ -x /bin/sysrepoctl ]; then
- match=$(sysrepoctl -l | grep "ietf-keystore ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
- if [ -x /bin/sysrepocfg ]; then
- sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
- rm /usr/share/netopeer2-keystored/stock_key_config.xml
- fi
-
- #generate ssh keys
- ssh-keygen -t rsa -f /tmp/ssh_host_rsa_key -N ""
- openssl rsa -in /tmp/ssh_host_rsa_key -outform pem > /etc/keystored/keys/ssh_host_rsa_key.pem
- openssl rsa -pubout -in /etc/keystored/keys/ssh_host_rsa_key.pem -out /etc/keystored/keys/ssh_host_rsa_key.pub.pem
- rm /tmp/ssh_host_rsa_key
- fi
-fi
-
-exit 0
+++ /dev/null
-#!/bin/sh
-
-# Warning, problems can occur if the device restarts in the middle of this uci-default script
-
-if [ -x /bin/sysrepoctl ]; then
- match=$(sysrepoctl -l | grep "ietf-keystore ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang -o root:root -p 600
- if [ -x /bin/sysrepocfg ]; then
- sysrepocfg -d startup -i /usr/share/netopeer2-keystored/stock_key_config.xml ietf-keystore
- rm /usr/share/netopeer2-keystored/stock_key_config.xml
- fi
- fi
-fi
-
-exit 0
+++ /dev/null
-#!/bin/sh
-
-# Warning, problems can occur if the device restarts in the middle of this uci-default script
-
-if [ -x /bin/sysrepoctl ]; then
- match=$(sysrepoctl -l | grep "ietf-ssh-server ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang -p 600
- fi
-
- match=$(sysrepoctl -l | grep "ietf-tls-server ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang -p 600
- fi
-
- match=$(sysrepoctl -l | grep "iana-crypt-hash ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang -p 600
- fi
-
- match=$(sysrepoctl -l | grep "ietf-x509-cert-to-name ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang -p 600
- fi
-
- match=$(sysrepoctl -l | grep "ietf-netconf-server ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang -o root:root -p 600
- sysrepoctl -m ietf-netconf-server -e listen
- sysrepoctl -m ietf-netconf-server -e ssh-listen
- if [ -x /bin/sysrepocfg ]; then
- sysrepocfg -d startup -i /usr/share/netopeer2-server/stock_config.xml ietf-netconf-server
- rm /usr/share/netopeer2-server/stock_config.xml
- fi
- fi
-
- match=$(sysrepoctl -l | grep "ietf-system ")
- if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-system@2014-08-06.yang -o root:root -p 600
- sysrepoctl -m ietf-system -e authentication
- sysrepoctl -m ietf-system -e local-users
- fi
-fi
-
-exit 0
+++ /dev/null
-#!/bin/sh /etc/rc.common
-
-START=99
-STOP=11
-
-USE_PROCD=1
-PROG=/bin/netopeer2-server
-
-start_service() {
-
- PERSIST_FILE=/etc/sysrepo/data/ietf-keystore.persist
-
- while [ ! -f $PERSIST_FILE ]
- do
- echo "no persist file yet"
- sleep 3
- done
-
- RETRY_CNT=5
- LAST_LINE=$(tail -n1 $PERSIST_FILE)
-
- while [[ -f $PERSIST_FILE && $LAST_LINE != "</module>" ]]
- do
- sleep 1
-
- echo "$RETRY_CNT: $LAST_LINE"
- LAST_LINE=$(tail -n1 $PERSIST_FILE)
- RETRY_CNT=$(($RETRY_CNT-1))
-
- if [ $RETRY_CNT -le 0 ];
- then
- rm $PERSIST_FILE
- RETRY_CNT=5
- fi
- done
-
- procd_open_instance
- procd_set_param command $PROG
- procd_append_param command -d -v 0
- procd_set_param respawn
- procd_close_instance
-}
-
-stop_service()
-{
- service_stop ${PROG}
-}
+++ /dev/null
-<netconf-server xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
- <listen>
- <endpoint>
- <name>test_ssh_listen_endpt</name>
- <ssh>
- <address>::</address>
- <port>830</port>
- <host-keys>
- <host-key>
- <name>test_ssh_listen_key</name>
- <public-key>ssh_host_rsa_key</public-key>
- </host-key>
- </host-keys>
- </ssh>
- </endpoint>
- </listen>
-</netconf-server>
+++ /dev/null
-Index: netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee/keystored/CMakeLists.txt
-===================================================================
---- netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee.orig/keystored/CMakeLists.txt
-+++ netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee/keystored/CMakeLists.txt
-@@ -105,6 +105,7 @@ endif()
- install(DIRECTORY DESTINATION ${KEYSTORED_KEYS_DIR}
- DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
-
-+if(FALSE)
- # install all the required modules and enable features
- install(CODE "
- execute_process(COMMAND ${SYSREPOCTL_EXECUTABLE} -l RESULT_VARIABLE RET OUTPUT_VARIABLE INSTALLED_MODULES ERROR_VARIABLE OUT)
-@@ -154,6 +155,7 @@ install(CODE "
- message(FATAL_ERROR \" Command sysrepocfg import failed:\\n \${OUT}\")
- endif()
- endif()")
-+endif()
-
- # plugins should be installed into sysrepo plugins dir
- install(TARGETS keystored DESTINATION ${SR_PLUGINS_DIR})
-Index: netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee/server/CMakeLists.txt
-===================================================================
---- netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee.orig/server/CMakeLists.txt
-+++ netopeer2-c204b59f9c2bb7e63eb907f33c44adbf208295ee/server/CMakeLists.txt
-@@ -147,6 +147,7 @@ include_directories(${SYSREPO_INCLUDE_DI
- # install binary
- install(TARGETS netopeer2-server DESTINATION ${CMAKE_INSTALL_BINDIR})
-
-+if(FALSE)
- # only for configuration
- if (ENABLE_CONFIGURATION)
- # find sysrepoctl
-@@ -239,6 +240,7 @@ if (ENABLE_CONFIGURATION)
-
- endif()")
- endif()
-+endif()
-
- # clean cmake cache
- add_custom_target(cleancache
+++ /dev/null
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
-===================================================================
---- /dev/null
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/CMakeLists.txt
-@@ -0,0 +1,5 @@
-+cmake_minimum_required(VERSION 2.6)
-+
-+add_subdirectory(server)
-+add_subdirectory(cli)
-+add_subdirectory(keystored)
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
-===================================================================
---- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/cli/CMakeLists.txt
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/cli/CMakeLists.txt
-@@ -1,7 +1,7 @@
- cmake_minimum_required(VERSION 2.6)
-
- # include custom Modules
--set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
-
- project(netopeer2-cli C)
- include(GNUInstallDirs)
-@@ -83,7 +83,7 @@ endif()
- install(FILES ${PROJECT_SOURCE_DIR}/doc/${PROJECT_NAME}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
-
- # clean cmake cache
--add_custom_target(cleancache
-+add_custom_target(cleancache_cli
- COMMAND make clean
- COMMAND find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} +
- COMMAND rm -rf Makefile Doxyfile
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
-===================================================================
---- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/keystored/CMakeLists.txt
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/keystored/CMakeLists.txt
-@@ -1,7 +1,7 @@
- cmake_minimum_required(VERSION 2.6)
-
- # include custom Modules
--set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
-
- project(keystored C)
- include(GNUInstallDirs)
-Index: netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
-===================================================================
---- netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d.orig/server/CMakeLists.txt
-+++ netopeer2-0.4.13-ae560bef2e70d274f6d028b59e3cb398ea2a621d/server/CMakeLists.txt
-@@ -1,7 +1,7 @@
- cmake_minimum_required(VERSION 2.8.9)
-
- # include custom Modules
--set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/")
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
-
- project(netopeer2-server C)
- include(GNUInstallDirs)
--- /dev/null
+menu "Select nfs-kernel-server configuration options"
+ depends on PACKAGE_nfs-kernel-server
+
+config NFS_KERNEL_SERVER_V4
+ bool "Include support for NFSv4"
+ default y
+
+endmenu
include $(TOPDIR)/rules.mk
PKG_NAME:=nfs-kernel-server
-PKG_VERSION:=2.3.1
-PKG_RELEASE:=1
-PKG_HASH:=ca92f1ab86b2af4dcd62d7716d46a6cdec268e83fe8d564cd8ff1464cc495989
+PKG_VERSION:=2.3.3
+PKG_RELEASE:=2
+PKG_HASH:=3c8c63611c7e78b7a3b2f8a28b9928a5b5e66d5e9ad09a1e54681508884320a4
PKG_SOURCE_URL:=@SF/nfs
-PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.xz
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/nfs-utils-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=$(PKG_NAME)/host
+HOST_BUILD_DEPENDS:=libtirpc/host
+
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_IPV6 \
+ CONFIG_NFS_KERNEL_SERVER_V4
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
SECTION:=net
CATEGORY:=Network
SUBMENU:=Filesystem
- DEPENDS:=+libwrap +libblkid +libuuid $(LIBRPC_DEPENDS)
+ DEPENDS:=+libwrap +libblkid +libuuid +libtirpc
URL:=http://nfs.sourceforge.net/
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
endef
define Package/nfs-kernel-server
$(call Package/nfs-kernel-server/Default)
TITLE:=Kernel NFS server support
- DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +portmap
+ DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +NFS_KERNEL_SERVER_V4:kmod-fs-nfs-v4 +rpcbind +NFS_KERNEL_SERVER_V4:nfs-utils-libs +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
endef
define Package/nfs-kernel-server/description
Kernel NFS server support
endef
+define Package/nfs-kernel-server/config
+ source "$(SOURCE)/Config.in"
+endef
+
define Package/nfs-kernel-server-utils
$(call Package/nfs-kernel-server/Default)
TITLE:=NFS server utils
/etc/exports
endef
-define Package/nfs-utils
+define Package/nfs-utils/Default
$(call Package/nfs-kernel-server/Default)
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS+= +libevent2 +USE_UCLIBC:librpc
+ DEPENDS+= +libevent2 +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+ URL:=http://nfs.sourceforge.net/
+ MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+endef
+
+define Package/nfs-utils
+ $(call Package/nfs-utils/Default)
TITLE:=updated mount utility (includes nfs4)
endef
Updated mount.nfs command - allows mounting nfs4 volumes
endef
-TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib -I$(STAGING_DIR)/usr/include/libevent \
- -I$(STAGING_DIR)/usr/include/ -Drpc_uint=uint
-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(LIBRPC) \
+define Package/nfs-utils-libs
+ $(call Package/nfs-utils/Default)
+ TITLE:=libraries provided by nfs-utils
+endef
+
+define Package/nfs-utils-libs/description
+ Libraries provided by nfs-utils
+endef
+
+TARGET_CFLAGS += -Wno-error=implicit-function-declaration \
+ -Wno-error=strict-prototypes \
+ -Wno-error=incompatible-pointer-types \
+ -Wno-error=format-security \
+ -Wno-error=undef \
+ -Wno-error=missing-include-dirs
+
+TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-L$(STAGING_DIR)/usr/lib/libevent
CONFIGURE_ARGS += \
+ --disable-caps \
--disable-gss \
- --disable-nfsv4 \
- --disable-nfsv41 \
- --disable-ipv6 \
- --enable-static \
+ --disable-nfsdcld \
+ --disable-nfsdcltrack \
--enable-shared \
- --disable-caps \
- --disable-tirpc \
- --disable-nfsdcld
+ --enable-static \
+ $(if $(CONFIG_NFS_KERNEL_SERVER_V4),--enable,--disable)-nfsv4 \
+ $(if $(CONFIG_NFS_KERNEL_SERVER_V4),--enable,--disable)-nfsv41
+
+ifeq ($(CONFIG_IPV6),n)
+CONFIGURE_ARGS += --disable-ipv6
+endif
CONFIGURE_VARS += \
libblkid_cv_is_recent=yes \
ac_cv_lib_resolv___res_querydomain=yes \
+ ac_cv_lib_bsd_daemon=no \
CONFIG_SQLITE3_TRUE="\#" \
CONFIG_NFSDCLD_TRUE="\#"
RPCGEN_PATH=$(STAGING_DIR_HOSTPKG)/bin/rpcgen \
RPCGEN=$(STAGING_DIR_HOSTPKG)/bin/rpcgen
-HOST_CFLAGS += -Dlinux
+HOST_CFLAGS += -Dlinux \
+ -Wno-error=missing-include-dirs
HOST_CONFIGURE_ARGS += \
--disable-gss \
--disable-nfsv4 \
--disable-nfsv41 \
- --disable-ipv6 \
- --disable-tirpc \
--without-tcp-wrappers
HOST_CONFIGURE_VARS += \
ac_cv_header_event_h=yes \
ac_cv_header_nfsidmap_h=yes \
ac_cv_header_blkid_blkid_h=yes \
+ ac_cv_lib_resolv___res_querydomain=yes \
GSSGLUE_CFLAGS=" " \
GSSGLUE_LIBS=" " \
RPCSECGSS_CFLAGS=" " \
$(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin
endef
+define Package/nfs-utils/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/nfsidmap.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfsidmap.{a,la,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfsidmap.pc $(1)/usr/lib/pkgconfig/
+endef
+
define Package/nfs-utils/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.nfs $(1)/sbin/
(cd $(1)/sbin; ln -sf mount.nfs mount.nfs4; ln -sf mount.nfs umount.nfs; ln -sf mount.nfs umount.nfs4)
endef
+define Package/nfs-utils-libs/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfsidmap.so* $(1)/usr/lib/
+endef
+
$(eval $(call HostBuild))
+$(eval $(call BuildPackage,nfs-utils))
+$(eval $(call BuildPackage,nfs-utils-libs))
$(eval $(call BuildPackage,nfs-kernel-server))
$(eval $(call BuildPackage,nfs-kernel-server-utils))
-$(eval $(call BuildPackage,nfs-utils))
USE_PROCD=1
NFS_D=/var/lib/nfs
+RECOVERY_D=$NFS_D/v4recovery
LOCK_D=/var/lib/nfs/sm
start_service() {
grep -q /proc/fs/nfsd /proc/mounts || \
mount -t nfsd nfsd /proc/fs/nfsd
mkdir -p $NFS_D
+ mkdir -p $RECOVERY_D
mkdir -p $LOCK_D
touch $NFS_D/rmtab
bool
prompt "Enable HTTP secure link module"
default n
+
+config NGINX_HTTP_SUB
+ bool
+ prompt "Enable HTTP sub module"
+ default n
+
+config NGINX_HEADERS_MORE
+ bool
+ prompt "Enable Headers_more module"
+ help
+ Set and clear input and output headers...more than "add"!
+ default y
+
+config NGINX_HTTP_BROTLI
+ bool
+ prompt "Enable Brotli compression module"
+ help
+ Add support for brotli compression module.
+ default n
+
+config NGINX_RTMP_MODULE
+ bool
+ prompt "Enable RTMP module"
+ depends on NGINX_SSL
+ help
+ Add support for NGINX-based Media Streaming Server module.
+ default n
+
+config NGINX_TS_MODULE
+ bool
+ prompt "Enable TS module"
+ help
+ Add support for MPEG-TS Live Module module.
+ default n
endmenu
--- /dev/null
+#
+# Copyright (C) 2010-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+menu "Configuration"
+ depends on PACKAGE_nginx-ssl
+
+config NGINX_DAV
+ bool
+ prompt "Enable WebDAV module"
+ help
+ Enable the HTTP and WebDAV methods PUT, DELETE, MKCOL, COPY and MOVE.
+ default n
+
+config NGINX_FLV
+ bool
+ prompt "Enable FLV module"
+ help
+ Provides the ability to seek within FLV (Flash) files using time-based offsets.
+ default n
+
+config NGINX_STUB_STATUS
+ bool
+ prompt "Enable stub status module"
+ help
+ Enable the stub status module which gives some status from the server.
+ default n
+
+config NGINX_HTTP_CHARSET
+ bool
+ prompt "Enable HTTP charset module"
+ default y
+
+config NGINX_HTTP_GZIP
+ bool
+ prompt "Enable HTTP gzip module"
+ default y
+
+config NGINX_HTTP_SSI
+ bool
+ prompt "Enable HTTP ssi module"
+ default y
+
+config NGINX_HTTP_USERID
+ bool
+ prompt "Enable HTTP userid module"
+ default y
+
+config NGINX_HTTP_ACCESS
+ bool
+ prompt "Enable HTTP access module"
+ default y
+
+config NGINX_HTTP_AUTH_BASIC
+ bool
+ prompt "Enable HTTP auth basic"
+ default y
+
+config NGINX_HTTP_AUTH_REQUEST
+ bool
+ prompt "Enable HTTP auth request module"
+ default n
+
+config NGINX_HTTP_AUTOINDEX
+ bool
+ prompt "Enable HTTP autoindex module"
+ default y
+
+config NGINX_HTTP_GEO
+ bool
+ prompt "Enable HTTP geo module"
+ default y
+
+config NGINX_HTTP_MAP
+ bool
+ prompt "Enable HTTP map module"
+ default y
+
+config NGINX_HTTP_SPLIT_CLIENTS
+ bool
+ prompt "Enable HTTP split clients"
+ default y
+
+config NGINX_HTTP_REFERER
+ bool
+ prompt "Enable HTTP referer module"
+ default y
+
+config NGINX_HTTP_REWRITE
+ bool
+ prompt "Enable HTTP rewrite module"
+ select NGINX_PCRE
+ default y
+
+config NGINX_HTTP_PROXY
+ bool
+ prompt "Enable HTTP proxy module"
+ default y
+
+config NGINX_HTTP_FASTCGI
+ bool
+ prompt "Enable HTTP fastcgi module"
+ default y
+
+config NGINX_HTTP_UWSGI
+ bool
+ prompt "Enable HTTP uwsgi module"
+ default y
+
+config NGINX_HTTP_SCGI
+ bool
+ prompt "Enable HTTP scgi module"
+ default y
+
+config NGINX_HTTP_MEMCACHED
+ bool
+ prompt "Enable HTTP memcached module"
+ default y
+
+config NGINX_HTTP_LIMIT_CONN
+ bool
+ prompt "Enable HTTP limit conn"
+ default y
+
+config NGINX_HTTP_LIMIT_REQ
+ bool
+ prompt "Enable HTTP limit req"
+ default y
+
+config NGINX_HTTP_EMPTY_GIF
+ bool
+ prompt "Enable HTTP empty gif"
+ default y
+
+config NGINX_HTTP_BROWSER
+ bool
+ prompt "Enable HTTP browser module"
+ default y
+
+config NGINX_HTTP_UPSTREAM_HASH
+ bool
+ prompt "Enable HTTP hash module"
+ default y
+
+config NGINX_HTTP_UPSTREAM_IP_HASH
+ bool
+ prompt "Enable HTTP IP hash module"
+ default y
+
+config NGINX_HTTP_UPSTREAM_LEAST_CONN
+ bool
+ prompt "Enable HTTP least conn module"
+ default y
+
+config NGINX_HTTP_UPSTREAM_KEEPALIVE
+ bool
+ prompt "Enable HTTP keepalive module"
+ default y
+
+config NGINX_HTTP_CACHE
+ bool
+ prompt "Enable HTTP cache"
+ default y
+
+config NGINX_HTTP_V2
+ bool
+ prompt "Enable HTTP_V2 module"
+ default n
+
+config NGINX_PCRE
+ bool
+ prompt "Enable PCRE library usage"
+ default y
+
+config NGINX_NAXSI
+ bool
+ prompt "Enable NAXSI module"
+ default y
+
+config NGINX_LUA
+ bool
+ prompt "Enable Lua module"
+ default n
+
+config NGINX_HTTP_REAL_IP
+ bool
+ prompt "Enable HTTP real ip module"
+ default n
+
+config NGINX_HTTP_SECURE_LINK
+ bool
+ prompt "Enable HTTP secure link module"
+ default n
+
+config NGINX_HTTP_SUB
+ bool
+ prompt "Enable HTTP sub module"
+ default n
+
+config NGINX_HEADERS_MORE
+ bool
+ prompt "Enable Headers_more module"
+ help
+ Set and clear input and output headers...more than "add"!
+ default y
+
+config NGINX_HTTP_BROTLI
+ bool
+ prompt "Enable Brotli compression module"
+ help
+ Add support for brotli compression module.
+ default n
+
+config NGINX_RTMP_MODULE
+ bool
+ prompt "Enable RTMP module"
+ help
+ Add support for NGINX-based Media Streaming Server module.
+ default n
+
+config NGINX_TS_MODULE
+ bool
+ prompt "Enable TS module"
+ help
+ Add support for MPEG-TS Live Module module.
+ default n
+
+endmenu
include $(TOPDIR)/rules.mk
PKG_NAME:=nginx
-PKG_VERSION:=1.12.2
+PKG_VERSION:=1.15.5
PKG_RELEASE:=1
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://nginx.org/download/
-PKG_HASH:=305f379da1d5fb5aefa79e45c829852ca6983c7cd2a79328f8e084a324cf0416
-PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
+PKG_HASH:=1a3a889a8f14998286de3b14cc1dd5b2747178e012d6d480a18aa413985dae6f
+
+PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de> \
+ Ansuel Smith <ansuelsmth@gmail.com>
PKG_LICENSE:=2-clause BSD-like license
-PKG_BUILD_DIR:=$(BUILD_DIR)/nginx-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
CONFIG_NGINX_NAXSI \
CONFIG_NGINX_LUA \
CONFIG_NGINX_HTTP_REAL_IP \
- CONFIG_NGINX_HTTP_SECURE_LINK
+ CONFIG_NGINX_HTTP_SECURE_LINK \
+ CONFIG_NGINX_HTTP_BROTLI \
+ CONFIG_NGINX_HEADERS_MORE \
+ CONFIG_NGINX_RTMP_MODULE \
+ CONFIG_NGINX_TS_MODULE \
include $(INCLUDE_DIR)/package.mk
-define Package/nginx
+define Package/nginx/default
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=Nginx web server
URL:=http://nginx.org/
- DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread
- MENU:=1
+ DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl \
+ +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread +NGINX_DAV:libexpat
endef
define Package/nginx/description
- nginx is an HTTP and reverse proxy server, as well as a mail proxy server,
- written by Igor Sysoev.
+ nginx is an HTTP and reverse proxy server, as well as a mail proxy server, \
+ written by Igor Sysoev. (Some module require SSL module enable to show up in \
+ config menu)
+endef
+
+define Package/nginx
+ $(Package/nginx/default)
+ VARIANT:=no-ssl
+endef
+
+define Package/nginx-ssl
+ $(Package/nginx/default)
+ TITLE += with SSL support
+ DEPENDS +=+libopenssl
+ VARIANT:=ssl
+ PROVIDES:=nginx
endef
+Package/nginx-ssl/description = $(Package/nginx/description) \
+ This varian is compiled with SSL support enabled. To enable additional module \
+ select them in the nginx default configuration menu.
+
+define Package/nginx-all-module
+ $(Package/nginx/default)
+ TITLE += with ALL module selected
+ DEPENDS:=+libpcre +libopenssl +zlib +liblua +libpthread +libexpat
+ VARIANT:=all-module
+ PROVIDES:=nginx
+endef
+
+Package/nginx-all-module/description = $(Package/nginx/description) \
+ This varian is compiled with ALL module selected.
+
define Package/nginx/config
source "$(SOURCE)/Config.in"
endef
+define Package/nginx-ssl/config
+ source "$(SOURCE)/Config_ssl.in"
+endef
+
config_files=nginx.conf mime.types
define Package/nginx/conffiles
/etc/nginx/
endef
+Package/nginx-ssl/conffiles = $(Package/nginx/conffiles)
+Package/nginx-all-module/conffiles = $(Package/nginx/conffiles)
+
+
ADDITIONAL_MODULES:=
-ifeq ($(CONFIG_NGINX_NAXSI),y)
- ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src
-endif
-ifeq ($(CONFIG_NGINX_LUA),y)
- ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx
-endif
-ifeq ($(CONFIG_IPV6),y)
- ADDITIONAL_MODULES += --with-ipv6
-endif
-ifeq ($(CONFIG_NGINX_STUB_STATUS),y)
- ADDITIONAL_MODULES += --with-http_stub_status_module
-endif
-ifeq ($(CONFIG_NGINX_FLV),y)
- ADDITIONAL_MODULES += --with-http_flv_module
-endif
-ifeq ($(CONFIG_NGINX_SSL),y)
- ADDITIONAL_MODULES += --with-http_ssl_module
-endif
-ifeq ($(CONFIG_NGINX_DAV),y)
- ADDITIONAL_MODULES += --with-http_dav_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_CACHE),y)
- ADDITIONAL_MODULES += --without-http-cache
-endif
-ifneq ($(CONFIG_NGINX_PCRE),y)
- ADDITIONAL_MODULES += --without-pcre
-endif
-ifneq ($(CONFIG_NGINX_HTTP_CHARSET),y)
- ADDITIONAL_MODULES += --without-http_charset_module
-else
- config_files += koi-utf koi-win win-utf
-endif
-ifneq ($(CONFIG_NGINX_HTTP_GZIP),y)
- ADDITIONAL_MODULES += --without-http_gzip_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_SSI),y)
- ADDITIONAL_MODULES += --without-http_ssi_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_USERID),y)
- ADDITIONAL_MODULES += --without-http_userid_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_ACCESS),y)
- ADDITIONAL_MODULES += --without-http_access_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_AUTH_BASIC),y)
- ADDITIONAL_MODULES += --without-http_auth_basic_module
-endif
-ifeq ($(CONFIG_NGINX_HTTP_AUTH_REQUEST),y)
- ADDITIONAL_MODULES += --with-http_auth_request_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_AUTOINDEX),y)
- ADDITIONAL_MODULES += --without-http_autoindex_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_GEO),y)
- ADDITIONAL_MODULES += --without-http_geo_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_MAP),y)
- ADDITIONAL_MODULES += --without-http_map_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_SPLIT_CLIENTS),y)
- ADDITIONAL_MODULES += --without-http_split_clients_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_REFERER),y)
- ADDITIONAL_MODULES += --without-http_referer_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_REWRITE),y)
- ADDITIONAL_MODULES += --without-http_rewrite_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_PROXY),y)
- ADDITIONAL_MODULES += --without-http_proxy_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_FASTCGI),y)
- ADDITIONAL_MODULES += --without-http_fastcgi_module
+
+ifneq ($(BUILD_VARIANT),all-module)
+ ifneq ($(CONFIG_NGINX_HTTP_CACHE),y)
+ ADDITIONAL_MODULES += --without-http-cache
+ endif
+ ifneq ($(CONFIG_NGINX_PCRE),y)
+ ADDITIONAL_MODULES += --without-pcre
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_CHARSET),y)
+ ADDITIONAL_MODULES += --without-http_charset_module
+ else
+ config_files += koi-utf koi-win win-utf
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_GZIP),y)
+ ADDITIONAL_MODULES += --without-http_gzip_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_SSI),y)
+ ADDITIONAL_MODULES += --without-http_ssi_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_USERID),y)
+ ADDITIONAL_MODULES += --without-http_userid_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_ACCESS),y)
+ ADDITIONAL_MODULES += --without-http_access_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_AUTH_BASIC),y)
+ ADDITIONAL_MODULES += --without-http_auth_basic_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_AUTOINDEX),y)
+ ADDITIONAL_MODULES += --without-http_autoindex_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_GEO),y)
+ ADDITIONAL_MODULES += --without-http_geo_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_MAP),y)
+ ADDITIONAL_MODULES += --without-http_map_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_SPLIT_CLIENTS),y)
+ ADDITIONAL_MODULES += --without-http_split_clients_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_REFERER),y)
+ ADDITIONAL_MODULES += --without-http_referer_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_REWRITE),y)
+ ADDITIONAL_MODULES += --without-http_rewrite_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_PROXY),y)
+ ADDITIONAL_MODULES += --without-http_proxy_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_FASTCGI),y)
+ ADDITIONAL_MODULES += --without-http_fastcgi_module
+ else
+ config_files += fastcgi_params
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_UWSGI),y)
+ ADDITIONAL_MODULES += --without-http_uwsgi_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_SCGI),y)
+ ADDITIONAL_MODULES += --without-http_scgi_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_MEMCACHED),y)
+ ADDITIONAL_MODULES += --without-http_memcached_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_LIMIT_CONN),y)
+ ADDITIONAL_MODULES += --without-http_limit_conn_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_LIMIT_REQ),y)
+ ADDITIONAL_MODULES += --without-http_limit_req_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_EMPTY_GIF),y)
+ ADDITIONAL_MODULES += --without-http_empty_gif_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_BROWSER),y)
+ ADDITIONAL_MODULES += --without-http_browser_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_HASH),y)
+ ADDITIONAL_MODULES += --without-http_upstream_hash_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH),y)
+ ADDITIONAL_MODULES += --without-http_upstream_ip_hash_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_LEAST_CONN),y)
+ ADDITIONAL_MODULES += --without-http_upstream_least_conn_module
+ endif
+ ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE),y)
+ ADDITIONAL_MODULES += --without-http_upstream_keepalive_module
+ endif
+
+ ifeq ($(BUILD_VARIANT),ssl)
+ ifneq ($(CONFIG_NGINX_SSL),y)
+ ADDITIONAL_MODULES += --with-http_ssl_module
+ endif
+ endif
+
+ ifeq ($(CONFIG_NGINX_SSL),y)
+ ADDITIONAL_MODULES += --with-http_ssl_module
+ endif
+ ifeq ($(CONFIG_NGINX_NAXSI),y)
+ ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src
+ endif
+ ifeq ($(CONFIG_NGINX_LUA),y)
+ ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx
+ endif
+ ifeq ($(CONFIG_IPV6),y)
+ ADDITIONAL_MODULES += --with-ipv6
+ endif
+ ifeq ($(CONFIG_NGINX_STUB_STATUS),y)
+ ADDITIONAL_MODULES += --with-http_stub_status_module
+ endif
+ ifeq ($(CONFIG_NGINX_FLV),y)
+ ADDITIONAL_MODULES += --with-http_flv_module
+ endif
+ ifeq ($(CONFIG_NGINX_DAV),y)
+ ADDITIONAL_MODULES += --with-http_dav_module --add-module=$(PKG_BUILD_DIR)/nginx-dav-ext-module
+ endif
+ ifeq ($(CONFIG_NGINX_HTTP_AUTH_REQUEST),y)
+ ADDITIONAL_MODULES += --with-http_auth_request_module
+ endif
+ ifeq ($(CONFIG_NGINX_HTTP_V2),y)
+ ADDITIONAL_MODULES += --with-http_v2_module
+ endif
+ ifeq ($(CONFIG_NGINX_HTTP_REAL_IP),y)
+ ADDITIONAL_MODULES += --with-http_realip_module
+ endif
+ ifeq ($(CONFIG_NGINX_HTTP_SECURE_LINK),y)
+ ADDITIONAL_MODULES += --with-http_secure_link_module
+ endif
+ ifeq ($(CONFIG_NGINX_HTTP_SUB),y)
+ ADDITIONAL_MODULES += --with-http_sub_module
+ endif
+ ifeq ($(CONFIG_NGINX_HEADERS_MORE),y)
+ ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-headers-more
+ endif
+ ifeq ($(CONFIG_NGINX_HTTP_BROTLI),y)
+ ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-brotli
+ endif
+ ifeq ($(CONFIG_NGINX_RTMP_MODULE),y)
+ ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-rtmp
+ endif
+ ifeq ($(CONFIG_NGINX_TS_MODULE),y)
+ ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-ts
+ endif
else
- config_files += fastcgi_params
-endif
-ifneq ($(CONFIG_NGINX_HTTP_UWSGI),y)
- ADDITIONAL_MODULES += --without-http_uwsgi_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_SCGI),y)
- ADDITIONAL_MODULES += --without-http_scgi_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_MEMCACHED),y)
- ADDITIONAL_MODULES += --without-http_memcached_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_LIMIT_CONN),y)
- ADDITIONAL_MODULES += --without-http_limit_conn_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_LIMIT_REQ),y)
- ADDITIONAL_MODULES += --without-http_limit_req_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_EMPTY_GIF),y)
- ADDITIONAL_MODULES += --without-http_empty_gif_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_BROWSER),y)
- ADDITIONAL_MODULES += --without-http_browser_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_HASH),y)
- ADDITIONAL_MODULES += --without-http_upstream_hash_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH),y)
- ADDITIONAL_MODULES += --without-http_upstream_ip_hash_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_LEAST_CONN),y)
- ADDITIONAL_MODULES += --without-http_upstream_least_conn_module
-endif
-ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE),y)
- ADDITIONAL_MODULES += --without-http_upstream_keepalive_module
-endif
-ifeq ($(CONFIG_NGINX_HTTP_V2),y)
- ADDITIONAL_MODULES += --with-http_v2_module
-endif
-ifeq ($(CONFIG_NGINX_HTTP_REAL_IP),y)
- ADDITIONAL_MODULES += --with-http_realip_module
-endif
-ifeq ($(CONFIG_NGINX_HTTP_SECURE_LINK),y)
- ADDITIONAL_MODULES += --with-http_secure_link_module
+ CONFIG_NGINX_HEADERS_MORE:=y
+ CONFIG_NGINX_HTTP_BROTLI:=y
+ CONFIG_NGINX_RTMP_MODULE:=y
+ CONFIG_NGINX_TS_MODULE:=y
+ CONFIG_NGINX_NAXSI:=y
+ CONFIG_NGINX_LUA:=y
+ CONFIG_NGINX_DAV:=y
+ ADDITIONAL_MODULES += --with-http_ssl_module --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src \
+ --add-module=$(PKG_BUILD_DIR)/lua-nginx --with-ipv6 --with-http_stub_status_module --with-http_flv_module \
+ --with-http_dav_module --add-module=$(PKG_BUILD_DIR)/nginx-dav-ext-module \
+ --with-http_auth_request_module --with-http_v2_module --with-http_realip_module \
+ --with-http_secure_link_module --with-http_sub_module --add-module=$(PKG_BUILD_DIR)/nginx-headers-more \
+ --add-module=$(PKG_BUILD_DIR)/nginx-brotli --add-module=$(PKG_BUILD_DIR)/nginx-rtmp \
+ --add-module=$(PKG_BUILD_DIR)/nginx-ts
+ config_files += koi-utf koi-win win-utf fastcgi_params
endif
+define Package/nginx-mod-luci/default
+ TITLE:=Nginx on LuCI
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Web Servers/Proxies
+ TITLE:=Support file for Nginx
+ URL:=http://nginx.org/
+ DEPENDS:=+uwsgi-cgi +uwsgi-cgi-luci-support
+endef
+
+define Package/nginx-mod-luci
+ $(Package/nginx-mod-luci/default)
+ DEPENDS += +nginx
+endef
+
+define Package/nginx-mod-luci/description
+ Support file for LuCI in nginx. Include custom nginx configuration, autostart script for uwsgi.
+endef
+
+define Package/nginx-mod-luci-ssl
+ $(Package/nginx-mod-luci/default)
+ TITLE += with HTTPS support
+ DEPENDS += +nginx-ssl
+endef
+
+Package/nginx-mod-luci-ssl/description = $(define Package/nginx-mod-luci/description) \
+ This also include redirect from http to https and cert autogeneration.
+
TARGET_CFLAGS += -fvisibility=hidden -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK
TARGET_LDFLAGS += -Wl,--gc-sections
-define Build/Configure
- ( cd $(PKG_BUILD_DIR) ; \
- $(if $(CONFIG_NGINX_LUA),LUA_INC=$(STAGING_DIR)/usr/include LUA_LIB=$(STAGING_DIR)/usr/lib) \
- ./configure \
+ifeq ($(CONFIG_NGINX_LUA),y)
+ CONFIGURE_VARS += LUA_INC=$(STAGING_DIR)/usr/include \
+ LUA_LIB=$(STAGING_DIR)/usr/lib
+endif
+
+CONFIGURE_ARGS += \
--crossbuild=Linux::$(ARCH) \
--prefix=/usr \
--conf-path=/etc/nginx/nginx.conf \
--with-cc="$(TARGET_CC)" \
--with-cc-opt="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
--with-ld-opt="$(TARGET_LDFLAGS)" \
- --without-http_upstream_zone_module \
- )
+ --without-http_upstream_zone_module
+
+define Package/nginx-mod-luci/install
+ $(INSTALL_DIR) $(1)/etc/nginx
+ $(INSTALL_BIN) ./files-luci-support/luci_uwsgi.conf $(1)/etc/nginx/luci_uwsgi.conf
+ $(INSTALL_BIN) ./files-luci-support/luci_nginx.conf $(1)/etc/nginx/luci_nginx.conf
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files-luci-support/60_nginx-luci-support $(1)/etc/uci-defaults/60_nginx-luci-support
+endef
+
+define Package/nginx-mod-luci-ssl/install
+ $(Package/nginx-mod-luci/install)
+ $(INSTALL_DIR) $(1)/etc/nginx
+ $(INSTALL_BIN) ./files-luci-support/luci_nginx_ssl.conf $(1)/etc/nginx/luci_nginx_ssl.conf
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files-luci-support/70_nginx-luci-support-ssl $(1)/etc/uci-defaults/70_nginx-luci-support-ssl
endef
define Package/nginx/install
$(if $(CONFIG_NGINX_NAXSI),$(chmod 0640 $(1)/etc/nginx/naxsi_core.rules))
endef
+Package/nginx-ssl/install = $(Package/nginx/install)
+Package/nginx-all-module/install = $(Package/nginx/install)
+
define Build/Prepare
- $(call Build/Prepare/Default)
- $(if $(CONFIG_NGINX_NAXSI),$(call Prepare/nginx-naxsi))
- $(if $(CONFIG_NGINX_LUA),$(call Prepare/lua-nginx))
+ $(Build/Prepare/Default)
+ $(Prepare/nginx-naxsi)
+ $(Prepare/lua-nginx)
+ $(Prepare/nginx-brotli)
+ $(Prepare/nginx-headers-more)
+ $(Prepare/nginx-rtmp)
+ $(Prepare/nginx-ts)
+ $(Prepare/nginx-dav-ext-module)
endef
-define Download/nginx-naxsi
- VERSION:=cf73f9c8664127252c2a4958d2e169516d3845a1
- SUBDIR:=nginx-naxsi
- FILE:=nginx-naxsi-module-$(PKG_VERSION)-$$(VERSION).tar.gz
- URL:=https://github.com/nbs-system/naxsi.git
- PROTO:=git
-endef
-define Prepare/nginx-naxsi
- $(eval $(call Download,nginx-naxsi))
+ifeq ($(CONFIG_NGINX_HEADERS_MORE),y)
+ define Download/nginx-headers-more
+ VERSION:=a9f7c7e86cc7441d04e2f11f01c2e3a9c4b0301d
+ SUBDIR:=nginx-headers-more
+ FILE:=headers-more-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
+ URL:=https://github.com/openresty/headers-more-nginx-module.git
+ MIRROR_HASH:=432609015719aaa7241e5166c7cda427acbe004f725887f78ef629d51bd9cb3f
+ PROTO:=git
+ endef
+ $(eval $(call Download,nginx-headers-more))
+
+ define Prepare/nginx-headers-more
+ $(eval $(Download/nginx-headers-more))
gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
-endef
+ endef
+endif
-define Download/lua-nginx
- VERSION:=cdd2ae921f67bf396c743406493127be496e57ce
- SUBDIR:=lua-nginx
- FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
- URL:=https://github.com/openresty/lua-nginx-module.git
- PROTO:=git
-endef
-define Prepare/lua-nginx
- $(eval $(call Download,lua-nginx))
+ifeq ($(CONFIG_NGINX_HTTP_BROTLI),y)
+ define Download/nginx-brotli
+ VERSION:=e26248ee361c04e25f581b92b85d95681bdffb39
+ SUBDIR:=nginx-brotli
+ FILE:=ngx-brotli-module-$(PKG_VERSION)-$$(VERSION).tar.gz
+ URL:=https://github.com/eustas/ngx_brotli.git
+ MIRROR_HASH:=76b891ba49f82f0cfbc9cba875646e26ee986b522373e0aa2698a9923a4adcdb
+ PROTO:=git
+ endef
+ $(eval $(call Download,nginx-brotli))
+
+ define Prepare/nginx-brotli
+ $(eval $(Download/nginx-brotli))
+ gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
+ endef
+endif
+
+
+ifeq ($(CONFIG_NGINX_RTMP_MODULE),y)
+ define Download/nginx-rtmp
+ VERSION:=791b6136f02bc9613daf178723ac09f4df5a3bbf
+ SUBDIR:=nginx-rtmp
+ FILE:=ngx-rtmp-module-$(PKG_VERSION)-$$(VERSION).tar.gz
+ URL:=https://github.com/arut/nginx-rtmp-module.git
+ MIRROR_HASH:=8db3f7b545ce98f47415e0436e12dfb55ae787afd3cd9515b5642c7b9dc0ef00
+ PROTO:=git
+ endef
+ $(eval $(call Download,nginx-rtmp))
+
+ define Prepare/nginx-rtmp
+ $(eval $(Download/nginx-rtmp))
+ gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
+ endef
+endif
+
+
+ifeq ($(CONFIG_NGINX_TS_MODULE),y)
+ define Download/nginx-ts
+ VERSION:=ef2f874d95cc75747eb625a292524a702aefb0fd
+ SUBDIR:=nginx-ts
+ FILE:=ngx-ts-module-$(PKG_VERSION)-$$(VERSION).tar.gz
+ URL:=https://github.com/arut/nginx-ts-module.git
+ MIRROR_HASH:=31ecc9968b928886b54884138eafe2fa747648bca5094d4c3132e8ae9509d1d3
+ PROTO:=git
+ endef
+ $(eval $(call Download,nginx-ts))
+
+ define Prepare/nginx-ts
+ $(eval $(Download/nginx-ts))
+ gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
+ endef
+endif
+
+
+ifeq ($(CONFIG_NGINX_NAXSI),y)
+ define Download/nginx-naxsi
+ VERSION:=951123ad456bdf5ac94e8d8819342fe3d49bc002
+ SUBDIR:=nginx-naxsi
+ FILE:=nginx-naxsi-module-$(PKG_VERSION)-$$(VERSION).tar.gz
+ URL:=https://github.com/nbs-system/naxsi.git
+ MIRROR_HASH:=7ab791f2ff38096f48013141bbfe20ba213d5e04dcac08ca82e0cac07d5c30f0
+ PROTO:=git
+ endef
+ $(eval $(call Download,nginx-naxsi))
+
+ define Prepare/nginx-naxsi
+ $(eval $(Download/nginx-naxsi))
+ gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
+ endef
+endif
+
+
+ifeq ($(CONFIG_NGINX_LUA),y)
+ define Download/lua-nginx
+ VERSION:=e94f2e5d64daa45ff396e262d8dab8e56f5f10e0
+ SUBDIR:=lua-nginx
+ FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
+ URL:=https://github.com/openresty/lua-nginx-module.git
+ MIRROR_HASH:=ae439f9a8b3c34d7240735b844db72ee721af4791bbaff5692bca20e6785f541
+ PROTO:=git
+ endef
+ $(eval $(call Download,lua-nginx))
+
+ define Prepare/lua-nginx
+ $(eval $(Download/lua-nginx))
gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
$(call PatchDir,$(PKG_BUILD_DIR),./patches-lua-nginx)
-endef
+ endef
+endif
+
+
+ifeq ($(CONFIG_NGINX_DAV),y)
+ define Download/nginx-dav-ext-module
+ VERSION:=430fd774fe838a04f1a5defbf1dd571d42300cf9
+ SUBDIR:=nginx-dav-ext-module
+ FILE:=nginx-dav-ext-module-$(PKG_VERSION)-$$(VERSION).tar.gz
+ URL:=https://github.com/arut/nginx-dav-ext-module.git
+ MIRROR_HASH:=0566053a8756423ecab455fd9d218cec1e017598fcbb3d6415a06f816851611e
+ PROTO:=git
+ endef
+ $(eval $(call Download,nginx-dav-ext-module))
+
+ define Prepare/nginx-dav-ext-module
+ $(eval $(Download/nginx-dav-ext-module))
+ gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
+ endef
+endif
$(eval $(call BuildPackage,nginx))
+$(eval $(call BuildPackage,nginx-ssl))
+$(eval $(call BuildPackage,nginx-all-module))
+$(eval $(call BuildPackage,nginx-mod-luci))
+$(eval $(call BuildPackage,nginx-mod-luci-ssl))
--- /dev/null
+#!/bin/sh
+
+if [ -f "/etc/nginx/luci_nginx.conf" ] && [ -f "/etc/nginx/nginx.conf" ]; then
+ if [ ! "$(cat '/etc/nginx/nginx.conf' | grep 'luci_uwsgi.conf')" ]; then
+ mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf_old
+ mv /etc/nginx/luci_nginx.conf /etc/nginx/nginx.conf
+ core_number=$(grep -c ^processor /proc/cpuinfo)
+ sed -i "3s/.*/worker_processes "$core_number";/" /etc/nginx/nginx.conf
+ if [ -n "$(pgrep uhttpd)" ]; then
+ /etc/init.d/uhttpd stop
+ /etc/init.d/uhttpd disable
+ fi
+ if [ -n "$(pgrep nginx)" ]; then
+ /etc/init.d/nginx restart
+ else
+ /etc/init.d/nginx start
+ fi
+ if [ -n "$(pgrep uwsgi)" ]; then
+ /etc/init.d/uwsgi restart
+ else
+ /etc/init.d/uwsgi start
+ fi
+ else
+ rm /etc/nginx/luci_nginx.conf
+ fi
+fi
+
+exit 0
--- /dev/null
+#!/bin/sh
+
+
+if [ -f "/etc/nginx/luci_nginx_ssl.conf" ] && [ -f "/etc/nginx/nginx.conf" ]; then
+ if [ ! "$(cat '/etc/nginx/nginx.conf' | grep 'return 301 https://$host$request_uri;')" ]; then
+ if [ -f "/etc/nginx/nginx.conf_old" ]; then
+ rm /etc/nginx/nginx.conf
+ else
+ mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf_old
+ fi
+ mv /etc/nginx/luci_nginx_ssl.conf /etc/nginx/nginx.conf
+ core_number=$(grep -c ^processor /proc/cpuinfo)
+ sed -i "3s/.*/worker_processes "$core_number";/" /etc/nginx/nginx.conf
+ if [ -n "$(pgrep nginx)" ]; then
+ /etc/init.d/nginx restart
+ else
+ /etc/init.d/nginx start
+ fi
+ else
+ rm /etc/nginx/luci_nginx_ssl.conf
+ fi
+fi
+
+
+if [ ! -f "/etc/nginx/nginx.key" ]; then
+
+ NGINX_KEY=/etc/nginx/nginx.key
+ NGINX_CER=/etc/nginx/nginx.cer
+ OPENSSL_BIN=/usr/bin/openssl
+ PX5G_BIN=/usr/sbin/px5g
+
+ # Prefer px5g for certificate generation (existence evaluated last)
+ GENKEY_CMD=""
+ UNIQUEID=$(dd if=/dev/urandom bs=1 count=4 | hexdump -e '1/1 "%02x"')
+ [ -x "$OPENSSL_BIN" ] && GENKEY_CMD="$OPENSSL_BIN req -x509 -nodes"
+ [ -x "$PX5G_BIN" ] && GENKEY_CMD="$PX5G_BIN selfsigned"
+ [ -n "$GENKEY_CMD" ] && {
+ $GENKEY_CMD \
+ -days 730 -newkey rsa:2048 -keyout "${NGINX_KEY}.new" -out "${NGINX_CER}.new" \
+ -subj /C="ZZ"/ST="Somewhere"/L="Unknown"/O="OpenWrt""$UNIQUEID"/CN="OpenWrt"
+ sync
+ mv "${NGINX_KEY}.new" "${NGINX_KEY}"
+ mv "${NGINX_CER}.new" "${NGINX_CER}"
+ }
+fi
+
+
+exit 0
--- /dev/null
+
+user nobody nogroup;
+worker_processes 1;
+
+#error_log logs/error.log;
+#error_log logs/error.log notice;
+#error_log logs/error.log info;
+
+pid /var/run/nginx.pid;
+
+
+events {
+ worker_connections 1024;
+}
+
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+
+ sendfile on;
+ keepalive_timeout 0;
+
+ client_body_buffer_size 10K;
+ client_header_buffer_size 1k;
+ client_max_body_size 1G;
+ large_client_header_buffers 2 1k;
+
+ gzip on;
+ gzip_http_version 1.1;
+ gzip_vary on;
+ gzip_comp_level 1;
+ gzip_proxied any;
+
+ root /www;
+
+ server {
+ listen 80 default_server;
+ listen [::]:80 default_server;
+ server_name localhost;
+
+ location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
+ expires 365d;
+ }
+
+ include luci_uwsgi.conf;
+
+ }
+}
\ No newline at end of file
--- /dev/null
+
+user root;
+worker_processes 1;
+
+#error_log logs/error.log;
+#error_log logs/error.log notice;
+#error_log logs/error.log info;
+
+pid /var/run/nginx.pid;
+
+
+events {
+ worker_connections 1024;
+}
+
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+
+ sendfile on;
+ keepalive_timeout 0;
+
+ client_body_buffer_size 10K;
+ client_header_buffer_size 1k;
+ client_max_body_size 1G;
+ large_client_header_buffers 2 1k;
+
+ gzip on;
+ gzip_http_version 1.1;
+ gzip_vary on;
+ gzip_comp_level 1;
+ gzip_proxied any;
+
+ root /www;
+
+ server {
+ listen 80 default_server;
+ listen [::]:80 default_server;
+ server_name _;
+ return 301 https://$host$request_uri;
+ }
+
+ server {
+ listen 443 ssl default_server;
+ listen [::]:443 ssl default_server;
+ server_name localhost;
+
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_ciphers "EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:DHE+AESGCM:DHE:!RSA!aNULL:!eNULL:!LOW:!RC4:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!CAMELLIA:!SEED";
+ ssl_session_tickets off;
+
+ ssl_certificate /etc/nginx/nginx.cer;
+ ssl_certificate_key /etc/nginx/nginx.key;
+
+ location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
+ expires 365d;
+ }
+
+ include luci_uwsgi.conf;
+
+ }
+}
\ No newline at end of file
--- /dev/null
+location /cgi-bin/luci {
+ index index.html;
+ uwsgi_param QUERY_STRING $query_string;
+ uwsgi_param REQUEST_METHOD $request_method;
+ uwsgi_param CONTENT_TYPE $content_type;
+ uwsgi_param CONTENT_LENGTH $content_length if_not_empty;
+ uwsgi_param REQUEST_URI $request_uri;
+ uwsgi_param PATH_INFO $document_uri;
+ uwsgi_param SERVER_PROTOCOL $server_protocol;
+ uwsgi_param REMOTE_ADDR $remote_addr;
+ uwsgi_param REMOTE_PORT $remote_port;
+ uwsgi_param SERVER_ADDR $server_addr;
+ uwsgi_param SERVER_PORT $server_port;
+ uwsgi_param SERVER_NAME $server_name;
+ uwsgi_modifier1 9;
+ uwsgi_pass unix:////var/run/uwsgi.sock;
+}
+
+location /luci-static {
+}
\ No newline at end of file
--- a/lua-nginx/src/ngx_http_lua_module.c
+++ b/lua-nginx/src/ngx_http_lua_module.c
-@@ -157,14 +157,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -165,14 +165,14 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_lua_loc_conf_t, log_socket_errors),
NULL },
{ ngx_string("init_by_lua"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
ngx_http_lua_init_by_lua,
-@@ -178,14 +178,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -186,14 +186,14 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_MAIN_CONF_OFFSET,
0,
(void *) ngx_http_lua_init_by_file },
{ ngx_string("init_worker_by_lua"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
ngx_http_lua_init_worker_by_lua,
-@@ -201,6 +201,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -209,6 +209,7 @@ static ngx_command_t ngx_http_lua_cmds[]
(void *) ngx_http_lua_init_worker_by_file },
#if defined(NDK) && NDK
/* set_by_lua $res { inline Lua code } [$arg1 [$arg2 [...]]] */
{ ngx_string("set_by_lua_block"),
NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -209,7 +210,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -217,7 +218,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_filter_set_by_lua_inline },
/* set_by_lua $res <inline script> [$arg1 [$arg2 [...]]] */
{ ngx_string("set_by_lua"),
NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -237,7 +238,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -245,7 +246,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_rewrite_handler_inline },
/* rewrite_by_lua_block { <inline script> } */
{ ngx_string("rewrite_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -246,7 +247,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -254,7 +255,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_rewrite_handler_inline },
/* access_by_lua "<inline script>" */
{ ngx_string("access_by_lua"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -255,7 +256,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -263,7 +264,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_access_handler_inline },
/* access_by_lua_block { <inline script> } */
{ ngx_string("access_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -264,7 +265,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -272,7 +273,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_access_handler_inline },
/* content_by_lua "<inline script>" */
{ ngx_string("content_by_lua"),
NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1,
-@@ -272,7 +273,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -280,7 +281,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_content_handler_inline },
/* content_by_lua_block { <inline script> } */
{ ngx_string("content_by_lua_block"),
NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
-@@ -280,7 +281,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -288,7 +289,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_content_handler_inline },
/* log_by_lua <inline script> */
{ ngx_string("log_by_lua"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -289,7 +290,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -297,7 +298,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_log_handler_inline },
/* log_by_lua_block { <inline script> } */
{ ngx_string("log_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -298,7 +299,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -306,7 +307,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_log_handler_inline },
{ ngx_string("rewrite_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
|NGX_CONF_TAKE1,
-@@ -353,7 +354,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -361,7 +362,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_header_filter_inline },
/* header_filter_by_lua_block { <inline script> } */
{ ngx_string("header_filter_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -362,7 +363,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -370,7 +371,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_header_filter_inline },
{ ngx_string("header_filter_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
|NGX_CONF_TAKE1,
-@@ -378,7 +379,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -386,7 +387,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_body_filter_inline },
/* body_filter_by_lua_block { <inline script> } */
{ ngx_string("body_filter_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
-@@ -387,7 +388,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -395,7 +396,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_body_filter_inline },
{ ngx_string("body_filter_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
|NGX_CONF_TAKE1,
-@@ -395,14 +396,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -403,14 +404,14 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_body_filter_file },
{ ngx_string("balancer_by_lua_file"),
NGX_HTTP_UPS_CONF|NGX_CONF_TAKE1,
ngx_http_lua_balancer_by_lua,
-@@ -509,14 +510,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+@@ -517,14 +518,14 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_lua_loc_conf_t, ssl_ciphers),
NULL },
ngx_feature_libs=
--- a/auto/cc/conf
+++ b/auto/cc/conf
-@@ -200,7 +200,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
+@@ -204,7 +204,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
else
ngx_feature="C99 variadic macros"
ngx_feature_name="NGX_HAVE_C99_VARIADIC_MACROS"
ngx_feature_incs="#include <stdio.h>
#define var(dummy, ...) sprintf(__VA_ARGS__)"
ngx_feature_path=
-@@ -214,7 +214,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
+@@ -218,7 +218,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
ngx_feature="gcc variadic macros"
ngx_feature_name="NGX_HAVE_GCC_VARIADIC_MACROS"
ngx_feature_incs="#include <sys/epoll.h>"
ngx_feature_path=
ngx_feature_libs=
-@@ -93,7 +93,7 @@ ngx_feature_test="int fd; struct stat sb
+@@ -110,7 +110,7 @@ ngx_feature_test="int fd; struct stat sb
CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE"
ngx_feature="sendfile()"
ngx_feature_name="NGX_HAVE_SENDFILE"
ngx_feature_incs="#include <sys/sendfile.h>
#include <errno.h>"
ngx_feature_path=
-@@ -114,7 +114,7 @@ fi
+@@ -131,7 +131,7 @@ fi
CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
ngx_feature="sendfile64()"
ngx_feature_name="NGX_HAVE_SENDFILE64"
ngx_feature_incs="#include <sys/sendfile.h>
#include <errno.h>"
ngx_feature_path=
-@@ -132,7 +132,7 @@ ngx_include="sys/prctl.h"; . auto/includ
+@@ -149,7 +149,7 @@ ngx_include="sys/prctl.h"; . auto/includ
ngx_feature="prctl(PR_SET_DUMPABLE)"
ngx_feature_name="NGX_HAVE_PR_SET_DUMPABLE"
ngx_feature_libs=
--- a/auto/unix
+++ b/auto/unix
-@@ -735,7 +735,7 @@ ngx_feature_test="void *p; p = memalign(
+@@ -840,7 +840,7 @@ ngx_feature_test="void *p; p = memalign(
ngx_feature="mmap(MAP_ANON|MAP_SHARED)"
ngx_feature_name="NGX_HAVE_MAP_ANON"
ngx_feature_incs="#include <sys/mman.h>"
ngx_feature_path=
ngx_feature_libs=
-@@ -748,7 +748,7 @@ ngx_feature_test="void *p;
+@@ -853,7 +853,7 @@ ngx_feature_test="void *p;
ngx_feature='mmap("/dev/zero", MAP_SHARED)'
ngx_feature_name="NGX_HAVE_MAP_DEVZERO"
ngx_feature_incs="#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>"
-@@ -763,7 +763,7 @@ ngx_feature_test='void *p; int fd;
+@@ -868,7 +868,7 @@ ngx_feature_test='void *p; int fd;
ngx_feature="System V shared memory"
ngx_feature_name="NGX_HAVE_SYSVSHM"
ngx_feature_incs="#include <sys/ipc.h>
#include <sys/shm.h>"
ngx_feature_path=
-@@ -777,7 +777,7 @@ ngx_feature_test="int id;
+@@ -882,7 +882,7 @@ ngx_feature_test="int id;
ngx_feature="POSIX semaphores"
ngx_feature_name="NGX_HAVE_POSIX_SEM"
return 0;
}
-@@ -40,7 +45,7 @@ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&
+@@ -40,7 +46,7 @@ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&
if [ -x $NGX_AUTOTEST ]; then
--- /dev/null
+--- a/auto/options
++++ b/auto/options
+@@ -397,8 +397,7 @@ $0: warning: the \"--with-sha1-asm\" opt
+ --test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
+
+ *)
+- echo "$0: error: invalid option \"$option\""
+- exit 1
++ echo "$0: error: ignoring invalid option \"$option\""
+ ;;
+ esac
+ done
include $(TOPDIR)/rules.mk
PKG_NAME:=nmap
-PKG_VERSION:=7.60
+PKG_VERSION:=7.70
PKG_RELEASE:=1
PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://nmap.org/dist/
-PKG_HASH:=a8796ecc4fa6c38aad6139d9515dc8113023a82e9d787e5a5fb5fa1b05516f21
+PKG_HASH:=847b068955f792f4cc247593aca6dc3dc4aae12976169873247488de147a6e18
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
# Name and release number of this package
PKG_NAME:=noddos
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPLv3
PKG_MAINTAINER:=Steven Hessing <steven.hessing@gmail.com>
--- /dev/null
+--- a/src/opensslfingerprint.cxx
++++ b/src/opensslfingerprint.cxx
+@@ -110,7 +110,9 @@ std::string getCertFingerprint(const std
+ snprintf(&fpbuf[57], 3, "%02x", md[19]);
+
+ if (Debug) {
+- syslog (LOG_DEBUG, "Cert: %s, fingerprint: %s", x->name, fpbuf);
++ char *namebuf = X509_NAME_oneline(X509_get_subject_name(x),NULL,0);
++ syslog (LOG_DEBUG, "Cert: %s, fingerprint: %s", namebuf, fpbuf);
++ free(namebuf);
+ }
+
+ std::string fp = fpbuf;
include $(TOPDIR)/rules.mk
PKG_NAME:=ntpclient
-PKG_VERSION:=2010_365
+PKG_VERSION:=2015_365
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient/
-PKG_HASH:=9ad9b028385082fb804167f464e2db0a0b3d33780acd399327e64898b8fcfddd
+PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient
+PKG_HASH:=95c3646919a9a2278fa384aa8e37117b250577ff8b09b8c93ba53e04e729b54b
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-2010
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-2015
include $(INCLUDE_DIR)/package.mk
--- a/ntpclient.c
+++ b/ntpclient.c
-@@ -611,7 +611,7 @@ int main(int argc, char *argv[]) {
+@@ -608,7 +608,7 @@ int main(int argc, char *argv[]) {
ntpc.cross_check=1;
for (;;) {
if (c == EOF) break;
switch (c) {
case 'c':
-@@ -660,6 +660,10 @@ int main(int argc, char *argv[]) {
- (ntpc.cross_check)=0;
+@@ -657,6 +657,10 @@ int main(int argc, char *argv[]) {
+ ntpc.cross_check = 0;
break;
+ case 'D':
include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
-PKG_VERSION:=4.2.8p11
+PKG_VERSION:=4.2.8p12
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
-PKG_HASH:=f14a39f753688252d683ff907035ffff106ba8d3db21309b742e09b5c3cd278e
+PKG_HASH:=709b222b5013d77d26bfff532b5ea470a8039497ef29d09363931c036cb30454
PKG_LICENSE:=Unique
PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
PKG_FIXUP:=autoreconf
PKG_LIBTOOL_PATHS:=. sntp
PKG_CHECK_FORMAT_SECURITY:=0
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
PKG_NAME:=ntripcaster
PKG_VERSION:=0.1.5
+PKG_RELEASE:=2
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/nunojpg/ntripcaster.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=03878920195cf854b38a1ea424f1cae57353fa87
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=264656e5f9f9583c477208f005371124bfcbb7ba548f418eb5f1215059d1294b
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/nunojpg/ntripcaster/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=2184af9821cf73bac1df229f1e61ca1d3e288c9de6087bee1ae218b54c588452
PKG_LICENSE:=GPL-2.0+
CATEGORY:=Network
SUBMENU:=NTRIP
TITLE:=Standard Ntrip Broadcaster
- URL:=http://igs.bkg.bund.de/ntrip/download
+ URL:=https://igs.bkg.bund.de/ntrip
DEPENDS:=+libpthread
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=ntripclient
-PKG_VERSION:=1.5.0
+PKG_VERSION:=1.51
+PKG_RELEASE:=1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/nunojpg/ntripclient.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=dcfb2cb3e6f31b7291a94e7f86379c78ffc0d44e
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=8d16f2bd0295a2e77fe8651e5f973c3ca4cf0d62fc4d671ebb54cfa8dc7debd0
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/nunojpg/ntripclient/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=d668e87b2260ef262e2066ac0ed217ec77478170deaf76ff48f2116a23c48ae5
PKG_LICENSE:=GPL-2.0+
include $(TOPDIR)/rules.mk
PKG_NAME:=ntripserver
-PKG_VERSION:=1.5.1
+PKG_VERSION:=1.51
+PKG_RELEASE:=1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/nunojpg/ntripserver.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=c3034ab575e8442222eb8c2ee9e224cac99cfa6d
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=71f168c4b41c9e1063280fc8aa21d8794c064708fbfa4929093ef5a139e2e736
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/nunojpg/ntripserver/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=3878c13d1b56e14085ce995565a2113aa592e3aa0b0eacfc65b6e3f5bdfc07e7
PKG_LICENSE:=GPL-2.0+
PKG_NAME:=nut
PKG_VERSION:=2.7.4
-PKG_RELEASE:=4
+PKG_RELEASE:=8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/
PKG_HASH:=980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7
-PKG_MAINTAINER:=Daniel Dickinson <lede@cshore.thecshore.com>
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=LICENSE-GPL2
+PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
+PKG_LICENSE:=GPL-2.0+ GPL-3.0+ GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE_FILES:=LICENSE-GPL2 LICENSE-GPL3 COPYING
+PKG_FIXUP:=autoreconf
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
endef
define Package/nut-server/install
+ # Server portion
$(INSTALL_DIR) $(1)/etc/nut
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/share/nut
- $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/nut-server.init $(1)/etc/init.d/nut-server
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsd $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsdrvctl $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/nut/cmdvartab $(1)/usr/share/nut/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/nut/driver.list $(1)/usr/share/nut/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/nut_server $(1)/etc/config/nut_server
- ln -sf /var/etc/nut/nut.conf $(1)/etc/nut/nut.conf
- ln -sf /var/etc/nut/ups.conf $(1)/etc/nut/ups.conf
ln -sf /var/etc/nut/upsd.users $(1)/etc/nut/upsd.users
ln -sf /var/etc/nut/upsd.conf $(1)/etc/nut/upsd.conf
+ # Driver common portion
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsdrvctl $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/nut/driver.list $(1)/usr/share/nut/
+ ln -sf /var/etc/nut/ups.conf $(1)/etc/nut/ups.conf
+ # Mangle libhid.usermap into a format (hotplug shell script) useful for OpenWrt
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
+ $(INSTALL_BIN) ./files/30-libhid-ups.head $(1)/etc/hotplug.d/usb/30-libhid-ups
+ $(CP) $(PKG_INSTALL_DIR)/etc/hotplug/usb/libhid.usermap $(PKG_BUILD_DIR)/30-libhid-ups.middle
+ $(SED) '/^$$$$/d' \
+ -e '/^#/d' \
+ -E -e 's:^[^ ][^ ]* *0x0003 *0x0{0,3}([^ ][^ ]*) *0x{0,3}*([^ ][^ ]*).*:\1/\2/* | \\:' \
+ $(PKG_BUILD_DIR)/30-libhid-ups.middle
+ tail -n+2 $(PKG_BUILD_DIR)/30-libhid-ups.middle >>$(1)/etc/hotplug.d/usb/30-libhid-ups
+ cat ./files/30-libhid-ups.tail >>$(1)/etc/hotplug.d/usb/30-libhid-ups
endef
define Package/nut-common
DEPENDS:= nut \
+NUT_DRIVER_SNMP:libnetsnmp \
+NUT_DRIVER_USB:libusb-compat \
- +NUT_SSL:libopenssl \
- +PACKAGE_libwrap:libwrap
+ +NUT_SSL:libopenssl
endef
define Package/nut-common/description
This package contains the common files.
endef
+define Package/nut-common/conffiles
+/etc/nut/nut.conf
+endef
+
define Package/nut-common/install
$(INSTALL_DIR) $(1)/etc/nut
$(INSTALL_DIR) $(1)/usr/lib
$(call Package/nut/Default)
TITLE+= (server)
DEPENDS:=nut +nut-common
+ USERID:=nut=113:nut=113
endef
define Package/nut-server/description
define Package/nut-server/conffiles
/etc/config/nut_server
+/etc/nut/upsd.conf
+/etc/nut/upsd.users
+/etc/nut/ups.conf
endef
define Package/nut-upsmon
$(call Package/nut/Default)
TITLE+= (monitor)
DEPENDS:=nut +nut-common
- USERID:=nut=113:nut=113
+ USERID:=nutmon=114:nutmon=114
endef
define Package/nut-upsmon/description
define Package/nut-upsmon/conffiles
/etc/config/nut_monitor
+/etc/nut/upsmon.conf
endef
define Package/nut-upsmon/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/nut-monitor.init $(1)/etc/init.d/nut-monitor
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsmon $(1)/usr/sbin/
+ $(INSTALL_BIN) ./files/nutshutdown $(1)/usr/sbin/nutshutdown
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/nut_monitor $(1)/etc/config/nut_monitor
ln -sf /var/etc/nut/upsmon.conf $(1)/etc/nut/upsmon.conf
$(call Package/nut/description/Default)
upsc is provided as a quick way to poll the status of a UPS server. It
can be used inside shell scripts and other programs that need UPS data
-but don not want to include the full interface.
+but do not want to include the full interface.
endef
define Package/nut-upsc/install
$(INSTALL_CONF) ./files/add_nut_httpd_conf $(1)/etc/uci-defaults/add_nut_httpd_conf
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsstats.html.sample $(1)/etc/nut/upsstats.html
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsstats-single.html.sample $(1)/etc/nut/upsstats-single.html
- $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsset.conf.sample $(1)/etc/nut/upsset.conf
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsset.conf.sample $(1)/etc/nut/upsset.conf.disable
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsset.conf.sample $(1)/etc/nut/upsset.conf.enable
+ $(SED) 's/### \?//' $(1)/etc/nut/upsset.conf.enable
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/nut_cgi $(1)/etc/config/nut_cgi
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/nut-cgi.init $(1)/etc/init.d/nut-cgi
ln -sf /var/etc/nut/hosts.conf $(1)/etc/nut/hosts.conf
+ ln -sf /var/etc/nut/upsset.conf $(1)/etc/nut/upsset.conf
endef
define Package/nut-avahi-service
define Package/nut-driver-$(2)
$(call Package/nut/Default)
TITLE:=$(2) (NUT $(1) driver)
- DEPENDS:=nut +nut-common
+ DEPENDS:=nut +nut-server
$(if $(filter $(1),snmp),DEPENDS+= @NUT_DRIVER_SNMP)
$(if $(filter $(1),usb),DEPENDS+= @NUT_DRIVER_USB)
$(if $(filter $(1),serial),DEPENDS+= @NUT_DRIVER_SERIAL)
--without-avahi \
--$(if $(CONFIG_NUT_DRIVER_SNMP),with,without)-snmp \
--$(if $(CONFIG_NUT_DRIVER_SERIAL),with,without)-serial \
+ --without-doc \
--without-neon \
--without-powerman \
--without-wrap \
+ --with-hotplug-dir=/etc/hotplug \
--with-cgi \
--without-ipmi \
--without-freeipmi \
--- /dev/null
+#!/bin/sh
+
+. /lib/functions.sh
+
+nut_driver_config() {
+ local cfg="$1"
+ local nomatch="$2"
+
+ config_get runas "$cfg" runas "nut"
+ config_get vendorid "$cfg" vendorid
+ config_get productid "$cfg" productid
+
+ [ "$ACTION" = "add" ] &&[ -n "$DEVNAME" ] && {
+ chmod 0660 /dev/"$DEVNAME"
+ chown ${runas:-root}:$(id -gn "${runas:-root}") /dev/"$DEVNAME"
+ }
+
+ if [ "$(printf "%04x" 0x"$pvendid")" = "$vendorid" ] && \
+ [ "$(printf "%04x" 0x"$pprodid")" = "$productid" ]; then
+ [ "$ACTION" = "add" ] && {
+ /etc/init.d/nut-server start "$cfg"
+ }
+ [ "$ACTION" = "remove" ] && {
+ /etc/init.d/nut-server stop "$cfg"
+ }
+ found=1
+ elif [ "$nomatch" = "1" ]; then
+ [ "$ACTION" = "add" ] && {
+ /etc/init.d/nut-server start "$cfg"
+ }
+ [ "$ACTION" = "remove" ] && {
+ /etc/init.d/nut-server stop "$cfg"
+ }
+ fi
+}
+
+perform_libhid_action() {
+ local vendorid productid runas
+ local pvendid pprodid found
+
+ pvendid=${PRODUCT%/*}
+ pvendid=${pvendid%/*}
+ pprodid=${PRODUCT%/*}
+ pprodid=${pprodid##*/}
+
+ config_load nut_server
+ config_foreach nut_driver_config driver 0
+ [ "$found" != "1" ] && config_foreach nut_driver_config driver 1
+}
+
+[ -n "$PRODUCT" ] && case "$PRODUCT" in
--- /dev/null
+"")
+ [ -d /var/run/nut ] && [ ! -f /var/run/nut/disable-hotplug ] && \
+ /etc/init.d/nut-server enabled && perform_libhid_action
+ ;;
+esac
# See /LICENSE for more information.
#
START=51
+USE_PROCD=1
DEFAULT=/etc/default/nut
UPSCGI_C=/var/etc/nut/hosts.conf
+UPSCGI_S=/var/etc/nut/upsset.conf
+
+nut_upscgi_upsset() {
+ local cfg="$1"
+ local enable
+
+ config_get_bool enable "$cfg" enable 0
+
+ [ $enable -eq 1 ] && {
+ ln -sf /etc/nut/upsset.conf.enable "$UPSCGI_S"
+ } || {
+ ln -sf /etc/nut/upsset.conf.disable "$UPSCGI_S"
+ }
+}
nut_upscgi_add() {
local cfg="$1"
system="$system:$port";
fi
config_get displayname "$cfg" displayname
- echo "MONITOR $system \"$displayname\"" >> $UPSCGI_C
+ echo "MONITOR $system \"$displayname\"" >> "$UPSCGI_C"
}
-start() {
- rm -f $UPSCGI_C
+service_reload() {
+ mkdir -m 0755 -p "$(dirname "$UPSCGI_C")"
+ rm -f "$UPSCGI_C"
+ rm -f "$UPSCGI_S"
config_load nut_cgi
config_foreach nut_upscgi_add host
+ config_foreach nut_upscgi_upsset upsset
chmod 640 /var/etc/nut/hosts.conf
}
-stop() {
- rm -f $UPSCGI_C
+start_service() {
+ service_reload
+}
+
+stop_service() {
+ rm -f "$UPSCGI_C"
+ rm -f "$UPSCGI_S"
+ ln -sf /etc/nut/upsset.conf.disable "$UPSCGI_S"
}
+service_triggers() {
+ procd_add_reload_trigger "nut_cgi"
+}
nut_upsmon_conf() {
local cfg="$1"
+ local RUNAS val optval
- echo "# Config file automatically generated from UCI config" > $UPSMON_C
+ echo "# Config file automatically generated from UCI config" > "$UPSMON_C"
- config_get runas "$cfg" runas "nut"
- [ -n "$runas" ] && echo "RUN_AS_USER $runas" >> $UPSMON_C
+ config_get RUNAS "$cfg" runas "nutmon"
+ [ -n "$RUNAS" ] && echo "RUN_AS_USER $RUNAS" >> "$UPSMON_C"
+ runas=$RUNAS
config_get val "$cfg" minsupplies 1
- echo "MINSUPPLIES $val" >> $UPSMON_C
+ echo "MINSUPPLIES $val" >> "$UPSMON_C"
- config_get val "$cfg" shutdowncmd "/sbin/halt"
- echo "SHUTDOWNCMD \"$val\"" >> $UPSMON_C
+ config_get val "$cfg" shutdowncmd "/usr/sbin/nutshutdown"
+ echo "SHUTDOWNCMD \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" notifycmd
- [ -n "$val" ] && echo "NOTIFYCMD \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYCMD \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" pollfreq 5
- echo "POLLFREQ $val" >> $UPSMON_C
+ echo "POLLFREQ $val" >> "$UPSMON_C"
config_get val "$cfg" pollfreqalert 5
- echo "POLLFREQALERT $val" >> $UPSMON_C
+ echo "POLLFREQALERT $val" >> "$UPSMON_C"
config_get val "$cfg" hostsync 15
- echo "HOSTSYNC $val" >> $UPSMON_C
+ echo "HOSTSYNC $val" >> "$UPSMON_C"
config_get val "$cfg" deadtime 15
- echo "DEADTIME $val" >> $UPSMON_C
+ echo "DEADTIME $val" >> "$UPSMON_C"
- config_get val "$cfg" powerdownflag /var/run/killpower
- echo "POWERDOWNFLAG $val" >> $UPSMON_C
+ echo "POWERDOWNFLAG /var/run/killpower" >> "$UPSMON_C"
config_get val "$cfg" onlinemsg
- [ -n "$val" ] && echo "NOTIFYMSG ONLINE \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG ONLINE \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" onbattmsg
- [ -n "$val" ] && echo "NOTIFYMSG ONBATT \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG ONBATT \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" lowbattmsg
- [ -n "$val" ] && echo "NOTIFYMSG LOWBATT \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG LOWBATT \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" fsdmsg
- [ -n "$val" ] && echo "NOTIFYMSG FSD \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG FSD \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" commokmsg
- [ -n "$val" ] && echo "NOTIFYMSG COMMOK \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG COMMOK \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" commbadmsg
- [ -n "$val" ] && echo "NOTIFYMSG COMMBAD \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG COMMBAD \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" shutdownmsg
- [ -n "$val" ] && echo "NOTIFYMSG SHUTDOWN \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG SHUTDOWN \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" replbattmsg
- [ -n "$val" ] && echo "NOTIFYMSG REPLBATT \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG REPLBATT \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" nocommmsg
- [ -n "$val" ] && echo "NOTIFYMSG NOCOMM \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG NOCOMM \"$val\"" >> "$UPSMON_C"
config_get val "$cfg" noparentmsg
- [ -n "$val" ] && echo "NOTIFYMSG NOPARENT \"$val\"" >> $UPSMON_C
+ [ -n "$val" ] && echo "NOTIFYMSG NOPARENT \"$val\"" >> "$UPSMON_C"
notifylist() {
local value="$1"
val=""
config_list_foreach "$cfg" defaultnotify notifylist
default="$optval"
- echo "NOTIFYFLAG ONLINE $(setnotify "$cfg" onlinenotify)" >> $UPSMON_C
- echo "NOTIFYFLAG ONBATT $(setnotify "$cfg" onbattnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG LOWBATT $(setnotify "$cfg" lowbatnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG FSD $(setnotify "$cfg" fsdnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG COMMOK $(setnotify "$cfg" commoknotify)" >> $UPSMON_C
- echo "NOTIFYFLAG COMMBAD $(setnotify "$cfg" commbadnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG SHUTDOWN $(setnotify "$cfg" shutdownnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG REPLBATT $(setnotify "$cfg" repolbattnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG NOCOMM $(setnotify "$cfg" nocommnotify)" >> $UPSMON_C
- echo "NOTIFYFLAG NOPARENT $(setnotify "$cfg" noparentnotify)" >> $UPSMON_C
+ echo "NOTIFYFLAG ONLINE $(setnotify "$cfg" onlinenotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG ONBATT $(setnotify "$cfg" onbattnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG LOWBATT $(setnotify "$cfg" lowbatnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG FSD $(setnotify "$cfg" fsdnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG COMMOK $(setnotify "$cfg" commoknotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG COMMBAD $(setnotify "$cfg" commbadnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG SHUTDOWN $(setnotify "$cfg" shutdownnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG REPLBATT $(setnotify "$cfg" repolbattnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG NOCOMM $(setnotify "$cfg" nocommnotify)" >> "$UPSMON_C"
+ echo "NOTIFYFLAG NOPARENT $(setnotify "$cfg" noparentnotify)" >> "$UPSMON_C"
config_get val "$cfg" rbwarntime 43200
- echo "RBWARNTIME $val" >> $UPSMON_C
+ echo "RBWARNTIME $val" >> "$UPSMON_C"
config_get val "$cfg" nocommwarntime 300
- echo "NOCOMMWARNTIME $val" >> $UPSMON_C
+ echo "NOCOMMWARNTIME $val" >> "$UPSMON_C"
config_get val "$cfg" finaldelay 5
- echo "FINALDELAY $val" >> $UPSMON_C
+ echo "FINALDELAY $val" >> "$UPSMON_C"
config_get val "$cfg" certpath
- if [ -n "$val" ]; then echo "CERTPATH $val" >> $UPSMON_C; fi
+ if [ -n "$val" ]; then echo "CERTPATH $val" >> "$UPSMON_C"; fi
config_get_bool val "$cfg" certverify 0
- if [ -n "$val" ]; then echo "CERTVERIFY $val" >> $UPSMON_C; fi
+ if [ -n "$val" ]; then echo "CERTVERIFY $val" >> "$UPSMON_C"; fi
config_get_bool val "$cfg" forcessl 0
- if [ -n "$val" ]; then echo "FORCESSL $val" >> $UPSMON_C; fi
+ if [ -n "$val" ]; then echo "FORCESSL $val" >> "$UPSMON_C"; fi
}
nut_upsmon_add() {
local password
local system
- # If no core config, use defaults
- [ -r $UPSMON_C ] || nut_upsmon_conf ""
-
config_get upsname "$cfg" upsname
config_get hostname "$cfg" hostname localhost
config_get port "$cfg" port
if [ -n "$port" ]; then
system="$system:$port";
fi
- echo "MONITOR $system $powervalue $username $password $type" >> $UPSMON_C
+ echo "MONITOR $system $powervalue $username $password $type" >> "$UPSMON_C"
}
-start_service() {
- rm -f $UPSMON_C
+build_config() {
+ local runas
+ mkdir -m 0750 -p "$(dirname "$UPSMON_C")"
config_load nut_monitor
-
config_foreach nut_upsmon_conf upsmon
config_foreach nut_upsmon_add master master
config_foreach nut_upsmon_add slave slave
- [ -z "$(cat /var/etc/nut/nut.conf)" ] && echo "MODE=netclient" >>/var/etc/nut/nut.conf
-
- chmod 640 $UPSMON_C
- chmod 640 /var/etc/nut/nut.conf
-
- [ -d /var/run/nut ] || {
- mkdir -m 0750 -p /var/run/nut
- chown ${runas:-root}:$(id -gn ${runas:-root}) /var/run/nut
+ [ -z "$(cat /var/etc/nut/nut.conf)" ] && {
+ echo "MODE=netclient" >>/var/etc/nut/nut.conf
+ chmod 640 /var/etc/nut/nut.conf
+ chgrp $(id -gn ${runas:-root}) /var/etc/nut/nut.conf
}
- chown ${runas:-root}:$(id -gn ${runas:-root}) $UPSMON_C
- $DEBUG /usr/sbin/upsmon $UPSMON_OPTIONS
+ chmod 640 "$UPSMON_C"
+ chgrp $(id -gn ${runas:-root}) "$UPSMON_C"
}
-stop_service() {
- [ -r $PID_F ] && /usr/sbin/upsmon -c stop
- rm -f $UPSMON_C
+start_service() {
+ build_config
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param stderr 0
+ procd_set_param stdout 1
+ procd_set_param command /usr/sbin/upsmon -D
+ procd_close_instance
}
reload_service() {
- upsmon -c reload
+ if pgrep upsmon >/dev/null 2>/dev/null; then
+ build_config
+ upsmon -c reload
+ else
+ stop
+ sleep 1
+ start
+ fi
+}
+
+service_triggers() {
+ procd_add_reload_trigger nut_monitor
}
#
START=50
-RUN_D=/var/run
-PID_F=$RUN_D/upsd.pid
-UPS_C=/var/etc/nut/ups.conf
USERS_C=/var/etc/nut/upsd.users
UPSD_C=/var/etc/nut/upsd.conf
+UPS_C=/var/etc/nut/ups.conf
USE_PROCD=1
-listen_address() {
- local cfg="$1"
+get_write_driver_config() {
+ local cfg="$1"
+ local var="$2"
+ local def="$3"
+ local flag="$4"
+ local val
- config_get address "$cfg" address "::1"
- config_get port "$cfg" port
- echo "LISTEN $address $port" >>$UPSD_C
+ [ -z "$flag" ] && {
+ config_get val "$cfg" "$var" "$def"
+ [ -n "$val" ] && [ "$val" != "0" ] && echo "$var = $val" >>"$UPS_C"
+ }
+
+ [ -n "$flag" ] && {
+ config_get_bool val "$cfg" "$var" "$def"
+ [ "$val" = 1 ] && echo "$var" >>"$UPS_C"
+ }
}
upsd_statepath() {
+ local cfg="$1"
+ local statepath
+
+ config_get statepath "$cfg" statepath "/var/run/nut"
+ STATEPATH="$statepath"
+}
+
+listen_address() {
local cfg="$1"
- config_get statepath "$cfg" statepath
+
+ config_get address "$cfg" address "::1"
+ config_get port "$cfg" port
+ echo "LISTEN $address $port" >>"$UPSD_C"
}
upsd_config() {
local cfg="$1"
- local maxage maxconn certfile
+ local maxage maxconn certfile runas statepath
# Note runas support requires you make sure USB device file is readable by
# the runas user
- config_get runas "$cfg" runas
+ config_get runas "$cfg" runas "nut"
+ RUNAS="$runas"
+
+ config_get statepath "$cfg" statepath "/var/run/nut"
+ STATEPATH="$statepath"
config_get maxage "$cfg" maxage
- [ -n "$maxage" ] && echo "MAXAGE $maxage" >>$UPSD_C
+ [ -n "$maxage" ] && echo "MAXAGE $maxage" >>"$UPSD_C"
config_get statepath "$cfg" statepath
- [ -n "$statepath" ] && echo "STATEPATH $statepath" >>$UPSD_C
+ [ -n "$statepath" ] && echo "STATEPATH $statepath" >>"$UPSD_C"
config_get maxconn "$cfg" maxconn
- [ -n "$maxconn" ] && echo "MAXCONN $maxconn" >>$UPSD_C
+ [ -n "$maxconn" ] && echo "MAXCONN $maxconn" >>"$UPSD_C"
#NOTE: certs only apply to SSL-enabled version
config_get certfile "$cfg" certfile
- [ -n "$certfile" ] && echo "CERTFILE $certfile" >>$UPSD_C
+ [ -n "$certfile" ] && echo "CERTFILE $certfile" >>"$UPSD_C"
}
nut_user_add() {
local val
config_get val "$cfg" username "$1"
- echo "[$val]" >> $USERS_C
+ echo "[$val]" >> "$USERS_C"
config_get val "$cfg" password
- echo " password = $val" >> $USERS_C
+ echo " password = $val" >> "$USERS_C"
config_get val "$cfg" actions
for a in $val; do
- echo " actions = $a" >> $USERS_C
+ echo " actions = $a" >> "$USERS_C"
done
instcmd() {
local val="$1"
- echo " instcmds = $val" >> $USERS_C
+ echo " instcmds = $val" >> "$USERS_C"
}
config_list_foreach "$cfg" instcmd instcmd
config_get val "$cfg" upsmon
if [ -n "$val" ]; then
- echo " upsmon $val" >> $USERS_C
+ echo " upsmon $val" >> "$USERS_C"
fi
}
-start_service() {
- local runas statepath
-
- mkdir -p /var/etc/nut
- chmod -R 750 /var/etc/nut
-
- rm -f $UPSD_C
- rm -f $USERS_C
- rm -f $UPSD_C
+build_server_config() {
+ mkdir -m 0755 -p "$(dirname "$UPSD_C")"
+ rm -f "$USERS_C"
+ rm -f "$UPSD_C"
rm -f /var/etc/nut/nut.conf
- echo "# Config file automatically generated from UCI config" > $UPS_C
- echo "# Config file automatically generated from UCI config" > $USERS_C
- echo "# Config file automatically generated from UCI config" > $UPSD_C
-
- local in_driver have_drivers
- config_cb() {
- if [ "$1" != "driver" ]; then
- in_driver=
- else
- echo "[$2]" >> $UPS_C
- in_driver=true
- have_drivers=true
- fi
- }
- option_cb() {
- if [ "$in_driver" = "true" ]; then
- echo " $1 = $2" >> $UPS_C
- fi
- }
-
- config_load nut_server
+ echo "# Config file automatically generated from UCI config" > "$USERS_C"
+ echo "# Config file automatically generated from UCI config" > "$UPSD_C"
config_foreach nut_user_add user
- config_foreach upsd_config upsd
config_foreach listen_address listen_address
-
+ config_foreach upsd_config upsd
echo "MODE=netserver" >>/var/etc/nut/nut.conf
- chmod 0640 $USERS_C
- chmod 0640 $UPS_C
- chmod 0640 $UPSD_C
+ chmod 0640 "$USERS_C"
+ chmod 0640 "$UPSD_C"
chmod 0640 /var/etc/nut/nut.conf
- [ -d "${statepath:-/var/run/nut}" ] || {
- mkdir -m 0750 -p "${statepath:-/var/run/nut}"
- chown $runas:$(id -gn $runas) "${statepath:-/var/run/nut}"
+
+ [ -d "${STATEPATH}" ] || {
+ mkdir -m 0750 -p "${STATEPATH}"
}
- if [ -n "$runas" ]; then
- chown -R $runas:$(id -gn $runas) /var/etc/nut
+ if [ -n "$RUNAS" ]; then
+ chown $RUNAS:$(id -gn $RUNAS) "${STATEPATH}"
+ chgrp $(id -gn $RUNAS) "$USERS_C"
+ chgrp $(id -gn $RUNAS) "$UPSD_C"
fi
+}
- if [ "$have_drivers" = "true" ]; then
- $DEBUG /usr/sbin/upsd ${runas:+-u $runas} $OPTIONS
- $DEBUG /usr/sbin/upsdrvctl ${runas:+-u $runas} start
- fi
+build_driver_config() {
+ local cfg="$1"
+ local runas
+
+ echo "[$cfg]" >>"$UPS_C"
+
+ config_get runas "$cfg" runas "nut"
+ RUNAS="$runas"
+
+ get_write_driver_config "$cfg" driver "usbhid-ups"
+ get_write_driver_config "$cfg" port "auto"
+ get_write_driver_config "$cfg" mfr
+ get_write_driver_config "$cfg" model
+ get_write_driver_config "$cfg" serial
+ get_write_driver_config "$cfg" sdtime
+ get_write_driver_config "$cfg" offdelay 20
+ get_write_driver_config "$cfg" ondelay 30
+ get_write_driver_config "$cfg" pollfreq 30
+ get_write_driver_config "$cfg" vendor
+ get_write_driver_config "$cfg" product
+ get_write_driver_config "$cfg" bus
+ get_write_driver_config "$cfg" interruptonly 0 1
+ get_write_driver_config "$cfg" interruptsize 0
+ get_write_driver_config "$cfg" maxreport
+ get_write_driver_config "$cfg" vendorid
+ get_write_driver_config "$cfg" productid
+ get_write_driver_config "$cfg" community
+ get_write_driver_config "$cfg" snmp_version
+ get_write_driver_config "$cfg" snmp_retries 0
+ get_write_driver_config "$cfg" snmp_timeout 0
+ get_write_driver_config "$cfg" notransferoids 0 1
+ get_write_driver_config "$cfg" other
+ echo "" >>$UPS_C
}
+build_config() {
+ mkdir -m 0755 -p "$(dirname "$UPS_C")"
+ rm -f "$UPS_C"
+ echo "# Config file automatically generated from UCI config" > "$UPS_C"
+ chmod 0640 "$UPS_C"
+
+ config_load nut_server
+ config_foreach build_driver_config driver
+ [ -n "$RUNAS" ] && chgrp $(id -gn $RUNAS) "$UPS_C"
-nut_driver_stop() {
+ build_server_config
+}
+
+start_driver_instance() {
local cfg="$1"
+ local requested="$2"
+ local RUNAS=nut
local driver
- config_get driver "$cfg" driver
+ # If wanting a specific instance, only start it
+ [ "$requested" != "$cfg" ] && [ x"$requested" != x"" ] && return 0
+
+ mkdir -m 0755 -p "$(dirname "$UPS_C")"
+
+ [ ! -s "$UPS_C" ] && build_config
+
- [ -r ${statepath:-/var/run/nut}/$driver-$cfg ] && /usr/sbin/upsdrvctl stop $cfg
+ # Avoid hotplug inadvertenly restarting driver during
+ # forced shutdown
+ [ -f /var/run/killpower ] && return 0
+ [ -d /var/run/nut ] && [ -f /var/run/nut/disable-hotplug ] && return 0
+
+
+ if [ -n "$RUNAS" ]; then
+ chown $RUNAS:$(id -gn $RUNAS) "${STATEPATH}"
+ chown $RUNAS:$(id -gn $RUNAS) "$(dirname "$UPS_C")"
+ fi
+
+ config_get driver "$cfg" driver "usbhid-ups"
+ procd_open_instance "$cfg"
+ procd_set_param respawn
+ procd_set_param stderr 0
+ procd_set_param stdout 1
+ procd_set_param command /lib/nut/${driver} -D -a "$cfg" ${RUNAS:+-u $RUNAS}
+ procd_close_instance
+}
+
+start_server_instance() {
+ local RUNAS STATEPATH
+ build_config
+
+ procd_open_instance "upsd"
+ procd_set_param respawn
+ procd_set_param stderr 0
+ procd_set_param stdout 1
+ procd_set_param command /usr/sbin/upsd -D ${RUNAS:+-u $RUNAS}
+ procd_close_instance
}
-stop_service() {
- [ -r $PID_F ] && /usr/sbin/upsd -c stop
- config_load ups
+start_service() {
+ local STATEPATH=/var/run/nut
+
+ # Avoid hotplug inadvertenly restarting driver during
+ # forced shutdown
+ [ -f /var/run/killpower ] && return 0
+ [ -d /var/run/nut ] && [ -f /var/run/nut/disable-hotplug ] && return 0
+
+ config_load nut_server
config_foreach upsd_statepath upsd
- config_foreach nut_driver_stop driver
+
+ [ -d "${STATEPATH}" ] || {
+ mkdir -m 0750 -p "${STATEPATH}"
+ }
+
+ build_config
+ config_foreach start_driver_instance driver "$@"
+
+ [ "$1" != "upsd" ] && [ x"$1" != x"" ] && return 0
+ start_server_instance "upsd"
}
reload_service() {
- upsd -c reload
+ stop
+ sleep 2
+ start
+}
+
+service_triggers() {
+ procd_add_reload_trigger "nut_server"
}
# option port # optional port number
# option displayname "Display Name"
+config upsset
+ option enable 0
#config upsmon 'upsmon'
-# option runas run-as-user
+# option runas nutmon
# option minsupplies 1
-# option shutdowncmd /sbin/halt
+# option shutdowncmd '/usr/sbin/nutshutdown'
# option notifycmd /path/to/cmd
# list defaultnotify SYSLOG
# option pollfreq 5
# option pollfreqalert 5
# option hostsync 15
# option deadtime 15
-# option powerdownflags /var/run/killpower
# option onlinemsg "online message"
# option onbattmsg "on battery message"
# option lowbattmsg "low battery message"
# option powervalue 1
# option username upsuser
# option password upspassword
-
# option maxage 15
# option statepath /var/run/nut
# option maxconn 1024
+# option runas nut
# NB: certificates only apply to SSL-enabled version
# option certfile /usr/local/etc/upsd.pem
--- /dev/null
+#!/bin/sh
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+. /lib/functions.sh
+
+mount -o remount,ro /overlay /overlay
+mount -o remount,ro / /
+
+stop_instance() {
+ /etc/init.d/nut-server stop "$1"
+}
+
+shutdown_instance() {
+ local cfg="$1"
+ config_get driver "$cfg" driver "usbhid-ups"
+ /lib/nut/${driver} -a "$cfg" -k
+}
+
+[ -f /var/run/killpower ] && {
+ [ -f /etc/config/nut_server ] && {
+ config_load nut_server
+
+ # Can't FSD unless drivers are stopped
+ config_foreach stop_instance driver
+ # Driver will wait 'offdelay' before shutting down
+ config_foreach shutdown_instance driver
+ # So this can happen
+ poweroff
+ # And just in case
+ sleep 120
+ # Uh-oh failed to poweroff UPS
+ reboot -f
+ } || {
+ poweroff
+ }
+} || {
+ poweroff
+}
--- /dev/null
+From fcbf18c92918ce5e81d0aab62a7aed5c2245ea4d Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Fri, 1 Jun 2018 11:17:28 -0300
+Subject: [PATCH 1/2] Add compatibility with openssl 1.1.0
+
+Minor adjustments were needed:
+* Openssl 1.1 libs do not need to be initialized.
+* TLSv*_method became TLS_*_method.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+---
+ clients/upsclient.c | 5 ++++-
+ m4/nut_check_libopenssl.m4 | 2 +-
+ server/netssl.c | 7 +++++--
+ 3 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/clients/upsclient.c b/clients/upsclient.c
+index b90587b0..053d60fb 100644
+--- a/clients/upsclient.c
++++ b/clients/upsclient.c
+@@ -316,10 +316,13 @@ int upscli_init(int certverify, const char *certpath,
+
+ #ifdef WITH_OPENSSL
+
++# if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
+ SSL_load_error_strings();
++# define TLS_client_method TLSv1_client_method
++# endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+
+- ssl_method = TLSv1_client_method();
++ ssl_method = TLS_client_method();
+
+ if (!ssl_method) {
+ return 0;
+diff --git a/m4/nut_check_libopenssl.m4 b/m4/nut_check_libopenssl.m4
+index 1b875077..7eb401cd 100644
+--- a/m4/nut_check_libopenssl.m4
++++ b/m4/nut_check_libopenssl.m4
+@@ -58,7 +58,7 @@ if test -z "${nut_have_libopenssl_seen}"; then
+
+ dnl check if openssl is usable
+ AC_CHECK_HEADERS(openssl/ssl.h, [nut_have_openssl=yes], [nut_have_openssl=no], [AC_INCLUDES_DEFAULT])
+- AC_CHECK_FUNCS(SSL_library_init, [], [nut_have_openssl=no])
++ AC_CHECK_FUNCS(SSL_CTX_new, [], [nut_have_openssl=no])
+
+ if test "${nut_have_openssl}" = "yes"; then
+ nut_with_ssl="yes"
+diff --git a/server/netssl.c b/server/netssl.c
+index c2f40989..0289e296 100644
+--- a/server/netssl.c
++++ b/server/netssl.c
+@@ -387,12 +387,15 @@ void ssl_init(void)
+
+ #ifdef WITH_OPENSSL
+
++# if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_load_error_strings();
+ SSL_library_init();
++# define TLS_server_method TLSv1_server_method
++# endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+
+- if ((ssl_method = TLSv1_server_method()) == NULL) {
++ if ((ssl_method = TLS_server_method()) == NULL) {
+ ssl_debug();
+- fatalx(EXIT_FAILURE, "TLSv1_server_method failed");
++ fatalx(EXIT_FAILURE, "TLS_server_method failed");
+ }
+
+ if ((ssl_ctx = SSL_CTX_new(ssl_method)) == NULL) {
+--
+2.16.1
+
--- /dev/null
+From 2ef929da38232af63ba53074ca97e95ae4faf912 Mon Sep 17 00:00:00 2001
+From: Arjen de Korte <build+lede@de-korte.org>
+Date: Tue, 28 Nov 2017 22:01:41 +0100
+Subject: [PATCH 2/2] Fix check for empty string
+
+---
+ clients/upssched.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/clients/upssched.c b/clients/upssched.c
+index 97b3ed42..3fdf118e 100644
+--- a/clients/upssched.c
++++ b/clients/upssched.c
+@@ -794,7 +794,7 @@ static void parse_at(const char *ntype, const char *un, const char *cmd,
+ }
+
+ if (!strcmp(cmd, "EXECUTE")) {
+- if (ca1 == '\0') {
++ if (ca1[0] == '\0') {
+ upslogx(LOG_ERR, "Empty EXECUTE command argument");
+ return;
+ }
+--
+2.16.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=ocserv
-PKG_VERSION:=0.11.11
+PKG_VERSION:=0.12.1
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/
-PKG_HASH:=4d7b663f10d840b6dfc216e13f287defc28195394fa9f80fad578186105fabf8
+PKG_HASH:=0b7d6f4cd54cf8bf6400a27d202819eec32341225ae48ca73d049f9d17e3a2bc
PKG_LICENSE:=GPLv2+
PKG_LICENSE_FILES:=COPYING
-PKG_FIXUP:=autoreconf
+#PKG_FIXUP:=autoreconf
PKG_CONFIG_DEPENDS:= \
CONFIG_OCSERV_PAM \
CONFIGURE_ARGS+= \
--with-pager="" \
- --enable-local-libopts \
--with-libreadline-prefix="$(STAGING_DIR)/" \
--without-libnl \
- --without-lz4 \
--without-gssapi \
--with-libcrypt-prefix="$(STAGING_DIR)/" \
--with-libev-prefix="$(STAGING_DIR)/" \
include $(TOPDIR)/rules.mk
PKG_NAME:=ola
-PKG_VERSION:=0.10.5
+PKG_VERSION:=0.10.7
PKG_RELEASE:=2
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/OpenLightingProject/ola.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=32db3c49d435398d017c6b5c0b25e02a7a831f5c
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=11ed6540bd667c1662d91de93a260a9a63a98725851f768647e2b9b2efe1ae34
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/OpenLightingProject/ola/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=95b5e99775f700a9cdf6e2219eccfc8c037fa8841f87cb00344359c4b8c7bf26
+
PKG_LICENSE:=LGPL-2.1+
PKG_FIXUP:=libtool
-PKG_INSTALL:=1
+PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
TITLE:=Open Lighting Architecture Daemon
URL:=https://www.openlighting.org/
MAINTAINER:=Christian Beier <dontmind@freeshell.org>
- DEPENDS:=+protobuf +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo
+ DEPENDS:=+protobuf +libftdi1 +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo +libmicrohttpd
endef
define Package/ola/description
--disable-static \
--disable-fatal-warnings \
--disable-unittests \
- --disable-http \
--without-dns-sd \
- --with-ola-protoc-plugin=$(HOST_BUILD_DIR)/protoc/ola_protoc_plugin
+ --with-ola-protoc-plugin=$(STAGING_DIR_HOSTPKG)/bin/ola_protoc_plugin
HOST_CONFIGURE_ARGS += \
--disable-all-plugins \
--disable-osc \
--disable-uart \
--disable-libusb \
- --disable-libftdi \
--disable-http \
--disable-examples \
--disable-unittests \
$(MAKE) protoc/ola_protoc_plugin
endef
-# nothing to install for host part
define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
+ $(CP) $(HOST_BUILD_DIR)/protoc/ola_protoc_plugin $(STAGING_DIR_HOSTPKG)/bin
endef
$(INSTALL_DIR) $(1)/usr/share/ola/pids
$(CP) $(PKG_INSTALL_DIR)/usr/share/ola/pids/* $(1)/usr/share/ola/pids
+
+ $(INSTALL_DIR) $(1)/usr/share/olad/www
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/olad/www/* $(1)/usr/share/olad/www
endef
define Package/ola/postinst
index 22647be..7dcf0de 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -32,7 +32,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-python-libs
+@@ -45,7 +45,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-python-libs
COMMON_CXXFLAGS_ONLY_WARNINGS = \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
--- /dev/null
+Index: ola-0.10.6/configure.ac
+===================================================================
+--- ola-0.10.6.orig/configure.ac
++++ ola-0.10.6/configure.ac
+@@ -72,8 +72,6 @@ AM_CONDITIONAL([SUPPORTS_GNU_PLUS_PLUS_1
+ require_gnu_plus_plus_11="no"
+ AS_IF([test "x$ac_cv_gnu_plus_plus_11" = xyes],
+ [AS_IF([test "x$ac_cv_gnu_plus_plus_98" = xyes],
+- [AS_IF([test "x$enable_unittests" = xno],
+- [CXXFLAGS="$CXXFLAGS -std=gnu++98"],
+ [PKG_CHECK_MODULES([CPPUNIT1], [cppunit < 1.14.0],
+ [CXXFLAGS="$CXXFLAGS -std=gnu++98"],
+ [PKG_CHECK_MODULES([CPPUNIT2], [cppunit >= 1.14.0],
+@@ -81,7 +79,6 @@ AS_IF([test "x$ac_cv_gnu_plus_plus_11" =
+ [AC_MSG_WARN([OLA requires std::auto_ptr support.])])
+ ])
+ ])
+- ])
+ ])
+ AS_IF([test "x$require_gnu_plus_plus_11" = xyes],
+ [CXXFLAGS="$CXXFLAGS -std=gnu++11"])
include $(TOPDIR)/rules.mk
PKG_NAME:=openssh
-PKG_VERSION:=7.6p1
-PKG_RELEASE:=1
+PKG_VERSION:=7.8p1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
https://ftp.spline.de/pub/OpenBSD/OpenSSH/portable/ \
https://anorien.csc.warwick.ac.uk/pub/OpenBSD/OpenSSH/portable/
-PKG_HASH:=a323caeeddfe145baaa0db16e98d784b1fbc7dd436a6bf1f479dfd5cd1d21723
+PKG_HASH:=1a484bb15152c183bb2514e112aa30dd34138c3cfb032eee5490a66c507144ca
PKG_LICENSE:=BSD ISC
PKG_LICENSE_FILES:=LICENCE
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_REMOVE_FILES:=
+PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/openssh-client
$(call Package/openssh/Default)
TITLE+= client
+ ALTERNATIVES:=\
+ 200:/usr/bin/ssh:/usr/bin/openssh-ssh \
+ 200:/usr/bin/scp:/usr/bin/openssh-scp \
+
endef
define Package/openssh-client/description
all install
endef
-define Package/openssh-client/preinst
-#!/bin/sh
-if [ -L $${IPKG_INSTROOT}/usr/bin/ssh ] && [ -L $${IPKG_INSTROOT}/usr/bin/scp ]; then
- rm -f $${IPKG_INSTROOT}/usr/bin/ssh $${IPKG_INSTROOT}/usr/bin/scp;
-fi
-exit 0
-endef
-
-define Package/openssh-client/postrm
-#!/bin/sh
-rm -f $${IPKG_INSTROOT}/usr/bin/ssh $${IPKG_INSTROOT}/usr/bin/scp;
-if [ -x $${IPKG_INSTROOT}/usr/sbin/dropbear ] ; then
- ln -s /usr/sbin/dropbear $${IPKG_INSTROOT}/usr/bin/ssh;
- ln -s /usr/sbin/dropbear $${IPKG_INSTROOT}/usr/bin/scp;
-fi
-exit 0
-endef
-
define Package/openssh-moduli/install
$(INSTALL_DIR) $(1)/etc/ssh
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/moduli $(1)/etc/ssh/
chmod 0700 $(1)/etc/ssh
$(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(1)/etc/ssh/
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scp $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh $(1)/usr/bin/openssh-ssh
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scp $(1)/usr/bin/openssh-scp
endef
define Package/openssh-client-utils/install
--- /dev/null
+From b67882dece4df10893307467f3782237fad72d25 Mon Sep 17 00:00:00 2001
+From: "djm@openbsd.org" <djm@openbsd.org>
+Date: Thu, 13 Sep 2018 02:08:33 +0000
+Subject: [PATCH 1/5] upstream: hold our collective noses and use the
+ openssl-1.1.x API in
+
+OpenSSH; feedback and ok tb@ jsing@ markus@
+
+OpenBSD-Commit-ID: cacbcac87ce5da0d3ca7ef1b38a6f7fb349e4417
+---
+ auth2.c | 4 +-
+ cipher.c | 16 +-
+ cipher.h | 4 +-
+ dh.c | 60 +++--
+ dh.h | 2 +-
+ digest-openssl.c | 26 ++-
+ kexdhc.c | 15 +-
+ kexdhs.c | 11 +-
+ kexgexc.c | 18 +-
+ kexgexs.c | 21 +-
+ monitor.c | 6 +-
+ ssh-dss.c | 26 ++-
+ ssh-ecdsa.c | 23 +-
+ ssh-keygen.c | 61 +++--
+ ssh-pkcs11-client.c | 12 +-
+ ssh-pkcs11.c | 55 +++--
+ ssh-rsa.c | 47 ++--
+ sshd.c | 6 +-
+ sshkey.c | 637 ++++++++++++++++++++++++++++------------------------
+ sshkey.h | 7 +-
+ 20 files changed, 619 insertions(+), 438 deletions(-)
+
+diff --git a/auth2.c b/auth2.c
+index ab879589..4d19957a 100644
+--- a/auth2.c
++++ b/auth2.c
+@@ -706,7 +706,7 @@ auth2_record_key(Authctxt *authctxt, int authenticated,
+ struct sshkey **tmp, *dup;
+ int r;
+
+- if ((r = sshkey_demote(key, &dup)) != 0)
++ if ((r = sshkey_from_private(key, &dup)) != 0)
+ fatal("%s: copy key: %s", __func__, ssh_err(r));
+ sshkey_free(authctxt->auth_method_key);
+ authctxt->auth_method_key = dup;
+@@ -715,7 +715,7 @@ auth2_record_key(Authctxt *authctxt, int authenticated,
+ return;
+
+ /* If authenticated, make sure we don't accept this key again */
+- if ((r = sshkey_demote(key, &dup)) != 0)
++ if ((r = sshkey_from_private(key, &dup)) != 0)
+ fatal("%s: copy key: %s", __func__, ssh_err(r));
+ if (authctxt->nprev_keys >= INT_MAX ||
+ (tmp = recallocarray(authctxt->prev_keys, authctxt->nprev_keys,
+diff --git a/cipher.c b/cipher.c
+index a72682a8..df43826e 100644
+--- a/cipher.c
++++ b/cipher.c
+@@ -446,7 +446,7 @@ cipher_get_keyiv_len(const struct sshcipher_ctx *cc)
+ }
+
+ int
+-cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
++cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, size_t len)
+ {
+ #ifdef WITH_OPENSSL
+ const struct sshcipher *c = cc->cipher;
+@@ -473,7 +473,7 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
+ return 0;
+ else if (evplen < 0)
+ return SSH_ERR_LIBCRYPTO_ERROR;
+- if ((u_int)evplen != len)
++ if ((size_t)evplen != len)
+ return SSH_ERR_INVALID_ARGUMENT;
+ #ifndef OPENSSL_HAVE_EVPCTR
+ if (c->evptype == evp_aes_128_ctr)
+@@ -484,14 +484,14 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
+ if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_IV_GEN,
+ len, iv))
+ return SSH_ERR_LIBCRYPTO_ERROR;
+- } else
+- memcpy(iv, cc->evp->iv, len);
++ } else if (!EVP_CIPHER_CTX_get_iv(cc->evp, iv, len))
++ return SSH_ERR_LIBCRYPTO_ERROR;
+ #endif
+ return 0;
+ }
+
+ int
+-cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
++cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv, size_t len)
+ {
+ #ifdef WITH_OPENSSL
+ const struct sshcipher *c = cc->cipher;
+@@ -507,6 +507,8 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
+ evplen = EVP_CIPHER_CTX_iv_length(cc->evp);
+ if (evplen <= 0)
+ return SSH_ERR_LIBCRYPTO_ERROR;
++ if ((size_t)evplen != len)
++ return SSH_ERR_INVALID_ARGUMENT;
+ #ifndef OPENSSL_HAVE_EVPCTR
+ /* XXX iv arg is const, but ssh_aes_ctr_iv isn't */
+ if (c->evptype == evp_aes_128_ctr)
+@@ -518,8 +520,8 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
+ if (!EVP_CIPHER_CTX_ctrl(cc->evp,
+ EVP_CTRL_GCM_SET_IV_FIXED, -1, (void *)iv))
+ return SSH_ERR_LIBCRYPTO_ERROR;
+- } else
+- memcpy(cc->evp->iv, iv, evplen);
++ } else if (!EVP_CIPHER_CTX_set_iv(cc->evp, iv, evplen))
++ return SSH_ERR_LIBCRYPTO_ERROR;
+ #endif
+ return 0;
+ }
+diff --git a/cipher.h b/cipher.h
+index dc7ecf11..dc1571d2 100644
+--- a/cipher.h
++++ b/cipher.h
+@@ -68,8 +68,8 @@ u_int cipher_is_cbc(const struct sshcipher *);
+
+ u_int cipher_ctx_is_plaintext(struct sshcipher_ctx *);
+
+-int cipher_get_keyiv(struct sshcipher_ctx *, u_char *, u_int);
+-int cipher_set_keyiv(struct sshcipher_ctx *, const u_char *);
++int cipher_get_keyiv(struct sshcipher_ctx *, u_char *, size_t);
++int cipher_set_keyiv(struct sshcipher_ctx *, const u_char *, size_t);
+ int cipher_get_keyiv_len(const struct sshcipher_ctx *);
+
+ #endif /* CIPHER_H */
+diff --git a/dh.c b/dh.c
+index ac8d5a0a..d0d4527b 100644
+--- a/dh.c
++++ b/dh.c
+@@ -216,14 +216,17 @@ choose_dh(int min, int wantbits, int max)
+ /* diffie-hellman-groupN-sha1 */
+
+ int
+-dh_pub_is_valid(DH *dh, BIGNUM *dh_pub)
++dh_pub_is_valid(const DH *dh, const BIGNUM *dh_pub)
+ {
+ int i;
+ int n = BN_num_bits(dh_pub);
+ int bits_set = 0;
+ BIGNUM *tmp;
++ const BIGNUM *dh_p;
+
+- if (dh_pub->neg) {
++ DH_get0_pqg(dh, &dh_p, NULL, NULL);
++
++ if (BN_is_negative(dh_pub)) {
+ logit("invalid public DH value: negative");
+ return 0;
+ }
+@@ -236,7 +239,7 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub)
+ error("%s: BN_new failed", __func__);
+ return 0;
+ }
+- if (!BN_sub(tmp, dh->p, BN_value_one()) ||
++ if (!BN_sub(tmp, dh_p, BN_value_one()) ||
+ BN_cmp(dh_pub, tmp) != -1) { /* pub_exp > p-2 */
+ BN_clear_free(tmp);
+ logit("invalid public DH value: >= p-1");
+@@ -247,14 +250,14 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub)
+ for (i = 0; i <= n; i++)
+ if (BN_is_bit_set(dh_pub, i))
+ bits_set++;
+- debug2("bits set: %d/%d", bits_set, BN_num_bits(dh->p));
++ debug2("bits set: %d/%d", bits_set, BN_num_bits(dh_p));
+
+ /*
+ * if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial
+ */
+ if (bits_set < 4) {
+ logit("invalid public DH value (%d/%d)",
+- bits_set, BN_num_bits(dh->p));
++ bits_set, BN_num_bits(dh_p));
+ return 0;
+ }
+ return 1;
+@@ -264,9 +267,12 @@ int
+ dh_gen_key(DH *dh, int need)
+ {
+ int pbits;
++ const BIGNUM *dh_p, *pub_key;
++
++ DH_get0_pqg(dh, &dh_p, NULL, NULL);
+
+- if (need < 0 || dh->p == NULL ||
+- (pbits = BN_num_bits(dh->p)) <= 0 ||
++ if (need < 0 || dh_p == NULL ||
++ (pbits = BN_num_bits(dh_p)) <= 0 ||
+ need > INT_MAX / 2 || 2 * need > pbits)
+ return SSH_ERR_INVALID_ARGUMENT;
+ if (need < 256)
+@@ -275,13 +281,14 @@ dh_gen_key(DH *dh, int need)
+ * Pollard Rho, Big step/Little Step attacks are O(sqrt(n)),
+ * so double requested need here.
+ */
+- dh->length = MINIMUM(need * 2, pbits - 1);
+- if (DH_generate_key(dh) == 0 ||
+- !dh_pub_is_valid(dh, dh->pub_key)) {
+- BN_clear_free(dh->priv_key);
+- dh->priv_key = NULL;
++ if (!DH_set_length(dh, MINIMUM(need * 2, pbits - 1)))
+ return SSH_ERR_LIBCRYPTO_ERROR;
+- }
++
++ if (DH_generate_key(dh) == 0)
++ return SSH_ERR_LIBCRYPTO_ERROR;
++ DH_get0_key(dh, &pub_key, NULL);
++ if (!dh_pub_is_valid(dh, pub_key))
++ return SSH_ERR_INVALID_FORMAT;
+ return 0;
+ }
+
+@@ -289,22 +296,27 @@ DH *
+ dh_new_group_asc(const char *gen, const char *modulus)
+ {
+ DH *dh;
++ BIGNUM *dh_p = NULL, *dh_g = NULL;
+
+ if ((dh = DH_new()) == NULL)
+ return NULL;
+- if (BN_hex2bn(&dh->p, modulus) == 0 ||
+- BN_hex2bn(&dh->g, gen) == 0) {
+- DH_free(dh);
+- return NULL;
+- }
+- return (dh);
++ if (BN_hex2bn(&dh_p, modulus) == 0 ||
++ BN_hex2bn(&dh_g, gen) == 0)
++ goto fail;
++ if (!DH_set0_pqg(dh, dh_p, NULL, dh_g))
++ goto fail;
++ return dh;
++ fail:
++ DH_free(dh);
++ BN_clear_free(dh_p);
++ BN_clear_free(dh_g);
++ return NULL;
+ }
+
+ /*
+ * This just returns the group, we still need to generate the exchange
+ * value.
+ */
+-
+ DH *
+ dh_new_group(BIGNUM *gen, BIGNUM *modulus)
+ {
+@@ -312,10 +324,12 @@ dh_new_group(BIGNUM *gen, BIGNUM *modulus)
+
+ if ((dh = DH_new()) == NULL)
+ return NULL;
+- dh->p = modulus;
+- dh->g = gen;
++ if (!DH_set0_pqg(dh, modulus, NULL, gen)) {
++ DH_free(dh);
++ return NULL;
++ }
+
+- return (dh);
++ return dh;
+ }
+
+ /* rfc2409 "Second Oakley Group" (1024 bits) */
+diff --git a/dh.h b/dh.h
+index bcd485cf..344b29e3 100644
+--- a/dh.h
++++ b/dh.h
+@@ -42,7 +42,7 @@ DH *dh_new_group18(void);
+ DH *dh_new_group_fallback(int);
+
+ int dh_gen_key(DH *, int);
+-int dh_pub_is_valid(DH *, BIGNUM *);
++int dh_pub_is_valid(const DH *, const BIGNUM *);
+
+ u_int dh_estimate(int);
+
+diff --git a/digest-openssl.c b/digest-openssl.c
+index 27709992..da7ed72b 100644
+--- a/digest-openssl.c
++++ b/digest-openssl.c
+@@ -43,7 +43,7 @@
+
+ struct ssh_digest_ctx {
+ int alg;
+- EVP_MD_CTX mdctx;
++ EVP_MD_CTX *mdctx;
+ };
+
+ struct ssh_digest {
+@@ -106,7 +106,7 @@ ssh_digest_bytes(int alg)
+ size_t
+ ssh_digest_blocksize(struct ssh_digest_ctx *ctx)
+ {
+- return EVP_MD_CTX_block_size(&ctx->mdctx);
++ return EVP_MD_CTX_block_size(ctx->mdctx);
+ }
+
+ struct ssh_digest_ctx *
+@@ -118,11 +118,14 @@ ssh_digest_start(int alg)
+ if (digest == NULL || ((ret = calloc(1, sizeof(*ret))) == NULL))
+ return NULL;
+ ret->alg = alg;
+- EVP_MD_CTX_init(&ret->mdctx);
+- if (EVP_DigestInit_ex(&ret->mdctx, digest->mdfunc(), NULL) != 1) {
++ if ((ret->mdctx = EVP_MD_CTX_new()) == NULL) {
+ free(ret);
+ return NULL;
+ }
++ if (EVP_DigestInit_ex(ret->mdctx, digest->mdfunc(), NULL) != 1) {
++ ssh_digest_free(ret);
++ return NULL;
++ }
+ return ret;
+ }
+
+@@ -132,7 +135,7 @@ ssh_digest_copy_state(struct ssh_digest_ctx *from, struct ssh_digest_ctx *to)
+ if (from->alg != to->alg)
+ return SSH_ERR_INVALID_ARGUMENT;
+ /* we have bcopy-style order while openssl has memcpy-style */
+- if (!EVP_MD_CTX_copy_ex(&to->mdctx, &from->mdctx))
++ if (!EVP_MD_CTX_copy_ex(to->mdctx, from->mdctx))
+ return SSH_ERR_LIBCRYPTO_ERROR;
+ return 0;
+ }
+@@ -140,7 +143,7 @@ ssh_digest_copy_state(struct ssh_digest_ctx *from, struct ssh_digest_ctx *to)
+ int
+ ssh_digest_update(struct ssh_digest_ctx *ctx, const void *m, size_t mlen)
+ {
+- if (EVP_DigestUpdate(&ctx->mdctx, m, mlen) != 1)
++ if (EVP_DigestUpdate(ctx->mdctx, m, mlen) != 1)
+ return SSH_ERR_LIBCRYPTO_ERROR;
+ return 0;
+ }
+@@ -161,7 +164,7 @@ ssh_digest_final(struct ssh_digest_ctx *ctx, u_char *d, size_t dlen)
+ return SSH_ERR_INVALID_ARGUMENT;
+ if (dlen < digest->digest_len) /* No truncation allowed */
+ return SSH_ERR_INVALID_ARGUMENT;
+- if (EVP_DigestFinal_ex(&ctx->mdctx, d, &l) != 1)
++ if (EVP_DigestFinal_ex(ctx->mdctx, d, &l) != 1)
+ return SSH_ERR_LIBCRYPTO_ERROR;
+ if (l != digest->digest_len) /* sanity */
+ return SSH_ERR_INTERNAL_ERROR;
+@@ -171,11 +174,10 @@ ssh_digest_final(struct ssh_digest_ctx *ctx, u_char *d, size_t dlen)
+ void
+ ssh_digest_free(struct ssh_digest_ctx *ctx)
+ {
+- if (ctx != NULL) {
+- EVP_MD_CTX_cleanup(&ctx->mdctx);
+- explicit_bzero(ctx, sizeof(*ctx));
+- free(ctx);
+- }
++ if (ctx == NULL)
++ return;
++ EVP_MD_CTX_free(ctx->mdctx);
++ freezero(ctx, sizeof(*ctx));
+ }
+
+ int
+diff --git a/kexdhc.c b/kexdhc.c
+index 9a9f1ea7..a8b74247 100644
+--- a/kexdhc.c
++++ b/kexdhc.c
+@@ -56,6 +56,7 @@ kexdh_client(struct ssh *ssh)
+ {
+ struct kex *kex = ssh->kex;
+ int r;
++ const BIGNUM *pub_key;
+
+ /* generate and send 'e', client DH public key */
+ switch (kex->kex_type) {
+@@ -81,15 +82,17 @@ kexdh_client(struct ssh *ssh)
+ goto out;
+ }
+ debug("sending SSH2_MSG_KEXDH_INIT");
+- if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0 ||
+- (r = sshpkt_start(ssh, SSH2_MSG_KEXDH_INIT)) != 0 ||
+- (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 ||
++ if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0)
++ goto out;
++ DH_get0_key(kex->dh, &pub_key, NULL);
++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXDH_INIT)) != 0 ||
++ (r = sshpkt_put_bignum2(ssh, pub_key)) != 0 ||
+ (r = sshpkt_send(ssh)) != 0)
+ goto out;
+ #ifdef DEBUG_KEXDH
+ DHparams_print_fp(stderr, kex->dh);
+ fprintf(stderr, "pub= ");
+- BN_print_fp(stderr, kex->dh->pub_key);
++ BN_print_fp(stderr, pub_key);
+ fprintf(stderr, "\n");
+ #endif
+ debug("expecting SSH2_MSG_KEXDH_REPLY");
+@@ -104,6 +107,7 @@ input_kex_dh(int type, u_int32_t seq, struct ssh *ssh)
+ {
+ struct kex *kex = ssh->kex;
+ BIGNUM *dh_server_pub = NULL, *shared_secret = NULL;
++ const BIGNUM *pub_key;
+ struct sshkey *server_host_key = NULL;
+ u_char *kbuf = NULL, *server_host_key_blob = NULL, *signature = NULL;
+ u_char hash[SSH_DIGEST_MAX_LENGTH];
+@@ -168,6 +172,7 @@ input_kex_dh(int type, u_int32_t seq, struct ssh *ssh)
+ #endif
+
+ /* calc and verify H */
++ DH_get0_key(kex->dh, &pub_key, NULL);
+ hashlen = sizeof(hash);
+ if ((r = kex_dh_hash(
+ kex->hash_alg,
+@@ -176,7 +181,7 @@ input_kex_dh(int type, u_int32_t seq, struct ssh *ssh)
+ sshbuf_ptr(kex->my), sshbuf_len(kex->my),
+ sshbuf_ptr(kex->peer), sshbuf_len(kex->peer),
+ server_host_key_blob, sbloblen,
+- kex->dh->pub_key,
++ pub_key,
+ dh_server_pub,
+ shared_secret,
+ hash, &hashlen)) != 0)
+diff --git a/kexdhs.c b/kexdhs.c
+index 5dfca0a2..8367c6c3 100644
+--- a/kexdhs.c
++++ b/kexdhs.c
+@@ -95,6 +95,7 @@ input_kex_dh_init(int type, u_int32_t seq, struct ssh *ssh)
+ {
+ struct kex *kex = ssh->kex;
+ BIGNUM *shared_secret = NULL, *dh_client_pub = NULL;
++ const BIGNUM *pub_key;
+ struct sshkey *server_host_public, *server_host_private;
+ u_char *kbuf = NULL, *signature = NULL, *server_host_key_blob = NULL;
+ u_char hash[SSH_DIGEST_MAX_LENGTH];
+@@ -121,6 +122,7 @@ input_kex_dh_init(int type, u_int32_t seq, struct ssh *ssh)
+ r = SSH_ERR_ALLOC_FAIL;
+ goto out;
+ }
++ DH_get0_key(kex->dh, &pub_key, NULL);
+ if ((r = sshpkt_get_bignum2(ssh, dh_client_pub)) != 0 ||
+ (r = sshpkt_get_end(ssh)) != 0)
+ goto out;
+@@ -130,12 +132,9 @@ input_kex_dh_init(int type, u_int32_t seq, struct ssh *ssh)
+ BN_print_fp(stderr, dh_client_pub);
+ fprintf(stderr, "\n");
+ debug("bits %d", BN_num_bits(dh_client_pub));
+-#endif
+-
+-#ifdef DEBUG_KEXDH
+ DHparams_print_fp(stderr, kex->dh);
+ fprintf(stderr, "pub= ");
+- BN_print_fp(stderr, kex->dh->pub_key);
++ BN_print_fp(stderr, pub_key);
+ fprintf(stderr, "\n");
+ #endif
+ if (!dh_pub_is_valid(kex->dh, dh_client_pub)) {
+@@ -171,7 +170,7 @@ input_kex_dh_init(int type, u_int32_t seq, struct ssh *ssh)
+ sshbuf_ptr(kex->my), sshbuf_len(kex->my),
+ server_host_key_blob, sbloblen,
+ dh_client_pub,
+- kex->dh->pub_key,
++ pub_key,
+ shared_secret,
+ hash, &hashlen)) != 0)
+ goto out;
+@@ -197,7 +196,7 @@ input_kex_dh_init(int type, u_int32_t seq, struct ssh *ssh)
+ /* send server hostkey, DH pubkey 'f' and signed H */
+ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXDH_REPLY)) != 0 ||
+ (r = sshpkt_put_string(ssh, server_host_key_blob, sbloblen)) != 0 ||
+- (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || /* f */
++ (r = sshpkt_put_bignum2(ssh, pub_key)) != 0 || /* f */
+ (r = sshpkt_put_string(ssh, signature, slen)) != 0 ||
+ (r = sshpkt_send(ssh)) != 0)
+ goto out;
+diff --git a/kexgexc.c b/kexgexc.c
+index 762a9a32..955bc837 100644
+--- a/kexgexc.c
++++ b/kexgexc.c
+@@ -93,6 +93,7 @@ input_kex_dh_gex_group(int type, u_int32_t seq, struct ssh *ssh)
+ {
+ struct kex *kex = ssh->kex;
+ BIGNUM *p = NULL, *g = NULL;
++ const BIGNUM *pub_key;
+ int r, bits;
+
+ debug("got SSH2_MSG_KEX_DH_GEX_GROUP");
+@@ -118,16 +119,18 @@ input_kex_dh_gex_group(int type, u_int32_t seq, struct ssh *ssh)
+ p = g = NULL; /* belong to kex->dh now */
+
+ /* generate and send 'e', client DH public key */
+- if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0 ||
+- (r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_INIT)) != 0 ||
+- (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 ||
++ if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0)
++ goto out;
++ DH_get0_key(kex->dh, &pub_key, NULL);
++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_INIT)) != 0 ||
++ (r = sshpkt_put_bignum2(ssh, pub_key)) != 0 ||
+ (r = sshpkt_send(ssh)) != 0)
+ goto out;
+ debug("SSH2_MSG_KEX_DH_GEX_INIT sent");
+ #ifdef DEBUG_KEXDH
+ DHparams_print_fp(stderr, kex->dh);
+ fprintf(stderr, "pub= ");
+- BN_print_fp(stderr, kex->dh->pub_key);
++ BN_print_fp(stderr, pub_key);
+ fprintf(stderr, "\n");
+ #endif
+ ssh_dispatch_set(ssh, SSH2_MSG_KEX_DH_GEX_GROUP, NULL);
+@@ -144,6 +147,7 @@ input_kex_dh_gex_reply(int type, u_int32_t seq, struct ssh *ssh)
+ {
+ struct kex *kex = ssh->kex;
+ BIGNUM *dh_server_pub = NULL, *shared_secret = NULL;
++ const BIGNUM *pub_key, *dh_p, *dh_g;
+ struct sshkey *server_host_key = NULL;
+ u_char *kbuf = NULL, *signature = NULL, *server_host_key_blob = NULL;
+ u_char hash[SSH_DIGEST_MAX_LENGTH];
+@@ -211,6 +215,8 @@ input_kex_dh_gex_reply(int type, u_int32_t seq, struct ssh *ssh)
+ kex->min = kex->max = -1;
+
+ /* calc and verify H */
++ DH_get0_key(kex->dh, &pub_key, NULL);
++ DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g);
+ hashlen = sizeof(hash);
+ if ((r = kexgex_hash(
+ kex->hash_alg,
+@@ -220,8 +226,8 @@ input_kex_dh_gex_reply(int type, u_int32_t seq, struct ssh *ssh)
+ sshbuf_ptr(kex->peer), sshbuf_len(kex->peer),
+ server_host_key_blob, sbloblen,
+ kex->min, kex->nbits, kex->max,
+- kex->dh->p, kex->dh->g,
+- kex->dh->pub_key,
++ dh_p, dh_g,
++ pub_key,
+ dh_server_pub,
+ shared_secret,
+ hash, &hashlen)) != 0)
+diff --git a/kexgexs.c b/kexgexs.c
+index f6983fd6..2a4aa7e8 100644
+--- a/kexgexs.c
++++ b/kexgexs.c
+@@ -72,6 +72,7 @@ input_kex_dh_gex_request(int type, u_int32_t seq, struct ssh *ssh)
+ struct kex *kex = ssh->kex;
+ int r;
+ u_int min = 0, max = 0, nbits = 0;
++ const BIGNUM *dh_p, *dh_g;
+
+ debug("SSH2_MSG_KEX_DH_GEX_REQUEST received");
+ if ((r = sshpkt_get_u32(ssh, &min)) != 0 ||
+@@ -101,9 +102,10 @@ input_kex_dh_gex_request(int type, u_int32_t seq, struct ssh *ssh)
+ goto out;
+ }
+ debug("SSH2_MSG_KEX_DH_GEX_GROUP sent");
++ DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g);
+ if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_GROUP)) != 0 ||
+- (r = sshpkt_put_bignum2(ssh, kex->dh->p)) != 0 ||
+- (r = sshpkt_put_bignum2(ssh, kex->dh->g)) != 0 ||
++ (r = sshpkt_put_bignum2(ssh, dh_p)) != 0 ||
++ (r = sshpkt_put_bignum2(ssh, dh_g)) != 0 ||
+ (r = sshpkt_send(ssh)) != 0)
+ goto out;
+
+@@ -123,6 +125,7 @@ input_kex_dh_gex_init(int type, u_int32_t seq, struct ssh *ssh)
+ {
+ struct kex *kex = ssh->kex;
+ BIGNUM *shared_secret = NULL, *dh_client_pub = NULL;
++ const BIGNUM *pub_key, *dh_p, *dh_g;
+ struct sshkey *server_host_public, *server_host_private;
+ u_char *kbuf = NULL, *signature = NULL, *server_host_key_blob = NULL;
+ u_char hash[SSH_DIGEST_MAX_LENGTH];
+@@ -153,17 +156,17 @@ input_kex_dh_gex_init(int type, u_int32_t seq, struct ssh *ssh)
+ (r = sshpkt_get_end(ssh)) != 0)
+ goto out;
+
++ DH_get0_key(kex->dh, &pub_key, NULL);
++ DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g);
++
+ #ifdef DEBUG_KEXDH
+ fprintf(stderr, "dh_client_pub= ");
+ BN_print_fp(stderr, dh_client_pub);
+ fprintf(stderr, "\n");
+ debug("bits %d", BN_num_bits(dh_client_pub));
+-#endif
+-
+-#ifdef DEBUG_KEXDH
+ DHparams_print_fp(stderr, kex->dh);
+ fprintf(stderr, "pub= ");
+- BN_print_fp(stderr, kex->dh->pub_key);
++ BN_print_fp(stderr, pub_key);
+ fprintf(stderr, "\n");
+ #endif
+ if (!dh_pub_is_valid(kex->dh, dh_client_pub)) {
+@@ -199,9 +202,9 @@ input_kex_dh_gex_init(int type, u_int32_t seq, struct ssh *ssh)
+ sshbuf_ptr(kex->my), sshbuf_len(kex->my),
+ server_host_key_blob, sbloblen,
+ kex->min, kex->nbits, kex->max,
+- kex->dh->p, kex->dh->g,
++ dh_p, dh_g,
+ dh_client_pub,
+- kex->dh->pub_key,
++ pub_key,
+ shared_secret,
+ hash, &hashlen)) != 0)
+ goto out;
+@@ -227,7 +230,7 @@ input_kex_dh_gex_init(int type, u_int32_t seq, struct ssh *ssh)
+ /* send server hostkey, DH pubkey 'f' and signed H */
+ if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_REPLY)) != 0 ||
+ (r = sshpkt_put_string(ssh, server_host_key_blob, sbloblen)) != 0 ||
+- (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || /* f */
++ (r = sshpkt_put_bignum2(ssh, pub_key)) != 0 || /* f */
+ (r = sshpkt_put_string(ssh, signature, slen)) != 0 ||
+ (r = sshpkt_send(ssh)) != 0)
+ goto out;
+diff --git a/monitor.c b/monitor.c
+index d4b4b047..b30813b4 100644
+--- a/monitor.c
++++ b/monitor.c
+@@ -566,6 +566,7 @@ int
+ mm_answer_moduli(int sock, struct sshbuf *m)
+ {
+ DH *dh;
++ const BIGNUM *dh_p, *dh_g;
+ int r;
+ u_int min, want, max;
+
+@@ -590,9 +591,10 @@ mm_answer_moduli(int sock, struct sshbuf *m)
+ return (0);
+ } else {
+ /* Send first bignum */
++ DH_get0_pqg(dh, &dh_p, NULL, &dh_g);
+ if ((r = sshbuf_put_u8(m, 1)) != 0 ||
+- (r = sshbuf_put_bignum2(m, dh->p)) != 0 ||
+- (r = sshbuf_put_bignum2(m, dh->g)) != 0)
++ (r = sshbuf_put_bignum2(m, dh_p)) != 0 ||
++ (r = sshbuf_put_bignum2(m, dh_g)) != 0)
+ fatal("%s: buffer error: %s", __func__, ssh_err(r));
+
+ DH_free(dh);
+diff --git a/ssh-dss.c b/ssh-dss.c
+index 9f832ee2..631b1571 100644
+--- a/ssh-dss.c
++++ b/ssh-dss.c
+@@ -51,6 +51,7 @@ ssh_dss_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
+ const u_char *data, size_t datalen, u_int compat)
+ {
+ DSA_SIG *sig = NULL;
++ const BIGNUM *sig_r, *sig_s;
+ u_char digest[SSH_DIGEST_MAX_LENGTH], sigblob[SIGBLOB_LEN];
+ size_t rlen, slen, len, dlen = ssh_digest_bytes(SSH_DIGEST_SHA1);
+ struct sshbuf *b = NULL;
+@@ -76,15 +77,16 @@ ssh_dss_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
+ goto out;
+ }
+
+- rlen = BN_num_bytes(sig->r);
+- slen = BN_num_bytes(sig->s);
++ DSA_SIG_get0(sig, &sig_r, &sig_s);
++ rlen = BN_num_bytes(sig_r);
++ slen = BN_num_bytes(sig_s);
+ if (rlen > INTBLOB_LEN || slen > INTBLOB_LEN) {
+ ret = SSH_ERR_INTERNAL_ERROR;
+ goto out;
+ }
+ explicit_bzero(sigblob, SIGBLOB_LEN);
+- BN_bn2bin(sig->r, sigblob + SIGBLOB_LEN - INTBLOB_LEN - rlen);
+- BN_bn2bin(sig->s, sigblob + SIGBLOB_LEN - slen);
++ BN_bn2bin(sig_r, sigblob + SIGBLOB_LEN - INTBLOB_LEN - rlen);
++ BN_bn2bin(sig_s, sigblob + SIGBLOB_LEN - slen);
+
+ if ((b = sshbuf_new()) == NULL) {
+ ret = SSH_ERR_ALLOC_FAIL;
+@@ -118,6 +120,7 @@ ssh_dss_verify(const struct sshkey *key,
+ const u_char *data, size_t datalen, u_int compat)
+ {
+ DSA_SIG *sig = NULL;
++ BIGNUM *sig_r = NULL, *sig_s = NULL;
+ u_char digest[SSH_DIGEST_MAX_LENGTH], *sigblob = NULL;
+ size_t len, dlen = ssh_digest_bytes(SSH_DIGEST_SHA1);
+ int ret = SSH_ERR_INTERNAL_ERROR;
+@@ -155,16 +158,21 @@ ssh_dss_verify(const struct sshkey *key,
+
+ /* parse signature */
+ if ((sig = DSA_SIG_new()) == NULL ||
+- (sig->r = BN_new()) == NULL ||
+- (sig->s = BN_new()) == NULL) {
++ (sig_r = BN_new()) == NULL ||
++ (sig_s = BN_new()) == NULL) {
+ ret = SSH_ERR_ALLOC_FAIL;
+ goto out;
+ }
+- if ((BN_bin2bn(sigblob, INTBLOB_LEN, sig->r) == NULL) ||
+- (BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s) == NULL)) {
++ if ((BN_bin2bn(sigblob, INTBLOB_LEN, sig_r) == NULL) ||
++ (BN_bin2bn(sigblob + INTBLOB_LEN, INTBLOB_LEN, sig_s) == NULL)) {
+ ret = SSH_ERR_LIBCRYPTO_ERROR;
+ goto out;
+ }
++ if (!DSA_SIG_set0(sig, sig_r, sig_s)) {
++ ret = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ sig_r = sig_s = NULL; /* transferred */
+
+ /* sha1 the data */
+ if ((ret = ssh_digest_memory(SSH_DIGEST_SHA1, data, datalen,
+@@ -186,6 +194,8 @@ ssh_dss_verify(const struct sshkey *key,
+ out:
+ explicit_bzero(digest, sizeof(digest));
+ DSA_SIG_free(sig);
++ BN_clear_free(sig_r);
++ BN_clear_free(sig_s);
+ sshbuf_free(b);
+ free(ktype);
+ if (sigblob != NULL) {
+diff --git a/ssh-ecdsa.c b/ssh-ecdsa.c
+index 3d3b78d7..9e92af04 100644
+--- a/ssh-ecdsa.c
++++ b/ssh-ecdsa.c
+@@ -49,6 +49,7 @@ ssh_ecdsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
+ const u_char *data, size_t datalen, u_int compat)
+ {
+ ECDSA_SIG *sig = NULL;
++ const BIGNUM *sig_r, *sig_s;
+ int hash_alg;
+ u_char digest[SSH_DIGEST_MAX_LENGTH];
+ size_t len, dlen;
+@@ -80,8 +81,9 @@ ssh_ecdsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
+ ret = SSH_ERR_ALLOC_FAIL;
+ goto out;
+ }
+- if ((ret = sshbuf_put_bignum2(bb, sig->r)) != 0 ||
+- (ret = sshbuf_put_bignum2(bb, sig->s)) != 0)
++ ECDSA_SIG_get0(sig, &sig_r, &sig_s);
++ if ((ret = sshbuf_put_bignum2(bb, sig_r)) != 0 ||
++ (ret = sshbuf_put_bignum2(bb, sig_s)) != 0)
+ goto out;
+ if ((ret = sshbuf_put_cstring(b, sshkey_ssh_name_plain(key))) != 0 ||
+ (ret = sshbuf_put_stringb(b, bb)) != 0)
+@@ -112,6 +114,7 @@ ssh_ecdsa_verify(const struct sshkey *key,
+ const u_char *data, size_t datalen, u_int compat)
+ {
+ ECDSA_SIG *sig = NULL;
++ BIGNUM *sig_r = NULL, *sig_s = NULL;
+ int hash_alg;
+ u_char digest[SSH_DIGEST_MAX_LENGTH];
+ size_t dlen;
+@@ -146,15 +149,23 @@ ssh_ecdsa_verify(const struct sshkey *key,
+ }
+
+ /* parse signature */
+- if ((sig = ECDSA_SIG_new()) == NULL) {
++ if ((sig = ECDSA_SIG_new()) == NULL ||
++ (sig_r = BN_new()) == NULL ||
++ (sig_s = BN_new()) == NULL) {
+ ret = SSH_ERR_ALLOC_FAIL;
+ goto out;
+ }
+- if (sshbuf_get_bignum2(sigbuf, sig->r) != 0 ||
+- sshbuf_get_bignum2(sigbuf, sig->s) != 0) {
++ if (sshbuf_get_bignum2(sigbuf, sig_r) != 0 ||
++ sshbuf_get_bignum2(sigbuf, sig_s) != 0) {
+ ret = SSH_ERR_INVALID_FORMAT;
+ goto out;
+ }
++ if (!ECDSA_SIG_set0(sig, sig_r, sig_s)) {
++ ret = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ sig_r = sig_s = NULL; /* transferred */
++
+ if (sshbuf_len(sigbuf) != 0) {
+ ret = SSH_ERR_UNEXPECTED_TRAILING_DATA;
+ goto out;
+@@ -180,6 +191,8 @@ ssh_ecdsa_verify(const struct sshkey *key,
+ sshbuf_free(sigbuf);
+ sshbuf_free(b);
+ ECDSA_SIG_free(sig);
++ BN_clear_free(sig_r);
++ BN_clear_free(sig_s);
+ free(ktype);
+ return ret;
+ }
+diff --git a/ssh-keygen.c b/ssh-keygen.c
+index 22860ad9..f240af66 100644
+--- a/ssh-keygen.c
++++ b/ssh-keygen.c
+@@ -450,7 +450,10 @@ do_convert_private_ssh2_from_blob(u_char *blob, u_int blen)
+ u_int magic, i1, i2, i3, i4;
+ size_t slen;
+ u_long e;
+-
++ BIGNUM *dsa_p = NULL, *dsa_q = NULL, *dsa_g = NULL;
++ BIGNUM *dsa_pub_key = NULL, *dsa_priv_key = NULL;
++ BIGNUM *rsa_n = NULL, *rsa_e = NULL, *rsa_d = NULL;
++ BIGNUM *rsa_p = NULL, *rsa_q = NULL, *rsa_iqmp = NULL;
+ if ((b = sshbuf_from(blob, blen)) == NULL)
+ fatal("%s: sshbuf_from failed", __func__);
+ if ((r = sshbuf_get_u32(b, &magic)) != 0)
+@@ -494,11 +497,23 @@ do_convert_private_ssh2_from_blob(u_char *blob, u_int blen)
+
+ switch (key->type) {
+ case KEY_DSA:
+- buffer_get_bignum_bits(b, key->dsa->p);
+- buffer_get_bignum_bits(b, key->dsa->g);
+- buffer_get_bignum_bits(b, key->dsa->q);
+- buffer_get_bignum_bits(b, key->dsa->pub_key);
+- buffer_get_bignum_bits(b, key->dsa->priv_key);
++ if ((dsa_p = BN_new()) == NULL ||
++ (dsa_q = BN_new()) == NULL ||
++ (dsa_g = BN_new()) == NULL ||
++ (dsa_pub_key = BN_new()) == NULL ||
++ (dsa_priv_key = BN_new()) == NULL)
++ fatal("%s: BN_new", __func__);
++ buffer_get_bignum_bits(b, dsa_p);
++ buffer_get_bignum_bits(b, dsa_g);
++ buffer_get_bignum_bits(b, dsa_q);
++ buffer_get_bignum_bits(b, dsa_pub_key);
++ buffer_get_bignum_bits(b, dsa_priv_key);
++ if (!DSA_set0_pqg(key->dsa, dsa_p, dsa_q, dsa_g))
++ fatal("%s: DSA_set0_pqg failed", __func__);
++ dsa_p = dsa_q = dsa_g = NULL; /* transferred */
++ if (!DSA_set0_key(key->dsa, dsa_pub_key, dsa_priv_key))
++ fatal("%s: DSA_set0_key failed", __func__);
++ dsa_pub_key = dsa_priv_key = NULL; /* transferred */
+ break;
+ case KEY_RSA:
+ if ((r = sshbuf_get_u8(b, &e1)) != 0 ||
+@@ -515,18 +530,34 @@ do_convert_private_ssh2_from_blob(u_char *blob, u_int blen)
+ e += e3;
+ debug("e %lx", e);
+ }
+- if (!BN_set_word(key->rsa->e, e)) {
++ if ((rsa_e = BN_new()) == NULL)
++ fatal("%s: BN_new", __func__);
++ if (!BN_set_word(rsa_e, e)) {
++ BN_clear_free(rsa_e);
+ sshbuf_free(b);
+ sshkey_free(key);
+ return NULL;
+ }
+- buffer_get_bignum_bits(b, key->rsa->d);
+- buffer_get_bignum_bits(b, key->rsa->n);
+- buffer_get_bignum_bits(b, key->rsa->iqmp);
+- buffer_get_bignum_bits(b, key->rsa->q);
+- buffer_get_bignum_bits(b, key->rsa->p);
+- if ((r = ssh_rsa_generate_additional_parameters(key)) != 0)
++ if ((rsa_n = BN_new()) == NULL ||
++ (rsa_d = BN_new()) == NULL ||
++ (rsa_p = BN_new()) == NULL ||
++ (rsa_q = BN_new()) == NULL ||
++ (rsa_iqmp = BN_new()) == NULL)
++ fatal("%s: BN_new", __func__);
++ buffer_get_bignum_bits(b, rsa_d);
++ buffer_get_bignum_bits(b, rsa_n);
++ buffer_get_bignum_bits(b, rsa_iqmp);
++ buffer_get_bignum_bits(b, rsa_q);
++ buffer_get_bignum_bits(b, rsa_p);
++ if (!RSA_set0_key(key->rsa, rsa_n, rsa_e, rsa_d))
++ fatal("%s: RSA_set0_key failed", __func__);
++ rsa_n = rsa_e = rsa_d = NULL; /* transferred */
++ if (!RSA_set0_factors(key->rsa, rsa_p, rsa_q))
++ fatal("%s: RSA_set0_factors failed", __func__);
++ rsa_p = rsa_q = NULL; /* transferred */
++ if ((r = ssh_rsa_complete_crt_parameters(key, rsa_iqmp)) != 0)
+ fatal("generate RSA parameters failed: %s", ssh_err(r));
++ BN_clear_free(rsa_iqmp);
+ break;
+ }
+ rlen = sshbuf_len(b);
+@@ -634,7 +665,7 @@ do_convert_from_pkcs8(struct sshkey **k, int *private)
+ identity_file);
+ }
+ fclose(fp);
+- switch (EVP_PKEY_type(pubkey->type)) {
++ switch (EVP_PKEY_base_id(pubkey)) {
+ case EVP_PKEY_RSA:
+ if ((*k = sshkey_new(KEY_UNSPEC)) == NULL)
+ fatal("sshkey_new failed");
+@@ -658,7 +689,7 @@ do_convert_from_pkcs8(struct sshkey **k, int *private)
+ #endif
+ default:
+ fatal("%s: unsupported pubkey type %d", __func__,
+- EVP_PKEY_type(pubkey->type));
++ EVP_PKEY_base_id(pubkey));
+ }
+ EVP_PKEY_free(pubkey);
+ return;
+diff --git a/ssh-pkcs11-client.c b/ssh-pkcs11-client.c
+index 028b272c..bcc18c6b 100644
+--- a/ssh-pkcs11-client.c
++++ b/ssh-pkcs11-client.c
+@@ -156,12 +156,14 @@ pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa,
+ static int
+ wrap_key(RSA *rsa)
+ {
+- static RSA_METHOD helper_rsa;
++ static RSA_METHOD *helper_rsa;
+
+- memcpy(&helper_rsa, RSA_get_default_method(), sizeof(helper_rsa));
+- helper_rsa.name = "ssh-pkcs11-helper";
+- helper_rsa.rsa_priv_enc = pkcs11_rsa_private_encrypt;
+- RSA_set_method(rsa, &helper_rsa);
++ if ((helper_rsa = RSA_meth_dup(RSA_get_default_method())) == NULL)
++ fatal("%s: RSA_meth_dup failed", __func__);
++ if (!RSA_meth_set1_name(helper_rsa, "ssh-pkcs11-helper") ||
++ !RSA_meth_set_priv_enc(helper_rsa, pkcs11_rsa_private_encrypt))
++ fatal("%s: failed to prepare method", __func__);
++ RSA_set_method(rsa, helper_rsa);
+ return (0);
+ }
+
+diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
+index 65a7b589..c35f9415 100644
+--- a/ssh-pkcs11.c
++++ b/ssh-pkcs11.c
+@@ -67,7 +67,7 @@ struct pkcs11_key {
+ struct pkcs11_provider *provider;
+ CK_ULONG slotidx;
+ int (*orig_finish)(RSA *rsa);
+- RSA_METHOD rsa_method;
++ RSA_METHOD *rsa_method;
+ char *keyid;
+ int keyid_len;
+ };
+@@ -182,6 +182,7 @@ pkcs11_rsa_finish(RSA *rsa)
+ rv = k11->orig_finish(rsa);
+ if (k11->provider)
+ pkcs11_provider_unref(k11->provider);
++ RSA_meth_free(k11->rsa_method);
+ free(k11->keyid);
+ free(k11);
+ }
+@@ -326,13 +327,18 @@ pkcs11_rsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx,
+ k11->keyid = xmalloc(k11->keyid_len);
+ memcpy(k11->keyid, keyid_attrib->pValue, k11->keyid_len);
+ }
+- k11->orig_finish = def->finish;
+- memcpy(&k11->rsa_method, def, sizeof(k11->rsa_method));
+- k11->rsa_method.name = "pkcs11";
+- k11->rsa_method.rsa_priv_enc = pkcs11_rsa_private_encrypt;
+- k11->rsa_method.rsa_priv_dec = pkcs11_rsa_private_decrypt;
+- k11->rsa_method.finish = pkcs11_rsa_finish;
+- RSA_set_method(rsa, &k11->rsa_method);
++ k11->rsa_method = RSA_meth_dup(def);
++ if (k11->rsa_method == NULL)
++ fatal("%s: RSA_meth_dup failed", __func__);
++ k11->orig_finish = RSA_meth_get_finish(def);
++ if (!RSA_meth_set1_name(k11->rsa_method, "pkcs11") ||
++ !RSA_meth_set_priv_enc(k11->rsa_method,
++ pkcs11_rsa_private_encrypt) ||
++ !RSA_meth_set_priv_dec(k11->rsa_method,
++ pkcs11_rsa_private_decrypt) ||
++ !RSA_meth_set_finish(k11->rsa_method, pkcs11_rsa_finish))
++ fatal("%s: setup pkcs11 method failed", __func__);
++ RSA_set_method(rsa, k11->rsa_method);
+ RSA_set_app_data(rsa, k11);
+ return (0);
+ }
+@@ -444,6 +450,15 @@ pkcs11_key_included(struct sshkey ***keysp, int *nkeys, struct sshkey *key)
+ return (0);
+ }
+
++static int
++have_rsa_key(const RSA *rsa)
++{
++ const BIGNUM *rsa_n, *rsa_e;
++
++ RSA_get0_key(rsa, &rsa_n, &rsa_e, NULL);
++ return rsa_n != NULL && rsa_e != NULL;
++}
++
+ static int
+ pkcs11_fetch_keys_filter(struct pkcs11_provider *p, CK_ULONG slotidx,
+ CK_ATTRIBUTE filter[], CK_ATTRIBUTE attribs[3],
+@@ -512,10 +527,20 @@ pkcs11_fetch_keys_filter(struct pkcs11_provider *p, CK_ULONG slotidx,
+ if ((rsa = RSA_new()) == NULL) {
+ error("RSA_new failed");
+ } else {
+- rsa->n = BN_bin2bn(attribs[1].pValue,
++ BIGNUM *rsa_n, *rsa_e;
++
++ rsa_n = BN_bin2bn(attribs[1].pValue,
+ attribs[1].ulValueLen, NULL);
+- rsa->e = BN_bin2bn(attribs[2].pValue,
++ rsa_e = BN_bin2bn(attribs[2].pValue,
+ attribs[2].ulValueLen, NULL);
++ if (rsa_n != NULL && rsa_e != NULL) {
++ if (!RSA_set0_key(rsa,
++ rsa_n, rsa_e, NULL))
++ fatal("%s: set key", __func__);
++ rsa_n = rsa_e = NULL; /* transferred */
++ }
++ BN_free(rsa_n);
++ BN_free(rsa_e);
+ }
+ } else {
+ cp = attribs[2].pValue;
+@@ -525,16 +550,16 @@ pkcs11_fetch_keys_filter(struct pkcs11_provider *p, CK_ULONG slotidx,
+ == NULL) {
+ error("d2i_X509 failed");
+ } else if ((evp = X509_get_pubkey(x509)) == NULL ||
+- evp->type != EVP_PKEY_RSA ||
+- evp->pkey.rsa == NULL) {
++ EVP_PKEY_base_id(evp) != EVP_PKEY_RSA ||
++ EVP_PKEY_get0_RSA(evp) == NULL) {
+ debug("X509_get_pubkey failed or no rsa");
+- } else if ((rsa = RSAPublicKey_dup(evp->pkey.rsa))
+- == NULL) {
++ } else if ((rsa = RSAPublicKey_dup(
++ EVP_PKEY_get0_RSA(evp))) == NULL) {
+ error("RSAPublicKey_dup");
+ }
+ X509_free(x509);
+ }
+- if (rsa && rsa->n && rsa->e &&
++ if (rsa && have_rsa_key(rsa) &&
+ pkcs11_rsa_wrap(p, slotidx, &attribs[0], rsa) == 0) {
+ if ((key = sshkey_new(KEY_UNSPEC)) == NULL)
+ fatal("sshkey_new failed");
+diff --git a/ssh-rsa.c b/ssh-rsa.c
+index 1756315b..2788f334 100644
+--- a/ssh-rsa.c
++++ b/ssh-rsa.c
+@@ -104,38 +104,55 @@ rsa_hash_alg_nid(int type)
+ }
+
+ int
+-ssh_rsa_generate_additional_parameters(struct sshkey *key)
++ssh_rsa_complete_crt_parameters(struct sshkey *key, const BIGNUM *iqmp)
+ {
+- BIGNUM *aux = NULL;
++ const BIGNUM *rsa_p, *rsa_q, *rsa_d;
++ BIGNUM *aux = NULL, *d_consttime = NULL;
++ BIGNUM *rsa_dmq1 = NULL, *rsa_dmp1 = NULL, *rsa_iqmp = NULL;
+ BN_CTX *ctx = NULL;
+- BIGNUM d;
+ int r;
+
+ if (key == NULL || key->rsa == NULL ||
+ sshkey_type_plain(key->type) != KEY_RSA)
+ return SSH_ERR_INVALID_ARGUMENT;
+
++ RSA_get0_key(key->rsa, NULL, NULL, &rsa_d);
++ RSA_get0_factors(key->rsa, &rsa_p, &rsa_q);
++
+ if ((ctx = BN_CTX_new()) == NULL)
+ return SSH_ERR_ALLOC_FAIL;
+- if ((aux = BN_new()) == NULL) {
++ if ((aux = BN_new()) == NULL ||
++ (rsa_dmq1 = BN_new()) == NULL ||
++ (rsa_dmp1 = BN_new()) == NULL)
++ return SSH_ERR_ALLOC_FAIL;
++ if ((d_consttime = BN_dup(rsa_d)) == NULL ||
++ (rsa_iqmp = BN_dup(iqmp)) == NULL) {
+ r = SSH_ERR_ALLOC_FAIL;
+ goto out;
+ }
+ BN_set_flags(aux, BN_FLG_CONSTTIME);
++ BN_set_flags(d_consttime, BN_FLG_CONSTTIME);
+
+- BN_init(&d);
+- BN_with_flags(&d, key->rsa->d, BN_FLG_CONSTTIME);
+-
+- if ((BN_sub(aux, key->rsa->q, BN_value_one()) == 0) ||
+- (BN_mod(key->rsa->dmq1, &d, aux, ctx) == 0) ||
+- (BN_sub(aux, key->rsa->p, BN_value_one()) == 0) ||
+- (BN_mod(key->rsa->dmp1, &d, aux, ctx) == 0)) {
++ if ((BN_sub(aux, rsa_q, BN_value_one()) == 0) ||
++ (BN_mod(rsa_dmq1, d_consttime, aux, ctx) == 0) ||
++ (BN_sub(aux, rsa_p, BN_value_one()) == 0) ||
++ (BN_mod(rsa_dmp1, d_consttime, aux, ctx) == 0)) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ if (!RSA_set0_crt_params(key->rsa, rsa_dmp1, rsa_dmq1, rsa_iqmp)) {
+ r = SSH_ERR_LIBCRYPTO_ERROR;
+ goto out;
+ }
++ rsa_dmp1 = rsa_dmq1 = rsa_iqmp = NULL; /* transferred */
++ /* success */
+ r = 0;
+ out:
+ BN_clear_free(aux);
++ BN_clear_free(d_consttime);
++ BN_clear_free(rsa_dmp1);
++ BN_clear_free(rsa_dmq1);
++ BN_clear_free(rsa_iqmp);
+ BN_CTX_free(ctx);
+ return r;
+ }
+@@ -145,6 +162,7 @@ int
+ ssh_rsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
+ const u_char *data, size_t datalen, const char *alg_ident)
+ {
++ const BIGNUM *rsa_n;
+ u_char digest[SSH_DIGEST_MAX_LENGTH], *sig = NULL;
+ size_t slen = 0;
+ u_int dlen, len;
+@@ -163,7 +181,8 @@ ssh_rsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
+ if (key == NULL || key->rsa == NULL || hash_alg == -1 ||
+ sshkey_type_plain(key->type) != KEY_RSA)
+ return SSH_ERR_INVALID_ARGUMENT;
+- if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE)
++ RSA_get0_key(key->rsa, &rsa_n, NULL, NULL);
++ if (BN_num_bits(rsa_n) < SSH_RSA_MINIMUM_MODULUS_SIZE)
+ return SSH_ERR_KEY_LENGTH;
+ slen = RSA_size(key->rsa);
+ if (slen <= 0 || slen > SSHBUF_MAX_BIGNUM)
+@@ -225,6 +244,7 @@ ssh_rsa_verify(const struct sshkey *key,
+ const u_char *sig, size_t siglen, const u_char *data, size_t datalen,
+ const char *alg)
+ {
++ const BIGNUM *rsa_n;
+ char *sigtype = NULL;
+ int hash_alg, want_alg, ret = SSH_ERR_INTERNAL_ERROR;
+ size_t len = 0, diff, modlen, dlen;
+@@ -235,7 +255,8 @@ ssh_rsa_verify(const struct sshkey *key,
+ sshkey_type_plain(key->type) != KEY_RSA ||
+ sig == NULL || siglen == 0)
+ return SSH_ERR_INVALID_ARGUMENT;
+- if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE)
++ RSA_get0_key(key->rsa, &rsa_n, NULL, NULL);
++ if (BN_num_bits(rsa_n) < SSH_RSA_MINIMUM_MODULUS_SIZE)
+ return SSH_ERR_KEY_LENGTH;
+
+ if ((b = sshbuf_from(sig, siglen)) == NULL)
+diff --git a/sshd.c b/sshd.c
+index a738c3ab..98beb1ed 100644
+--- a/sshd.c
++++ b/sshd.c
+@@ -493,8 +493,8 @@ demote_sensitive_data(void)
+
+ for (i = 0; i < options.num_host_key_files; i++) {
+ if (sensitive_data.host_keys[i]) {
+- if ((r = sshkey_demote(sensitive_data.host_keys[i],
+- &tmp)) != 0)
++ if ((r = sshkey_from_private(
++ sensitive_data.host_keys[i], &tmp)) != 0)
+ fatal("could not demote host %s key: %s",
+ sshkey_type(sensitive_data.host_keys[i]),
+ ssh_err(r));
+@@ -1772,7 +1772,7 @@ main(int ac, char **av)
+ error("Error loading host key \"%s\": %s",
+ options.host_key_files[i], ssh_err(r));
+ if (pubkey == NULL && key != NULL)
+- if ((r = sshkey_demote(key, &pubkey)) != 0)
++ if ((r = sshkey_from_private(key, &pubkey)) != 0)
+ fatal("Could not demote key: \"%s\": %s",
+ options.host_key_files[i], ssh_err(r));
+ sensitive_data.host_keys[i] = key;
+diff --git a/sshkey.c b/sshkey.c
+index 72c08c7e..a5e6e60e 100644
+--- a/sshkey.c
++++ b/sshkey.c
+@@ -288,14 +288,24 @@ sshkey_names_valid2(const char *names, int allow_wildcard)
+ u_int
+ sshkey_size(const struct sshkey *k)
+ {
++#ifdef WITH_OPENSSL
++ const BIGNUM *rsa_n, *dsa_p;
++#endif /* WITH_OPENSSL */
++
+ switch (k->type) {
+ #ifdef WITH_OPENSSL
+ case KEY_RSA:
+ case KEY_RSA_CERT:
+- return BN_num_bits(k->rsa->n);
++ if (k->rsa == NULL)
++ return 0;
++ RSA_get0_key(k->rsa, &rsa_n, NULL, NULL);
++ return BN_num_bits(rsa_n);
+ case KEY_DSA:
+ case KEY_DSA_CERT:
+- return BN_num_bits(k->dsa->p);
++ if (k->dsa == NULL)
++ return 0;
++ DSA_get0_pqg(k->dsa, &dsa_p, NULL, NULL);
++ return BN_num_bits(dsa_p);
+ case KEY_ECDSA:
+ case KEY_ECDSA_CERT:
+ return sshkey_curve_nid_to_bits(k->ecdsa_nid);
+@@ -500,10 +510,7 @@ sshkey_new(int type)
+ #ifdef WITH_OPENSSL
+ case KEY_RSA:
+ case KEY_RSA_CERT:
+- if ((rsa = RSA_new()) == NULL ||
+- (rsa->n = BN_new()) == NULL ||
+- (rsa->e = BN_new()) == NULL) {
+- RSA_free(rsa);
++ if ((rsa = RSA_new()) == NULL) {
+ free(k);
+ return NULL;
+ }
+@@ -511,12 +518,7 @@ sshkey_new(int type)
+ break;
+ case KEY_DSA:
+ case KEY_DSA_CERT:
+- if ((dsa = DSA_new()) == NULL ||
+- (dsa->p = BN_new()) == NULL ||
+- (dsa->q = BN_new()) == NULL ||
+- (dsa->g = BN_new()) == NULL ||
+- (dsa->pub_key = BN_new()) == NULL) {
+- DSA_free(dsa);
++ if ((dsa = DSA_new()) == NULL) {
+ free(k);
+ return NULL;
+ }
+@@ -550,47 +552,7 @@ sshkey_new(int type)
+ return k;
+ }
+
+-int
+-sshkey_add_private(struct sshkey *k)
+-{
+- switch (k->type) {
+-#ifdef WITH_OPENSSL
+- case KEY_RSA:
+- case KEY_RSA_CERT:
+-#define bn_maybe_alloc_failed(p) (p == NULL && (p = BN_new()) == NULL)
+- if (bn_maybe_alloc_failed(k->rsa->d) ||
+- bn_maybe_alloc_failed(k->rsa->iqmp) ||
+- bn_maybe_alloc_failed(k->rsa->q) ||
+- bn_maybe_alloc_failed(k->rsa->p) ||
+- bn_maybe_alloc_failed(k->rsa->dmq1) ||
+- bn_maybe_alloc_failed(k->rsa->dmp1))
+- return SSH_ERR_ALLOC_FAIL;
+- break;
+- case KEY_DSA:
+- case KEY_DSA_CERT:
+- if (bn_maybe_alloc_failed(k->dsa->priv_key))
+- return SSH_ERR_ALLOC_FAIL;
+- break;
+-#undef bn_maybe_alloc_failed
+- case KEY_ECDSA:
+- case KEY_ECDSA_CERT:
+- /* Cannot do anything until we know the group */
+- break;
+-#endif /* WITH_OPENSSL */
+- case KEY_ED25519:
+- case KEY_ED25519_CERT:
+- case KEY_XMSS:
+- case KEY_XMSS_CERT:
+- /* no need to prealloc */
+- break;
+- case KEY_UNSPEC:
+- break;
+- default:
+- return SSH_ERR_INVALID_ARGUMENT;
+- }
+- return 0;
+-}
+-
++/* XXX garbage-collect this API */
+ struct sshkey *
+ sshkey_new_private(int type)
+ {
+@@ -598,10 +560,6 @@ sshkey_new_private(int type)
+
+ if (k == NULL)
+ return NULL;
+- if (sshkey_add_private(k) != 0) {
+- sshkey_free(k);
+- return NULL;
+- }
+ return k;
+ }
+
+@@ -683,9 +641,15 @@ cert_compare(struct sshkey_cert *a, struct sshkey_cert *b)
+ int
+ sshkey_equal_public(const struct sshkey *a, const struct sshkey *b)
+ {
+-#if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC)
++#if defined(WITH_OPENSSL)
++ const BIGNUM *rsa_e_a, *rsa_n_a;
++ const BIGNUM *rsa_e_b, *rsa_n_b;
++ const BIGNUM *dsa_p_a, *dsa_q_a, *dsa_g_a, *dsa_pub_key_a;
++ const BIGNUM *dsa_p_b, *dsa_q_b, *dsa_g_b, *dsa_pub_key_b;
++# if defined(OPENSSL_HAS_ECC)
+ BN_CTX *bnctx;
+-#endif /* WITH_OPENSSL && OPENSSL_HAS_ECC */
++# endif /* OPENSSL_HAS_ECC */
++#endif /* WITH_OPENSSL */
+
+ if (a == NULL || b == NULL ||
+ sshkey_type_plain(a->type) != sshkey_type_plain(b->type))
+@@ -695,16 +659,24 @@ sshkey_equal_public(const struct sshkey *a, const struct sshkey *b)
+ #ifdef WITH_OPENSSL
+ case KEY_RSA_CERT:
+ case KEY_RSA:
+- return a->rsa != NULL && b->rsa != NULL &&
+- BN_cmp(a->rsa->e, b->rsa->e) == 0 &&
+- BN_cmp(a->rsa->n, b->rsa->n) == 0;
++ if (a->rsa == NULL || b->rsa == NULL)
++ return 0;
++ RSA_get0_key(a->rsa, &rsa_n_a, &rsa_e_a, NULL);
++ RSA_get0_key(b->rsa, &rsa_n_b, &rsa_e_b, NULL);
++ return BN_cmp(rsa_e_a, rsa_e_b) == 0 &&
++ BN_cmp(rsa_n_a, rsa_n_b) == 0;
+ case KEY_DSA_CERT:
+ case KEY_DSA:
+- return a->dsa != NULL && b->dsa != NULL &&
+- BN_cmp(a->dsa->p, b->dsa->p) == 0 &&
+- BN_cmp(a->dsa->q, b->dsa->q) == 0 &&
+- BN_cmp(a->dsa->g, b->dsa->g) == 0 &&
+- BN_cmp(a->dsa->pub_key, b->dsa->pub_key) == 0;
++ if (a->dsa == NULL || b->dsa == NULL)
++ return 0;
++ DSA_get0_pqg(a->dsa, &dsa_p_a, &dsa_q_a, &dsa_g_a);
++ DSA_get0_pqg(b->dsa, &dsa_p_b, &dsa_q_b, &dsa_g_b);
++ DSA_get0_key(a->dsa, &dsa_pub_key_a, NULL);
++ DSA_get0_key(b->dsa, &dsa_pub_key_b, NULL);
++ return BN_cmp(dsa_p_a, dsa_p_b) == 0 &&
++ BN_cmp(dsa_q_a, dsa_q_b) == 0 &&
++ BN_cmp(dsa_g_a, dsa_g_b) == 0 &&
++ BN_cmp(dsa_pub_key_a, dsa_pub_key_b) == 0;
+ # ifdef OPENSSL_HAS_ECC
+ case KEY_ECDSA_CERT:
+ case KEY_ECDSA:
+@@ -761,6 +733,9 @@ to_blob_buf(const struct sshkey *key, struct sshbuf *b, int force_plain,
+ {
+ int type, ret = SSH_ERR_INTERNAL_ERROR;
+ const char *typename;
++#ifdef WITH_OPENSSL
++ const BIGNUM *rsa_n, *rsa_e, *dsa_p, *dsa_q, *dsa_g, *dsa_pub_key;
++#endif /* WITH_OPENSSL */
+
+ if (key == NULL)
+ return SSH_ERR_INVALID_ARGUMENT;
+@@ -793,11 +768,13 @@ to_blob_buf(const struct sshkey *key, struct sshbuf *b, int force_plain,
+ case KEY_DSA:
+ if (key->dsa == NULL)
+ return SSH_ERR_INVALID_ARGUMENT;
++ DSA_get0_pqg(key->dsa, &dsa_p, &dsa_q, &dsa_g);
++ DSA_get0_key(key->dsa, &dsa_pub_key, NULL);
+ if ((ret = sshbuf_put_cstring(b, typename)) != 0 ||
+- (ret = sshbuf_put_bignum2(b, key->dsa->p)) != 0 ||
+- (ret = sshbuf_put_bignum2(b, key->dsa->q)) != 0 ||
+- (ret = sshbuf_put_bignum2(b, key->dsa->g)) != 0 ||
+- (ret = sshbuf_put_bignum2(b, key->dsa->pub_key)) != 0)
++ (ret = sshbuf_put_bignum2(b, dsa_p)) != 0 ||
++ (ret = sshbuf_put_bignum2(b, dsa_q)) != 0 ||
++ (ret = sshbuf_put_bignum2(b, dsa_g)) != 0 ||
++ (ret = sshbuf_put_bignum2(b, dsa_pub_key)) != 0)
+ return ret;
+ break;
+ # ifdef OPENSSL_HAS_ECC
+@@ -814,9 +791,10 @@ to_blob_buf(const struct sshkey *key, struct sshbuf *b, int force_plain,
+ case KEY_RSA:
+ if (key->rsa == NULL)
+ return SSH_ERR_INVALID_ARGUMENT;
++ RSA_get0_key(key->rsa, &rsa_n, &rsa_e, NULL);
+ if ((ret = sshbuf_put_cstring(b, typename)) != 0 ||
+- (ret = sshbuf_put_bignum2(b, key->rsa->e)) != 0 ||
+- (ret = sshbuf_put_bignum2(b, key->rsa->n)) != 0)
++ (ret = sshbuf_put_bignum2(b, rsa_e)) != 0 ||
++ (ret = sshbuf_put_bignum2(b, rsa_n)) != 0)
+ return ret;
+ break;
+ #endif /* WITH_OPENSSL */
+@@ -1750,59 +1728,95 @@ sshkey_from_private(const struct sshkey *k, struct sshkey **pkp)
+ {
+ struct sshkey *n = NULL;
+ int ret = SSH_ERR_INTERNAL_ERROR;
++ int r = SSH_ERR_INTERNAL_ERROR;
++#ifdef WITH_OPENSSL
++ const BIGNUM *rsa_n, *rsa_e;
++ BIGNUM *rsa_n_dup = NULL, *rsa_e_dup = NULL;
++ const BIGNUM *dsa_p, *dsa_q, *dsa_g, *dsa_pub_key;
++ BIGNUM *dsa_p_dup = NULL, *dsa_q_dup = NULL, *dsa_g_dup = NULL;
++ BIGNUM *dsa_pub_key_dup = NULL;
++#endif /* WITH_OPENSSL */
+
+ *pkp = NULL;
+ switch (k->type) {
+ #ifdef WITH_OPENSSL
+ case KEY_DSA:
+ case KEY_DSA_CERT:
+- if ((n = sshkey_new(k->type)) == NULL)
+- return SSH_ERR_ALLOC_FAIL;
+- if ((BN_copy(n->dsa->p, k->dsa->p) == NULL) ||
+- (BN_copy(n->dsa->q, k->dsa->q) == NULL) ||
+- (BN_copy(n->dsa->g, k->dsa->g) == NULL) ||
+- (BN_copy(n->dsa->pub_key, k->dsa->pub_key) == NULL)) {
+- sshkey_free(n);
+- return SSH_ERR_ALLOC_FAIL;
++ if ((n = sshkey_new(k->type)) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++
++ DSA_get0_pqg(k->dsa, &dsa_p, &dsa_q, &dsa_g);
++ DSA_get0_key(k->dsa, &dsa_pub_key, NULL);
++ if ((dsa_p_dup = BN_dup(dsa_p)) == NULL ||
++ (dsa_q_dup = BN_dup(dsa_q)) == NULL ||
++ (dsa_g_dup = BN_dup(dsa_g)) == NULL ||
++ (dsa_pub_key_dup = BN_dup(dsa_pub_key)) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ if (!DSA_set0_pqg(n->dsa, dsa_p_dup, dsa_q_dup, dsa_g_dup)) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ dsa_p_dup = dsa_q_dup = dsa_g_dup = NULL; /* transferred */
++ if (!DSA_set0_key(n->dsa, dsa_pub_key_dup, NULL)) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
+ }
++ dsa_pub_key_dup = NULL; /* transferred */
++
+ break;
+ # ifdef OPENSSL_HAS_ECC
+ case KEY_ECDSA:
+ case KEY_ECDSA_CERT:
+- if ((n = sshkey_new(k->type)) == NULL)
+- return SSH_ERR_ALLOC_FAIL;
++ if ((n = sshkey_new(k->type)) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
+ n->ecdsa_nid = k->ecdsa_nid;
+ n->ecdsa = EC_KEY_new_by_curve_name(k->ecdsa_nid);
+ if (n->ecdsa == NULL) {
+- sshkey_free(n);
+- return SSH_ERR_ALLOC_FAIL;
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
+ }
+ if (EC_KEY_set_public_key(n->ecdsa,
+ EC_KEY_get0_public_key(k->ecdsa)) != 1) {
+- sshkey_free(n);
+- return SSH_ERR_LIBCRYPTO_ERROR;
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
+ }
+ break;
+ # endif /* OPENSSL_HAS_ECC */
+ case KEY_RSA:
+ case KEY_RSA_CERT:
+- if ((n = sshkey_new(k->type)) == NULL)
+- return SSH_ERR_ALLOC_FAIL;
+- if ((BN_copy(n->rsa->n, k->rsa->n) == NULL) ||
+- (BN_copy(n->rsa->e, k->rsa->e) == NULL)) {
+- sshkey_free(n);
+- return SSH_ERR_ALLOC_FAIL;
++ if ((n = sshkey_new(k->type)) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
+ }
++ RSA_get0_key(k->rsa, &rsa_n, &rsa_e, NULL);
++ if ((rsa_n_dup = BN_dup(rsa_n)) == NULL ||
++ (rsa_e_dup = BN_dup(rsa_e)) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ if (!RSA_set0_key(n->rsa, rsa_n_dup, rsa_e_dup, NULL)) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ rsa_n_dup = rsa_e_dup = NULL; /* transferred */
+ break;
+ #endif /* WITH_OPENSSL */
+ case KEY_ED25519:
+ case KEY_ED25519_CERT:
+- if ((n = sshkey_new(k->type)) == NULL)
+- return SSH_ERR_ALLOC_FAIL;
++ if ((n = sshkey_new(k->type)) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
+ if (k->ed25519_pk != NULL) {
+ if ((n->ed25519_pk = malloc(ED25519_PK_SZ)) == NULL) {
+- sshkey_free(n);
+- return SSH_ERR_ALLOC_FAIL;
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
+ }
+ memcpy(n->ed25519_pk, k->ed25519_pk, ED25519_PK_SZ);
+ }
+@@ -1810,37 +1824,46 @@ sshkey_from_private(const struct sshkey *k, struct sshkey **pkp)
+ #ifdef WITH_XMSS
+ case KEY_XMSS:
+ case KEY_XMSS_CERT:
+- if ((n = sshkey_new(k->type)) == NULL)
+- return SSH_ERR_ALLOC_FAIL;
+- if ((ret = sshkey_xmss_init(n, k->xmss_name)) != 0) {
+- sshkey_free(n);
+- return ret;
++ if ((n = sshkey_new(k->type)) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
+ }
++ if ((r = sshkey_xmss_init(n, k->xmss_name)) != 0)
++ goto out;
+ if (k->xmss_pk != NULL) {
+ size_t pklen = sshkey_xmss_pklen(k);
+ if (pklen == 0 || sshkey_xmss_pklen(n) != pklen) {
+- sshkey_free(n);
+- return SSH_ERR_INTERNAL_ERROR;
++ r = SSH_ERR_INTERNAL_ERROR;
++ goto out;
+ }
+ if ((n->xmss_pk = malloc(pklen)) == NULL) {
+- sshkey_free(n);
+- return SSH_ERR_ALLOC_FAIL;
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
+ }
+ memcpy(n->xmss_pk, k->xmss_pk, pklen);
+ }
+ break;
+ #endif /* WITH_XMSS */
+ default:
+- return SSH_ERR_KEY_TYPE_UNKNOWN;
+- }
+- if (sshkey_is_cert(k)) {
+- if ((ret = sshkey_cert_copy(k, n)) != 0) {
+- sshkey_free(n);
+- return ret;
+- }
++ r = SSH_ERR_KEY_TYPE_UNKNOWN;
++ goto out;
+ }
++ if (sshkey_is_cert(k) && (r = sshkey_cert_copy(k, n)) != 0)
++ goto out;
++ /* success */
+ *pkp = n;
+- return 0;
++ n = NULL;
++ r = 0;
++ out:
++ sshkey_free(n);
++ BN_clear_free(rsa_n_dup);
++ BN_clear_free(rsa_e_dup);
++ BN_clear_free(dsa_p_dup);
++ BN_clear_free(dsa_q_dup);
++ BN_clear_free(dsa_g_dup);
++ BN_clear_free(dsa_pub_key_dup);
++
++ return r;
+ }
+
+ static int
+@@ -1966,6 +1989,17 @@ cert_parse(struct sshbuf *b, struct sshkey *key, struct sshbuf *certbuf)
+ return ret;
+ }
+
++static int
++check_rsa_length(const RSA *rsa)
++{
++ const BIGNUM *rsa_n;
++
++ RSA_get0_key(rsa, &rsa_n, NULL, NULL);
++ if (BN_num_bits(rsa_n) < SSH_RSA_MINIMUM_MODULUS_SIZE)
++ return SSH_ERR_KEY_LENGTH;
++ return 0;
++}
++
+ static int
+ sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp,
+ int allow_cert)
+@@ -1976,9 +2010,13 @@ sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp,
+ size_t len;
+ u_char *pk = NULL;
+ struct sshbuf *copy;
+-#if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC)
++#if defined(WITH_OPENSSL)
++ BIGNUM *rsa_n = NULL, *rsa_e = NULL;
++ BIGNUM *dsa_p = NULL, *dsa_q = NULL, *dsa_g = NULL, *dsa_pub_key = NULL;
++# if defined(OPENSSL_HAS_ECC)
+ EC_POINT *q = NULL;
+-#endif /* WITH_OPENSSL && OPENSSL_HAS_ECC */
++# endif /* OPENSSL_HAS_ECC */
++#endif /* WITH_OPENSSL */
+
+ #ifdef DEBUG_PK /* XXX */
+ sshbuf_dump(b, stderr);
+@@ -2013,15 +2051,23 @@ sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp,
+ ret = SSH_ERR_ALLOC_FAIL;
+ goto out;
+ }
+- if (sshbuf_get_bignum2(b, key->rsa->e) != 0 ||
+- sshbuf_get_bignum2(b, key->rsa->n) != 0) {
++ if ((rsa_e = BN_new()) == NULL ||
++ (rsa_n = BN_new()) == NULL) {
++ ret = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ if (sshbuf_get_bignum2(b, rsa_e) != 0 ||
++ sshbuf_get_bignum2(b, rsa_n) != 0) {
+ ret = SSH_ERR_INVALID_FORMAT;
+ goto out;
+ }
+- if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
+- ret = SSH_ERR_KEY_LENGTH;
++ if (!RSA_set0_key(key->rsa, rsa_n, rsa_e, NULL)) {
++ ret = SSH_ERR_LIBCRYPTO_ERROR;
+ goto out;
+ }
++ rsa_n = rsa_e = NULL; /* transferred */
++ if ((ret = check_rsa_length(key->rsa)) != 0)
++ goto out;
+ #ifdef DEBUG_PK
+ RSA_print_fp(stderr, key->rsa, 8);
+ #endif
+@@ -2038,13 +2084,30 @@ sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp,
+ ret = SSH_ERR_ALLOC_FAIL;
+ goto out;
+ }
+- if (sshbuf_get_bignum2(b, key->dsa->p) != 0 ||
+- sshbuf_get_bignum2(b, key->dsa->q) != 0 ||
+- sshbuf_get_bignum2(b, key->dsa->g) != 0 ||
+- sshbuf_get_bignum2(b, key->dsa->pub_key) != 0) {
++ if ((dsa_p = BN_new()) == NULL ||
++ (dsa_q = BN_new()) == NULL ||
++ (dsa_g = BN_new()) == NULL ||
++ (dsa_pub_key = BN_new()) == NULL) {
++ ret = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ if (sshbuf_get_bignum2(b, dsa_p) != 0 ||
++ sshbuf_get_bignum2(b, dsa_q) != 0 ||
++ sshbuf_get_bignum2(b, dsa_g) != 0 ||
++ sshbuf_get_bignum2(b, dsa_pub_key) != 0) {
+ ret = SSH_ERR_INVALID_FORMAT;
+ goto out;
+ }
++ if (!DSA_set0_pqg(key->dsa, dsa_p, dsa_q, dsa_g)) {
++ ret = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ dsa_p = dsa_q = dsa_g = NULL; /* transferred */
++ if (!DSA_set0_key(key->dsa, dsa_pub_key, NULL)) {
++ ret = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ dsa_pub_key = NULL; /* transferred */
+ #ifdef DEBUG_PK
+ DSA_print_fp(stderr, key->dsa, 8);
+ #endif
+@@ -2178,9 +2241,17 @@ sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp,
+ free(ktype);
+ free(curve);
+ free(pk);
+-#if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC)
++#if defined(WITH_OPENSSL)
++ BN_clear_free(rsa_n);
++ BN_clear_free(rsa_e);
++ BN_clear_free(dsa_p);
++ BN_clear_free(dsa_q);
++ BN_clear_free(dsa_g);
++ BN_clear_free(dsa_pub_key);
++# if defined(OPENSSL_HAS_ECC)
+ EC_POINT_free(q);
+-#endif /* WITH_OPENSSL && OPENSSL_HAS_ECC */
++# endif /* OPENSSL_HAS_ECC */
++#endif /* WITH_OPENSSL */
+ return ret;
+ }
+
+@@ -2361,120 +2432,6 @@ sshkey_verify(const struct sshkey *key,
+ }
+ }
+
+-/* Converts a private to a public key */
+-int
+-sshkey_demote(const struct sshkey *k, struct sshkey **dkp)
+-{
+- struct sshkey *pk;
+- int ret = SSH_ERR_INTERNAL_ERROR;
+-
+- *dkp = NULL;
+- if ((pk = calloc(1, sizeof(*pk))) == NULL)
+- return SSH_ERR_ALLOC_FAIL;
+- pk->type = k->type;
+- pk->flags = k->flags;
+- pk->ecdsa_nid = k->ecdsa_nid;
+- pk->dsa = NULL;
+- pk->ecdsa = NULL;
+- pk->rsa = NULL;
+- pk->ed25519_pk = NULL;
+- pk->ed25519_sk = NULL;
+- pk->xmss_pk = NULL;
+- pk->xmss_sk = NULL;
+-
+- switch (k->type) {
+-#ifdef WITH_OPENSSL
+- case KEY_RSA_CERT:
+- if ((ret = sshkey_cert_copy(k, pk)) != 0)
+- goto fail;
+- /* FALLTHROUGH */
+- case KEY_RSA:
+- if ((pk->rsa = RSA_new()) == NULL ||
+- (pk->rsa->e = BN_dup(k->rsa->e)) == NULL ||
+- (pk->rsa->n = BN_dup(k->rsa->n)) == NULL) {
+- ret = SSH_ERR_ALLOC_FAIL;
+- goto fail;
+- }
+- break;
+- case KEY_DSA_CERT:
+- if ((ret = sshkey_cert_copy(k, pk)) != 0)
+- goto fail;
+- /* FALLTHROUGH */
+- case KEY_DSA:
+- if ((pk->dsa = DSA_new()) == NULL ||
+- (pk->dsa->p = BN_dup(k->dsa->p)) == NULL ||
+- (pk->dsa->q = BN_dup(k->dsa->q)) == NULL ||
+- (pk->dsa->g = BN_dup(k->dsa->g)) == NULL ||
+- (pk->dsa->pub_key = BN_dup(k->dsa->pub_key)) == NULL) {
+- ret = SSH_ERR_ALLOC_FAIL;
+- goto fail;
+- }
+- break;
+- case KEY_ECDSA_CERT:
+- if ((ret = sshkey_cert_copy(k, pk)) != 0)
+- goto fail;
+- /* FALLTHROUGH */
+-# ifdef OPENSSL_HAS_ECC
+- case KEY_ECDSA:
+- pk->ecdsa = EC_KEY_new_by_curve_name(pk->ecdsa_nid);
+- if (pk->ecdsa == NULL) {
+- ret = SSH_ERR_ALLOC_FAIL;
+- goto fail;
+- }
+- if (EC_KEY_set_public_key(pk->ecdsa,
+- EC_KEY_get0_public_key(k->ecdsa)) != 1) {
+- ret = SSH_ERR_LIBCRYPTO_ERROR;
+- goto fail;
+- }
+- break;
+-# endif /* OPENSSL_HAS_ECC */
+-#endif /* WITH_OPENSSL */
+- case KEY_ED25519_CERT:
+- if ((ret = sshkey_cert_copy(k, pk)) != 0)
+- goto fail;
+- /* FALLTHROUGH */
+- case KEY_ED25519:
+- if (k->ed25519_pk != NULL) {
+- if ((pk->ed25519_pk = malloc(ED25519_PK_SZ)) == NULL) {
+- ret = SSH_ERR_ALLOC_FAIL;
+- goto fail;
+- }
+- memcpy(pk->ed25519_pk, k->ed25519_pk, ED25519_PK_SZ);
+- }
+- break;
+-#ifdef WITH_XMSS
+- case KEY_XMSS_CERT:
+- if ((ret = sshkey_cert_copy(k, pk)) != 0)
+- goto fail;
+- /* FALLTHROUGH */
+- case KEY_XMSS:
+- if ((ret = sshkey_xmss_init(pk, k->xmss_name)) != 0)
+- goto fail;
+- if (k->xmss_pk != NULL) {
+- size_t pklen = sshkey_xmss_pklen(k);
+-
+- if (pklen == 0 || sshkey_xmss_pklen(pk) != pklen) {
+- ret = SSH_ERR_INTERNAL_ERROR;
+- goto fail;
+- }
+- if ((pk->xmss_pk = malloc(pklen)) == NULL) {
+- ret = SSH_ERR_ALLOC_FAIL;
+- goto fail;
+- }
+- memcpy(pk->xmss_pk, k->xmss_pk, pklen);
+- }
+- break;
+-#endif /* WITH_XMSS */
+- default:
+- ret = SSH_ERR_KEY_TYPE_UNKNOWN;
+- fail:
+- sshkey_free(pk);
+- return ret;
+- }
+- *dkp = pk;
+- return 0;
+-}
+-
+ /* Convert a plain key to their _CERT equivalent */
+ int
+ sshkey_to_certified(struct sshkey *k)
+@@ -2532,6 +2489,9 @@ sshkey_certify_custom(struct sshkey *k, struct sshkey *ca, const char *alg,
+ size_t i, ca_len, sig_len;
+ int ret = SSH_ERR_INTERNAL_ERROR;
+ struct sshbuf *cert;
++#ifdef WITH_OPENSSL
++ const BIGNUM *rsa_n, *rsa_e, *dsa_p, *dsa_q, *dsa_g, *dsa_pub_key;
++#endif /* WITH_OPENSSL */
+
+ if (k == NULL || k->cert == NULL ||
+ k->cert->certblob == NULL || ca == NULL)
+@@ -2558,10 +2518,12 @@ sshkey_certify_custom(struct sshkey *k, struct sshkey *ca, const char *alg,
+ switch (k->type) {
+ #ifdef WITH_OPENSSL
+ case KEY_DSA_CERT:
+- if ((ret = sshbuf_put_bignum2(cert, k->dsa->p)) != 0 ||
+- (ret = sshbuf_put_bignum2(cert, k->dsa->q)) != 0 ||
+- (ret = sshbuf_put_bignum2(cert, k->dsa->g)) != 0 ||
+- (ret = sshbuf_put_bignum2(cert, k->dsa->pub_key)) != 0)
++ DSA_get0_pqg(k->dsa, &dsa_p, &dsa_q, &dsa_g);
++ DSA_get0_key(k->dsa, &dsa_pub_key, NULL);
++ if ((ret = sshbuf_put_bignum2(cert, dsa_p)) != 0 ||
++ (ret = sshbuf_put_bignum2(cert, dsa_q)) != 0 ||
++ (ret = sshbuf_put_bignum2(cert, dsa_g)) != 0 ||
++ (ret = sshbuf_put_bignum2(cert, dsa_pub_key)) != 0)
+ goto out;
+ break;
+ # ifdef OPENSSL_HAS_ECC
+@@ -2575,8 +2537,9 @@ sshkey_certify_custom(struct sshkey *k, struct sshkey *ca, const char *alg,
+ break;
+ # endif /* OPENSSL_HAS_ECC */
+ case KEY_RSA_CERT:
+- if ((ret = sshbuf_put_bignum2(cert, k->rsa->e)) != 0 ||
+- (ret = sshbuf_put_bignum2(cert, k->rsa->n)) != 0)
++ RSA_get0_key(k->rsa, &rsa_n, &rsa_e, NULL);
++ if ((ret = sshbuf_put_bignum2(cert, rsa_e)) != 0 ||
++ (ret = sshbuf_put_bignum2(cert, rsa_n)) != 0)
+ goto out;
+ break;
+ #endif /* WITH_OPENSSL */
+@@ -2758,18 +2721,25 @@ sshkey_private_serialize_opt(const struct sshkey *key, struct sshbuf *b,
+ enum sshkey_serialize_rep opts)
+ {
+ int r = SSH_ERR_INTERNAL_ERROR;
++#ifdef WITH_OPENSSL
++ const BIGNUM *rsa_n, *rsa_e, *rsa_d, *rsa_iqmp, *rsa_p, *rsa_q;
++ const BIGNUM *dsa_p, *dsa_q, *dsa_g, *dsa_pub_key, *dsa_priv_key;
++#endif /* WITH_OPENSSL */
+
+ if ((r = sshbuf_put_cstring(b, sshkey_ssh_name(key))) != 0)
+ goto out;
+ switch (key->type) {
+ #ifdef WITH_OPENSSL
+ case KEY_RSA:
+- if ((r = sshbuf_put_bignum2(b, key->rsa->n)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->rsa->e)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->rsa->d)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->rsa->iqmp)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->rsa->p)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->rsa->q)) != 0)
++ RSA_get0_key(key->rsa, &rsa_n, &rsa_e, &rsa_d);
++ RSA_get0_factors(key->rsa, &rsa_p, &rsa_q);
++ RSA_get0_crt_params(key->rsa, NULL, NULL, &rsa_iqmp);
++ if ((r = sshbuf_put_bignum2(b, rsa_n)) != 0 ||
++ (r = sshbuf_put_bignum2(b, rsa_e)) != 0 ||
++ (r = sshbuf_put_bignum2(b, rsa_d)) != 0 ||
++ (r = sshbuf_put_bignum2(b, rsa_iqmp)) != 0 ||
++ (r = sshbuf_put_bignum2(b, rsa_p)) != 0 ||
++ (r = sshbuf_put_bignum2(b, rsa_q)) != 0)
+ goto out;
+ break;
+ case KEY_RSA_CERT:
+@@ -2777,19 +2747,24 @@ sshkey_private_serialize_opt(const struct sshkey *key, struct sshbuf *b,
+ r = SSH_ERR_INVALID_ARGUMENT;
+ goto out;
+ }
++ RSA_get0_key(key->rsa, NULL, NULL, &rsa_d);
++ RSA_get0_factors(key->rsa, &rsa_p, &rsa_q);
++ RSA_get0_crt_params(key->rsa, NULL, NULL, &rsa_iqmp);
+ if ((r = sshbuf_put_stringb(b, key->cert->certblob)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->rsa->d)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->rsa->iqmp)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->rsa->p)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->rsa->q)) != 0)
++ (r = sshbuf_put_bignum2(b, rsa_d)) != 0 ||
++ (r = sshbuf_put_bignum2(b, rsa_iqmp)) != 0 ||
++ (r = sshbuf_put_bignum2(b, rsa_p)) != 0 ||
++ (r = sshbuf_put_bignum2(b, rsa_q)) != 0)
+ goto out;
+ break;
+ case KEY_DSA:
+- if ((r = sshbuf_put_bignum2(b, key->dsa->p)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->dsa->q)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->dsa->g)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->dsa->pub_key)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->dsa->priv_key)) != 0)
++ DSA_get0_pqg(key->dsa, &dsa_p, &dsa_q, &dsa_g);
++ DSA_get0_key(key->dsa, &dsa_pub_key, &dsa_priv_key);
++ if ((r = sshbuf_put_bignum2(b, dsa_p)) != 0 ||
++ (r = sshbuf_put_bignum2(b, dsa_q)) != 0 ||
++ (r = sshbuf_put_bignum2(b, dsa_g)) != 0 ||
++ (r = sshbuf_put_bignum2(b, dsa_pub_key)) != 0 ||
++ (r = sshbuf_put_bignum2(b, dsa_priv_key)) != 0)
+ goto out;
+ break;
+ case KEY_DSA_CERT:
+@@ -2797,8 +2772,9 @@ sshkey_private_serialize_opt(const struct sshkey *key, struct sshbuf *b,
+ r = SSH_ERR_INVALID_ARGUMENT;
+ goto out;
+ }
++ DSA_get0_key(key->dsa, NULL, &dsa_priv_key);
+ if ((r = sshbuf_put_stringb(b, key->cert->certblob)) != 0 ||
+- (r = sshbuf_put_bignum2(b, key->dsa->priv_key)) != 0)
++ (r = sshbuf_put_bignum2(b, dsa_priv_key)) != 0)
+ goto out;
+ break;
+ # ifdef OPENSSL_HAS_ECC
+@@ -2899,6 +2875,10 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
+ u_char *xmss_pk = NULL, *xmss_sk = NULL;
+ #ifdef WITH_OPENSSL
+ BIGNUM *exponent = NULL;
++ BIGNUM *rsa_n = NULL, *rsa_e = NULL, *rsa_d = NULL;
++ BIGNUM *rsa_iqmp = NULL, *rsa_p = NULL, *rsa_q = NULL;
++ BIGNUM *dsa_p = NULL, *dsa_q = NULL, *dsa_g = NULL;
++ BIGNUM *dsa_pub_key = NULL, *dsa_priv_key = NULL;
+ #endif /* WITH_OPENSSL */
+
+ if (kp != NULL)
+@@ -2913,18 +2893,44 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
+ r = SSH_ERR_ALLOC_FAIL;
+ goto out;
+ }
+- if ((r = sshbuf_get_bignum2(buf, k->dsa->p)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->dsa->q)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->dsa->g)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->dsa->pub_key)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->dsa->priv_key)) != 0)
++ if ((dsa_p = BN_new()) == NULL ||
++ (dsa_q = BN_new()) == NULL ||
++ (dsa_g = BN_new()) == NULL ||
++ (dsa_pub_key = BN_new()) == NULL ||
++ (dsa_priv_key = BN_new()) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ if ((r = sshbuf_get_bignum2(buf, dsa_p)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, dsa_q)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, dsa_g)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, dsa_pub_key)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, dsa_priv_key)) != 0)
+ goto out;
++ if (!DSA_set0_pqg(k->dsa, dsa_p, dsa_q, dsa_g)) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ dsa_p = dsa_q = dsa_g = NULL; /* transferred */
++ if (!DSA_set0_key(k->dsa, dsa_pub_key, dsa_priv_key)) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ dsa_pub_key = dsa_priv_key = NULL; /* transferred */
+ break;
+ case KEY_DSA_CERT:
++ if ((dsa_priv_key = BN_new()) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
+ if ((r = sshkey_froms(buf, &k)) != 0 ||
+- (r = sshkey_add_private(k)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->dsa->priv_key)) != 0)
++ (r = sshbuf_get_bignum2(buf, dsa_priv_key)) != 0)
++ goto out;
++ if (!DSA_set0_key(k->dsa, NULL, dsa_priv_key)) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
+ goto out;
++ }
++ dsa_priv_key = NULL; /* transferred */
+ break;
+ # ifdef OPENSSL_HAS_ECC
+ case KEY_ECDSA:
+@@ -2965,7 +2971,6 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
+ goto out;
+ }
+ if ((r = sshkey_froms(buf, &k)) != 0 ||
+- (r = sshkey_add_private(k)) != 0 ||
+ (r = sshbuf_get_bignum2(buf, exponent)) != 0)
+ goto out;
+ if (EC_KEY_set_private_key(k->ecdsa, exponent) != 1) {
+@@ -2983,32 +2988,65 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
+ r = SSH_ERR_ALLOC_FAIL;
+ goto out;
+ }
+- if ((r = sshbuf_get_bignum2(buf, k->rsa->n)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->rsa->e)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->rsa->d)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->rsa->iqmp)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->rsa->p)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->rsa->q)) != 0 ||
+- (r = ssh_rsa_generate_additional_parameters(k)) != 0)
++ if ((rsa_n = BN_new()) == NULL ||
++ (rsa_e = BN_new()) == NULL ||
++ (rsa_d = BN_new()) == NULL ||
++ (rsa_iqmp = BN_new()) == NULL ||
++ (rsa_p = BN_new()) == NULL ||
++ (rsa_q = BN_new()) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
+ goto out;
+- if (BN_num_bits(k->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
+- r = SSH_ERR_KEY_LENGTH;
++ }
++ if ((r = sshbuf_get_bignum2(buf, rsa_n)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, rsa_e)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, rsa_d)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, rsa_iqmp)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, rsa_p)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, rsa_q)) != 0)
++ goto out;
++ if (!RSA_set0_key(k->rsa, rsa_n, rsa_e, rsa_d)) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
+ goto out;
+ }
++ rsa_n = rsa_e = rsa_d = NULL; /* transferred */
++ if (!RSA_set0_factors(k->rsa, rsa_p, rsa_q)) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ rsa_p = rsa_q = NULL; /* transferred */
++ if ((r = check_rsa_length(k->rsa)) != 0)
++ goto out;
++ if ((r = ssh_rsa_complete_crt_parameters(k, rsa_iqmp)) != 0)
++ goto out;
+ break;
+ case KEY_RSA_CERT:
++ if ((rsa_d = BN_new()) == NULL ||
++ (rsa_iqmp = BN_new()) == NULL ||
++ (rsa_p = BN_new()) == NULL ||
++ (rsa_q = BN_new()) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
+ if ((r = sshkey_froms(buf, &k)) != 0 ||
+- (r = sshkey_add_private(k)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->rsa->d)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->rsa->iqmp)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->rsa->p)) != 0 ||
+- (r = sshbuf_get_bignum2(buf, k->rsa->q)) != 0 ||
+- (r = ssh_rsa_generate_additional_parameters(k)) != 0)
++ (r = sshbuf_get_bignum2(buf, rsa_d)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, rsa_iqmp)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, rsa_p)) != 0 ||
++ (r = sshbuf_get_bignum2(buf, rsa_q)) != 0)
++ goto out;
++ if (!RSA_set0_key(k->rsa, NULL, NULL, rsa_d)) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
+ goto out;
+- if (BN_num_bits(k->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
+- r = SSH_ERR_KEY_LENGTH;
++ }
++ rsa_d = NULL; /* transferred */
++ if (!RSA_set0_factors(k->rsa, rsa_p, rsa_q)) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
+ goto out;
+ }
++ rsa_p = rsa_q = NULL; /* transferred */
++ if ((r = check_rsa_length(k->rsa)) != 0)
++ goto out;
++ if ((r = ssh_rsa_complete_crt_parameters(k, rsa_iqmp)) != 0)
++ goto out;
+ break;
+ #endif /* WITH_OPENSSL */
+ case KEY_ED25519:
+@@ -3029,7 +3067,6 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
+ break;
+ case KEY_ED25519_CERT:
+ if ((r = sshkey_froms(buf, &k)) != 0 ||
+- (r = sshkey_add_private(k)) != 0 ||
+ (r = sshbuf_get_string(buf, &ed25519_pk, &pklen)) != 0 ||
+ (r = sshbuf_get_string(buf, &ed25519_sk, &sklen)) != 0)
+ goto out;
+@@ -3066,7 +3103,6 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
+ break;
+ case KEY_XMSS_CERT:
+ if ((r = sshkey_froms(buf, &k)) != 0 ||
+- (r = sshkey_add_private(k)) != 0 ||
+ (r = sshbuf_get_cstring(buf, &xmss_name, NULL)) != 0 ||
+ (r = sshbuf_get_string(buf, &xmss_pk, &pklen)) != 0 ||
+ (r = sshbuf_get_string(buf, &xmss_sk, &sklen)) != 0)
+@@ -3115,6 +3151,17 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
+ free(curve);
+ #ifdef WITH_OPENSSL
+ BN_clear_free(exponent);
++ BN_clear_free(dsa_p);
++ BN_clear_free(dsa_q);
++ BN_clear_free(dsa_g);
++ BN_clear_free(dsa_pub_key);
++ BN_clear_free(dsa_priv_key);
++ BN_clear_free(rsa_n);
++ BN_clear_free(rsa_e);
++ BN_clear_free(rsa_d);
++ BN_clear_free(rsa_p);
++ BN_clear_free(rsa_q);
++ BN_clear_free(rsa_iqmp);
+ #endif /* WITH_OPENSSL */
+ sshkey_free(k);
+ freezero(ed25519_pk, pklen);
+@@ -3769,7 +3816,9 @@ translate_libcrypto_error(unsigned long pem_err)
+ switch (pem_reason) {
+ case EVP_R_BAD_DECRYPT:
+ return SSH_ERR_KEY_WRONG_PASSPHRASE;
++#ifdef EVP_R_BN_DECODE_ERROR
+ case EVP_R_BN_DECODE_ERROR:
++#endif
+ case EVP_R_DECODE_ERROR:
+ #ifdef EVP_R_PRIVATE_KEY_DECODE_ERROR
+ case EVP_R_PRIVATE_KEY_DECODE_ERROR:
+@@ -3834,7 +3883,7 @@ sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
+ r = convert_libcrypto_error();
+ goto out;
+ }
+- if (pk->type == EVP_PKEY_RSA &&
++ if (EVP_PKEY_base_id(pk) == EVP_PKEY_RSA &&
+ (type == KEY_UNSPEC || type == KEY_RSA)) {
+ if ((prv = sshkey_new(KEY_UNSPEC)) == NULL) {
+ r = SSH_ERR_ALLOC_FAIL;
+@@ -3849,11 +3898,9 @@ sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
+ r = SSH_ERR_LIBCRYPTO_ERROR;
+ goto out;
+ }
+- if (BN_num_bits(prv->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
+- r = SSH_ERR_KEY_LENGTH;
++ if ((r = check_rsa_length(prv->rsa)) != 0)
+ goto out;
+- }
+- } else if (pk->type == EVP_PKEY_DSA &&
++ } else if (EVP_PKEY_base_id(pk) == EVP_PKEY_DSA &&
+ (type == KEY_UNSPEC || type == KEY_DSA)) {
+ if ((prv = sshkey_new(KEY_UNSPEC)) == NULL) {
+ r = SSH_ERR_ALLOC_FAIL;
+@@ -3865,7 +3912,7 @@ sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
+ DSA_print_fp(stderr, prv->dsa, 8);
+ #endif
+ #ifdef OPENSSL_HAS_ECC
+- } else if (pk->type == EVP_PKEY_EC &&
++ } else if (EVP_PKEY_base_id(pk) == EVP_PKEY_EC &&
+ (type == KEY_UNSPEC || type == KEY_ECDSA)) {
+ if ((prv = sshkey_new(KEY_UNSPEC)) == NULL) {
+ r = SSH_ERR_ALLOC_FAIL;
+diff --git a/sshkey.h b/sshkey.h
+index 9060b2ec..922db5bb 100644
+--- a/sshkey.h
++++ b/sshkey.h
+@@ -39,6 +39,7 @@
+ # define EC_POINT void
+ # endif /* OPENSSL_HAS_ECC */
+ #else /* WITH_OPENSSL */
++# define BIGNUM void
+ # define RSA void
+ # define DSA void
+ # define EC_KEY void
+@@ -126,10 +127,8 @@ struct sshkey {
+ #define ED25519_PK_SZ crypto_sign_ed25519_PUBLICKEYBYTES
+
+ struct sshkey *sshkey_new(int);
+-int sshkey_add_private(struct sshkey *);
+-struct sshkey *sshkey_new_private(int);
++struct sshkey *sshkey_new_private(int); /* XXX garbage collect */
+ void sshkey_free(struct sshkey *);
+-int sshkey_demote(const struct sshkey *, struct sshkey **);
+ int sshkey_equal_public(const struct sshkey *,
+ const struct sshkey *);
+ int sshkey_equal(const struct sshkey *, const struct sshkey *);
+@@ -218,7 +217,7 @@ int sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type,
+ const char *passphrase, struct sshkey **keyp, char **commentp);
+
+ /* XXX should be internal, but used by ssh-keygen */
+-int ssh_rsa_generate_additional_parameters(struct sshkey *);
++int ssh_rsa_complete_crt_parameters(struct sshkey *, const BIGNUM *);
+
+ /* stateful keys (e.g. XMSS) */
+ #ifdef NO_ATTRIBUTE_ON_PROTOTYPE_ARGS
+--
+2.16.4
+
--- /dev/null
+From a294365f8524e6cc3bb82bdcb459e95d65226fce Mon Sep 17 00:00:00 2001
+From: Damien Miller <djm@mindrot.org>
+Date: Thu, 13 Sep 2018 12:13:50 +1000
+Subject: [PATCH 2/5] adapt -portable to OpenSSL 1.1x API
+
+Polyfill missing API with replacement functions extracted from LibreSSL
+---
+ auth-pam.c | 4 +
+ cipher.c | 38 ---
+ configure.ac | 112 +++++-
+ dh.c | 2 +
+ kexdh.c | 2 +
+ kexdhc.c | 2 +
+ kexdhs.c | 2 +
+ kexgex.c | 2 +
+ kexgexc.c | 2 +
+ kexgexs.c | 2 +
+ monitor.c | 4 +-
+ openbsd-compat/Makefile.in | 1 +
+ openbsd-compat/libressl-api-compat.c | 636 +++++++++++++++++++++++++++++++++++
+ openbsd-compat/openssl-compat.h | 136 ++++++++
+ ssh-dss.c | 2 +
+ ssh-ecdsa.c | 2 +
+ ssh-pkcs11-client.c | 2 +
+ ssh-pkcs11.c | 1 +
+ ssh-rsa.c | 2 +
+ sshkey.c | 3 +-
+ 20 files changed, 916 insertions(+), 41 deletions(-)
+ create mode 100644 openbsd-compat/libressl-api-compat.c
+
+diff --git a/auth-pam.c b/auth-pam.c
+index 8c013836..1dec53e9 100644
+--- a/auth-pam.c
++++ b/auth-pam.c
+@@ -128,6 +128,10 @@ extern u_int utmp_len;
+ typedef pthread_t sp_pthread_t;
+ #else
+ typedef pid_t sp_pthread_t;
++#define pthread_exit fake_pthread_exit
++#define pthread_create fake_pthread_create
++#define pthread_cancel fake_pthread_cancel
++#define pthread_join fake_pthread_join
+ #endif
+
+ struct pam_ctxt {
+diff --git a/cipher.c b/cipher.c
+index df43826e..12c59888 100644
+--- a/cipher.c
++++ b/cipher.c
+@@ -525,41 +525,3 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv, size_t len)
+ #endif
+ return 0;
+ }
+-
+-#ifdef WITH_OPENSSL
+-#define EVP_X_STATE(evp) (evp)->cipher_data
+-#define EVP_X_STATE_LEN(evp) (evp)->cipher->ctx_size
+-#endif
+-
+-int
+-cipher_get_keycontext(const struct sshcipher_ctx *cc, u_char *dat)
+-{
+-#if defined(WITH_OPENSSL) && !defined(OPENSSL_NO_RC4)
+- const struct sshcipher *c = cc->cipher;
+- int plen = 0;
+-
+- if (c->evptype == EVP_rc4) {
+- plen = EVP_X_STATE_LEN(cc->evp);
+- if (dat == NULL)
+- return (plen);
+- memcpy(dat, EVP_X_STATE(cc->evp), plen);
+- }
+- return (plen);
+-#else
+- return 0;
+-#endif
+-}
+-
+-void
+-cipher_set_keycontext(struct sshcipher_ctx *cc, const u_char *dat)
+-{
+-#if defined(WITH_OPENSSL) && !defined(OPENSSL_NO_RC4)
+- const struct sshcipher *c = cc->cipher;
+- int plen;
+-
+- if (c->evptype == EVP_rc4) {
+- plen = EVP_X_STATE_LEN(cc->evp);
+- memcpy(EVP_X_STATE(cc->evp), dat, plen);
+- }
+-#endif
+-}
+diff --git a/configure.ac b/configure.ac
+index 83e53075..c0e120fe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2602,9 +2602,10 @@ if test "x$openssl" = "xyes" ; then
+ AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")])
+ ;;
+ 100*) ;; # 1.0.x
++ 101*) ;; # 1.1.x
+ 200*) ;; # LibreSSL
+ *)
+- AC_MSG_ERROR([OpenSSL >= 1.1.0 is not yet supported (have "$ssl_library_ver")])
++ AC_MSG_ERROR([OpenSSL > 1.1.x is not yet supported (have "$ssl_library_ver")])
+ ;;
+ esac
+ AC_MSG_RESULT([$ssl_library_ver])
+@@ -2777,6 +2778,115 @@ if test "x$openssl" = "xyes" ; then
+ [AC_DEFINE([HAVE_EVP_CIPHER_CTX_CTRL], [1],
+ [Define if libcrypto has EVP_CIPHER_CTX_ctrl])])
+
++ # LibreSSL/OpenSSL 1.1x API
++ AC_SEARCH_LIBS([DH_get0_key], [crypto],
++ [AC_DEFINE([HAVE_DH_GET0_KEY], [1],
++ [Define if libcrypto has DH_get0_key])])
++ AC_SEARCH_LIBS([DH_get0_pqg], [crypto],
++ [AC_DEFINE([HAVE_DH_GET0_PQG], [1],
++ [Define if libcrypto has DH_get0_pqg])])
++ AC_SEARCH_LIBS([DH_set0_key], [crypto],
++ [AC_DEFINE([HAVE_DH_SET0_KEY], [1],
++ [Define if libcrypto has DH_set0_key])])
++ AC_SEARCH_LIBS([DH_set_length], [crypto],
++ [AC_DEFINE([HAVE_DH_SET_LENGTH], [1],
++ [Define if libcrypto has DH_set_length])])
++ AC_SEARCH_LIBS([DH_set0_pqg], [crypto],
++ [AC_DEFINE([HAVE_DH_SET0_PQG], [1],
++ [Define if libcrypto has DH_set0_pqg])])
++
++ AC_SEARCH_LIBS([DSA_get0_key], [crypto],
++ [AC_DEFINE([HAVE_DSA_GET0_KEY], [1],
++ [Define if libcrypto has DSA_get0_key])])
++ AC_SEARCH_LIBS([DSA_get0_pqg], [crypto],
++ [AC_DEFINE([HAVE_DSA_GET0_PQG], [1],
++ [Define if libcrypto has DSA_get0_pqg])])
++ AC_SEARCH_LIBS([DSA_set0_key], [crypto],
++ [AC_DEFINE([HAVE_DSA_SET0_KEY], [1],
++ [Define if libcrypto has DSA_set0_key])])
++ AC_SEARCH_LIBS([DSA_set0_pqg], [crypto],
++ [AC_DEFINE([HAVE_DSA_SET0_PQG], [1],
++ [Define if libcrypto has DSA_set0_pqg])])
++
++ AC_SEARCH_LIBS([DSA_SIG_get0], [crypto],
++ [AC_DEFINE([HAVE_DSA_SIG_GET0], [1],
++ [Define if libcrypto has DSA_SIG_get0])])
++ AC_SEARCH_LIBS([DSA_SIG_set0], [crypto],
++ [AC_DEFINE([HAVE_DSA_SIG_SET0], [1],
++ [Define if libcrypto has DSA_SIG_set0])])
++
++ AC_SEARCH_LIBS([ECDSA_SIG_get0], [crypto],
++ [AC_DEFINE([HAVE_ECDSA_SIG_GET0], [1],
++ [Define if libcrypto has ECDSA_SIG_get0])])
++ AC_SEARCH_LIBS([ECDSA_SIG_set0], [crypto],
++ [AC_DEFINE([HAVE_ECDSA_SIG_SET0], [1],
++ [Define if libcrypto has ECDSA_SIG_set0])])
++
++ AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv], [crypto],
++ [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV], [1],
++ [Define if libcrypto has EVP_CIPHER_CTX_iv])])
++ AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv_noconst], [crypto],
++ [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV_NOCONST], [1],
++ [Define if libcrypto has EVP_CIPHER_CTX_iv_noconst])])
++ AC_SEARCH_LIBS([EVP_CIPHER_CTX_get_iv], [crypto],
++ [AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1],
++ [Define if libcrypto has EVP_CIPHER_CTX_get_iv])])
++ AC_SEARCH_LIBS([EVP_CIPHER_CTX_set_iv], [crypto],
++ [AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1],
++ [Define if libcrypto has EVP_CIPHER_CTX_set_iv])])
++
++ AC_SEARCH_LIBS([RSA_get0_crt_params], [crypto],
++ [AC_DEFINE([HAVE_RSA_GET0_CRT_PARAMS], [1],
++ [Define if libcrypto has RSA_get0_crt_params])])
++ AC_SEARCH_LIBS([RSA_get0_factors], [crypto],
++ [AC_DEFINE([HAVE_RSA_GET0_FACTORS], [1],
++ [Define if libcrypto has RSA_get0_factors])])
++ AC_SEARCH_LIBS([RSA_get0_key], [crypto],
++ [AC_DEFINE([HAVE_RSA_GET0_KEY], [1],
++ [Define if libcrypto has RSA_get0_key])])
++ AC_SEARCH_LIBS([RSA_set0_crt_params], [crypto],
++ [AC_DEFINE([HAVE_RSA_SET0_CRT_PARAMS], [1],
++ [Define if libcrypto has RSA_get0_srt_params])])
++ AC_SEARCH_LIBS([RSA_set0_factors], [crypto],
++ [AC_DEFINE([HAVE_RSA_SET0_FACTORS], [1],
++ [Define if libcrypto has RSA_set0_factors])])
++ AC_SEARCH_LIBS([RSA_set0_key], [crypto],
++ [AC_DEFINE([HAVE_RSA_SET0_KEY], [1],
++ [Define if libcrypto has RSA_set0_key])])
++
++ AC_SEARCH_LIBS([RSA_meth_free], [crypto],
++ [AC_DEFINE([HAVE_RSA_METH_FREE], [1],
++ [Define if libcrypto has RSA_meth_free])])
++ AC_SEARCH_LIBS([RSA_meth_dup], [crypto],
++ [AC_DEFINE([HAVE_RSA_METH_DUP], [1],
++ [Define if libcrypto has RSA_meth_dup])])
++ AC_SEARCH_LIBS([RSA_meth_set1_name], [crypto],
++ [AC_DEFINE([HAVE_RSA_METH_SET1_NAME], [1],
++ [Define if libcrypto has RSA_meth_set1_name])])
++ AC_SEARCH_LIBS([RSA_meth_get_finish], [crypto],
++ [AC_DEFINE([HAVE_RSA_METH_GET_FINISH], [1],
++ [Define if libcrypto has RSA_meth_get_finish])])
++ AC_SEARCH_LIBS([RSA_meth_set_priv_enc], [crypto],
++ [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_ENC], [1],
++ [Define if libcrypto has RSA_meth_set_priv_enc])])
++ AC_SEARCH_LIBS([RSA_meth_set_priv_dec], [crypto],
++ [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_DEC], [1],
++ [Define if libcrypto has RSA_meth_set_priv_dec])])
++ AC_SEARCH_LIBS([RSA_meth_set_finish], [crypto],
++ [AC_DEFINE([HAVE_RSA_METH_SET_FINISH], [1],
++ [Define if libcrypto has RSA_meth_set_finish])])
++
++ AC_SEARCH_LIBS([EVP_PKEY_get0_RSA], [crypto],
++ [AC_DEFINE([HAVE_EVP_PKEY_GET0_RSA], [1],
++ [Define if libcrypto has EVP_PKEY_get0_RSA])])
++
++ AC_SEARCH_LIBS([EVP_MD_CTX_new], [crypto],
++ [AC_DEFINE([HAVE_EVP_MD_CTX_NEW], [1],
++ [Define if libcrypto has EVP_MD_CTX_new])])
++ AC_SEARCH_LIBS([EVP_MD_CTX_free], [crypto],
++ [AC_DEFINE([HAVE_EVP_MD_CTX_FREE], [1],
++ [Define if libcrypto has EVP_MD_CTX_free])])
++
+ AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+diff --git a/dh.c b/dh.c
+index d0d4527b..f3ed3882 100644
+--- a/dh.c
++++ b/dh.c
+@@ -43,6 +43,8 @@
+ #include "misc.h"
+ #include "ssherr.h"
+
++#include "openbsd-compat/openssl-compat.h"
++
+ static int
+ parse_prime(int linenum, char *line, struct dhgroup *dhg)
+ {
+diff --git a/kexdh.c b/kexdh.c
+index 0bf0dc13..e6925b18 100644
+--- a/kexdh.c
++++ b/kexdh.c
+@@ -33,6 +33,8 @@
+
+ #include <openssl/evp.h>
+
++#include "openbsd-compat/openssl-compat.h"
++
+ #include "ssh2.h"
+ #include "sshkey.h"
+ #include "cipher.h"
+diff --git a/kexdhc.c b/kexdhc.c
+index a8b74247..8b56377a 100644
+--- a/kexdhc.c
++++ b/kexdhc.c
+@@ -36,6 +36,8 @@
+ #include <string.h>
+ #include <signal.h>
+
++#include "openbsd-compat/openssl-compat.h"
++
+ #include "sshkey.h"
+ #include "cipher.h"
+ #include "digest.h"
+diff --git a/kexdhs.c b/kexdhs.c
+index 8367c6c3..337aab5b 100644
+--- a/kexdhs.c
++++ b/kexdhs.c
+@@ -35,6 +35,8 @@
+
+ #include <openssl/dh.h>
+
++#include "openbsd-compat/openssl-compat.h"
++
+ #include "sshkey.h"
+ #include "cipher.h"
+ #include "digest.h"
+diff --git a/kexgex.c b/kexgex.c
+index 8b0d8333..3ca4bd37 100644
+--- a/kexgex.c
++++ b/kexgex.c
+@@ -33,6 +33,8 @@
+ #include <openssl/evp.h>
+ #include <signal.h>
+
++#include "openbsd-compat/openssl-compat.h"
++
+ #include "sshkey.h"
+ #include "cipher.h"
+ #include "kex.h"
+diff --git a/kexgexc.c b/kexgexc.c
+index 955bc837..0d07f73c 100644
+--- a/kexgexc.c
++++ b/kexgexc.c
+@@ -37,6 +37,8 @@
+ #include <string.h>
+ #include <signal.h>
+
++#include "openbsd-compat/openssl-compat.h"
++
+ #include "sshkey.h"
+ #include "cipher.h"
+ #include "digest.h"
+diff --git a/kexgexs.c b/kexgexs.c
+index 2a4aa7e8..ce934f88 100644
+--- a/kexgexs.c
++++ b/kexgexs.c
+@@ -36,6 +36,8 @@
+
+ #include <openssl/dh.h>
+
++#include "openbsd-compat/openssl-compat.h"
++
+ #include "sshkey.h"
+ #include "cipher.h"
+ #include "digest.h"
+diff --git a/monitor.c b/monitor.c
+index b30813b4..531b2993 100644
+--- a/monitor.c
++++ b/monitor.c
+@@ -29,7 +29,6 @@
+
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-#include "openbsd-compat/sys-tree.h"
+ #include <sys/wait.h>
+
+ #include <errno.h>
+@@ -60,7 +59,10 @@
+ #include <openssl/dh.h>
+ #endif
+
++#include "openbsd-compat/sys-tree.h"
+ #include "openbsd-compat/sys-queue.h"
++#include "openbsd-compat/openssl-compat.h"
++
+ #include "atomicio.h"
+ #include "xmalloc.h"
+ #include "ssh.h"
+diff --git a/openbsd-compat/Makefile.in b/openbsd-compat/Makefile.in
+index 2fd9b952..c1e14cbd 100644
+--- a/openbsd-compat/Makefile.in
++++ b/openbsd-compat/Makefile.in
+@@ -85,6 +85,7 @@ COMPAT= arc4random.o \
+ getrrsetbyname-ldns.o \
+ kludge-fd_set.o \
+ openssl-compat.o \
++ libressl-api-compat.o \
+ xcrypt.o
+
+ PORTS= port-aix.o \
+diff --git a/openbsd-compat/libressl-api-compat.c b/openbsd-compat/libressl-api-compat.c
+new file mode 100644
+index 00000000..de3e64a6
+--- /dev/null
++++ b/openbsd-compat/libressl-api-compat.c
+@@ -0,0 +1,636 @@
++/* $OpenBSD: dsa_lib.c,v 1.29 2018/04/14 07:09:21 tb Exp $ */
++/* $OpenBSD: rsa_lib.c,v 1.37 2018/04/14 07:09:21 tb Exp $ */
++/* $OpenBSD: evp_lib.c,v 1.17 2018/09/12 06:35:38 djm Exp $ */
++/* $OpenBSD: dh_lib.c,v 1.32 2018/05/02 15:48:38 tb Exp $ */
++/* $OpenBSD: p_lib.c,v 1.24 2018/05/30 15:40:50 tb Exp $ */
++/* $OpenBSD: digest.c,v 1.30 2018/04/14 07:09:21 tb Exp $ */
++/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
++ * All rights reserved.
++ *
++ * This package is an SSL implementation written
++ * by Eric Young (eay@cryptsoft.com).
++ * The implementation was written so as to conform with Netscapes SSL.
++ *
++ * This library is free for commercial and non-commercial use as long as
++ * the following conditions are aheared to. The following conditions
++ * apply to all code found in this distribution, be it the RC4, RSA,
++ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
++ * included with this distribution is covered by the same copyright terms
++ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
++ *
++ * Copyright remains Eric Young's, and as such any Copyright notices in
++ * the code are not to be removed.
++ * If this package is used in a product, Eric Young should be given attribution
++ * as the author of the parts of the library used.
++ * This can be in the form of a textual message at program startup or
++ * in documentation (online or textual) provided with the package.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. All advertising materials mentioning features or use of this software
++ * must display the following acknowledgement:
++ * "This product includes cryptographic software written by
++ * Eric Young (eay@cryptsoft.com)"
++ * The word 'cryptographic' can be left out if the rouines from the library
++ * being used are not cryptographic related :-).
++ * 4. If you include any Windows specific code (or a derivative thereof) from
++ * the apps directory (application code) you must include an acknowledgement:
++ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
++ *
++ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ * The licence and distribution terms for any publically available version or
++ * derivative of this code cannot be changed. i.e. this code cannot simply be
++ * copied and put under another distribution licence
++ * [including the GNU Public Licence.]
++ */
++
++/* $OpenBSD: dsa_asn1.c,v 1.22 2018/06/14 17:03:19 jsing Exp $ */
++/* $OpenBSD: ecs_asn1.c,v 1.9 2018/03/17 15:24:44 tb Exp $ */
++/* $OpenBSD: digest.c,v 1.30 2018/04/14 07:09:21 tb Exp $ */
++/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
++ * project 2000.
++ */
++/* ====================================================================
++ * Copyright (c) 2000-2005 The OpenSSL Project. All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ *
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ *
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in
++ * the documentation and/or other materials provided with the
++ * distribution.
++ *
++ * 3. All advertising materials mentioning features or use of this
++ * software must display the following acknowledgment:
++ * "This product includes software developed by the OpenSSL Project
++ * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
++ *
++ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
++ * endorse or promote products derived from this software without
++ * prior written permission. For written permission, please contact
++ * licensing@OpenSSL.org.
++ *
++ * 5. Products derived from this software may not be called "OpenSSL"
++ * nor may "OpenSSL" appear in their names without prior written
++ * permission of the OpenSSL Project.
++ *
++ * 6. Redistributions of any form whatsoever must retain the following
++ * acknowledgment:
++ * "This product includes software developed by the OpenSSL Project
++ * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
++ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
++ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
++ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
++ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
++ * OF THE POSSIBILITY OF SUCH DAMAGE.
++ * ====================================================================
++ *
++ * This product includes cryptographic software written by Eric Young
++ * (eay@cryptsoft.com). This product includes software written by Tim
++ * Hudson (tjh@cryptsoft.com).
++ *
++ */
++
++/* $OpenBSD: rsa_meth.c,v 1.2 2018/09/12 06:35:38 djm Exp $ */
++/*
++ * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#include "includes.h"
++
++#ifdef WITH_OPENSSL
++
++#include <sys/types.h>
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <openssl/err.h>
++#include <openssl/bn.h>
++#include <openssl/dsa.h>
++#include <openssl/rsa.h>
++#include <openssl/evp.h>
++#include <openssl/ecdsa.h>
++#include <openssl/dh.h>
++
++#ifndef HAVE_DSA_GET0_PQG
++void
++DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
++{
++ if (p != NULL)
++ *p = d->p;
++ if (q != NULL)
++ *q = d->q;
++ if (g != NULL)
++ *g = d->g;
++}
++#endif /* HAVE_DSA_GET0_PQG */
++
++#ifndef HAVE_DSA_SET0_PQG
++int
++DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g)
++{
++ if ((d->p == NULL && p == NULL) || (d->q == NULL && q == NULL) ||
++ (d->g == NULL && g == NULL))
++ return 0;
++
++ if (p != NULL) {
++ BN_free(d->p);
++ d->p = p;
++ }
++ if (q != NULL) {
++ BN_free(d->q);
++ d->q = q;
++ }
++ if (g != NULL) {
++ BN_free(d->g);
++ d->g = g;
++ }
++
++ return 1;
++}
++#endif /* HAVE_DSA_SET0_PQG */
++
++#ifndef HAVE_DSA_GET0_KEY
++void
++DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key)
++{
++ if (pub_key != NULL)
++ *pub_key = d->pub_key;
++ if (priv_key != NULL)
++ *priv_key = d->priv_key;
++}
++#endif /* HAVE_DSA_GET0_KEY */
++
++#ifndef HAVE_DSA_SET0_KEY
++int
++DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
++{
++ if (d->pub_key == NULL && pub_key == NULL)
++ return 0;
++
++ if (pub_key != NULL) {
++ BN_free(d->pub_key);
++ d->pub_key = pub_key;
++ }
++ if (priv_key != NULL) {
++ BN_free(d->priv_key);
++ d->priv_key = priv_key;
++ }
++
++ return 1;
++}
++#endif /* HAVE_DSA_SET0_KEY */
++
++#ifndef HAVE_RSA_GET0_KEY
++void
++RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
++{
++ if (n != NULL)
++ *n = r->n;
++ if (e != NULL)
++ *e = r->e;
++ if (d != NULL)
++ *d = r->d;
++}
++#endif /* HAVE_RSA_GET0_KEY */
++
++#ifndef HAVE_RSA_SET0_KEY
++int
++RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
++{
++ if ((r->n == NULL && n == NULL) || (r->e == NULL && e == NULL))
++ return 0;
++
++ if (n != NULL) {
++ BN_free(r->n);
++ r->n = n;
++ }
++ if (e != NULL) {
++ BN_free(r->e);
++ r->e = e;
++ }
++ if (d != NULL) {
++ BN_free(r->d);
++ r->d = d;
++ }
++
++ return 1;
++}
++#endif /* HAVE_RSA_SET0_KEY */
++
++#ifndef HAVE_RSA_GET0_CRT_PARAMS
++void
++RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1,
++ const BIGNUM **iqmp)
++{
++ if (dmp1 != NULL)
++ *dmp1 = r->dmp1;
++ if (dmq1 != NULL)
++ *dmq1 = r->dmq1;
++ if (iqmp != NULL)
++ *iqmp = r->iqmp;
++}
++#endif /* HAVE_RSA_GET0_CRT_PARAMS */
++
++#ifndef HAVE_RSA_SET0_CRT_PARAMS
++int
++RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp)
++{
++ if ((r->dmp1 == NULL && dmp1 == NULL) ||
++ (r->dmq1 == NULL && dmq1 == NULL) ||
++ (r->iqmp == NULL && iqmp == NULL))
++ return 0;
++
++ if (dmp1 != NULL) {
++ BN_free(r->dmp1);
++ r->dmp1 = dmp1;
++ }
++ if (dmq1 != NULL) {
++ BN_free(r->dmq1);
++ r->dmq1 = dmq1;
++ }
++ if (iqmp != NULL) {
++ BN_free(r->iqmp);
++ r->iqmp = iqmp;
++ }
++
++ return 1;
++}
++#endif /* HAVE_RSA_SET0_CRT_PARAMS */
++
++#ifndef HAVE_RSA_GET0_FACTORS
++void
++RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q)
++{
++ if (p != NULL)
++ *p = r->p;
++ if (q != NULL)
++ *q = r->q;
++}
++#endif /* HAVE_RSA_GET0_FACTORS */
++
++#ifndef HAVE_RSA_SET0_FACTORS
++int
++RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q)
++{
++ if ((r->p == NULL && p == NULL) || (r->q == NULL && q == NULL))
++ return 0;
++
++ if (p != NULL) {
++ BN_free(r->p);
++ r->p = p;
++ }
++ if (q != NULL) {
++ BN_free(r->q);
++ r->q = q;
++ }
++
++ return 1;
++}
++#endif /* HAVE_RSA_SET0_FACTORS */
++
++#ifndef HAVE_EVP_CIPHER_CTX_GET_IV
++int
++EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, unsigned char *iv, size_t len)
++{
++ if (ctx == NULL)
++ return 0;
++ if (EVP_CIPHER_CTX_iv_length(ctx) < 0)
++ return 0;
++ if (len != (size_t)EVP_CIPHER_CTX_iv_length(ctx))
++ return 0;
++ if (len > EVP_MAX_IV_LENGTH)
++ return 0; /* sanity check; shouldn't happen */
++ /*
++ * Skip the memcpy entirely when the requested IV length is zero,
++ * since the iv pointer may be NULL or invalid.
++ */
++ if (len != 0) {
++ if (iv == NULL)
++ return 0;
++# ifdef HAVE_EVP_CIPHER_CTX_IV
++ memcpy(iv, EVP_CIPHER_CTX_iv(ctx), len);
++# else
++ memcpy(iv, ctx->iv, len);
++# endif /* HAVE_EVP_CIPHER_CTX_IV */
++ }
++ return 1;
++}
++#endif /* HAVE_EVP_CIPHER_CTX_GET_IV */
++
++#ifndef HAVE_EVP_CIPHER_CTX_SET_IV
++int
++EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len)
++{
++ if (ctx == NULL)
++ return 0;
++ if (EVP_CIPHER_CTX_iv_length(ctx) < 0)
++ return 0;
++ if (len != (size_t)EVP_CIPHER_CTX_iv_length(ctx))
++ return 0;
++ if (len > EVP_MAX_IV_LENGTH)
++ return 0; /* sanity check; shouldn't happen */
++ /*
++ * Skip the memcpy entirely when the requested IV length is zero,
++ * since the iv pointer may be NULL or invalid.
++ */
++ if (len != 0) {
++ if (iv == NULL)
++ return 0;
++# ifdef HAVE_EVP_CIPHER_CTX_IV_NOCONST
++ memcpy(EVP_CIPHER_CTX_iv_noconst(ctx), iv, len);
++# else
++ memcpy(ctx->iv, iv, len);
++# endif /* HAVE_EVP_CIPHER_CTX_IV_NOCONST */
++ }
++ return 1;
++}
++#endif /* HAVE_EVP_CIPHER_CTX_SET_IV */
++
++#ifndef HAVE_DSA_SIG_GET0
++void
++DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
++{
++ if (pr != NULL)
++ *pr = sig->r;
++ if (ps != NULL)
++ *ps = sig->s;
++}
++#endif /* HAVE_DSA_SIG_GET0 */
++
++#ifndef HAVE_DSA_SIG_SET0
++int
++DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
++{
++ if (r == NULL || s == NULL)
++ return 0;
++
++ BN_clear_free(sig->r);
++ sig->r = r;
++ BN_clear_free(sig->s);
++ sig->s = s;
++
++ return 1;
++}
++#endif /* HAVE_DSA_SIG_SET0 */
++
++#ifndef HAVE_ECDSA_SIG_GET0
++void
++ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
++{
++ if (pr != NULL)
++ *pr = sig->r;
++ if (ps != NULL)
++ *ps = sig->s;
++}
++#endif /* HAVE_ECDSA_SIG_GET0 */
++
++#ifndef HAVE_ECDSA_SIG_SET0
++int
++ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
++{
++ if (r == NULL || s == NULL)
++ return 0;
++
++ BN_clear_free(sig->r);
++ BN_clear_free(sig->s);
++ sig->r = r;
++ sig->s = s;
++ return 1;
++}
++#endif /* HAVE_ECDSA_SIG_SET0 */
++
++#ifndef HAVE_DH_GET0_PQG
++void
++DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
++{
++ if (p != NULL)
++ *p = dh->p;
++ if (q != NULL)
++ *q = dh->q;
++ if (g != NULL)
++ *g = dh->g;
++}
++#endif /* HAVE_DH_GET0_PQG */
++
++#ifndef HAVE_DH_SET0_PQG
++int
++DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
++{
++ if ((dh->p == NULL && p == NULL) || (dh->g == NULL && g == NULL))
++ return 0;
++
++ if (p != NULL) {
++ BN_free(dh->p);
++ dh->p = p;
++ }
++ if (q != NULL) {
++ BN_free(dh->q);
++ dh->q = q;
++ }
++ if (g != NULL) {
++ BN_free(dh->g);
++ dh->g = g;
++ }
++
++ return 1;
++}
++#endif /* HAVE_DH_SET0_PQG */
++
++#ifndef HAVE_DH_GET0_KEY
++void
++DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
++{
++ if (pub_key != NULL)
++ *pub_key = dh->pub_key;
++ if (priv_key != NULL)
++ *priv_key = dh->priv_key;
++}
++#endif /* HAVE_DH_GET0_KEY */
++
++#ifndef HAVE_DH_SET0_KEY
++int
++DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
++{
++ if (pub_key != NULL) {
++ BN_free(dh->pub_key);
++ dh->pub_key = pub_key;
++ }
++ if (priv_key != NULL) {
++ BN_free(dh->priv_key);
++ dh->priv_key = priv_key;
++ }
++
++ return 1;
++}
++#endif /* HAVE_DH_SET0_KEY */
++
++#ifndef HAVE_DH_SET_LENGTH
++int
++DH_set_length(DH *dh, long length)
++{
++ if (length < 0 || length > INT_MAX)
++ return 0;
++
++ dh->length = length;
++ return 1;
++}
++#endif /* HAVE_DH_SET_LENGTH */
++
++#ifndef HAVE_RSA_METH_FREE
++void
++RSA_meth_free(RSA_METHOD *meth)
++{
++ if (meth != NULL) {
++ free((char *)meth->name);
++ free(meth);
++ }
++}
++#endif /* HAVE_RSA_METH_FREE */
++
++#ifndef HAVE_RSA_METH_DUP
++RSA_METHOD *
++RSA_meth_dup(const RSA_METHOD *meth)
++{
++ RSA_METHOD *copy;
++
++ if ((copy = calloc(1, sizeof(*copy))) == NULL)
++ return NULL;
++ memcpy(copy, meth, sizeof(*copy));
++ if ((copy->name = strdup(meth->name)) == NULL) {
++ free(copy);
++ return NULL;
++ }
++
++ return copy;
++}
++#endif /* HAVE_RSA_METH_DUP */
++
++#ifndef HAVE_RSA_METH_SET1_NAME
++int
++RSA_meth_set1_name(RSA_METHOD *meth, const char *name)
++{
++ char *copy;
++
++ if ((copy = strdup(name)) == NULL)
++ return 0;
++ free((char *)meth->name);
++ meth->name = copy;
++ return 1;
++}
++#endif /* HAVE_RSA_METH_SET1_NAME */
++
++#ifndef HAVE_RSA_METH_GET_FINISH
++int
++(*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa)
++{
++ return meth->finish;
++}
++#endif /* HAVE_RSA_METH_GET_FINISH */
++
++#ifndef HAVE_RSA_METH_SET_PRIV_ENC
++int
++RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen,
++ const unsigned char *from, unsigned char *to, RSA *rsa, int padding))
++{
++ meth->rsa_priv_enc = priv_enc;
++ return 1;
++}
++#endif /* HAVE_RSA_METH_SET_PRIV_ENC */
++
++#ifndef HAVE_RSA_METH_SET_PRIV_DEC
++int
++RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen,
++ const unsigned char *from, unsigned char *to, RSA *rsa, int padding))
++{
++ meth->rsa_priv_dec = priv_dec;
++ return 1;
++}
++#endif /* HAVE_RSA_METH_SET_PRIV_DEC */
++
++#ifndef HAVE_RSA_METH_SET_FINISH
++int
++RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa))
++{
++ meth->finish = finish;
++ return 1;
++}
++#endif /* HAVE_RSA_METH_SET_FINISH */
++
++#ifndef HAVE_EVP_PKEY_GET0_RSA
++RSA *
++EVP_PKEY_get0_RSA(EVP_PKEY *pkey)
++{
++ if (pkey->type != EVP_PKEY_RSA) {
++ /* EVPerror(EVP_R_EXPECTING_AN_RSA_KEY); */
++ return NULL;
++ }
++ return pkey->pkey.rsa;
++}
++#endif /* HAVE_EVP_PKEY_GET0_RSA */
++
++#ifndef HAVE_EVP_MD_CTX_NEW
++EVP_MD_CTX *
++EVP_MD_CTX_new(void)
++{
++ return calloc(1, sizeof(EVP_MD_CTX));
++}
++#endif /* HAVE_EVP_MD_CTX_NEW */
++
++#ifndef HAVE_EVP_MD_CTX_FREE
++void
++EVP_MD_CTX_free(EVP_MD_CTX *ctx)
++{
++ if (ctx == NULL)
++ return;
++
++ EVP_MD_CTX_cleanup(ctx);
++
++ free(ctx);
++}
++#endif /* HAVE_EVP_MD_CTX_FREE */
++
++#endif /* WITH_OPENSSL */
+diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
+index 2ae42bac..9e0264c0 100644
+--- a/openbsd-compat/openssl-compat.h
++++ b/openbsd-compat/openssl-compat.h
+@@ -24,6 +24,8 @@
+ #include <openssl/evp.h>
+ #include <openssl/rsa.h>
+ #include <openssl/dsa.h>
++#include <openssl/ecdsa.h>
++#include <openssl/dh.h>
+
+ int ssh_compatible_openssl(long, long);
+
+@@ -96,5 +98,139 @@ void ssh_OpenSSL_add_all_algorithms(void);
+
+ #endif /* SSH_DONT_OVERLOAD_OPENSSL_FUNCS */
+
++/* LibreSSL/OpenSSL 1.1x API compat */
++#ifndef HAVE_DSA_GET0_PQG
++void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q,
++ const BIGNUM **g);
++#endif /* HAVE_DSA_GET0_PQG */
++
++#ifndef HAVE_DSA_SET0_PQG
++int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
++#endif /* HAVE_DSA_SET0_PQG */
++
++#ifndef HAVE_DSA_GET0_KEY
++void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
++ const BIGNUM **priv_key);
++#endif /* HAVE_DSA_GET0_KEY */
++
++#ifndef HAVE_DSA_SET0_KEY
++int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key);
++#endif /* HAVE_DSA_SET0_KEY */
++
++#ifndef HAVE_EVP_CIPHER_CTX_GET_IV
++int EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx,
++ unsigned char *iv, size_t len);
++#endif /* HAVE_EVP_CIPHER_CTX_GET_IV */
++
++#ifndef HAVE_EVP_CIPHER_CTX_SET_IV
++int EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx,
++ const unsigned char *iv, size_t len);
++#endif /* HAVE_EVP_CIPHER_CTX_SET_IV */
++
++#ifndef HAVE_RSA_GET0_KEY
++void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e,
++ const BIGNUM **d);
++#endif /* HAVE_RSA_GET0_KEY */
++
++#ifndef HAVE_RSA_SET0_KEY
++int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
++#endif /* HAVE_RSA_SET0_KEY */
++
++#ifndef HAVE_RSA_GET0_CRT_PARAMS
++void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1,
++ const BIGNUM **iqmp);
++#endif /* HAVE_RSA_GET0_CRT_PARAMS */
++
++#ifndef HAVE_RSA_SET0_CRT_PARAMS
++int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp);
++#endif /* HAVE_RSA_SET0_CRT_PARAMS */
++
++#ifndef HAVE_RSA_GET0_FACTORS
++void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q);
++#endif /* HAVE_RSA_GET0_FACTORS */
++
++#ifndef HAVE_RSA_SET0_FACTORS
++int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
++#endif /* HAVE_RSA_SET0_FACTORS */
++
++#ifndef DSA_SIG_GET0
++void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
++#endif /* DSA_SIG_GET0 */
++
++#ifndef DSA_SIG_SET0
++int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
++#endif /* DSA_SIG_SET0 */
++
++#ifndef HAVE_ECDSA_SIG_GET0
++void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
++#endif /* HAVE_ECDSA_SIG_GET0 */
++
++#ifndef HAVE_ECDSA_SIG_SET0
++int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
++#endif /* HAVE_ECDSA_SIG_SET0 */
++
++#ifndef HAVE_DH_GET0_PQG
++void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,
++ const BIGNUM **g);
++#endif /* HAVE_DH_GET0_PQG */
++
++#ifndef HAVE_DH_SET0_PQG
++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
++#endif /* HAVE_DH_SET0_PQG */
++
++#ifndef HAVE_DH_GET0_KEY
++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);
++#endif /* HAVE_DH_GET0_KEY */
++
++#ifndef HAVE_DH_SET0_KEY
++int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
++#endif /* HAVE_DH_SET0_KEY */
++
++#ifndef HAVE_DH_SET_LENGTH
++int DH_set_length(DH *dh, long length);
++#endif /* HAVE_DH_SET_LENGTH */
++
++#ifndef HAVE_RSA_METH_FREE
++void RSA_meth_free(RSA_METHOD *meth);
++#endif /* HAVE_RSA_METH_FREE */
++
++#ifndef HAVE_RSA_METH_DUP
++RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
++#endif /* HAVE_RSA_METH_DUP */
++
++#ifndef HAVE_RSA_METH_SET1_NAME
++int RSA_meth_set1_name(RSA_METHOD *meth, const char *name);
++#endif /* HAVE_RSA_METH_SET1_NAME */
++
++#ifndef HAVE_RSA_METH_GET_FINISH
++int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa);
++#endif /* HAVE_RSA_METH_GET_FINISH */
++
++#ifndef HAVE_RSA_METH_SET_PRIV_ENC
++int RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen,
++ const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
++#endif /* HAVE_RSA_METH_SET_PRIV_ENC */
++
++#ifndef HAVE_RSA_METH_SET_PRIV_DEC
++int RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen,
++ const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
++#endif /* HAVE_RSA_METH_SET_PRIV_DEC */
++
++#ifndef HAVE_RSA_METH_SET_FINISH
++int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa));
++#endif /* HAVE_RSA_METH_SET_FINISH */
++
++#ifndef HAVE_EVP_PKEY_GET0_RSA
++RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey);
++#endif /* HAVE_EVP_PKEY_GET0_RSA */
++
++#ifndef HAVE_EVP_MD_CTX_new
++EVP_MD_CTX *EVP_MD_CTX_new(void);
++#endif /* HAVE_EVP_MD_CTX_new */
++
++#ifndef HAVE_EVP_MD_CTX_free
++void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
++#endif /* HAVE_EVP_MD_CTX_free */
++
+ #endif /* WITH_OPENSSL */
+ #endif /* _OPENSSL_COMPAT_H */
+diff --git a/ssh-dss.c b/ssh-dss.c
+index 631b1571..a23c383d 100644
+--- a/ssh-dss.c
++++ b/ssh-dss.c
+@@ -43,6 +43,8 @@
+ #define SSHKEY_INTERNAL
+ #include "sshkey.h"
+
++#include "openbsd-compat/openssl-compat.h"
++
+ #define INTBLOB_LEN 20
+ #define SIGBLOB_LEN (2*INTBLOB_LEN)
+
+diff --git a/ssh-ecdsa.c b/ssh-ecdsa.c
+index 9e92af04..2f553175 100644
+--- a/ssh-ecdsa.c
++++ b/ssh-ecdsa.c
+@@ -43,6 +43,8 @@
+ #define SSHKEY_INTERNAL
+ #include "sshkey.h"
+
++#include "openbsd-compat/openssl-compat.h"
++
+ /* ARGSUSED */
+ int
+ ssh_ecdsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
+diff --git a/ssh-pkcs11-client.c b/ssh-pkcs11-client.c
+index bcc18c6b..d1241ce6 100644
+--- a/ssh-pkcs11-client.c
++++ b/ssh-pkcs11-client.c
+@@ -32,6 +32,8 @@
+
+ #include <openssl/rsa.h>
+
++#include "openbsd-compat/openssl-compat.h"
++
+ #include "pathnames.h"
+ #include "xmalloc.h"
+ #include "sshbuf.h"
+diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
+index c35f9415..775de964 100644
+--- a/ssh-pkcs11.c
++++ b/ssh-pkcs11.c
+@@ -30,6 +30,7 @@
+ #include <dlfcn.h>
+
+ #include "openbsd-compat/sys-queue.h"
++#include "openbsd-compat/openssl-compat.h"
+
+ #include <openssl/x509.h>
+
+diff --git a/ssh-rsa.c b/ssh-rsa.c
+index 2788f334..9b14f9a9 100644
+--- a/ssh-rsa.c
++++ b/ssh-rsa.c
+@@ -35,6 +35,8 @@
+ #include "digest.h"
+ #include "log.h"
+
++#include "openbsd-compat/openssl-compat.h"
++
+ static int openssh_RSA_verify(int, u_char *, size_t, u_char *, size_t, RSA *);
+
+ static const char *
+diff --git a/sshkey.c b/sshkey.c
+index a5e6e60e..18b253d9 100644
+--- a/sshkey.c
++++ b/sshkey.c
+@@ -60,6 +60,8 @@
+
+ #include "xmss_fast.h"
+
++#include "openbsd-compat/openssl-compat.h"
++
+ /* openssh private key file format */
+ #define MARK_BEGIN "-----BEGIN OPENSSH PRIVATE KEY-----\n"
+ #define MARK_END "-----END OPENSSH PRIVATE KEY-----\n"
+@@ -1727,7 +1729,6 @@ int
+ sshkey_from_private(const struct sshkey *k, struct sshkey **pkp)
+ {
+ struct sshkey *n = NULL;
+- int ret = SSH_ERR_INTERNAL_ERROR;
+ int r = SSH_ERR_INTERNAL_ERROR;
+ #ifdef WITH_OPENSSL
+ const BIGNUM *rsa_n, *rsa_e;
+--
+2.16.4
+
--- /dev/null
+From 14a6994ae89f54218c2c509c7e68323b7a9a2cbf Mon Sep 17 00:00:00 2001
+From: "djm@openbsd.org" <djm@openbsd.org>
+Date: Thu, 13 Sep 2018 05:06:51 +0000
+Subject: [PATCH 3/5] upstream: use only openssl-1.1.x API here too
+
+OpenBSD-Regress-ID: ae877064597c349954b1b443769723563cecbc8f
+---
+ regress/unittests/sshkey/test_sshkey.c | 104 +++++++++++++++++++++------------
+ 1 file changed, 67 insertions(+), 37 deletions(-)
+
+diff --git a/regress/unittests/sshkey/test_sshkey.c b/regress/unittests/sshkey/test_sshkey.c
+index 72367bde..a32d2884 100644
+--- a/regress/unittests/sshkey/test_sshkey.c
++++ b/regress/unittests/sshkey/test_sshkey.c
+@@ -1,4 +1,5 @@
+ /* $OpenBSD: test_sshkey.c,v 1.14 2018/07/13 02:13:19 djm Exp $ */
++/* Incorporates changes from 1.16 */
+ /*
+ * Regress test for sshkey.h key management API
+ *
+@@ -173,6 +174,61 @@ get_private(const char *n)
+ return ret;
+ }
+
++static const BIGNUM *
++rsa_n(struct sshkey *k)
++{
++ const BIGNUM *n = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->rsa, NULL);
++ RSA_get0_key(k->rsa, &n, NULL, NULL);
++ return n;
++}
++
++static const BIGNUM *
++rsa_e(struct sshkey *k)
++{
++ const BIGNUM *e = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->rsa, NULL);
++ RSA_get0_key(k->rsa, NULL, &e, NULL);
++ return e;
++}
++
++static const BIGNUM *
++rsa_p(struct sshkey *k)
++{
++ const BIGNUM *p = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->rsa, NULL);
++ RSA_get0_factors(k->rsa, &p, NULL);
++ return p;
++}
++
++static const BIGNUM *
++dsa_g(struct sshkey *k)
++{
++ const BIGNUM *g = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->dsa, NULL);
++ DSA_get0_pqg(k->dsa, NULL, NULL, &g);
++ return g;
++}
++
++static const BIGNUM *
++dsa_priv_key(struct sshkey *k)
++{
++ const BIGNUM *priv_key = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->dsa, NULL);
++ DSA_get0_key(k->dsa, NULL, &priv_key);
++ return priv_key;
++}
++
+ void
+ sshkey_tests(void)
+ {
+@@ -197,9 +253,6 @@ sshkey_tests(void)
+ k1 = sshkey_new(KEY_RSA);
+ ASSERT_PTR_NE(k1, NULL);
+ ASSERT_PTR_NE(k1->rsa, NULL);
+- ASSERT_PTR_NE(k1->rsa->n, NULL);
+- ASSERT_PTR_NE(k1->rsa->e, NULL);
+- ASSERT_PTR_EQ(k1->rsa->p, NULL);
+ sshkey_free(k1);
+ TEST_DONE();
+
+@@ -207,8 +260,6 @@ sshkey_tests(void)
+ k1 = sshkey_new(KEY_DSA);
+ ASSERT_PTR_NE(k1, NULL);
+ ASSERT_PTR_NE(k1->dsa, NULL);
+- ASSERT_PTR_NE(k1->dsa->g, NULL);
+- ASSERT_PTR_EQ(k1->dsa->priv_key, NULL);
+ sshkey_free(k1);
+ TEST_DONE();
+
+@@ -230,27 +281,6 @@ sshkey_tests(void)
+ sshkey_free(k1);
+ TEST_DONE();
+
+- TEST_START("new_private KEY_RSA");
+- k1 = sshkey_new_private(KEY_RSA);
+- ASSERT_PTR_NE(k1, NULL);
+- ASSERT_PTR_NE(k1->rsa, NULL);
+- ASSERT_PTR_NE(k1->rsa->n, NULL);
+- ASSERT_PTR_NE(k1->rsa->e, NULL);
+- ASSERT_PTR_NE(k1->rsa->p, NULL);
+- ASSERT_INT_EQ(sshkey_add_private(k1), 0);
+- sshkey_free(k1);
+- TEST_DONE();
+-
+- TEST_START("new_private KEY_DSA");
+- k1 = sshkey_new_private(KEY_DSA);
+- ASSERT_PTR_NE(k1, NULL);
+- ASSERT_PTR_NE(k1->dsa, NULL);
+- ASSERT_PTR_NE(k1->dsa->g, NULL);
+- ASSERT_PTR_NE(k1->dsa->priv_key, NULL);
+- ASSERT_INT_EQ(sshkey_add_private(k1), 0);
+- sshkey_free(k1);
+- TEST_DONE();
+-
+ TEST_START("generate KEY_RSA too small modulus");
+ ASSERT_INT_EQ(sshkey_generate(KEY_RSA, 128, &k1),
+ SSH_ERR_KEY_LENGTH);
+@@ -285,18 +315,18 @@ sshkey_tests(void)
+ ASSERT_INT_EQ(sshkey_generate(KEY_RSA, 1024, &kr), 0);
+ ASSERT_PTR_NE(kr, NULL);
+ ASSERT_PTR_NE(kr->rsa, NULL);
+- ASSERT_PTR_NE(kr->rsa->n, NULL);
+- ASSERT_PTR_NE(kr->rsa->e, NULL);
+- ASSERT_PTR_NE(kr->rsa->p, NULL);
+- ASSERT_INT_EQ(BN_num_bits(kr->rsa->n), 1024);
++ ASSERT_PTR_NE(rsa_n(kr), NULL);
++ ASSERT_PTR_NE(rsa_e(kr), NULL);
++ ASSERT_PTR_NE(rsa_p(kr), NULL);
++ ASSERT_INT_EQ(BN_num_bits(rsa_n(kr)), 1024);
+ TEST_DONE();
+
+ TEST_START("generate KEY_DSA");
+ ASSERT_INT_EQ(sshkey_generate(KEY_DSA, 1024, &kd), 0);
+ ASSERT_PTR_NE(kd, NULL);
+ ASSERT_PTR_NE(kd->dsa, NULL);
+- ASSERT_PTR_NE(kd->dsa->g, NULL);
+- ASSERT_PTR_NE(kd->dsa->priv_key, NULL);
++ ASSERT_PTR_NE(dsa_g(kd), NULL);
++ ASSERT_PTR_NE(dsa_priv_key(kd), NULL);
+ TEST_DONE();
+
+ #ifdef OPENSSL_HAS_ECC
+@@ -323,9 +353,9 @@ sshkey_tests(void)
+ ASSERT_PTR_NE(kr, k1);
+ ASSERT_INT_EQ(k1->type, KEY_RSA);
+ ASSERT_PTR_NE(k1->rsa, NULL);
+- ASSERT_PTR_NE(k1->rsa->n, NULL);
+- ASSERT_PTR_NE(k1->rsa->e, NULL);
+- ASSERT_PTR_EQ(k1->rsa->p, NULL);
++ ASSERT_PTR_NE(rsa_n(k1), NULL);
++ ASSERT_PTR_NE(rsa_e(k1), NULL);
++ ASSERT_PTR_EQ(rsa_p(k1), NULL);
+ TEST_DONE();
+
+ TEST_START("equal KEY_RSA/demoted KEY_RSA");
+@@ -339,8 +369,8 @@ sshkey_tests(void)
+ ASSERT_PTR_NE(kd, k1);
+ ASSERT_INT_EQ(k1->type, KEY_DSA);
+ ASSERT_PTR_NE(k1->dsa, NULL);
+- ASSERT_PTR_NE(k1->dsa->g, NULL);
+- ASSERT_PTR_EQ(k1->dsa->priv_key, NULL);
++ ASSERT_PTR_NE(dsa_g(k1), NULL);
++ ASSERT_PTR_EQ(dsa_priv_key(k1), NULL);
+ TEST_DONE();
+
+ TEST_START("equal KEY_DSA/demoted KEY_DSA");
+--
+2.16.4
+
--- /dev/null
+From d100d85cc797d9871e0c34a09104b02b0452b4f4 Mon Sep 17 00:00:00 2001
+From: "djm@openbsd.org" <djm@openbsd.org>
+Date: Thu, 13 Sep 2018 09:03:20 +0000
+Subject: [PATCH 4/5] upstream: missed a bit of openssl-1.0.x API in this
+ unittest
+
+OpenBSD-Regress-ID: a73a54d7f7381856a3f3a2d25947bee7a9a5dbc9
+---
+ regress/unittests/sshkey/common.c | 79 +++++++++++++++++++++++++++++++++-
+ regress/unittests/sshkey/common.h | 11 ++++-
+ regress/unittests/sshkey/test_file.c | 13 +++---
+ regress/unittests/sshkey/test_sshkey.c | 57 +-----------------------
+ 4 files changed, 96 insertions(+), 64 deletions(-)
+
+diff --git a/regress/unittests/sshkey/common.c b/regress/unittests/sshkey/common.c
+index b598f05c..548da684 100644
+--- a/regress/unittests/sshkey/common.c
++++ b/regress/unittests/sshkey/common.c
+@@ -1,4 +1,4 @@
+-/* $OpenBSD: common.c,v 1.2 2015/01/08 13:10:58 djm Exp $ */
++/* $OpenBSD: common.c,v 1.3 2018/09/13 09:03:20 djm Exp $ */
+ /*
+ * Helpers for key API tests
+ *
+@@ -82,3 +82,80 @@ load_bignum(const char *name)
+ return ret;
+ }
+
++const BIGNUM *
++rsa_n(struct sshkey *k)
++{
++ const BIGNUM *n = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->rsa, NULL);
++ RSA_get0_key(k->rsa, &n, NULL, NULL);
++ return n;
++}
++
++const BIGNUM *
++rsa_e(struct sshkey *k)
++{
++ const BIGNUM *e = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->rsa, NULL);
++ RSA_get0_key(k->rsa, NULL, &e, NULL);
++ return e;
++}
++
++const BIGNUM *
++rsa_p(struct sshkey *k)
++{
++ const BIGNUM *p = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->rsa, NULL);
++ RSA_get0_factors(k->rsa, &p, NULL);
++ return p;
++}
++
++const BIGNUM *
++rsa_q(struct sshkey *k)
++{
++ const BIGNUM *q = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->rsa, NULL);
++ RSA_get0_factors(k->rsa, NULL, &q);
++ return q;
++}
++
++const BIGNUM *
++dsa_g(struct sshkey *k)
++{
++ const BIGNUM *g = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->dsa, NULL);
++ DSA_get0_pqg(k->dsa, NULL, NULL, &g);
++ return g;
++}
++
++const BIGNUM *
++dsa_pub_key(struct sshkey *k)
++{
++ const BIGNUM *pub_key = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->dsa, NULL);
++ DSA_get0_key(k->dsa, &pub_key, NULL);
++ return pub_key;
++}
++
++const BIGNUM *
++dsa_priv_key(struct sshkey *k)
++{
++ const BIGNUM *priv_key = NULL;
++
++ ASSERT_PTR_NE(k, NULL);
++ ASSERT_PTR_NE(k->dsa, NULL);
++ DSA_get0_key(k->dsa, NULL, &priv_key);
++ return priv_key;
++}
++
+diff --git a/regress/unittests/sshkey/common.h b/regress/unittests/sshkey/common.h
+index bf7d19dc..7a514fdc 100644
+--- a/regress/unittests/sshkey/common.h
++++ b/regress/unittests/sshkey/common.h
+@@ -1,4 +1,4 @@
+-/* $OpenBSD: common.h,v 1.1 2014/06/24 01:14:18 djm Exp $ */
++/* $OpenBSD: common.h,v 1.2 2018/09/13 09:03:20 djm Exp $ */
+ /*
+ * Helpers for key API tests
+ *
+@@ -14,3 +14,12 @@ struct sshbuf *load_text_file(const char *name);
+ /* Load a bignum from a file */
+ BIGNUM *load_bignum(const char *name);
+
++/* Accessors for key components */
++const BIGNUM *rsa_n(struct sshkey *k);
++const BIGNUM *rsa_e(struct sshkey *k);
++const BIGNUM *rsa_p(struct sshkey *k);
++const BIGNUM *rsa_q(struct sshkey *k);
++const BIGNUM *dsa_g(struct sshkey *k);
++const BIGNUM *dsa_pub_key(struct sshkey *k);
++const BIGNUM *dsa_priv_key(struct sshkey *k);
++
+diff --git a/regress/unittests/sshkey/test_file.c b/regress/unittests/sshkey/test_file.c
+index 99b7e21c..596c166b 100644
+--- a/regress/unittests/sshkey/test_file.c
++++ b/regress/unittests/sshkey/test_file.c
+@@ -1,4 +1,5 @@
+ /* $OpenBSD: test_file.c,v 1.6 2017/04/30 23:33:48 djm Exp $ */
++/* Incorporates changes from 1.8 */
+ /*
+ * Regress test for sshkey.h key management API
+ *
+@@ -60,9 +61,9 @@ sshkey_file_tests(void)
+ a = load_bignum("rsa_1.param.n");
+ b = load_bignum("rsa_1.param.p");
+ c = load_bignum("rsa_1.param.q");
+- ASSERT_BIGNUM_EQ(k1->rsa->n, a);
+- ASSERT_BIGNUM_EQ(k1->rsa->p, b);
+- ASSERT_BIGNUM_EQ(k1->rsa->q, c);
++ ASSERT_BIGNUM_EQ(rsa_n(k1), a);
++ ASSERT_BIGNUM_EQ(rsa_p(k1), b);
++ ASSERT_BIGNUM_EQ(rsa_q(k1), c);
+ BN_free(a);
+ BN_free(b);
+ BN_free(c);
+@@ -151,9 +152,9 @@ sshkey_file_tests(void)
+ a = load_bignum("dsa_1.param.g");
+ b = load_bignum("dsa_1.param.priv");
+ c = load_bignum("dsa_1.param.pub");
+- ASSERT_BIGNUM_EQ(k1->dsa->g, a);
+- ASSERT_BIGNUM_EQ(k1->dsa->priv_key, b);
+- ASSERT_BIGNUM_EQ(k1->dsa->pub_key, c);
++ ASSERT_BIGNUM_EQ(dsa_g(k1), a);
++ ASSERT_BIGNUM_EQ(dsa_priv_key(k1), b);
++ ASSERT_BIGNUM_EQ(dsa_pub_key(k1), c);
+ BN_free(a);
+ BN_free(b);
+ BN_free(c);
+diff --git a/regress/unittests/sshkey/test_sshkey.c b/regress/unittests/sshkey/test_sshkey.c
+index a32d2884..deeb23a0 100644
+--- a/regress/unittests/sshkey/test_sshkey.c
++++ b/regress/unittests/sshkey/test_sshkey.c
+@@ -1,5 +1,5 @@
+ /* $OpenBSD: test_sshkey.c,v 1.14 2018/07/13 02:13:19 djm Exp $ */
+-/* Incorporates changes from 1.16 */
++/* Incorporates changes from 1.16 and 1.17 */
+ /*
+ * Regress test for sshkey.h key management API
+ *
+@@ -174,61 +174,6 @@ get_private(const char *n)
+ return ret;
+ }
+
+-static const BIGNUM *
+-rsa_n(struct sshkey *k)
+-{
+- const BIGNUM *n = NULL;
+-
+- ASSERT_PTR_NE(k, NULL);
+- ASSERT_PTR_NE(k->rsa, NULL);
+- RSA_get0_key(k->rsa, &n, NULL, NULL);
+- return n;
+-}
+-
+-static const BIGNUM *
+-rsa_e(struct sshkey *k)
+-{
+- const BIGNUM *e = NULL;
+-
+- ASSERT_PTR_NE(k, NULL);
+- ASSERT_PTR_NE(k->rsa, NULL);
+- RSA_get0_key(k->rsa, NULL, &e, NULL);
+- return e;
+-}
+-
+-static const BIGNUM *
+-rsa_p(struct sshkey *k)
+-{
+- const BIGNUM *p = NULL;
+-
+- ASSERT_PTR_NE(k, NULL);
+- ASSERT_PTR_NE(k->rsa, NULL);
+- RSA_get0_factors(k->rsa, &p, NULL);
+- return p;
+-}
+-
+-static const BIGNUM *
+-dsa_g(struct sshkey *k)
+-{
+- const BIGNUM *g = NULL;
+-
+- ASSERT_PTR_NE(k, NULL);
+- ASSERT_PTR_NE(k->dsa, NULL);
+- DSA_get0_pqg(k->dsa, NULL, NULL, &g);
+- return g;
+-}
+-
+-static const BIGNUM *
+-dsa_priv_key(struct sshkey *k)
+-{
+- const BIGNUM *priv_key = NULL;
+-
+- ASSERT_PTR_NE(k, NULL);
+- ASSERT_PTR_NE(k->dsa, NULL);
+- DSA_get0_key(k->dsa, NULL, &priv_key);
+- return priv_key;
+-}
+-
+ void
+ sshkey_tests(void)
+ {
+--
+2.16.4
+
--- /dev/null
+From a3fc79d9cdab61ed58dafc4c49b295ec1bbe1d84 Mon Sep 17 00:00:00 2001
+From: Damien Miller <djm@mindrot.org>
+Date: Thu, 13 Sep 2018 19:05:48 +1000
+Subject: [PATCH 5/5] add compat header
+
+---
+ regress/unittests/sshkey/common.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/regress/unittests/sshkey/common.c b/regress/unittests/sshkey/common.c
+index 548da684..e63465c4 100644
+--- a/regress/unittests/sshkey/common.c
++++ b/regress/unittests/sshkey/common.c
+@@ -27,6 +27,8 @@
+ # include <openssl/ec.h>
+ #endif
+
++#include "openbsd-compat/openssl-compat.h"
++
+ #include "../test_helper/test_helper.h"
+
+ #include "ssherr.h"
+--
+2.16.4
+
+++ /dev/null
---- a/ssh_config
-+++ b/ssh_config
-@@ -48,3 +48,6 @@
- # VisualHostKey no
- # ProxyCommand ssh -q -W %h:%p gateway.example.com
- # RekeyLimit 1G 1h
-+
-+# enable DSCP QoS values (per RFC-4594)
-+#IPQoS AF21 AF11
---- a/sshd_config
-+++ b/sshd_config
-@@ -107,6 +107,9 @@ AuthorizedKeysFile .ssh/authorized_keys
- # no default banner path
- #Banner none
-
-+# enable DSCP QoS values (per RFC-4594)
-+#IPQoS AF21 AF11
-+
- # override default of no subsystems
- Subsystem sftp /usr/libexec/sftp-server
-
#
# Copyright (C) 2013 Julius Schulz-Zander <julius@net.t-labs.tu-berlin.de>
# Copyright (C) 2014-2017 OpenWrt.org
+# Copyright (C) 2018 Yousong Zhou <yszhou4tech@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
-# $Id: Makefile $
-
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
+# Checklist on version bump
+#
+# - Check acinclude.m4 for range of supported kernel versions: "but version newer than .* is not supported"
+# - Check and update kmod dependencies when necessary (runtime module load check in the least)
+#
PKG_NAME:=openvswitch
-
-PKG_VERSION:=2.8.2
-PKG_RELEASE:=1
-PKG_LICENSE:=Apache-2.0
-PKG_LICENSE_FILES:=COPYING
-PKG_USE_MIPS16:=0
-
+PKG_VERSION:=2.10.0
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
-PKG_HASH:=87b4a7e7134a44ce1f808d3415a2244b4518c2b0b2a42fa2f8231e592f13103d
+PKG_HASH:=64f7cdcfffc73b2e09980d04ee22731eadd6453698b92d7397c9e45c7c174050
-PKG_BUILD_DEPENDS:=python/host python-six/host
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_BUILD_DEPENDS:=python/host python-six/host
+PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include ../../lang/python/python-host.mk
include ../../lang/python/python-package.mk
-define Package/openvswitch/Default
- SECTION:=net
- SUBMENU:=Open vSwitch
- CATEGORY:=Network
- URL:=http://openvswitch.org/
-endef
-define Package/openvswitch/Default/description
- Open vSwitch is a production quality, multilayer, software-based, Ethernet
- virtual switch. It is designed to enable massive network automation through
- programmatic extension, while still supporting standard management interfaces
- and protocols (e.g. NetFlow, sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag). In
- addition, it is designed to support distribution across multiple physical
- servers similar to VMware's vNetwork distributed vswitch or Cisco's Nexus
- 1000V.
-endef
+ovs_kmod_packages:=
+ovs_kmod_intree_kernel_patchver_min:=3.10
+ovs_kmod_intree_kernel_patchver_max:=4.15
+ovs_kmod_intree_not_supported:=$(strip $(call kernel_patchver_lt,$(ovs_kmod_intree_kernel_patchver_min))$(call kernel_patchver_gt,$(ovs_kmod_intree_kernel_patchver_max)))
+ovs_kmod_intree_dir:=$(PKG_BUILD_DIR)/datapath/linux
+ovs_kmod_upstream_dir:=$(LINUX_DIR)/net/openvswitch
+ovs_kmod_package_name=$(if $(filter openvswitch,$(1)),openvswitch,$(1))
+ovs_kmod_is_intree=$(filter %-intree,$(1))
+ovs_kmod_upstream_name=kmod-$(call ovs_kmod_package_name,$(patsubst %-intree,%,$(1)))
+ovs_kmod_package_provides=$(call ovs_kmod_upstream_name,$(1))
+define OvsKmodPackageTemplate
+ define KernelPackage/$(call ovs_kmod_package_name,$(1))
+ SECTION:=kernel
+ CATEGORY:=Kernel modules
+ SUBMENU:=Network Support
+ TITLE:=$(ovs_kmod_$(1)_title)
+ DEPENDS:=$(ovs_kmod_$(1)_depends) $(if $(call ovs_kmod_is_intree,$(1)),@DEVEL $(if $(ovs_kmod_intree_not_supported),@BROKEN))
+ PROVIDES:=$(call ovs_kmod_package_provides,$(1))
+ KCONFIG:=$(ovs_kmod_$(1)_kconfig)
+ FILES:=$(ovs_kmod_$(1)_files)
+ AUTOLOAD:=$(call AutoProbe,$(foreach m,$(ovs_kmod_$(1)_files),$(patsubst %.ko,%,$(basename $(m)))))
+ endef
-define Package/openvswitch-base
- $(call Package/openvswitch/Default)
- TITLE:=Open vSwitch Userspace Package (base)
- DEPENDS:=+libpcap +libopenssl +librt +kmod-openvswitch
+ ovs_kmod_packages+=$(call ovs_kmod_package_name,$(1))
endef
-define Package/openvswitch-base/description
- Provides the main userspace components required for Open vSwitch to function.
- The main OVS tools (ovs-vsctl, ovs-ofctl, etc) are packaged separately
- to conserve some room and allow more configurability.
-endef
+ovs_kmod_openvswitch_title:=Open vSwitch kernel datapath (upstream)
+ovs_kmod_openvswitch_kconfig:=CONFIG_OPENVSWITCH
+ovs_kmod_openvswitch_depends:=\
+ +kmod-lib-crc32c +kmod-mpls \
+ +kmod-nf-nat +IPV6:kmod-nf-nat6 \
+ +kmod-nf-conntrack +IPV6:kmod-nf-conntrack6
+ovs_kmod_openvswitch_files:=$(ovs_kmod_upstream_dir)/openvswitch.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch))
+
+ovs_kmod_openvswitch-gre_title:=Open vSwitch GRE tunneling support (upstream)
+ovs_kmod_openvswitch-gre_kconfig:= CONFIG_OPENVSWITCH_GRE
+ovs_kmod_openvswitch-gre_depends:= +kmod-openvswitch +kmod-gre
+ovs_kmod_openvswitch-gre_files:= $(ovs_kmod_upstream_dir)/vport-gre.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-gre))
+
+ovs_kmod_openvswitch-vxlan_title:=Open vSwitch VXLAN tunneling support (upstream)
+ovs_kmod_openvswitch-vxlan_kconfig:= CONFIG_OPENVSWITCH_VXLAN
+ovs_kmod_openvswitch-vxlan_depends:= +kmod-openvswitch +kmod-vxlan
+ovs_kmod_openvswitch-vxlan_files:= $(ovs_kmod_upstream_dir)/vport-vxlan.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-vxlan))
+
+ovs_kmod_openvswitch-geneve_title:=Open vSwitch Geneve tunneling support (upstream)
+ovs_kmod_openvswitch-geneve_kconfig:= CONFIG_OPENVSWITCH_GENEVE
+ovs_kmod_openvswitch-geneve_depends:= +kmod-openvswitch +kmod-geneve
+ovs_kmod_openvswitch-geneve_files:= $(ovs_kmod_upstream_dir)/vport-geneve.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-geneve))
+
+# NOTE depends
+#
+# - kmod-gre: with linux-4.14, ovs-2.10, when ovs decides to not
+# USE_UPSTREAM_TUNNEL, it requires kmod-gre to be enabled so that
+# CONFIG_NET_IPGRE_DEMUX is enabled and ovs will have rpl_gre_init()
+# compiled in.
+#
+# - kmod-gre6: with linux-4.14, ovs-2.10, when ovs decides to not
+# USE_UPSTREAM_TUNNEL, it requires xfrm6_tunnel_register() from
+# net/ipv6/tunnel6.ko, which will be pulled in by kmod-ip6-tunnel, which
+# will be pulled in by kmod-gre6. NOTE that tunnel6.ko itself cannot be
+# enabled and selected on its own
+#
+ovs_kmod_openvswitch-intree_title:=Open vSwitch kernel datapath (in tree)
+ovs_kmod_openvswitch-intree_depends:=$(ovs_kmod_openvswitch_depends) +kmod-gre +IPV6:kmod-gre6
+ovs_kmod_openvswitch-intree_files:= $(ovs_kmod_intree_dir)/openvswitch.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-intree))
+
+ovs_kmod_openvswitch-gre-intree_title:=Open vSwitch GRE tunneling support (in tree)
+ovs_kmod_openvswitch-gre-intree_depends:= +kmod-openvswitch-intree +kmod-gre
+ovs_kmod_openvswitch-gre-intree_files:= $(ovs_kmod_intree_dir)/vport-gre.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-gre-intree))
+
+ovs_kmod_openvswitch-vxlan-intree_title:=Open vSwitch VXLAN tunneling support (in tree)
+ovs_kmod_openvswitch-vxlan-intree_depends:= +kmod-openvswitch-intree +kmod-vxlan
+ovs_kmod_openvswitch-vxlan-intree_files:= $(ovs_kmod_intree_dir)/vport-vxlan.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-vxlan-intree))
+
+ovs_kmod_openvswitch-geneve-intree_title:=Open vSwitch Geneve tunneling support (in tree)
+ovs_kmod_openvswitch-geneve-intree_depends:= +kmod-openvswitch-intree +kmod-geneve
+ovs_kmod_openvswitch-geneve-intree_files:= $(ovs_kmod_intree_dir)/vport-geneve.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-geneve-intree))
+
+ovs_kmod_openvswitch-stt-intree_title:=Open vSwitch STT tunneling support (in tree)
+ovs_kmod_openvswitch-stt-intree_depends:= +kmod-openvswitch-intree
+ovs_kmod_openvswitch-stt-intree_files:= $(ovs_kmod_intree_dir)/vport-stt.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-stt-intree))
+
+ovs_kmod_openvswitch-lisp-intree_title:=Open vSwitch LISP tunneling support (in tree)
+ovs_kmod_openvswitch-lisp-intree_depends:= +kmod-openvswitch-intree
+ovs_kmod_openvswitch-lisp-intree_files:= $(ovs_kmod_intree_dir)/vport-lisp.ko
+$(eval $(call OvsKmodPackageTemplate,openvswitch-lisp-intree))
+
+
+ovs_packages:=
+ovs_package_name=$(if $(filter openvswitch,$(1)),openvswitch,openvswitch-$(1))
+define OvsPackageTemplate
+ define Package/$(call ovs_package_name,$(1))
+ SECTION:=net
+ SUBMENU:=Open vSwitch
+ CATEGORY:=Network
+ URL:=https://www.openvswitch.org
+ TITLE:=$(ovs_$(1)_title)
+ HIDDEN:=$(ovs_$(1)_hidden)
+ DEPENDS:=$(ovs_$(1)_depends) +libunbound
+ endef
-define Package/openvswitch-ovn-base
- $(call Package/openvswitch/Default)
- TITLE:=Open Virtual Networking (base)
- DEPENDS:=+openvswitch-base
-endef
+ define Package/$(call ovs_package_name,$(1))/install
+ $(foreach f,$(ovs_$(1)_files),
+ $(INSTALL_DIR) $$(1)/$(dir $(f))
+ $(CP) $(PKG_INSTALL_DIR)/$(f) $$(1)/$(dir $(f))
+ )
+ $(ovs_$(1)_install)
+ endef
-define Package/openvswitch-ovn-base/description
- Provides the main userspace components required for Open Virtual Networking
- over Open vSwitch.
+ ovs_packages+=$(call ovs_package_name,$(1))
endef
-OVN_BIN_TOOLS:=ovn-controller ovn-controller-vtep ovn-detrace \
- ovn-docker-overlay-driver ovn-docker-underlay-driver \
- ovn-nbctl ovn-sbctl ovn-trace
-define Package/openvswitch-ovn
- $(call Package/openvswitch/Default)
- TITLE:=Open Virtual Networking (base)
- DEPENDS:=+openvswitch-ovn-base $(foreach t,$(OVN_BIN_TOOLS),+openvswitch-$(t))
+# Dependency review
+#
+# for f in sbin/*; do echo $f; readelf -d $f | grep -i shared; done
+# for f in bin/*; do echo $f; readelf -d $f | grep -i shared; done
+# for f in lib/*.so; do echo $f; readelf -d $f | grep -i shared; done
+#
+ovs_libopenvswitch_title:=Open vSwitch (libopenvswitch.so)
+ovs_libopenvswitch_hidden:=1
+ovs_libopenvswitch_depends:=+libopenssl +librt
+ovs_libopenvswitch_files:=usr/lib/libopenvswitch*.so*
+$(eval $(call OvsPackageTemplate,libopenvswitch))
+
+
+ovs_libofproto_title:=Open vSwitch (libofproto.so libsflow.so)
+ovs_libofproto_hidden:=1
+ovs_libofproto_depends:=+librt
+ovs_libofproto_files:=usr/lib/libofproto*.so* usr/lib/libsflow*.so*
+$(eval $(call OvsPackageTemplate,libofproto))
+
+
+ovs_libovsdb_title:=Open vSwitch (libovsdb.so)
+ovs_libovsdb_hidden:=1
+ovs_libovsdb_depends:=+librt
+ovs_libovsdb_files:=usr/lib/libovsdb*.so*
+$(eval $(call OvsPackageTemplate,libovsdb))
+
+
+ovs_libovn_title:=Open vSwitch (libovn.so)
+ovs_libovn_hidden:=1
+ovs_libovn_depends:=+librt
+ovs_libovn_files:=usr/lib/libovn*.so*
+$(eval $(call OvsPackageTemplate,libovn))
+
+
+ovs_vswitchd_title:=Open vSwitch (ovs-vswitchd)
+ovs_vswitchd_hidden:=1
+ovs_vswitchd_depends:=+librt +openvswitch-libopenvswitch +openvswitch-libofproto
+ovs_vswitchd_files:=usr/sbin/ovs-vswitchd
+$(eval $(call OvsPackageTemplate,vswitchd))
+
+
+ovs_ovsdb_title:=Open vSwitch (ovsdb-server)
+ovs_ovsdb_hidden:=1
+ovs_ovsdb_depends:=+librt +openvswitch-libopenvswitch +openvswitch-libovsdb
+ovs_ovsdb_files:=usr/sbin/ovsdb-server
+$(eval $(call OvsPackageTemplate,ovsdb))
+
+
+ovs_common_title:=Open vSwitch (common files)
+ovs_common_hidden:=1
+ovs_common_depends:=+librt +openvswitch-libopenvswitch +openvswitch-libofproto +openvswitch-libovsdb
+ovs_common_files:= \
+ usr/share/openvswitch/scripts/ovs-lib \
+ usr/share/openvswitch/scripts/ovs-ctl \
+ usr/share/openvswitch/scripts/ovs-kmod-ctl \
+ usr/share/openvswitch/scripts/ovs-save \
+ $(foreach b,ovs-appctl ovs-dpctl ovs-ofctl ovs-vsctl ovsdb-client ovsdb-tool,usr/bin/$(b))
+define ovs_common_install
+ $$(INSTALL_DIR) $$(1)/etc/openvswitch
+ $$(INSTALL_DIR) $$(1)/etc/init.d
+ $$(INSTALL_BIN) ./files/openvswitch.init $$(1)/etc/init.d/openvswitch
+ $$(INSTALL_DIR) $$(1)/etc/config
+ $$(INSTALL_DATA) ./files/openvswitch.config $$(1)/etc/config/openvswitch
+ $$(INSTALL_DIR) $$(1)/usr/share/openvswitch/scripts
+ $$(INSTALL_BIN) ./files/ovs-ctl-wrapper $$(1)/usr/share/openvswitch/scripts/
+ $$(LN) /usr/share/openvswitch/scripts/ovs-ctl-wrapper $$(1)/usr/bin/ovs-ctl
+ $$(LN) /usr/share/openvswitch/scripts/ovs-ctl-wrapper $$(1)/usr/bin/ovs-kmod-ctl
endef
-
-define Package/openvswitch-ovn/description
- Provides all the components required for Open Virtual Networking
- (including the tools)
+define Package/openvswitch-common/conffiles
+/etc/openvswitch
endef
+$(eval $(call OvsPackageTemplate,common))
-define Package/openvswitch-vtep
- $(call Package/openvswitch/Default)
- TITLE:=Open vSwitch VXLAN Tunnel End Point
- DEPENDS:=+openvswitch-base
-endef
-define Package/openvswitch-vtep/description
- This schema specifies relations that a VTEP can use to integrate physi‐
- cal ports into logical switches maintained by a network virtualization
- controller such as NSX.
+# coreutils-sleep is required by ovs-lib for sleeping a fraction of second
+#
+# uuidgen is required for generating system-id
+ovs_openvswitch_title:=Open vSwitch
+ovs_openvswitch_hidden:=
+ovs_openvswitch_depends:=+librt +coreutils +coreutils-sleep +uuidgen \
+ +openvswitch-common +openvswitch-vswitchd +openvswitch-ovsdb +kmod-openvswitch
+ovs_openvswitch_files:= usr/share/openvswitch/vswitch.ovsschema
+$(eval $(call OvsPackageTemplate,openvswitch))
+
+
+ovs_ovn-common_title:=Open Virtual Network (common files)
+ovs_ovn-common_hidden:=1
+ovs_ovn-common_depends:=+librt +openvswitch-common +openvswitch-libopenvswitch +openvswitch-libovn +openvswitch-libovsdb
+ovs_ovn-common_files:= \
+ usr/share/openvswitch/scripts/ovn-ctl \
+ $(foreach b,ovn-nbctl ovn-sbctl ovn-trace ovn-detrace,usr/bin/$(b))
+define ovs_ovn-common_install
+ $$(INSTALL_DIR) $$(1)/usr/share/openvswitch/scripts
+ $$(LN) /usr/share/openvswitch/scripts/ovs-ctl-wrapper $$(1)/usr/bin/ovn-ctl
endef
+$(eval $(call OvsPackageTemplate,ovn-common))
-define Package/openvswitch-python
- $(call Package/openvswitch/Default)
- TITLE:=Open vSwitch Python Support
- DEPENDS:=+PACKAGE_openvswitch-python:python +PACKAGE_openvswitch-python:python-six
-endef
-define Package/openvswitch-python/description
- Provides bindings and libraries for using Python to manipulate/work with Open vSwitch.
-endef
+ovs_ovn-north_title:=Open Virtual Network (north package)
+ovs_ovn-north_hidden:=
+ovs_ovn-north_depends:=+openvswitch-ovsdb +openvswitch-ovn-common
+ovs_ovn-north_files:=\
+ usr/share/openvswitch/ovn-nb.ovsschema \
+ usr/share/openvswitch/ovn-sb.ovsschema \
+ usr/bin/ovn-northd
+$(eval $(call OvsPackageTemplate,ovn-north))
-OVS_BIN_TOOLS:= \
- ovsdb-client ovs-l3ping ovs-dpctl-top \
- ovs-tcpdump ovs-tcpundump ovs-pcap ovs-parse-backtrace
-define Package/openvswitch
- $(call Package/openvswitch/Default)
- TITLE:=Open vSwitch Userspace Package
- DEPENDS:=+openvswitch-base $(foreach t,$(OVS_BIN_TOOLS),+openvswitch-$(t))
-endef
-define Package/openvswitch/description
- Provides the main userspace components required for Open vSwitch to function.
- Includes also most of OVS utilities.
-endef
+ovs_ovn-host_title:=Open Virtual Network (chassis package)
+ovs_ovn-host_hidden:=
+ovs_ovn-host_depends:=+openvswitch +openvswitch-ovn-common
+ovs_ovn-host_files:=usr/bin/ovn-controller
+$(eval $(call OvsPackageTemplate,ovn-host))
-define KernelPackage/openvswitch
- SECTION:=kernel
- CATEGORY:=Kernel modules
- SUBMENU:=Network Support
- TITLE:=Open vSwitch kernel datapath
- KCONFIG:=CONFIG_OPENVSWITCH
- DEPENDS:= \
- +kmod-lib-crc32c +kmod-mpls \
- +kmod-nf-nat +IPV6:kmod-nf-nat6
- FILES:= $(LINUX_DIR)/net/openvswitch/openvswitch.ko
- AUTOLOAD:=$(call AutoProbe,openvswitch)
-endef
-
-define KernelPackage/openvswitch-gre
- SECTION:=kernel
- CATEGORY:=Kernel modules
- SUBMENU:=Network Support
- TITLE:=Open vSwitch GRE tunneling support
- KCONFIG:= CONFIG_OPENVSWITCH_GRE
- DEPENDS:= +kmod-openvswitch +kmod-gre
- FILES:= $(LINUX_DIR)/net/openvswitch/vport-gre.ko
- AUTOLOAD:=$(call AutoProbe,vport-gre)
-endef
-
-define KernelPackage/openvswitch-vxlan
- SECTION:=kernel
- CATEGORY:=Kernel modules
- SUBMENU:=Network Support
- TITLE:=Open vSwitch VXLAN tunneling support
- KCONFIG:= CONFIG_OPENVSWITCH_VXLAN
- DEPENDS:= +kmod-openvswitch +kmod-vxlan
- FILES:= $(LINUX_DIR)/net/openvswitch/vport-vxlan.ko
- AUTOLOAD:=$(call AutoProbe,vport-vxlan)
-endef
-define KernelPackage/openvswitch-geneve
- SECTION:=kernel
- CATEGORY:=Kernel modules
- SUBMENU:=Network Support
- TITLE:=Open vSwitch Geneve tunneling support
- KCONFIG:= CONFIG_OPENVSWITCH_GENEVE
- DEPENDS:= +kmod-openvswitch +kmod-geneve
- FILES:= $(LINUX_DIR)/net/openvswitch/vport-geneve.ko
- AUTOLOAD:=$(call AutoProbe,vport-geneve)
+ovs_python_title:=Open vSwitch (Python library)
+ovs_python_hidden:=
+ovs_python_depends:=+PACKAGE_openvswitch-python:python +PACKAGE_openvswitch-python:python-six
+define ovs_python_install
+ $$(INSTALL_DIR) $$(1)$$(PYTHON_PKG_DIR)
+ $$(CP) $$(PKG_INSTALL_DIR)/usr/share/openvswitch/python/ovs $$(1)$$(PYTHON_PKG_DIR)
endef
+$(eval $(call OvsPackageTemplate,python))
-CONFIGURE_ARGS += --enable-ndebug
-CONFIGURE_ARGS += --enable-shared
-TARGET_CFLAGS += -flto -std=gnu99
+CONFIGURE_ARGS+= \
+ --enable-ndebug \
+ --enable-shared \
+ --disable-libcapng \
CONFIGURE_VARS += \
ovs_cv_flake8=no \
ovs_cv_sphinx=no \
ovs_cv_python=$(PYTHON) \
ovs_cv_python_host=$(HOST_PYTHON_BIN) \
- KARCH=$(LINUX_KARCH)
+ KARCH=$(LINUX_KARCH) \
-MAKE_VARS += PYTHONPATH="$(HOST_PYTHONPATH)"
-MAKE_FLAGS += ARCH="$(LINUX_KARCH)"
+ovs_intree_kmod_configs:=CONFIG_PACKAGE_kmod-openvswitch-intree
+ovs_intree_kmod_enabled:=$(strip $(foreach c,$(ovs_intree_kmod_configs),$(c)))
+PKG_CONFIG_DEPENDS+=$(ovs_intree_kmod_configs)
+ifneq ($(ovs_intree_kmod_enabled),)
+ CONFIGURE_ARGS += --with-linux=$(LINUX_DIR)
+endif
-define OvsBinUtility
- define Package/openvswitch-$(2)
- $(call Package/openvswitch/Default)
- TITLE:=$(3)
- DEPENDS:=+$(1) $(4)
- endef
-
- define Package/openvswitch-$(2)/description
- $(3)
- endef
-
- define Package/openvswitch-$(2)/install
- $(INSTALL_DIR) $$(1)/usr/bin/ ;\
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/
- endef
-endef
-
-define Package/openvswitch-base/install
- $(INSTALL_DIR) $(1)/etc/openvswitch
-
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/etc/init.d/openvswitch.init $(1)/etc/init.d/openvswitch
-
- $(INSTALL_DIR) $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libofproto*.so* $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopenvswitch*.so* $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libovsdb*.so* $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsflow*.so* $(1)/usr/lib/
-
- $(INSTALL_DIR) $(1)/usr/bin/
- $(foreach bin,ovsdb-tool ovs-appctl ovs-ofctl ovs-dpctl ovs-vsctl ovs-pki, \
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(bin) $(1)/usr/bin/ ; )
-
- $(INSTALL_DIR) $(1)/usr/sbin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ovs-vswitchd $(1)/usr/sbin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ovsdb-server $(1)/usr/sbin/
-
- $(INSTALL_DIR) $(1)/usr/share/openvswitch/scripts
- $(INSTALL_CONF) \
- $(PKG_INSTALL_DIR)/usr/share/openvswitch/vswitch.ovsschema \
- $(1)/usr/share/openvswitch/
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)/usr/share/openvswitch/scripts/ovs-lib \
- $(1)/usr/share/openvswitch/scripts
- $(INSTALL_BIN) \
- $(PKG_INSTALL_DIR)/usr/share/openvswitch/scripts/ovs-ctl \
- $(1)/usr/share/openvswitch/scripts
-endef
-
-define Package/openvswitch-ovn-base/install
- $(INSTALL_DIR) $(1)/usr/lib/ $(1)/usr/bin/ $(1)/usr/share/openvswitch/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libovn*.so* $(1)/usr/lib/
-
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ovn-northd $(1)/usr/bin/
-
- $(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/share/openvswitch/ovn-nb.ovsschema $(1)/usr/share/openvswitch/
- $(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/share/openvswitch/ovn-sb.ovsschema $(1)/usr/share/openvswitch/
-endef
-
-define Package/openvswitch-vtep/install
- $(INSTALL_DIR) $(1)/usr/lib/ $(1)/usr/bin/ $(1)/usr/share/openvswitch/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtep-ctl $(1)/usr/bin/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvtep*.so* $(1)/usr/lib/
- $(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/share/openvswitch/vtep.ovsschema $(1)/usr/share/openvswitch/
-endef
-
-define Package/openvswitch-python/install
- $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/ovs
- $(CP) $(PKG_INSTALL_DIR)/usr/share/openvswitch/python/ovs/* $(1)/usr/lib/python$(PYTHON_VERSION)/ovs
-endef
-
-define Package/openvswitch-ovn/install
- :
-endef
-
-define Package/openvswitch/install
- :
-endef
+TARGET_CFLAGS += -flto -std=gnu99
+MAKE_VARS += PYTHONPATH="$(HOST_PYTHONPATH)"
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-appctl,Open vSwitch app control utility))
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-ofctl,Open vSwitch OpenFlow control utility))
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-dpctl,Open vSwitch datapath management utility))
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-vsctl,Open vSwitch ovs-vswitchd management utility))
-$(eval $(call OvsBinUtility,openvswitch-base,ovsdb-client,Open vSwitch database JSON-RPC client))
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-l3ping,Check network deployment for L3 tunneling problems))
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-docker,Open vSwitch docker tool))
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-dpctl-top,Top like behavior for ovs-dpctl dump-flows))
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-pki,OpenFlow public key infrastructure management utility))
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-tcpdump,Dump traffic from an Open vSwitch port using tcpdump))
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-tcpundump,Convert ``tcpdump -xx`` output to hex strings))
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-pcap,Print packets from a pcap file as hex))
-$(eval $(call OvsBinUtility,openvswitch-base,ovs-parse-backtrace,parses ovs-appctl backtrace output))
-
-$(eval $(call OvsBinUtility,openvswitch-ovn-base,ovn-controller,Open Virtual Network local controller))
-$(eval $(call OvsBinUtility,openvswitch-ovn-base,ovn-controller-vtep,Open Virtual Network local controller for vtep enabled physical switches,+openvswitch-vtep))
-$(eval $(call OvsBinUtility,openvswitch-ovn-base,ovn-detrace,Convert ``ovs-appctl ofproto/trace`` output to combine OVN logical flow information))
-$(eval $(call OvsBinUtility,openvswitch-ovn-base,ovn-docker-overlay-driver,OVN Docker overlay driver utility))
-$(eval $(call OvsBinUtility,openvswitch-ovn-base,ovn-docker-underlay-driver,OVN Docker underlay driver utility))
-$(eval $(call OvsBinUtility,openvswitch-ovn-base,ovn-nbctl,Open Virtual Network northbound db management utility))
-$(eval $(call OvsBinUtility,openvswitch-ovn-base,ovn-sbctl,Utility for querying and configuring OVN_Southbound data‐base))
-$(eval $(call OvsBinUtility,openvswitch-ovn-base,ovn-trace,Open Virtual Network logical network tracing utility))
-
-$(foreach t,$(OVS_BIN_TOOLS),$(eval $(call BuildPackage,openvswitch-$(t))))
-$(foreach t,$(OVN_BIN_TOOLS),$(eval $(call BuildPackage,openvswitch-$(t))))
-
-$(eval $(call BuildPackage,openvswitch-base))
-$(eval $(call BuildPackage,openvswitch-ovn-base))
-$(eval $(call BuildPackage,openvswitch-ovn))
-$(eval $(call BuildPackage,openvswitch-vtep))
-$(eval $(call BuildPackage,openvswitch-python))
-$(eval $(call BuildPackage,openvswitch))
-
-$(eval $(call KernelPackage,openvswitch))
-$(eval $(call KernelPackage,openvswitch-gre))
-$(eval $(call KernelPackage,openvswitch-vxlan))
-$(eval $(call KernelPackage,openvswitch-geneve))
+$(foreach p,$(ovs_kmod_packages),\
+ $(eval $(call KernelPackage,$(p)))\
+)
+$(foreach p,$(ovs_packages),\
+ $(eval $(call BuildPackage,$(p)))\
+)
--- /dev/null
+# Which packages to install
+
+Install `openvswitch` if you need OpenFlow virtual switch function. It
+contains ovs-vswitchd, ovsdb-server and helper utilities such as ovs-vsctl,
+ovs-ofctl, ovs-ctl etc.
+
+Linux kernel datapath module openvswitch.ko will also be installed along with
+package `openvswitch`. Tunnel encap support for gre, geneve, vxlan can be
+included by installing `kmod-openvswitch-{gre,geneve,vxlan}` respectively
+
+For OVN deployment
+
+- Install `openvswitch-ovn-north` for ovs-northd, ovsdb-server, ovn helper utitlies
+- Install `openvswitch-ovn-host` for ovn-controller and `openvswitch`
+
+# How to use them
+
+Open vSwitch provides a few very useful helper script in
+`/usr/share/openvswitch/scripts/`. A simple initscript is provided. It's
+mainly a wrapper around `ovs-ctl` and `ovn-ctl` with simple knobs from
+`/etc/config/openvswitch`. Procd is not used here.
+
+ /etc/init.d/openvswitch start
+ /etc/init.d/openvswitch stop
+ /etc/init.d/openvswitch stop north
+ /etc/init.d/openvswitch restart ovs
+ /etc/init.d/openvswitch status
+
+Use `ovs-ctl` and `ovn-ctl` directly for more functionalities
+
+# Open vSwitch in-tree Linux datapath modules
+
+The Open vSwitch build system uses regexp and conditional-compilation
+heuristics to support building the shipped kernel module source code against a
+wide range of kernels, as of openvswitch-2.10, the list is supposed to include
+vanilla linux 3.10 to 4.15, plus a few distro kernels.
+
+It may NOT work
+
+ - Sometimes the code does not compile
+ - Sometimes the code compiles but insmod will fail
+ - Sometimes modules are loaded okay but actually does not function right
+
+For these reasons, the in-tree datapath modules are NOT visible/enabled by
+default.
+
+Building and using in-tree datapath modules requires some level of devel
+abilities to proceed. You are expected to configure build options and build
+the code on your own
+
+E.g. pair openvswitch userspace with in-tree datapath module
+
+ CONFIG_DEVEL=y
+ CONFIG_PACKAGE_openvswitch=y
+ # CONFIG_PACKAGE_kmod-openvswitch is not set
+ CONFIG_PACKAGE_kmod-openvswitch-intree=y
+
+E.g. replace in-tree datapath module with upstream version
+
+ opkg remove --force-depends kmod-openvswitch-intree
+ opkg install kmod-openvswitch
+ ovs-ctl force-reload-kmod
+++ /dev/null
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2013 Julius Schulz-Zander <julius@net.t-labs.tu-berlin.de>
-# Copyright (C) 2014-2017 OpenWrt.org
-
-START=15
-
-start() {
- /usr/share/openvswitch/scripts/ovs-ctl start
-}
-
-stop() {
- /usr/share/openvswitch/scripts/ovs-ctl stop
-}
-
-restart() {
- /usr/share/openvswitch/scripts/ovs-ctl restart
-}
-
-status() {
- /usr/share/openvswitch/scripts/ovs-ctl status
-}
-
--- /dev/null
+config ovs ovs
+ option disabled 1
+
+config ovn_northd north
+ option disabled 1
+
+config ovn_controller controller
+ option disabled 1
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 Julius Schulz-Zander <julius@net.t-labs.tu-berlin.de>
+# Copyright (C) 2014-2017 OpenWrt.org
+# Copyright (C) 2018 Yousong Zhou <yszhou4tech@gmail.com>
+
+START=15
+
+ovs_script_dir=/usr/share/openvswitch/scripts
+ovs_ctl="$ovs_script_dir/ovs-ctl"; [ -x "$ovs_ctl" ] || ovs_ctl=:
+ovn_ctl="$ovs_script_dir/ovn-ctl"; [ -x "$ovn_ctl" ] || ovn_ctl=:
+
+EXTRA_COMMANDS=status
+
+start() {
+ ovs_action start "$@"
+}
+
+stop() {
+ ovs_action stop "$@"
+}
+
+restart() {
+ ovs_action restart "$@"
+}
+
+status() {
+ ovs_action status "$@"
+}
+
+ovs_action_cfgs=
+ovs_action() {
+ local action="$1"; shift
+ local cfgtype
+
+ ovs_action_cfgs="$*"
+ config_load openvswitch
+ for cfgtype in ovs ovn_northd ovn_controller; do
+ config_foreach "ovs_xx" "$cfgtype" "$action" "$cfgtype"
+ done
+}
+
+ovs_xx() {
+ local cfg="$1"
+ local action="$2"
+ local cfgtype="$3"
+ local disabled
+
+ if [ -n "$ovs_action_cfgs" ] && ! list_contains "ovs_action_cfgs" "$cfg"; then
+ return
+ fi
+ case "$action" in
+ status|stop) ;;
+ *)
+ config_get_bool disabled "$cfg" disabled 0
+ [ "$disabled" -le 0 ] || return
+ ;;
+ esac
+
+ case "$cfgtype" in
+ ovs)
+ "$ovs_ctl" "$action" \
+ --system-id=random
+ ;;
+ ovn_*)
+ "$ovn_ctl" "${action}_${cfgtype#ovn_}"
+ ;;
+ esac
+}
--- /dev/null
+#!/bin/sh
+
+s=/usr/share/openvswitch/scripts
+case "$0" in
+ *ovs-ctl) "$s/ovs-ctl" "$@" ;;
+ *ovs-kmod-ctl) "$s/ovs-kmod-ctl" "$@" ;;
+ *ovn-ctl) "$s/ovn-ctl" "$@" ;;
+ *) exit 1;;
+esac
-diff --git a/configure.ac b/configure.ac
-index e6a23a6..8a7c6d6 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -118,7 +118,6 @@ OVS_CHECK_XENSERVER_VERSION
+@@ -122,7 +122,6 @@ OVS_CHECK_SOCKET_LIBS
+ OVS_CHECK_XENSERVER_VERSION
OVS_CHECK_GROFF
- OVS_CHECK_GNU_MAKE
OVS_CHECK_TLS
-OVS_CHECK_ATOMIC_LIBS
OVS_CHECK_GCC4_ATOMICS
OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(1)
OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(2)
-diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
-index 712cb5a..e840f10 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
-@@ -40,7 +40,9 @@
+@@ -39,7 +39,9 @@
#include <netpacket/packet.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <net/if_packet.h>
+#endif
#include <net/route.h>
- #include <netinet/in.h>
#include <poll.h>
-diff --git a/lib/ovs-atomic.h b/lib/ovs-atomic.h
-index 9ead907..0a131d7 100644
+ #include <stdlib.h>
--- a/lib/ovs-atomic.h
+++ b/lib/ovs-atomic.h
-@@ -318,7 +318,7 @@
+@@ -320,7 +320,7 @@
#include "util.h"
#define IN_OVS_ATOMIC_H
-From c27232c954cdbe0207252ad88fddad4fd6ac0fbc Mon Sep 17 00:00:00 2001
+From e4ac9741a99866976322c21605b312bc27633c92 Mon Sep 17 00:00:00 2001
From: Helmut Schaa <helmut.schaa@googlemail.com>
Date: Wed, 8 Jan 2014 13:48:33 +0100
-Subject: [PATCH 100/104] netdev-linux: Use unsigned int for ifi_flags
+Subject: [PATCH 100/107] netdev-linux: Use unsigned int for ifi_flags
ifi_flags is unsigned, the local equivalents should do the same.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
-index c0471be15..0750e5f2c 100644
+index e16ea58a0..5ada9a21f 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
-@@ -2788,7 +2788,7 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
+@@ -3115,7 +3115,7 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
enum netdev_flags on, enum netdev_flags *old_flagsp)
OVS_REQUIRES(netdev->mutex)
{
int error = 0;
old_flags = netdev->ifi_flags;
---
-2.16.2
-
-From a6df8dd455c8be7c0c2ba79f35cf5390e892b39e Mon Sep 17 00:00:00 2001
+From 9f4775d9a2541e8128ea99f3b02925cc1ee05374 Mon Sep 17 00:00:00 2001
From: Helmut Schaa <helmut.schaa@googlemail.com>
Date: Wed, 8 Jan 2014 13:48:49 +0100
-Subject: [PATCH 101/104] netdev-linux: Let interface flag survive internal
+Subject: [PATCH 101/107] netdev-linux: Let interface flag survive internal
port setup
Due to a race condition when bringing up an internal port on Linux
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
-index 0750e5f2c..59e7b9c96 100644
+index 5ada9a21f..bb8275cfa 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
-@@ -2791,7 +2791,13 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
+@@ -3118,7 +3118,13 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
unsigned int old_flags, new_flags;
int error = 0;
*old_flagsp = iff_to_nd_flags(old_flags);
new_flags = (old_flags & ~nd_to_iff_flags(off)) | nd_to_iff_flags(on);
if (new_flags != old_flags) {
---
-2.16.2
-
-From b3cc748d502f7f87aeb103b3f69573b0e640e2ba Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 28 Feb 2018 13:42:44 +0800
-Subject: [PATCH 102/104] python: separate host/target python for cross-compile
+From e451d74788c73e8679e6a2268185a08901ac7f8c Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Tue, 21 Aug 2018 12:21:05 +0000
+Subject: [PATCH 102/107] python: separate host/target python for cross-compile
At the moment, python-six is a requirement for openvswitch python
library on target machine.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
---
- Makefile.am | 2 +-
- m4/openvswitch.m4 | 12 ++++--------
- 2 files changed, 5 insertions(+), 9 deletions(-)
+ Makefile.am | 2 +-
+ m4/openvswitch.m4 | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
-index 31d633179..4b9e8d491 100644
+index 788972804..cd90cc176 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -59,7 +59,7 @@ endif
+@@ -60,7 +60,7 @@ endif
# foo/__init__.pyc will cause Python to ignore foo.py.
run_python = \
PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \
ALL_LOCAL =
BUILT_SOURCES =
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
-index 00ffad35f..52f207bda 100644
+index 5743f83ce..acb6b140e 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
-@@ -347,20 +347,16 @@ else:
- if test $ovs_cv_python = no; then
- AC_MSG_ERROR([cannot find python 2.7 or higher.])
- fi
-- AM_MISSING_PROG([PYTHON], [python])
-+ AC_SUBST([PYTHON])
- PYTHON=$ovs_cv_python
-+ AM_MISSING_PROG([PYTHON_HOST], [python])
-+ PYTHON_HOST=$ovs_cv_python_host
+@@ -449,7 +449,9 @@ AC_DEFUN([OVS_CHECK_PYTHON],
+ fi])
+ AC_SUBST([PYTHON])
+ PYTHON=$ovs_cv_python
++ PYTHON_HOST=$ovs_cv_python_host
+ AC_SUBST([HAVE_PYTHON])
++ AM_MISSING_PROG([PYTHON_HOST], [python])
+ HAVE_PYTHON=yes
+ AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
- # HAVE_PYTHON is always true. (Python has not always been a build
- # requirement, so this variable is now obsolete.)
- AC_SUBST([HAVE_PYTHON])
- HAVE_PYTHON=yes
-- AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])
--
-- AC_MSG_CHECKING([whether $PYTHON has six library])
-- if ! $PYTHON -c 'import six ; six.moves.range' >&AS_MESSAGE_LOG_FD 2>&1; then
-- AC_MSG_ERROR([Missing Python six library or version too old.])
-- fi
-- AC_MSG_RESULT([yes])])
-+ AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
-
- dnl Checks for Python 3.x, x >= 4.
- AC_DEFUN([OVS_CHECK_PYTHON3],
---
-2.16.2
-
-From 05a6fa94778f9d6c54ca676de80708d03d6c365a Mon Sep 17 00:00:00 2001
+From 6b9732c8851c5466f2a363d88b5acae320801efe Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Wed, 14 Mar 2018 16:40:01 +0800
-Subject: [PATCH 103/104] ovs-ctl: fix setting hostname
+Subject: [PATCH 103/107] ovs-ctl: fix setting hostname
The command "hostname" is not available in OpenWrt by default.
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
-index 4ddc450fb..52018e6d3 100755
+index 43c8f32b7..6203ecff5 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
-@@ -68,9 +68,7 @@ ovs_vsctl () {
+@@ -36,9 +36,7 @@ insert_mod_if_required () {
}
set_hostname () {
}
set_system_ids () {
---
-2.16.2
-
-From d8dd661e1c100a2d2ba0361cf6c91dcdedfeeb70 Mon Sep 17 00:00:00 2001
+From 940441e2982cb35765830060e8203e5dd1a0f967 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Wed, 14 Mar 2018 16:44:13 +0800
-Subject: [PATCH 104/104] ovs-lib: fix install_dir()
+Subject: [PATCH 104/107] ovs-lib: fix install_dir()
The command "install" is not available in OpenWrt by default
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
-index 1bccea0c5..457297f3f 100644
+index 090a14434..f2a30e065 100644
--- a/utilities/ovs-lib.in
+++ b/utilities/ovs-lib.in
-@@ -157,7 +157,10 @@ install_dir () {
+@@ -159,7 +159,10 @@ install_dir () {
[ "${OVS_USER##*:}" != "" ] && INSTALL_GROUP="${OVS_USER##*:}"
if test ! -d "$DIR"; then
- install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR"
+ mkdir -p "$DIR"
-+ chmod "$INSTALL_MODE"
++ chmod "$INSTALL_MODE" "$DIR"
+ chown "$INSTALL_USER" "$DIR"
+ chgrp "$INSTALL_GROUP" "$DIR"
restorecon "$DIR" >/dev/null 2>&1
fi
}
---
-2.16.2
-
--- /dev/null
+From d0cad5ac122aca722dc2013c1f53fda44c477cf2 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Tue, 21 Aug 2018 13:02:21 +0000
+Subject: [PATCH 105/107] build: disable building tests
+
+Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
+---
+ Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index cd90cc176..2e9e50f3a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -477,7 +477,6 @@ include m4/automake.mk
+ include lib/automake.mk
+ include ofproto/automake.mk
+ include utilities/automake.mk
+-include tests/automake.mk
+ include include/automake.mk
+ include third-party/automake.mk
+ include debian/automake.mk
--- /dev/null
+From 2a59f2b60e8a22dc93d48c511b5c4255b429ff66 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Wed, 5 Sep 2018 12:32:54 +0000
+Subject: [PATCH 106/107] ovs-save: compatible with busybox ip command
+
+Busybox ip command will have exit code 1 for `ip -V` or `ip help` etc.,
+use `ip rule list` to cover both iproute2 and busybox ip command
+
+Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
+---
+ utilities/ovs-save | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utilities/ovs-save b/utilities/ovs-save
+index ea8fb6a45..72d460df4 100755
+--- a/utilities/ovs-save
++++ b/utilities/ovs-save
+@@ -38,7 +38,7 @@ EOF
+ }
+
+ save_interfaces () {
+- if (ip -V) > /dev/null 2>&1; then :; else
++ if (ip rule list) > /dev/null 2>&1; then :; else
+ echo "$0: ip not found in $PATH" >&2
+ exit 1
+ fi
--- /dev/null
+From 1e859f407b94a0f549fc41fceec11ca12653878b Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Thu, 6 Sep 2018 11:48:20 +0000
+Subject: [PATCH 107/107] datapath: use KARCH when building linux datapath
+ modules
+
+Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
+---
+ datapath/linux/Makefile.main.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in
+index 7d18253be..039485d16 100644
+--- a/datapath/linux/Makefile.main.in
++++ b/datapath/linux/Makefile.main.in
+@@ -68,10 +68,10 @@ ifeq (,$(wildcard $(CONFIG_FILE)))
+ endif
+
+ default:
+- $(MAKE) -C $(KSRC) M=$(builddir) modules
++ $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules
+
+ modules_install:
+- $(MAKE) -C $(KSRC) M=$(builddir) modules_install
++ $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules_install
+ depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h`
+ endif
+
PKG_NAME:=p910nd
PKG_VERSION:=0.97
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/p910nd
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
-START=50
+START=99
USE_PROCD=1
append_bool() {
append_string "$section" port ""
procd_open_instance $name
procd_set_param command /usr/sbin/p910nd $args
+ procd_set_param respawn
procd_close_instance
fi
}
PKG_LICENSE:=Apache-2.0
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_MIRROR_HASH:=9e04b979cff827974ec9e9708daf116867bf1268cdad7dff4ad585172123f6b5
PKG_SOURCE_URL:=https://github.com/pagekite/libpagekite.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=v$(PKG_REV)
include $(TOPDIR)/rules.mk
PKG_NAME:=pen
-PKG_VERSION:=0.34.0
+PKG_VERSION:=0.34.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://siag.nu/pub/pen/
-PKG_HASH:=a3306bfb02619b103ff431002bb91079048bf2dd24f739bf38e373860558cd27
+PKG_HASH:=2b640795029df9d1672e17202c109cc5d42538f6754a6070dc27da640881e864
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=511a6bedd65169ffd1aadb38dd470d53d445cffcc3a322ec2dd0dee6009162a6
+PKG_MIRROR_HASH:=8c8d1743b8972ade6c75027346fc652f7a1c0f17e2f9bd2e65aad20013d9870e
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/br101/pingcheck
PKG_SOURCE_PROTO:=git
+++ /dev/null
-#
-# Copyright (C) 2006-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=portmap
-PKG_VERSION:=6.0
-PKG_RELEASE:=4
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://neil.brown.name/portmap/
-PKG_HASH:=02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de
-
-PKG_LICENSE:=BSD-4c
-PKG_LICENSE_FILES:=portmap.man
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/portmap
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=+libwrap $(LIBRPC_DEPENDS)
- TITLE:=The RPC Portmapper
- URL:=http://neil.brown.name/portmap/
- MAINTAINER:=Peter Wagner <tripolar@gmx.at>
- USERID:=rpc=65533:rpc=65533
-endef
-
-define Package/portmap/description
- Portmap is a server that converts RPC (Remote Procedure Call) program
- numbers into DARPA protocol port numbers.
-endef
-
-MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DHOSTS_ACCESS -DFACILITY=LOG_DAEMON -DIGNORE_SIGCHLD" \
- RPCUSER="rpc" \
- LDLIBS="$(TARGET_LDFLAGS) -lwrap $(LIBRPC)" \
- all
-
-define Package/portmap/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/portmap $(1)/usr/sbin/
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/portmap.init $(1)/etc/init.d/portmap
-endef
-
-$(eval $(call BuildPackage,portmap))
+++ /dev/null
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2011 OpenWrt.org
-
-START=19
-STOP=19
-
-USE_PROCD=1
-
-start_service() {
- procd_open_instance
- procd_set_param command /usr/sbin/portmap -f
- procd_close_instance
-}
+++ /dev/null
-diff -ur portmap_6.0.org/Makefile portmap_6.0/Makefile
---- portmap_6.0.org/Makefile 2008-04-19 22:44:35.000000000 +0200
-+++ portmap_6.0/Makefile 2008-04-19 00:02:01.000000000 +0200
-@@ -127,7 +127,7 @@
- CPPFLAGS += $(HOSTS_ACCESS)
- portmap: CFLAGS += -fpie
- portmap: LDLIBS += $(WRAP_LIB)
--portmap: LDFLAGS += -pie
-+#portmap: LDFLAGS += -pie
- portmap: portmap.o pmap_check.o from_local.o
-
- from_local: CPPFLAGS += -DTEST
PKG_NAME:=privoxy
PKG_VERSION:=3.0.26
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=privoxy-$(PKG_VERSION)-stable-src.tar.gz
PKG_SOURCE_URL:=@SF/ijbswa
;;
esac
}
+
+ list_cb()
+ {
+ option_cb "$@"
+ }
fi
}
include $(TOPDIR)/rules.mk
PKG_NAME:=radsecproxy
-PKG_VERSION:=1.6.8
+PKG_VERSION:=1.7.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://software.uninett.no/radsecproxy/
-PKG_HASH:=9923203c3aaf17e31d5bc7a61b99e5a6aa0ef19a8397616f6ef9c0c41948f7d2
+PKG_SOURCE_URL:=https://github.com/radsecproxy/radsecproxy/releases/download/$(PKG_VERSION)/
+PKG_HASH:=2cf23e618ab9275221350acf5a97bce4ff18aee472045f8a3b4c7673491079d2
-PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE:=BSD-3-CLAUSE
PKG_LICENSE_FILES:=LICENSE
+PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/radsecproxy
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libopenssl +libpthread
+ DEPENDS:=+libopenssl +libpthread +libnettle
TITLE:=radsecproxy
- URL:=http://software.uninett.no/radsecproxy
+ URL:=https://radsecproxy.github.io/
MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
endef
+++ /dev/null
---- a/dtls.c
-+++ b/dtls.c
-@@ -523,6 +523,7 @@ void *udpdtlsserverrd(void *arg) {
- free(params);
- cacheexpire(sessioncache, &lastexpiry);
- }
-+ return NULL;
- }
-
- int dtlsconnect(struct server *server, struct timeval *when, int timeout, char *text) {
-@@ -642,6 +643,7 @@ void *udpdtlsclientrd(void *arg) {
- if (udp2bio(s, conf->servers->rbios, cnt))
- debug(DBG_DBG, "radudpget: got DTLS in UDP from %s", addr2string((struct sockaddr *)&from));
- }
-+ return NULL;
- }
-
- void *dtlsclientrd(void *arg) {
---- a/radsecproxy.c
-+++ b/radsecproxy.c
-@@ -3203,6 +3203,8 @@ void *sighandler(void *arg) {
- debug(DBG_WARN, "sighandler: ignoring signal %d", sig);
- }
- }
-+
-+ return NULL;
- }
-
- int createpidfile(const char *pidfile) {
-@@ -3289,6 +3291,8 @@ int radsecproxy_main(int argc, char **ar
- /* just hang around doing nothing, anything to do here? */
- for (;;)
- sleep(1000);
-+
-+ return 0;
- }
-
- /* Local Variables: */
---- a/udp.c
-+++ b/udp.c
-@@ -266,6 +266,8 @@ void *udpclientrd(void *arg) {
- buf = radudpget(*s, NULL, &server, NULL);
- replyh(server, buf);
- }
-+
-+ return NULL;
- }
-
- void *udpserverrd(void *arg) {
-@@ -310,6 +312,8 @@ void *udpserverwr(void *arg) {
- debug(DBG_DBG, "udpserverwr: refcount %d", reply->refcount);
- freerq(reply);
- }
-+
-+ return NULL;
- }
-
- void addclientudp(struct client *client) {
-diff --git a/radsecproxy.c b/radsecproxy.c
-index 563c4a8..9fa076d 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
-@@ -3382,18 +3382,16 @@ int radsecproxy_main(int argc, char **argv) {
+@@ -3385,15 +3385,13 @@ int radsecproxy_main(int argc, char **ar
options.loglevel = loglevel;
else if (options.loglevel)
debug_set_level(options.loglevel);
- debug_set_destination(options.logdestination
- ? options.logdestination
- : "x-syslog:///", LOG_TYPE_DEBUG);
-+ debug_set_destination(options.logdestination
-+ ? options.logdestination
-+ : "x-syslog:///", LOG_TYPE_DEBUG);
- #if defined(WANT_FTICKS)
- if (options.ftickssyslogfacility) {
- debug_set_destination(options.ftickssyslogfacility,
- LOG_TYPE_FTICKS);
- free(options.ftickssyslogfacility);
- }
--#endif
++ debug_set_destination(options.logdestination
++ ? options.logdestination
++ : "x-syslog:///", LOG_TYPE_DEBUG);
+ if (options.ftickssyslogfacility) {
-+ debug_set_destination(options.ftickssyslogfacility,
-+ LOG_TYPE_FTICKS);
-+ free(options.ftickssyslogfacility);
++ debug_set_destination(options.ftickssyslogfacility,
++ LOG_TYPE_FTICKS);
++ free(options.ftickssyslogfacility);
}
-+#endif
free(options.logdestination);
-
- if (!list_first(clconfs))
+ if (options.logtid)
include $(TOPDIR)/rules.mk
PKG_NAME:=reaver
-PKG_VERSION:=1.6.4
+PKG_VERSION:=1.6.5
PKG_RELEASE:=1
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/t6x/reaver-wps-fork-t6x/releases/download/v$(PKG_VERSION)
-PKG_HASH:=bf63b3d5a5596b0bd292a995f778dc99b0b89af88237cc2cfd7c4abbce942bb2
+PKG_HASH:=342e9d265cf459bd2387205b73a63d1fc7582e268f0e9aec20613f3ec11b6a6b
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=docs/LICENSE
include $(TOPDIR)/rules.mk
PKG_NAME:=redsocks
-PKG_VERSION:=0.4-20150907
+PKG_VERSION:=0.5
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=30ced050c58cbdd39732921a794b053127e9c45ebdcdd4a6023bdc5e434607da
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/darkk/redsocks.git
-PKG_SOURCE_VERSION:=2118c616b4970a0436eceaa57a6e3451ec98ad2b
+PKG_SOURCE:=$(PKG_NAME)-release-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/darkk/redsocks/tar.gz/release-$(PKG_VERSION)?
+PKG_HASH:=bbeb531d7f1986d7102f1bd6733dacce41d3f3ba7d604f1aab61c63e0ba2ee62
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
PKG_MAINTAINER:=Johannes Morgenroth <jm@m-network.de>
PKG_LICENSE:=Apache-2.0
define Package/redsocks
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libevent2
+ DEPENDS:=+libevent2-core
TITLE:=Redirect any TCP connection to a SOCKS or HTTPS proxy server
endef
uses the system firewall's redirection facility to intercept TCP connections,
thus the redirection is system-wide, with fine-grained control, and does
not depend on LD_PRELOAD libraries.
-
+
Redsocks supports tunneling TCP connections and UDP packets. It has
authentication support for both, SOCKS and HTTP proxies.
-
+
Also included is a small DNS server returning answers with the "truncated" flag
set for any UDP query, forcing the resolver to use TCP.
endef
PKG_NAME:=rp-pppoe
PKG_VERSION:=3.12
-PKG_RELEASE:=3
-PKG_MAINTAINER:=Daniel Dickinson <lede@cshore.thecshore.com>
+PKG_RELEASE:=6
PKG_LICENSE:=LGPL-2.0+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
# Copyright (C) 2006-2011 OpenWrt.org
START=50
+STOP=50
USE_PROCD=1
pppoe_triggers() {
local cfg="$1"
- local interface server_interfaces client_interfaces both_interfaces
+ local enabled interface server_interfaces client_interfaces both_interfaces
+ config_get_bool enabled "$cfg" enabled 1
+ [ "$enabled" -gt 0 ] || return 0
config_get server_interfaces "$cfg" server_interface
config_get client_interfaces "$cfg" client_interface
config_get both_interfaces "$cfg" both_interfaces
- for interface in $server_interfaces; do
- append interfaces "$interface" "|"
- done
- for interface in $client_interfaces; do
- append interfaces "$interface" "|"
- done
- for interface in $both_interfaces; do
- append interfaces "$interface" "|"
+ for interface in $server_interfaces $client_interfaces $both_interfaces; do
+ procd_add_reload_interface_trigger $interface
done
}
pppoe_relay_instance() {
local cfg="$1"
- local interface server_interfaces client_interfaces both_interfaces maxsessions timeout OPTIONS
+ local enabled interface device server_interfaces client_interfaces both_interfaces maxsessions timeout OPTIONS
+ config_get_bool enabled "$cfg" enabled 1
+ [ "$enabled" -gt 0 ] || return 0
config_get server_interfaces "$cfg" server_interface
config_get client_interfaces "$cfg" client_interface
config_get both_interfaces "$cfg" both_interfaces
if [ "$use_non_uci_config" -gt 0 ]; then
. /etc/default/pppoe-relay
else
- [ -z "${server_interfaces}${client_interfaces}${both_interfaces}" ] && return 1
+ local NEED_INTFS=SC
+ . /lib/functions/network.sh
for interface in $server_interfaces; do
- append OPTIONS "-S $interface"
+ if network_get_physdev device $interface; then
+ append OPTIONS "-S $device"
+ NEED_INTFS=${NEED_INTFS/S/}
+ fi
done
for interface in $client_interfaces; do
- append OPTIONS "-C $interface"
+ if network_get_physdev device $interface; then
+ append OPTIONS "-C $device"
+ NEED_INTFS=${NEED_INTFS/C/}
+ fi
done
for interface in $both_interfaces; do
- append OPTIONS "-B $interface"
+ if network_get_physdev device $interface; then
+ append OPTIONS "-B $device"
+ NEED_INTFS=${NEED_INTFS/?/}
+ fi
done
+ [ -z "${NEED_INTFS}" ] || return 1 # need at least 2 interfaces, one for server(s) and one for client(s)
[ -n "$maxsessions" ] && append OPTIONS "-n $maxsessions"
[ -n "$timeout" ] && append OPTIONS "-i $timeout"
fi
procd_open_instance
- procd_set_param command /usr/sbin/pppoe-relay -F
- procd_append_param command $OPTIONS
+ procd_set_param command /usr/sbin/pppoe-relay -F $OPTIONS
+ procd_set_param respawn
procd_close_instance
}
start_service() {
- local use_non_uci_config
+ local use_non_uci_config
- config_load pppoe
- config_foreach pppoe_relay_instance pppoe_relay
+ config_load pppoe
+ config_foreach pppoe_relay_instance pppoe_relay
}
-reload_triggers() {
- local interfaces
-
- config_load pppoe
- config_foreach pppoe_triggers pppoe_relay
+service_triggers() {
+ procd_add_reload_trigger "pppoe"
- procd_add_reload_trigger "pppoe"
- procd_add_interface_trigger "$interfaces"
+ config_load pppoe
+ config_foreach pppoe_triggers pppoe_relay
}
# Copyright (C) 2006-2011 OpenWrt.org
START=50
+STOP=50
USE_PROCD=1
pppoe_triggers() {
- local cfg="$1"
- local interface
- config_get interface "$cfg" interface
+ local cfg="$1"
+ local enabled interface
+ config_get_bool enabled "$cfg" enabled 1
+ [ "$enabled" -gt 0 ] || return 0
+ config_get interface "$cfg" interface
+ procd_add_reload_interface_trigger $interface
}
pppoe_instance() {
- local cfg="$1"
- local interface ac_name service_names service_name maxsessionsperpeer localip firstremoteip maxsessions optionsfiles randomsession unit offset timeout mss sync OPTIONS
- config_get interface "$cfg" interface
- config_get ac_name "$cfg" ac_name
- config_get service_names "$cfg" service_name
- config_get maxsessionsperpeer "$cfg" maxsessionsperpeer
- config_get localip "$cfg" localip
- config_get firstremoteip "$cfg" firstremoteip
- config_get maxsessions "$cfg" maxsessions
- config_get optionsfile "$cfg" optionsfile
- config_get_bool randomsession "$cfg" randomsession 1
- config_get_bool unit "$cfg" unit 0
- config_get offset "$cfg" offset
- config_get timeout "$cfg" timeout
- config_get mss "$cfg" mss
- config_get_bool sync "$cfg" sync 0
- config_get use_non_uci_config "$cfg" use_non_uci_config 0
+ local cfg="$1"
+ local enabled interface device ac_name service_names service_name maxsessionsperpeer localip firstremoteip maxsessions optionsfiles randomsession unit offset timeout mss sync OPTIONS
+ config_get_bool enabled "$cfg" enabled 1
+ [ "$enabled" -gt 0 ] || return 0
+ config_get interface "$cfg" interface
+ config_get ac_name "$cfg" ac_name
+ config_get service_names "$cfg" service_name
+ config_get maxsessionsperpeer "$cfg" maxsessionsperpeer
+ config_get localip "$cfg" localip
+ config_get firstremoteip "$cfg" firstremoteip
+ config_get maxsessions "$cfg" maxsessions
+ config_get optionsfile "$cfg" optionsfile
+ config_get_bool randomsession "$cfg" randomsession 1
+ config_get_bool unit "$cfg" unit 0
+ config_get offset "$cfg" offset
+ config_get timeout "$cfg" timeout
+ config_get mss "$cfg" mss
+ config_get_bool sync "$cfg" sync 0
+ config_get_bool use_non_uci_config "$cfg" use_non_uci_config 0
- if [ "$use_non_uci_config" -gt 0 ]; then
- . /etc/default/pppoe-server
- else
- [ -z "$interface" ] && return 1
- [ -n "$ac_name" ] && append OPTIONS "-C $ac_name"
- for service_name in $service_names; do
- append OPTIONS "-S $service_name"
- done
- append OPTIONS "-I $interface"
- [ -n "$maxsessionsperpeer" ] && append OPTIONS "-x $maxsessionsperpeer"
- [ -n "$localip" ] && append OPTIONS "-L $localip"
- [ -n "$firstremoteip" ] && append OPTIONS "-R $firstremoteip"
- [ -n "maxsessions" ] && append OPTIONS "-N $maxsessions"
- [ -n "optionsfile" ] && append OPTIONS "-O $optionsfile"
- [ "$randomsession" = "1" ] && append OPTIONS "-r"
- [ "$unit" = "1" ] && append OPTIONS "-u"
- [ -n "$offset" ] && append OPTIONS "-o $offset"
- [ -n "$timeout" ] && append OPTIONS "-T $timeout"
- [ -n "$mss" ] && append OPTIONS "-m $mss"
- [ "$sync" = "1" ] && append OPTIONS "-s"
- fi
+ if [ "$use_non_uci_config" -gt 0 ]; then
+ . /etc/default/pppoe-server
+ else
+ . /lib/functions/network.sh
+ network_get_physdev device $interface || return 1
+ [ -n "$ac_name" ] && append OPTIONS "-C $ac_name"
+ for service_name in $service_names; do
+ append OPTIONS "-S $service_name"
+ done
+ append OPTIONS "-I $device"
+ [ -n "$maxsessionsperpeer" ] && append OPTIONS "-x $maxsessionsperpeer"
+ [ -n "$localip" ] && append OPTIONS "-L $localip"
+ [ -n "$firstremoteip" ] && append OPTIONS "-R $firstremoteip"
+ [ -n "maxsessions" ] && append OPTIONS "-N $maxsessions"
+ [ -n "optionsfile" ] && append OPTIONS "-O $optionsfile"
+ [ "$randomsession" = "1" ] && append OPTIONS "-r"
+ [ "$unit" = "1" ] && append OPTIONS "-u"
+ [ -n "$offset" ] && append OPTIONS "-o $offset"
+ [ -n "$timeout" ] && append OPTIONS "-T $timeout"
+ [ -n "$mss" ] && append OPTIONS "-m $mss"
+ [ "$sync" = "1" ] && append OPTIONS "-s"
+ fi
- procd_open_instance
- procd_set_param command /usr/sbin/pppoe-server -F
- procd_append_param command -k $OPTIONS
- procd_set_param file /etc/ppp/options
- procd_append_param file /etc/ppp/pppoe-server-options
- procd_close_instance
+ procd_open_instance
+ procd_set_param command /usr/sbin/pppoe-server -F -k $OPTIONS
+ procd_set_param respawn
+ procd_set_param file /etc/ppp/options
+ procd_append_param file /etc/ppp/pppoe-server-options
+ procd_close_instance
}
start_service() {
- config_load pppoe
- config_foreach pppoe_instance pppoe_server
+ config_load pppoe
+ config_foreach pppoe_instance pppoe_server
}
service_triggers() {
- local interface
- config_load pppoe
- config_foreach pppoe_triggers pppoe_server
+ procd_add_reload_trigger "pppoe"
- procd_add_reload_trigger "pppoe"
- procd_add_interface_trigger "$interface"
+ config_load pppoe
+ config_foreach pppoe_triggers pppoe_server
}
--- /dev/null
+--- a/src/pppoe.h
++++ b/src/pppoe.h
+@@ -132,6 +132,9 @@ typedef unsigned long UINT32_t;
+ #endif
+
+ #include <netinet/in.h>
++/* avoid redefinitions if <linux/in.h> and <linux/in6.h> get included. */
++#define _LINUX_IN_H
++#define _LINUX_IN6_H
+
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rpcbind
+PKG_VERSION:=1.2.5
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=@SF/rpcbind
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_HASH:=2ce360683963b35c19c43f0ee2c7f18aa5b81ef41c3fdbd15ffcb00b8bffda7a
+
+PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_FIXUP:=autoreconf
+PKG_REMOVE_FILES:=autogen.sh aclocal.m4
+PKG_INSTALL:=1
+
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_RPCBIND_LIBWRAP \
+ CONFIG_RPCBIND_WARMSTARTS
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/rpcbind
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+libtirpc +RPCBIND_LIBWRAP:libwrap
+ TITLE:=Universal addresses to RPC mapper
+ URL:=http://rpcbind.sourceforge.net/
+ USERID:=rpc=65533:rpc=65533
+endef
+
+define Package/rpcbind/description
+ The rpcbind utility is a server that converts RPC program numbers into universal addresses.
+ It must be running on the host to be able to make RPC calls on a server on that machine.
+
+ Rpcbind replaces portmap for NFS v2/v3. It has more features, like ipv6 support.
+ Note: Nfs4 only configurations can run without it.
+endef
+
+define Package/rpcbind/config
+if PACKAGE_rpcbind
+ config RPCBIND_LIBWRAP
+ bool "Enable libwrap (TCP wrappers) support."
+ default y
+
+ config RPCBIND_WARMSTARTS
+ bool "Enable warmstarts support"
+ default y
+ help
+ The warmstart feature saves RPC registrations on termination.
+endif
+endef
+
+CONFIGURE_ARGS += \
+ --with-rpcuser=rpc \
+ --without-systemdsystemunitdir
+
+ifeq ($(CONFIG_RPCBIND_LIBWRAP),y)
+ CONFIGURE_ARGS += --enable-libwrap
+else
+ CONFIGURE_ARGS += --disable-libwrap
+endif
+ifeq ($(CONFIG_RPCBIND_WARMSTARTS),y)
+ CONFIGURE_ARGS += --enable-warmstarts
+endif
+
+define Package/rpcbind/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rpcinfo $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rpcbind $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/rpcbind.init $(1)/etc/init.d/rpcbind
+endef
+
+$(eval $(call BuildPackage,rpcbind))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+STOP=19
+
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/rpcbind -f -w
+ procd_set_param respawn
+ procd_close_instance
+}
PKG_NAME:=rsync
PKG_VERSION:=3.1.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.samba.org/pub/rsync/src
CONFIGURE_ARGS+= --with-included-zlib=yes
endif
+ifeq ($(CONFIG_IPV6),y)
+ TARGET_CFLAGS+= -DINET6
+else
+ CONFIGURE_ARGS+= --disable-ipv6
+endif
+
define Package/rsyncd
SECTION:=net
CATEGORY:=Network
include $(TOPDIR)/rules.mk
PKG_NAME:=rsyslog
-PKG_VERSION:=8.18.0
+PKG_VERSION:=8.38.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.rsyslog.com/files/download/rsyslog/
-PKG_HASH:=94346237ecfa22c9f78cebc3f18d59056f5d9846eb906c75beaa7e486f02c695
+PKG_SOURCE_URL:=https://www.rsyslog.com/files/download/rsyslog/
+PKG_HASH:=4d328ed3bcae784e15401c6c20ada2a9be380798ff6bf0da3fe2095915bba22c
-PKG_MAINTAINER:=Dov Murik <dmurik@us.ibm.com>
+PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
SECTION:=net
CATEGORY:=Network
TITLE:=Enhanced system logging and kernel message trapping daemons
- URL:=http://www.rsyslog.com/
+ URL:=https://www.rsyslog.com/
DEPENDS:=+libestr +libfastjson +libuuid +zlib +USE_UCLIBC:libpthread +USE_UCLIBC:librt
endef
CONFIGURE_ARGS+= \
--disable-libgcrypt \
- --disable-liblogging-stdlog
-
-TARGET_CFLAGS += \
- -std=c99
+ --disable-fmhttp \
+ --disable-default-tests \
+ --disable-libsystemd
define Package/rsyslog/install
$(INSTALL_DIR) $(1)/usr/sbin
include $(TOPDIR)/rules.mk
PKG_NAME:=rtorrent
-PKG_VERSION:=0.9.6-git-1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_VERSION:=0.9.7
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/rakshasa/rtorrent.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=62cb5a4605c0664bc522e0e0da9c72f09cf643a9
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=3c6834b12ebfa8d62618f6e9dbc06dfa593861fa0b435d2fd1bddb0e886fc77b
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/rakshasa/rtorrent/releases/download/v$(PKG_VERSION)
+PKG_HASH:=5d9842fe48c9582fbea2c7bf9f51412c1ccbba07d059b257039ad53b863fe8bb
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
TITLE:=BitTorrent client for ncurses
URL:=http://libtorrent.rakshasa.no/
DEPENDS:=+libcurl +libtorrent +libncursesw +libsigcxx +libpthread
- MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+ MAINTAINER:=Rosen Penev <rosenp@gmail.com>
endef
define Package/rtorrent/Default/description
---- a/configure.ac
-+++ b/configure.ac
-@@ -4,7 +4,6 @@ AC_DEFINE(API_VERSION, 9, api version)
-
- AM_INIT_AUTOMAKE
- AC_CONFIG_HEADERS(config.h)
--AM_PATH_CPPUNIT(1.9.6)
-
- AC_PROG_CXX
- AC_PROG_LIBTOOL
--- a/scripts/common.m4
+++ b/scripts/common.m4
@@ -153,7 +153,7 @@ dnl Need to fix this so that it uses t
- Canvas(int x = 0, int y = 0, int width = 0, int height = 0);
+ Canvas(int x = 0, int y = 0, int width = 1, int height = 1);
- ~Canvas() { delwin(m_window); }
+ ~Canvas() { if (!m_isDaemon) { delwin(m_window); } }
- void refresh() { wnoutrefresh(m_window); }
+ void refresh() { if (!m_isDaemon) { wnoutrefresh(m_window); } }
--- /dev/null
+config SAMBA4_SERVER_ACL
+ bool "ACL support (xattr)"
+ depends on PACKAGE_samba4-server
+ select PACKAGE_acl
+ help
+ installs: sharesec
+ modules: vfs_acl_xattr vfs_acl_tdb vfs_posixacl
+
+ Extended access control list support
+ default n
+
+config SAMBA4_SERVER_AD_DC
+ bool "Active Directory Domain Controller support (requires krb5-server) (EXPERIMENTAL)"
+ depends on PACKAGE_samba4-server
+ select PACKAGE_python-base
+ select PACKAGE_python-crypto
+ select PACKAGE_libopenssl
+ select PACKAGE_libgnutls
+ select PACKAGE_libopenldap
+ help
+ installs: samba (meta-daemon) python-crypt ntlm_auth
+ scripts: samba-tool
+
+ Run as a Active Directory Domain Controller
+ see: https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller
+ HINT: see section (# Using the Domain Controller as a File Server)
+ NOTE: Extroot is recommend for this setup, as it is not optimized to run completely from RAM/tempfs!
+ default n
+
+config SAMBA4_SERVER_AVAHI
+ bool "Avahi support"
+ depends on PACKAGE_samba4-server
+ select SAMBA4_SERVER_VFS
+ select PACKAGE_libavahi-client
+ help
+ Announce Samba resources via DNS/DNS-SD using the Avahi daemon, for Linux/Mac clients.
+ default y
+
+config SAMBA4_SERVER_VFS
+ bool "Common VFS modules"
+ depends on PACKAGE_samba4-server
+ help
+ installs:
+ modules: (vfs_btrfs) vfs_fruit vfs_shadow_copy2 vfs_recycle vfs_fake_perms vfs_readonly vfs_cap vfs_offline vfs_crossrename vfs_catia vfs_streams_xattr
+
+ Commonly used VFS modules, vfs_btrfs requires kmod-fs-btrfs to be selected separately
+ default y
+
+config SAMBA4_SERVER_QUOTAS
+ bool "Disk quota support"
+ depends on PACKAGE_samba4-server
+ help
+ installs:
+ modules: vfs_default_quota
+
+ Support for disk quotas using the quotas VFS module (vfs_default_quota)
+ default n
+
+config SAMBA4_SERVER_VFSX
+ bool "Extended VFS modules"
+ depends on PACKAGE_samba4-server
+ help
+ installs:
+ modules: vfs_virusfilter vfs_shell_snap vfs_commit vfs_worm vfs_xattr_tdb vfs_aio_fork vfs_aio_pthread (vfs_linux_xfs_sgid) vfs_netatalk vfs_dirsort vfs_fileid
+
+ Additional VFS modules that aren't commonly used, vfs_linux_xfs_sgid requires kmod-fs-xfs to be selected separately
+ default n
+
+config SAMBA4_SERVER_NETBIOS
+ bool "NetBIOS support"
+ depends on PACKAGE_samba4-server
+ help
+ installs: nmbd (daemon)
+
+ Announce Samba resources via NetBIOS using the nmbd daemon
+ WSD (Web Services for Devices) replaces the functionality of NetBIOS and is provided by the wsdd2 package (selected by default).
+ Note: As of Windows 10 Fall Creators Update (1709) NetBIOS isn't supported unless the old SMB1 feature is reinstalled (not recommended).
+ Network shares can be directly accessed via network paths '\\hostname\sharename' and mounted via 'map network drive' without NetBIOS or WSD.
+ default n
+
+config SAMBA4_SERVER_WINBIND
+ bool "Winbind support"
+ depends on PACKAGE_samba4-server
+ depends on SAMBA4_SERVER_AD_DC
+ help
+ installs: winbindd (daemon) wbinfo
+
+ Support using domain users and groups in local commands, such as chown and chgrp.
+ Display domain users and groups in local command's output, such as ls.
+ see: https://wiki.samba.org/index.php/Configuring_Winbindd_on_a_Samba_AD_DC
+ default n
--- /dev/null
+# Based partially on (wongsyrone/hbl0307106015) versions
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=samba
+PKG_VERSION:=4.9.1
+PKG_RELEASE:=3
+
+PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
+PKG_LICENSE:=GPL-3.0-only
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE_URL:=https://download.samba.org/pub/samba/stable/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=33118cbe83a87be085eba1aae6e597878b02d6ac9b2da67454ed33cf3e9853f2
+
+# Buildroot bug? Can't add target deps via '+SAMBA4_SERVER_AD_DC:python-crypto' (as work-around we select via config.in)
+PKG_BUILD_DEPENDS:=SAMBA4_SERVER_AD_DC:python-crypto nfs-kernel-server/host
+
+PKG_CONFIG_DEPENDS:= \
+ CONFIG_SAMBA4_SERVER_NETBIOS \
+ CONFIG_SAMBA4_SERVER_AVAHI \
+ CONFIG_SAMBA4_SERVER_VFS \
+ CONFIG_SAMBA4_SERVER_VFSX \
+ CONFIG_SAMBA4_SERVER_QUOTAS \
+ CONFIG_SAMBA4_SERVER_ACL \
+ CONFIG_SAMBA4_SERVER_AD_DC \
+ CONFIG_SAMBA4_SERVER_WINBIND \
+ CONFIG_PACKAGE_kmod-fs-btrfs \
+ CONFIG_PACKAGE_kmod-fs-xfs
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/version.mk
+
+define Package/samba4/Default
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Samba $(PKG_VERSION)
+ URL:=http://www.samba.org/
+endef
+
+define Package/samba4/Default/description
+ The Samba software suite is a collection of programs that implements the
+ SMB/CIFS protocol for UNIX systems, allowing you to serve files and printers.
+
+ Samba 4 implements up-to protocol version SMB v3.1.1 (Win10), supports mDNS via AVAHI and a AD-DC setup via krb5.
+ NOTE: No cluster and printer support.
+endef
+
+define Package/samba4-libs
+ $(call Package/samba4/Default)
+ TITLE+= libs
+ DEPENDS:= +zlib +libtirpc +krb5-libs +libpopt \
+ +PACKAGE_libcap:libcap +PACKAGE_libpthread:libpthread +PACKAGE_libnettle:libnettle \
+ +PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam +PACKAGE_dbus:dbus +PACKAGE_libavahi-client:libavahi-client \
+ +SAMBA4_SERVER_VFS:attr \
+ +SAMBA4_SERVER_ACL:acl +SAMBA4_SERVER_ACL:attr \
+ +SAMBA4_SERVER_AVAHI:libavahi-client \
+ +SAMBA4_SERVER_AD_DC:python-base +SAMBA4_SERVER_AD_DC:libopenssl +SAMBA4_SERVER_AD_DC:libgnutls +SAMBA4_SERVER_AD_DC:libopenldap +SAMBA4_SERVER_AD_DC:jansson +SAMBA4_SERVER_AD_DC:libarchive
+endef
+
+define Package/samba4-server
+ $(call Package/samba4/Default)
+ TITLE+= server
+ DEPENDS:= +samba4-libs
+endef
+
+define Package/samba4-server/description
+ installs: smbd (daemon) smbpasswd pdbedit testparm
+
+ This provides the basic fileserver service and is the minimum needed to serve file shares.
+ HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
+endef
+
+define Package/samba4-server/config
+ select PACKAGE_wsdd2
+ source "$(SOURCE)/Config.in"
+endef
+
+define Package/samba4-client
+ $(call Package/samba4/Default)
+ TITLE+= client
+ DEPENDS:= +samba4-libs
+endef
+
+define Package/samba4-client/description
+ installs: smbclient cifsdd
+
+ The smbclient program implements a simple ftp-like client for accessing SMB shares
+endef
+
+define Package/samba4-admin
+ $(call Package/samba4/Default)
+ TITLE+= admin tools
+ DEPENDS:= +samba4-libs
+endef
+
+define Package/samba4-admin/description
+ installs: net smbcontrol profiles rpcclient smbcacls smbcquotas
+
+ Administration tools collection
+endef
+
+define Package/samba4-utils
+ $(call Package/samba4/Default)
+ TITLE+= utils
+ DEPENDS:= +samba4-libs
+endef
+
+define Package/samba4-utils/description
+ installs: smbstatus smbtree smbget nmblookup mvxattr
+
+ Utilities collection
+endef
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections
+
+CONFIGURE_VARS += \
+ CPP="$(TARGET_CROSS)cpp"
+
+CONFIGURE_CMD = ./buildtools/bin/waf
+
+# Strip options that WAF configure script does not recognize
+CONFIGURE_ARGS:=$(filter-out \
+ --host=% \
+ --build=% \
+ --program-suffix=% \
+ --disable-nls \
+ --disable-ipv6 \
+ , $(CONFIGURE_ARGS))
+
+CONFIGURE_ARGS += \
+ --hostcc="$(HOSTCC)" \
+ --cross-compile \
+ --cross-answers=cross-answers.txt \
+ --disable-cups \
+ --disable-iprint \
+ --disable-cephfs \
+ --disable-fault-handling \
+ --disable-glusterfs \
+ --disable-rpath \
+ --disable-rpath-install \
+ --disable-rpath-private-install \
+ --enable-fhs \
+ --without-automount \
+ --without-iconv \
+ --without-lttng \
+ --without-ntvfs-fileserver \
+ --without-pam \
+ --without-systemd \
+ --without-utmp \
+ --without-dmapi \
+ --without-fam \
+ --without-gettext \
+ --without-regedit \
+ --without-gpgme
+
+# Optional AES-NI support - https://lists.samba.org/archive/samba-technical/2017-September/122738.html
+# Support for Nettle wasn't comitted
+ifdef CONFIG_TARGET_x86_64
+ CONFIGURE_ARGS += --accel-aes=intelaesni
+else
+ CONFIGURE_ARGS += --accel-aes=none
+endif
+
+CONFIGURE_ARGS += \
+ --with-lockdir=/var/lock \
+ --with-logfilebase=/var/log \
+ --with-piddir=/var/run \
+ --with-privatedir=/etc/samba
+
+CONFIGURE_ARGS += \
+ --with-system-mitkrb5 "$(STAGING_DIR)/usr" \
+ --with-system-mitkdc=/usr/sbin/krb5kdc
+
+ ## embedded-heimdal
+ # --bundled-libraries=talloc,tevent,tdb,ldb,com_err,cmocka,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
+
+ifeq ($(CONFIG_SAMBA4_SERVER_AVAHI),y)
+ CONFIGURE_ARGS += --enable-avahi
+else
+ CONFIGURE_ARGS += --disable-avahi
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_QUOTAS),y)
+ CONFIGURE_ARGS += --with-quotas
+else
+ CONFIGURE_ARGS += --without-quotas
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
+ CONFIGURE_ARGS += --with-acl-support
+else
+ CONFIGURE_ARGS += --without-acl-support
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
+ CONFIGURE_ARGS += --enable-gnutls --with-dnsupdate --with-ads --with-ldap
+ TARGET_CFLAGS := -I$(STAGING_DIR)/usr/include/python2.7 $(TARGET_CFLAGS)
+else
+ CONFIGURE_ARGS += --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo --disable-gnutls --without-dnsupdate --without-ads --without-ldap
+ CONFIGURE_VARS += \
+ python_LDFLAGS="" \
+ python_LIBDIR=""
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
+ CONFIGURE_ARGS += --with-winbind
+else
+ CONFIGURE_ARGS += --without-winbind
+endif
+
+SAMBA4_IDMAP_MODULES :=
+SAMBA4_IDMAP_MODULES_SHARED :=
+SAMBA4_PDB_MODULES :=pdb_smbpasswd,pdb_tdbsam,
+SAMBA4_AUTH_MODULES :=auth_builtin,auth_sam,auth_unix,auth_script,
+SAMBA4_VFS_MODULES :=vfs_default,
+ifeq ($(CONFIG_SAMBA4_SERVER_VFS),y)
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_fruit,vfs_shadow_copy2,vfs_recycle,vfs_fake_perms,vfs_readonly,vfs_cap,vfs_offline,vfs_crossrename,vfs_catia,vfs_streams_xattr,vfs_xattr_tdb,
+ifeq ($(CONFIG_PACKAGE_kmod-fs-btrfs),y)
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_btrfs,
+endif
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_VFSX),y)
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_virusfilter,vfs_shell_snap,vfs_commit,vfs_worm,vfs_aio_fork,vfs_aio_pthread,vfs_netatalk,vfs_dirsort,vfs_fileid,
+ifeq ($(CONFIG_PACKAGE_kmod-fs-xfs),y)
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_linux_xfs_sgid,
+endif
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_QUOTAS),y)
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_default_quota,
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_posixacl,vfs_acl_xattr,vfs_acl_tdb,
+ # vfs_zfsacl needs https://github.com/zfsonlinux/zfs/tree/master/include/sys/zfs_acl.h
+ # vfs_nfs4acl_xattr needs https://github.com/notriddle/libdrpc/blob/master/rpc/xdr.h
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
+ SAMBA4_PDB_MODULES :=$(SAMBA4_PDB_MODULES)pdb_samba_dsdb,
+ SAMBA4_AUTH_MODULES :=$(SAMBA4_AUTH_MODULES)auth_samba4,
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_audit,vfs_extd_audit,vfs_full_audit,
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
+ SAMBA4_IDMAP_MODULES :=$(SAMBA4_IDMAP_MODULES)idmap_passdb,idmap_nss,idmap_tdb,idmap_tdb2,idmap_script,nss_info_template,
+ SAMBA4_IDMAP_MODULES_SHARED :=$(SAMBA4_IDMAP_MODULES_SHARED)idmap_autorid,idmap_rid,idmap_ad,idmap_rfc2307,
+ # idmap_ad needs --with-ads
+ # idmap_rfc2307 needs ldap headers
+ SAMBA4_AUTH_MODULES :=$(SAMBA4_AUTH_MODULES)auth_winbind,
+endif
+
+SAMBA4_MODULES :=${SAMBA4_AUTH_MODULES}${SAMBA4_PDB_MODULES}${SAMBA4_IDMAP_MODULES}${SAMBA4_VFS_MODULES}
+SAMBA4_MODULES_SHARDED :=${SAMBA4_IDMAP_MODULES_SHARED}
+
+CONFIGURE_ARGS += \
+ --with-static-modules=$(SAMBA4_MODULES)!DEFAULT,!FORCED \
+ --with-shared-modules=$(SAMBA4_MODULES_SHARDED)!DEFAULT,!FORCED
+
+# Setup build/install targets
+# CONFIG_PACKAGE_samba4-server
+BUILD_TARGETS_SERVER :=smbd/smbd,smbpasswd,pdbedit,testparm
+# Optional server targets
+ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
+ BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),sharesec
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_NETBIOS),y)
+ BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),nmbd
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
+ BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),samba,nsstest,ntlm_auth
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
+ BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),winbindd,wbinfo,winbind_krb5_locator
+endif
+# CONFIG_PACKAGE_samba4-client
+BUILD_TARGETS_CLIENT :=client/smbclient,client/cifsdd
+# CONFIG_PACKAGE_samba4-admin
+BUILD_TARGETS_ADMIN :=net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas
+# CONFIG_PACKAGE_samba4-utils
+BUILD_TARGETS_UTILS :=smbstatus,smbtree,smbget,mvxattr,nmblookup
+
+# lib bundling
+# NOTE: bundle + make private, we want to avoid version configuration (build, link) conflicts
+CONFIGURE_ARGS += --builtin-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace
+#CONFIGURE_ARGS += --nonshared-binary=$(BUILD_TARGETS_SERVER)
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
+CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace,pytalloc-util,pyldb-util,NONE
+else
+CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace,NONE
+endif
+CONFIGURE_ARGS += --private-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace
+
+define Build/Prepare
+ $(Build/Prepare/Default)
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),)
+ # un-bundle dnspython
+ $(SED) '/"dns.resolver":/d' $(PKG_BUILD_DIR)/third_party/wscript
+ # unbundle iso8601
+ $(SED) '/"iso8601":/d' $(PKG_BUILD_DIR)/third_party/wscript
+endif
+endef
+
+define Build/Configure
+ $(CP) ./waf-cross-answers/$(ARCH).txt $(PKG_BUILD_DIR)/cross-answers.txt
+ echo 'Checking uname machine type: "$(ARCH)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
+ echo 'Checking uname release type: "$(LINUX_VERSION)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
+ echo 'Checking uname version type: "$(VERSION_DIST) Linux-$(LINUX_VERSION) $(shell date +%Y-%m-%d)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
+ # NOTE: For some unknown reason this answer is not needed on some hosts/distros, yet needed on others?
+ echo 'Checking whether POSIX capabilities are available: OK' >> $(PKG_BUILD_DIR)/cross-answers.txt
+ $(call Build/Configure/Default,configure)
+endef
+
+# BUG: We need to use "waf install --targets=" otherwise a "make install" or "waf install" will retrigger a full recompile of all possible targets!
+define Build/Compile
+ (cd $(PKG_BUILD_DIR); \
+ ./buildtools/bin/waf install -j$(shell nproc) \
+ --targets=$(SAMBA4_MODULES)$(SAMBA4_MODULES_SHARDED)$(BUILD_TARGETS_SERVER),$(BUILD_TARGETS_UTILS),$(BUILD_TARGETS_ADMIN),$(BUILD_TARGETS_CLIENT) \
+ --destdir="$(PKG_INSTALL_DIR)" \
+ )
+endef
+
+# No default install see above
+define Build/Install
+endef
+
+define Package/samba4-libs/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/*.so* $(1)/usr/lib/
+endef
+
+define Package/samba4-client/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbclient,cifsdd} $(1)/usr/bin/
+endef
+
+define Package/samba4-admin/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas} $(1)/usr/bin/
+endef
+
+define Package/samba4-utils/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbstatus,smbtree,smbget,mvxattr,nmblookup} $(1)/usr/bin/
+endef
+
+define Package/samba4-server/install
+ $(INSTALL_DIR) $(1)/usr/lib/samba
+ if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/idmap ]; then \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/idmap $(1)/usr/lib/samba/; \
+ fi
+ if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/auth ]; then \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/auth $(1)/usr/lib/samba/; \
+ fi
+ if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/vfs ]; then \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/vfs $(1)/usr/lib/samba/; \
+ fi
+ if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/pdb ]; then \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/pdb $(1)/usr/lib/samba/; \
+ fi
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbpasswd,pdbedit,testparm} $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smbd $(1)/usr/sbin/
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7 $(1)/usr/lib/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{samba-tool,ntlm_auth,smbtar} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{samba,samba-gpupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns} $(1)/usr/sbin/
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_NETBIOS),y)
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nmbd $(1)/usr/sbin/
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wbinfo $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/winbindd $(1)/usr/sbin/
+endif
+ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sharesec $(1)/usr/bin/
+endif
+ $(INSTALL_DIR) $(1)/etc/config $(1)/etc/samba $(1)/etc/init.d
+ $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba4
+ $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba
+ $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba4
+endef
+
+define Package/samba4-server/conffiles
+/etc/config/samba4
+/etc/samba/smb.conf.template
+/etc/samba/smb.conf
+/etc/samba/smbpasswd
+/etc/samba/secrets.tdb
+/etc/samba/passdb.tdb
+/etc/samba/idmap.ldb
+/etc/samba/lmhosts
+/etc/nsswitch.conf
+endef
+
+$(eval $(call BuildPackage,samba4-libs))
+$(eval $(call BuildPackage,samba4-server))
+$(eval $(call BuildPackage,samba4-client))
+$(eval $(call BuildPackage,samba4-admin))
+$(eval $(call BuildPackage,samba4-utils))
--- /dev/null
+config samba
+ option 'workgroup' 'WORKGROUP'
+ option 'description' 'Samba on OpenWrt'
+ option 'charset' 'UTF-8'
+ option 'homes' '0'
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=98
+USE_PROCD=1
+
+smb_header() {
+ config_get samba_iface $1 interface "loopback lan"
+
+ # resolve interfaces
+ local interfaces=$(
+ . /lib/functions/network.sh
+
+ local net
+ for net in $samba_iface; do
+ local device
+ network_is_up $net || continue
+ network_get_device device "$net"
+ echo -n "${device:-$net} "
+ done
+ )
+
+ local workgroup description charset
+ # we dont use netbios anymore as default and wsd/avahi is dns based
+ local hostname="$(uci get system.@system[0].hostname)"
+ local domain="$(uci get dhcp.@dnsmasq[0].domain)"
+ [ -n "$domain" ] && hostname="$hostname.$domain"
+
+ config_get workgroup $1 workgroup "WORKGROUP"
+ config_get description $1 description "Samba on OpenWrt"
+ config_get charset $1 charset "UTF-8"
+
+ config_get_bool MACOS $1 macos 0
+ config_get_bool DISABLE_NETBIOS $1 disable_netbios 0
+ config_get_bool DISABLE_AD_DC $1 disable_ad_dc 0
+ config_get_bool DISABLE_WINBIND $1 disable_winbind 0
+
+ mkdir -p /var/etc
+ sed -e "s#|NAME|#$hostname#g" \
+ -e "s#|WORKGROUP|#$workgroup#g" \
+ -e "s#|DESCRIPTION|#$description#g" \
+ -e "s#|INTERFACES|#$interfaces#g" \
+ -e "s#|CHARSET|#$charset#g" \
+ /etc/samba/smb.conf.template > /var/etc/smb.conf
+
+ echo -e "\n######### Dynamic written config options #########\n" >> /var/etc/smb.conf
+ if [ "$DISABLE_NETBIOS" -eq 1 ] || [ ! -x /usr/sbin/nmbd ]; then
+ echo -e "\tdisable netbios = yes" >> /var/etc/smb.conf
+ fi
+
+ local homes
+ config_get_bool homes $1 homes 0
+ [ $homes -gt 0 ] && {
+ cat <<EOT >> /var/etc/smb.conf
+
+[homes]
+ comment = Home Directories
+ browsable = no
+ writable = yes
+ read only = no
+ create mask = 0750
+EOT
+ }
+
+ [ -L /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
+}
+
+smb_add_share() {
+ local name
+ local path
+ local users
+ local create_mask
+ local dir_mask
+ local browseable
+ local read_only
+ local guest_ok
+ local guest_only
+ local inherit_owner
+ local vfs_objects
+ local timemachine
+ local timemachine_maxsize
+ local force_root
+
+ config_get name $1 name
+ config_get path $1 path
+ config_get users $1 users
+ config_get create_mask $1 create_mask
+ config_get dir_mask $1 dir_mask
+ config_get browseable $1 browseable
+ config_get read_only $1 read_only
+ config_get guest_ok $1 guest_ok
+ config_get guest_only $1 guest_only
+ config_get inherit_owner $1 inherit_owner
+ config_get vfs_objects $1 vfs_objects
+ config_get_bool timemachine $1 timemachine 0
+ config_get timemachine_maxsize $1 timemachine_maxsize
+ config_get_bool force_root $1 force_root 0
+
+ [ -z "$name" -o -z "$path" ] && return
+
+ echo -e "\n[$name]\n\tpath = $path" >> /var/etc/smb.conf
+
+ if [ "$force_root" -eq 1 ]; then
+ echo -e "\tforce user = root" >> /var/etc/smb.conf
+ echo -e "\tforce group = root" >> /var/etc/smb.conf
+ else
+ [ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf
+ fi
+
+ [ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/smb.conf
+ [ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/smb.conf
+
+ [ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" >> /var/etc/smb.conf
+ [ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/smb.conf
+ [ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
+ [ -n "$guest_only" ] && echo -e "\tguest only = $guest_only" >> /var/etc/smb.conf
+ [ -n "$inherit_owner" ] && echo -e "\tinherit owner = $inherit_owner" >> /var/etc/smb.conf
+
+ if [ "$MACOS" -eq 1 ]; then
+ vfs_objects="catia fruit streams_xattr $vfs_objects"
+ echo -e "\tfruit:encoding = native" >> /var/etc/smb.conf
+ echo -e "\tfruit:metadata = stream" >> /var/etc/smb.conf
+ echo -e "\tfruit:veto_appledouble = no" >> /var/etc/smb.conf
+ # avoid mixed shares order for aapl
+ if [ "$timemachine" -eq 1 ]; then
+ echo -e "\tfruit:time machine = yes" >> /var/etc/smb.conf
+ [ -n "$timemachine_maxsize" ] && echo -e "\tfruit:time machine max size = ${timemachine_maxsize}G" >> /var/etc/smb.conf
+ fi
+ fi
+
+ [ -n "$vfs_objects" ] && echo -e "\tvfs objects = $vfs_objects" >> /var/etc/smb.conf
+}
+
+init_config() {
+ # Create samba dirs
+ [ -d /var/lib/samba ] || mkdir -p /var/lib/samba
+ [ -d /var/cache/samba ] || mkdir -p /var/cache/samba
+ [ -d /var/run/samba ] || mkdir -p /var/run/samba
+ [ -d /var/log/samba ] || mkdir -p /var/log/samba
+ [ -d /var/lock ] && chmod 0755 /var/lock || {
+ mkdir -p /var/lock
+ chmod 0755 /var/lock
+ }
+
+ config_load samba4
+ config_foreach smb_header samba
+ config_foreach smb_add_share sambashare
+}
+
+service_triggers() {
+ PROCD_RELOAD_DELAY=2000
+
+ procd_add_reload_trigger "dhcp" "system" "samba4"
+
+ local i
+ for i in $samba_iface; do
+ procd_add_reload_interface_trigger $i
+ done
+}
+
+start_service() {
+ init_config
+
+ # start main AD-DC daemon, will spawn (smbd,nmbd,winbindd) as needed/configured.
+ if [ "$DISABLE_AD_DC" -ne 1 ] && [ -x /usr/sbin/samba ]; then
+ procd_open_instance
+ procd_set_param command /usr/sbin/samba -F
+ procd_set_param respawn
+ procd_set_param file /var/etc/smb.conf
+ procd_close_instance
+ else
+ # start fileserver daemon
+ procd_open_instance
+ procd_set_param command /usr/sbin/smbd -F
+ procd_set_param respawn
+ procd_set_param file /var/etc/smb.conf
+ procd_close_instance
+
+ # start netbios daemon
+ if [ "$DISABLE_NETBIOS" -ne 1 ] && [ -x /usr/sbin/nmbd ]; then
+ procd_open_instance
+ procd_set_param command /usr/sbin/nmbd -F
+ procd_set_param respawn
+ procd_set_param file /var/etc/smb.conf
+ procd_close_instance
+ fi
+ # start winbind daemon
+ if [ "$DISABLE_WINBIND" -ne 1 ] && [ -x /usr/sbin/winbindd ]; then
+ procd_open_instance
+ procd_set_param command /usr/sbin/winbindd -F
+ procd_set_param respawn
+ procd_set_param file /var/etc/smb.conf
+ procd_close_instance
+ fi
+ fi
+ # lower priority using renice (if found)
+ if [ -x /usr/bin/renice ]; then
+ [ -x /usr/sbin/samba ] && renice -n 2 $(pidof samba)
+ [ -x /usr/sbin/smbd ] && renice -n 2 $(pidof smbd)
+ [ -x /usr/sbin/nmbd ] && renice -n 2 $(pidof nmbd)
+ [ -x /usr/sbin/winbindd ] && renice -n 2 $(pidof winbindd)
+ fi
+}
--- /dev/null
+[global]
+ netbios name = |NAME|
+ interfaces = |INTERFACES|
+ server string = |DESCRIPTION|
+ unix charset = |CHARSET|
+ workgroup = |WORKGROUP|
+
+ ## This global parameter allows the Samba admin to limit what interfaces on a machine will serve SMB requests.
+ bind interfaces only = yes
+
+ ## time for inactive connections to-be closed in minutes
+ deadtime = 15
+
+ ## disable core dumps
+ enable core files = no
+
+ ## set security (auto, user, domain, ads)
+ security = user
+
+ ## This parameter controls whether a remote client is allowed or required to use SMB encryption.
+ ## It has different effects depending on whether the connection uses SMB1 or SMB2 and newer:
+ ## If the connection uses SMB1, then this option controls the use of a Samba-specific extension to the SMB protocol introduced in Samba 3.2 that makes use of the Unix extensions.
+ ## If the connection uses SMB2 or newer, then this option controls the use of the SMB-level encryption that is supported in SMB version 3.0 and above and available in Windows 8 and newer.
+ ##(default/auto,desired,required,off)
+ #smb encrypt = default
+
+ ## set invalid users
+ invalid users = root
+
+ ## map unknow users to guest
+ map to guest = Bad User
+
+ ## allow client access to accounts that have null passwords.
+ null passwords = yes
+
+ ## The old plaintext passdb backend. Some Samba features will not work if this passdb backend is used. (NOTE: enabled for size reasons)
+ ## (tdbsam,smbpasswd,ldapsam)
+ passdb backend = smbpasswd
+
+ ## Set location of smbpasswd ('smbd -b' will show default compiled location)
+ #smb passwd file = /etc/samba/smbpasswd
+
+ ## LAN/WAN options (IPTOS_LOWDELAY TCP_NODELAY) WAN (IPTOS_THROUGHPUT)
+ socket options = IPTOS_LOWDELAY TCP_NODELAY
+
+ ## lower CPU useage if supported
+ use sendfile = yes
+
+ ## samba will behave as previous versions of Samba would and will fail the lock request immediately if the lock range cannot be obtained.
+ #blocking locks = No
+
+ ## disable loading of all printcap printers by default (iprint, cups, lpstat)
+ load printers = No
+ printcap name = /dev/null
+
+ ## Enabling this parameter will disable Samba's support for the SPOOLSS set of MS-RPC's.
+ disable spoolss = yes
+
+ ## This parameters controls how printer status information is interpreted on your system.
+ ## (BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, SOFTQ)
+ printing = bsd
+
+ ## Disable that nmbd is acting as a WINS server for unknow netbios names
+ #dns proxy = No
+
+ ## win/unix user mapping backend
+ #idmap config * : backend = tdb
+
+ ## Allows the server name that is advertised through MDNS to be set to the hostname rather than the Samba NETBIOS name.
+ ## This allows an administrator to make Samba registered MDNS records match the case of the hostname rather than being in all capitals.
+ ## (netbios, mdns)
+ mdns name = mdns
+
+ ## Clients that only support netbios won't be able to see your samba server when netbios support is disabled.
+ #disable netbios = Yes
+
+ ## Setting this value to no will cause nmbd never to become a local master browser.
+ #local master = no
+
+ ## (auto, yes) If this is set to yes, on startup, nmbd will force an election, and it will have a slight advantage in winning the election. It is recommended that this parameter is used in conjunction with domain master = yes, so that nmbd can guarantee becoming a domain master.
+ #preferred master = yes
+
+ ## (445 139) Specifies which ports the server should listen on for SMB traffic.
+ ## 139 is netbios/nmbd
+ #smb ports = 445 139
+
+ ## This is a list of files and directories that are neither visible nor accessible.
+ ## Each entry in the list must be separated by a '/', which allows spaces to be included in the entry. '*' and '?' can be used to specify multiple files or directories as in DOS wildcards.
+ veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/
+
+ ## If a directory that is to be deleted contains nothing but veto files this deletion will fail unless you also set the delete veto files parameter to yes.
+ delete veto files = yes
+
+################ Filesystem and creation rules ################
+ ## reported filesystem type (NTFS,Samba,FAT)
+ #fstype = FAT
+
+ ## Allows a user who has write access to the file (by whatever means, including an ACL permission) to modify the permissions (including ACL) on it.
+ #dos filemode = Yes
+
+ ## file/dir creating rules
+ #create mask = 0666
+ #directory mask = 0777
+ #force group = root
+ #force user = root
+ #inherit owner = windows and unix
+################################################################
--- /dev/null
+--- samba-4.4.0rc2/source3/wscript
++++ samba-4.4.0rc2/source3/wscript
+@@ -870,7 +870,7 @@
+ if conf.env.with_iconv:
+ conf.DEFINE('HAVE_ICONV', 1)
+
+- if Options.options.with_pam:
++ if Options.options.with_pam != False:
+ use_pam=True
+ conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
+ if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
+@@ -943,6 +943,17 @@
+ conf.DEFINE('WITH_PAM', 1)
+ conf.DEFINE('WITH_PAM_MODULES', 1)
+
++ else:
++ Logs.warn("PAM disabled")
++ use_pam=False
++ conf.undefine('WITH_PAM')
++ conf.undefine('WITH_PAM_MODULES')
++ conf.undefine('HAVE_SECURITY_PAM_APPL_H')
++ conf.undefine('PAM_RHOST')
++ conf.undefine('PAM_TTY')
++ conf.undefine('HAVE_PAM_PAM_APPL_H')
++
++
+ seteuid = False
+
+ #
--- /dev/null
+samba: build dnsserver_common code
+
+Just 'install' does not seem to do it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/source4/dns_server/wscript_build
++++ b/source4/dns_server/wscript_build
+@@ -4,7 +4,7 @@ bld.SAMBA_LIBRARY('dnsserver_common',
+ source='dnsserver_common.c',
+ deps='samba-util samba-errors ldbsamba clidns',
+ private_library=True,
+- install=bld.AD_DC_BUILD_IS_ENABLED()
++ enabled=bld.AD_DC_BUILD_IS_ENABLED()
+ )
+
+ bld.SAMBA_MODULE('service_dns',
--- /dev/null
+--- a/source3/lib/messages.c
++++ b/source3/lib/messages.c
+@@ -221,7 +221,7 @@ struct messaging_context *messaging_init
+ return NULL;
+ }
+
+- priv_path = private_path("msg.sock");
++ priv_path = lock_path("msg.sock");
+ if (priv_path == NULL) {
+ TALLOC_FREE(ctx);
+ return NULL;
+@@ -311,7 +311,7 @@ NTSTATUS messaging_reinit(struct messagi
+
+ msg_ctx->msg_dgm_ref = messaging_dgm_ref(
+ msg_ctx, msg_ctx->event_ctx, &msg_ctx->id.unique_id,
+- private_path("msg.sock"), lck_path,
++ lock_path("msg.sock"), lck_path,
+ messaging_recv_cb, msg_ctx, &ret);
+
+ if (msg_ctx->msg_dgm_ref == NULL) {
--- /dev/null
+--- a/source4/lib/messaging/messaging.c
++++ b/source4/lib/messaging/messaging.c
+@@ -323,7 +323,7 @@ struct imessaging_context *imessaging_in
+ goto fail;
+ }
+
+- msg->sock_dir = lpcfg_private_path(msg, lp_ctx, "msg.sock");
++ msg->sock_dir = lpcfg_lock_path(msg, lp_ctx, "msg.sock");
+ if (msg->sock_dir == NULL) {
+ goto fail;
+ }
--- /dev/null
+Some modules such as dynamic library maybe cann't be imported while cross compile,
+we just check whether does the module exist.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+Index: samba-4.4.2/buildtools/wafsamba/samba_bundled.py
+===================================================================
+--- samba-4.4.2.orig/buildtools/wafsamba/samba_bundled.py
++++ samba-4.4.2/buildtools/wafsamba/samba_bundled.py
+@@ -2,6 +2,7 @@
+
+ import sys
+ import Build, Options, Logs
++import imp, os
+ from Configure import conf
+ from samba_utils import TO_LIST
+
+@@ -230,17 +231,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, li
+ # versions
+ minversion = minimum_library_version(conf, libname, minversion)
+
+- try:
+- m = __import__(modulename)
+- except ImportError:
+- found = False
+- else:
++ # Find module in PYTHONPATH
++ stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]])
++ if stuff:
+ try:
+- version = m.__version__
+- except AttributeError:
++ m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2])
++ except ImportError:
+ found = False
++
++ if conf.env.CROSS_COMPILE:
++ # Some modules such as dynamic library maybe cann't be imported
++ # while cross compile, we just check whether the module exist
++ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1]))
++ found = True
+ else:
+- found = tuplize_version(version) >= tuplize_version(minversion)
++ try:
++ version = m.__version__
++ except AttributeError:
++ found = False
++ else:
++ found = tuplize_version(version) >= tuplize_version(minversion)
++ finally:
++ if stuff[0]:
++ stuff[0].close()
++ else:
++ found = False
++
+ if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
+ Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
+ sys.exit(1)
--- /dev/null
+Don't check xsltproc manpages
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+Index: samba-4.4.2/lib/ldb/wscript
+===================================================================
+--- samba-4.4.2.orig/lib/ldb/wscript
++++ samba-4.4.2/lib/ldb/wscript
+@@ -65,7 +65,7 @@ def configure(conf):
+ conf.define('USING_SYSTEM_LDB', 1)
+
+ if conf.env.standalone_ldb:
+- conf.CHECK_XSLTPROC_MANPAGES()
++ #conf.CHECK_XSLTPROC_MANPAGES()
+
+ # we need this for the ldap backend
+ if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
+Index: samba-4.4.2/lib/talloc/wscript
+===================================================================
+--- samba-4.4.2.orig/lib/talloc/wscript
++++ samba-4.4.2/lib/talloc/wscript
+@@ -56,7 +56,7 @@ def configure(conf):
+ if conf.env.standalone_talloc:
+ conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1
+
+- conf.CHECK_XSLTPROC_MANPAGES()
++ #conf.CHECK_XSLTPROC_MANPAGES()
+
+ if not conf.env.disable_python:
+ # also disable if we don't have the python libs installed
+Index: samba-4.4.2/lib/tdb/wscript
+===================================================================
+--- samba-4.4.2.orig/lib/tdb/wscript
++++ samba-4.4.2/lib/tdb/wscript
+@@ -92,7 +92,7 @@ def configure(conf):
+ not conf.env.disable_tdb_mutex_locking):
+ conf.define('USE_TDB_MUTEX_LOCKING', 1)
+
+- conf.CHECK_XSLTPROC_MANPAGES()
++ #conf.CHECK_XSLTPROC_MANPAGES()
+
+ if not conf.env.disable_python:
+ # also disable if we don't have the python libs installed
--- /dev/null
+--- a/libcli/smbreadline/wscript_configure
++++ b/libcli/smbreadline/wscript_configure
+@@ -1,11 +1,13 @@
+ #!/usr/bin/env python
+
+
+-conf.CHECK_HEADERS('readline.h history.h readline/readline.h readline/history.h')
+-for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']:
+- if conf.CHECK_FUNCS_IN('tgetent', termlib):
+- conf.env['READLINE_TERMLIB'] = termlib
+- break
++#conf.CHECK_HEADERS('readline.h history.h readline/readline.h readline/history.h')
++#for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']:
++# if conf.CHECK_FUNCS_IN('tgetent', termlib):
++# conf.env['READLINE_TERMLIB'] = termlib
++# break
++
++conf.undefine('HAVE_READLINE_READLINE_H')
+
+ #
+ # Check if we need to work around readline/readline.h
--- /dev/null
+--- a/lib/crypto/wscript_configure 2018-07-26
++++ b/lib/crypto/wscript_configure 2018-08-27
+@@ -2,11 +2,11 @@
+ import Options
+ import Utils
+
+-if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
+- checklibc=True):
+- conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
+- checklibc=True)
+- conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
++# if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
++ # checklibc=True):
++conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
++ checklibc=True)
++conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
+ checklibc=True)
+ conf.CHECK_FUNCS_IN('CC_MD5_Init', '', headers='CommonCrypto/CommonDigest.h',
+ checklibc=True)
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -302,22 +302,13 @@ def configure(conf):
+
+ conf.CHECK_FUNCS('prctl dirname basename')
+
+- strlcpy_in_bsd = False
+-
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+- checklibc=True):
+- strlcpy_in_bsd = True
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ # Not checking for libbsd
++ conf.CHECK_FUNCS('strlcpy strlcat')
++ conf.CHECK_FUNCS('getpeereid')
++ conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
++ conf.CHECK_FUNCS('setproctitle_init')
++
++ conf.CHECK_FUNCS('closefrom')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+@@ -667,9 +658,6 @@ removeea setea
+
+ # look for a method of finding the list of network interfaces
+ for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
+- bsd_for_strlcpy = ''
+- if strlcpy_in_bsd:
+- bsd_for_strlcpy = ' bsd'
+ if conf.CHECK_CODE('''
+ #define %s 1
+ #define NO_CONFIG_H 1
+@@ -682,7 +670,7 @@ removeea setea
+ #include "test/getifaddrs.c"
+ ''' % method,
+ method,
+- lib='nsl socket' + bsd_for_strlcpy,
++ lib='nsl socket',
+ addmain=False,
+ execute=True):
+ break
+@@ -730,7 +718,6 @@ def build(bld):
+ break
+
+ extra_libs = ''
+- if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
+
+ bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
+ REPLACE_HOSTCC_SOURCE,
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking whether setreuid is available: NO
+Checking whether setresuid is available: NO
+Checking whether seteuid is available: NO
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "128"
+Checking value of _NSIG: "128"
+Checking value of SIGRTMAX: "127"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
--- /dev/null
+Checking uname sysname type: "Linux"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking correct behavior of strtoll: OK
+Checking for working strptime: NO
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "35"
+Checking for a 64-bit host to support lmdb: NO
+Checking whether the WRFILE -keytab is supported: OK
+Checking errno of iconv for illegal multibyte sequence: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials: "OK"
+Checking whether fcntl locking is available: OK
+Checking whether fcntl lock supports open file description locks: NO
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
include $(TOPDIR)/rules.mk
PKG_NAME:=scapy
-PKG_VERSION:=2.3.1
+PKG_VERSION:=2.4.0
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=PKG-INFO
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
-PKG_SOURCE_URL:=https://bitbucket.org/secdev/scapy/downloads/
-PKG_HASH:=8972c02e39a826a10c02c2bdd5025f7251dce9589c57befd9bb55c65f02e4934
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/secdev/scapy/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=3836c62c33dd3f7c1ae30f5c2c1ab8078e4e32f5bf9c8be758dbaafe1c6a580e
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python-package.mk
CATEGORY:=Network
TITLE:=Interactive packet manipulation tool and network scanner
MAINTAINER:=W. Michael Petullo <mike@flyn.org>
- URL:=http://www.secdev.org/projects/scapy/
+ URL:=https://scapy.net/
DEPENDS:=+python
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-ccnet
-PKG_VERSION:=6.2.2
+PKG_VERSION:=6.3.0
PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
PKG_LICENSE:=GPL-3.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/haiwen/ccnet-server.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=6b9d7e2920aa9b807f9efe9038439b57ce949ecc
+PKG_SOURCE_VERSION:=614926b161623b267b4fb77fa1861718da406103
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=8aed6d2283ac7b3148f9b5c82b1d992ed36dc5193000cf727bdcfae7446ce1fe
+PKG_MIRROR_HASH:=843660e05809e6a6e076cf4d5ea3a6aad65b9b03aa1eaa3b4d980a314e7aed61
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
DEPENDS:=+libsearpc +libevent2 +libopenssl \
+glib2 +python +libzdb +libuuid \
+libpthread +libsqlite3 +jansson $(ICONV_DEPENDS)
- EXTRA_DEPENDS:=libsearpc (=6.2.2-8998e7b2c5587f0b94c48db24e2952d08def5add-1)
+ EXTRA_DEPENDS:=libsearpc (=3.0.8-12a01268825e9c7e17794c58c367e3b4db912ad9-1)
endef
define Package/seafile-ccnet/description
--- /dev/null
+From afeb62f01ad6e610cd19dcde0ceffc018b3247ec Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Wed, 6 Jun 2018 18:05:33 -0300
+Subject: [PATCH] Remove API deprecated in openssl 1.1
+
+With openssl 1.1, we do not call OpenSSL_add_all_algorithms(), as
+library initialization is done automatically.
+Functions RAND_pseudo_bytes and RSA_generate_key were deprecated as
+well.
+Also, we need to #include <openssl/bn.h> for BN_num_bytes().
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+---
+ lib/rsa.c | 19 ++++++++++++++-----
+ net/common/processors/keepalive-proc.c | 4 ++--
+ net/common/processors/keepalive2-proc.c | 2 +-
+ net/common/processors/sendsessionkey-proc.c | 2 +-
+ net/common/processors/sendsessionkey-v2-proc.c | 2 +-
+ net/server/user-mgr.c | 4 ++++
+ tools/ccnet-init.c | 2 ++
+ 7 files changed, 25 insertions(+), 10 deletions(-)
+
+diff --git a/lib/rsa.c b/lib/rsa.c
+index 7cca150..23abb82 100644
+--- a/lib/rsa.c
++++ b/lib/rsa.c
+@@ -4,6 +4,7 @@
+ #include <openssl/rand.h>
+ #include <openssl/rsa.h>
+ #include <openssl/err.h>
++#include <openssl/bn.h>
+
+ #include <string.h>
+ #include <glib.h>
+@@ -207,9 +208,17 @@ RSA *
+ generate_private_key(u_int bits)
+ {
+ RSA *private = NULL;
+-
+- private = RSA_generate_key(bits, 35, NULL, NULL);
+- if (private == NULL)
+- g_error ("rsa_generate_private_key: key generation failed.");
+- return private;
++ BIGNUM *e = NULL;
++
++ private = RSA_new();
++ e = BN_new();
++ if (private == NULL || e == NULL || !BN_set_word(e, 35) ||
++ !RSA_generate_key_ex(private, bits, e, NULL)) {
++ RSA_free(private);
++ BN_free(e);
++ g_error ("rsa_generate_private_key: key generation failed.");
++ return NULL;
++ }
++ BN_free(e);
++ return private;
+ }
+diff --git a/net/common/processors/keepalive-proc.c b/net/common/processors/keepalive-proc.c
+index 609d102..42a0c23 100644
+--- a/net/common/processors/keepalive-proc.c
++++ b/net/common/processors/keepalive-proc.c
+@@ -401,7 +401,7 @@ static void send_challenge(CcnetProcessor *processor)
+ unsigned char *buf;
+ int len;
+
+- RAND_pseudo_bytes (priv->random_buf, 40);
++ RAND_bytes (priv->random_buf, 40);
+ buf = public_key_encrypt (peer->pubkey, priv->random_buf, 40, &len);
+ ccnet_processor_send_update (processor, "311", NULL, (char *)buf, len);
+
+@@ -434,7 +434,7 @@ static void send_challenge_user(CcnetProcessor *processor, CcnetUser *user)
+
+ ccnet_debug ("[Keepalive] Send user challenge to %.8s\n",
+ processor->peer->id);
+- RAND_pseudo_bytes (priv->random_buf, 40);
++ RAND_bytes (priv->random_buf, 40);
+ buf = public_key_encrypt (user->pubkey, priv->random_buf, 40, &len);
+ ccnet_processor_send_update (processor, "321", NULL, (char *)buf, len);
+
+diff --git a/net/common/processors/keepalive2-proc.c b/net/common/processors/keepalive2-proc.c
+index d3e799e..d81c266 100644
+--- a/net/common/processors/keepalive2-proc.c
++++ b/net/common/processors/keepalive2-proc.c
+@@ -306,7 +306,7 @@ static void send_challenge(CcnetProcessor *processor)
+ unsigned char *buf;
+ int len;
+
+- RAND_pseudo_bytes (priv->random_buf, 40);
++ RAND_bytes (priv->random_buf, 40);
+ buf = public_key_encrypt (peer->pubkey, priv->random_buf, 40, &len);
+ if (len < 0) {
+ ccnet_debug ("[Keepalive] Failed to encrypt challenge "
+diff --git a/net/common/processors/sendsessionkey-proc.c b/net/common/processors/sendsessionkey-proc.c
+index 3ec2757..10c3340 100644
+--- a/net/common/processors/sendsessionkey-proc.c
++++ b/net/common/processors/sendsessionkey-proc.c
+@@ -124,7 +124,7 @@ generate_session_key (CcnetProcessor *processor, int *len_p)
+ unsigned char random_buf[40];
+ SHA_CTX s;
+
+- RAND_pseudo_bytes (random_buf, sizeof(random_buf));
++ RAND_bytes (random_buf, sizeof(random_buf));
+
+ SHA1_Init (&s);
+ SHA1_Update (&s, random_buf, sizeof(random_buf));
+diff --git a/net/common/processors/sendsessionkey-v2-proc.c b/net/common/processors/sendsessionkey-v2-proc.c
+index c1c6924..4805ba6 100644
+--- a/net/common/processors/sendsessionkey-v2-proc.c
++++ b/net/common/processors/sendsessionkey-v2-proc.c
+@@ -125,7 +125,7 @@ generate_session_key (CcnetProcessor *processor, int *len_p)
+ unsigned char random_buf[40];
+ SHA_CTX s;
+
+- RAND_pseudo_bytes (random_buf, sizeof(random_buf));
++ RAND_bytes (random_buf, sizeof(random_buf));
+
+ SHA1_Init (&s);
+ SHA1_Update (&s, random_buf, sizeof(random_buf));
+diff --git a/net/server/user-mgr.c b/net/server/user-mgr.c
+index 0973959..3f0c3b3 100644
+--- a/net/server/user-mgr.c
++++ b/net/server/user-mgr.c
+@@ -811,9 +811,13 @@ hash_password_pbkdf2_sha256 (const char *passwd,
+ char salt_str[SHA256_DIGEST_LENGTH*2+1];
+
+ if (!RAND_bytes (salt, sizeof(salt))) {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || OPENSSL_API_COMPAT < 0x10100000L
+ ccnet_warning ("Failed to generate salt "
+ "with RAND_bytes(), use RAND_pseudo_bytes().\n");
+ RAND_pseudo_bytes (salt, sizeof(salt));
++#else
++ ccnet_warning ("Failed to generate salt with RAND_bytes().\n");
++#endif
+ }
+
+ PKCS5_PBKDF2_HMAC (passwd, strlen(passwd),
+diff --git a/tools/ccnet-init.c b/tools/ccnet-init.c
+index 4748962..28c9995 100644
+--- a/tools/ccnet-init.c
++++ b/tools/ccnet-init.c
+@@ -162,7 +162,9 @@ main(int argc, char **argv)
+
+ config_dir = ccnet_expand_path (config_dir);
+ /* printf("[conf_dir=%s\n]", config_dir); */
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ OpenSSL_add_all_algorithms();
++#endif
+
+ if (RAND_status() != 1) { /* it should be seeded automatically */
+ fprintf(stderr, "PRNG is not seeded\n");
+--
+2.16.4
+
include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-seahub
-PKG_VERSION:=6.2.2
+PKG_VERSION:=6.3.0
PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
PKG_LICENSE:=Apache-2.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/haiwen/seahub.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=120e7a299e77968f1af48ea2dcf4bd9b909c426f
+PKG_SOURCE_VERSION:=d1ab146a936a6ea1e1581bf3f194e86742f0d3cd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=511500c40dd7b1009f77109c6df810df1cf2c17a84a8f6841d592a9e05d22064
+PKG_MIRROR_HASH:=21c2ed3886d0c87853f9720704b14c0a0dce8215e7346af775e306f80b29fa0d
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python-package.mk
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
URL:=http://seafile.com/
DEPENDS:=+simplejson +python +pillow +chardet +django +django-appconf \
- +django-compressor +django-constance +django-jsonfield +django-picklefield \
- +django-postoffice +django-restframework +django-statici18n +et_xmlfile \
- +flup +gunicorn +jdcal +openpyxl +python-dateutil +python-mysql +pytz +rcssmin
+ +django-compressor +django-constance +django-formtools +django-jsonfield \
+ +django-picklefield +django-postoffice +django-restframework \
+ +django-simple-captcha +django-statici18n +django-webpack-loader +et_xmlfile \
+ +flup +gunicorn +jdcal +openpyxl +python-dateutil +python-mysql \
+ +python-qrcode +python-requests +python-requests-oauthlib +pytz +rcssmin
endef
define Build/Configure
-diff -rupN seahub-3.1.7-server.orig/seahub/settings.py seahub-3.1.7-server/seahub/settings.py
---- seahub-3.1.7-server.orig/seahub/settings.py 2014-10-20 09:32:35.000000000 +0200
-+++ seahub-3.1.7-server/seahub/settings.py 2014-12-10 15:47:21.625104606 +0100
-@@ -46,7 +46,7 @@ SITE_ID = 1
+--- a/seahub/settings.py
++++ b/seahub/settings.py
+@@ -47,7 +47,7 @@ SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
-@@ -209,7 +209,7 @@ SHOW_REPO_DOWNLOAD_BUTTON = False
- REPO_PASSWORD_MIN_LENGTH = 8
+@@ -310,7 +310,7 @@ SHARE_LINK_EMAIL_LANGUAGE = ''
+ ENABLE_UPLOAD_LINK_VIRUS_CHECK = False
# mininum length for user's password
-USER_PASSWORD_MIN_LENGTH = 6
# LEVEL based on four types of input:
# num, upper letter, lower letter, other symbols
-@@ -218,7 +218,7 @@ USER_PASSWORD_STRENGTH_LEVEL = 3
+@@ -319,7 +319,7 @@ USER_PASSWORD_STRENGTH_LEVEL = 3
# default False, only check USER_PASSWORD_MIN_LENGTH
# when True, check password strength level, STRONG(or above) is allowed
-USER_STRONG_PASSWORD_REQUIRED = False
+USER_STRONG_PASSWORD_REQUIRED = True
- # Using server side crypto by default, otherwise, let user choose crypto method.
- FORCE_SERVER_CRYPTO = True
+ # Force user to change password when admin add/reset a user.
+ FORCE_PASSWORD_CHANGE = True
-diff -rupN seafile-seahub-6.2.2.orig/Makefile seafile-seahub-6.2.2/Makefile
---- seafile-seahub-6.2.2.orig/Makefile 2017-10-22 22:28:22.000000000 +0200
-+++ seafile-seahub-6.2.2/Makefile 2017-10-22 22:46:18.007470936 +0200
+--- a/Makefile
++++ b/Makefile
@@ -1,3 +1,6 @@
+include $(TOPDIR)/rules.mk
+include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
PROJECT=seahub
develop: setup-git
-@@ -9,7 +12,9 @@ dist: locale uglify statici18n collectst
+@@ -9,7 +12,7 @@ dist: locale uglify statici18n collectst
locale:
@echo "--> Compile locales"
-- django-admin.py compilemessages && cd seahub/two_factor && django-admin.py compilemessages
-+ $(call HostPython,,$(STAGING_DIR)/usr/bin/django-admin.py compilemessages)
-+ cd seahub/two_factor
+- django-admin.py compilemessages
+ $(call HostPython,,$(STAGING_DIR)/usr/bin/django-admin.py compilemessages)
@echo ""
uglify:
-@@ -19,17 +24,17 @@ uglify:
+@@ -19,17 +22,17 @@ uglify:
statici18n:
@echo "--> Generate JS locale files in static/scripts/i18n"
include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-server
-PKG_VERSION:=6.2.2
+PKG_VERSION:=6.3.0
PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
PKG_LICENSE:=GPL-3.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/haiwen/seafile-server.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=6978d2cb2e05cc774370b4d06c9f0a864df71936
+PKG_SOURCE_VERSION:=a8c66e1bc6f6245e48917f39a24167d22a95dbd6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=99aa9c41641d7c0ffe18bbab75418b1347dd9e156124472bbee5a6dda09a8057
+PKG_MIRROR_HASH:=d63667f8cddcac645fb0d350c71e2a32d0c44f47df46a3a013d2dbecb3574d9a
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql +python-urllib3 \
+jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient \
+libpthread +libuuid +bash +procps-ng +procps-ng-pkill +SEAFILE_FUSE_SUPPORT:libfuse $(ICONV_DEPENDS)
- EXTRA_DEPENDS:=seafile-ccnet (=6.2.2-6b9d7e2920aa9b807f9efe9038439b57ce949ecc-1), seafile-seahub (=6.2.2-120e7a299e77968f1af48ea2dcf4bd9b909c426f-1)
+ EXTRA_DEPENDS:=seafile-ccnet (=6.3.0-614926b161623b267b4fb77fa1861718da406103-1), seafile-seahub (=6.3.0-d1ab146a936a6ea1e1581bf3f194e86742f0d3cd-1)
MENU:=1
endef
-diff -rupN seafile-server-5.1.1.orig/scripts/seaf-fsck.sh seafile-server-5.1.1/scripts/seaf-fsck.sh
---- seafile-server-5.1.1.orig/scripts/seaf-fsck.sh 2016-04-21 11:05:26.000000000 +0200
-+++ seafile-server-5.1.1/scripts/seaf-fsck.sh 2016-04-22 09:10:13.075581325 +0200
+--- a/scripts/seaf-fsck.sh
++++ b/scripts/seaf-fsck.sh
@@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}")
TOPDIR=$(dirname "${INSTALLPATH}")
default_ccnet_conf_dir=${TOPDIR}/ccnet
export PATH=${INSTALLPATH}/seafile/bin:$PATH
export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
-diff -rupN seafile-server-5.1.1.orig/scripts/seaf-gc.sh seafile-server-5.1.1/scripts/seaf-gc.sh
---- seafile-server-5.1.1.orig/scripts/seaf-gc.sh 2016-04-21 11:05:26.000000000 +0200
-+++ seafile-server-5.1.1/scripts/seaf-gc.sh 2016-04-22 09:10:27.211581999 +0200
+--- a/scripts/seaf-gc.sh
++++ b/scripts/seaf-gc.sh
@@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}")
TOPDIR=$(dirname "${INSTALLPATH}")
default_ccnet_conf_dir=${TOPDIR}/ccnet
seaf_gc_opts=""
export PATH=${INSTALLPATH}/seafile/bin:$PATH
-diff -rupN seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh seafile-server-5.1.1/scripts/setup-seafile-mysql.sh
---- seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh 2016-04-21 11:05:26.000000000 +0200
-+++ seafile-server-5.1.1/scripts/setup-seafile-mysql.sh 2016-04-22 09:11:50.083585953 +0200
+--- a/scripts/setup-seafile-mysql.sh
++++ b/scripts/setup-seafile-mysql.sh
@@ -40,15 +40,10 @@ function check_python_executable() {
function check_python_module () {
module=$1
export PYTHON=$PYTHON
+export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:$PYTHONPATH"
- exec $PYTHON "$python_script"
-diff -rupN seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh seafile-server-5.1.1/scripts/sqlite2mysql.sh
---- seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh 2016-04-21 11:05:26.000000000 +0200
-+++ seafile-server-5.1.1/scripts/sqlite2mysql.sh 2016-04-22 09:02:22.047558854 +0200
+ exec $PYTHON "$python_script" "$@"
+--- a/scripts/sqlite2mysql.sh
++++ b/scripts/sqlite2mysql.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
-diff -rupN seafile-server-5.1.1.orig/lib/repo.vala seafile-server-5.1.1/lib/repo.vala
---- seafile-server-5.1.1.orig/lib/repo.vala 2016-04-19 15:44:32.000000000 +0200
-+++ seafile-server-5.1.1/lib/repo.vala 2016-04-25 21:29:33.327962235 +0200
-@@ -30,7 +30,7 @@ public class Repo : Object {
+--- a/lib/repo.vala
++++ b/lib/repo.vala
+@@ -34,7 +34,7 @@ public class Repo : Object {
// data format version
public int version { get; set; }
+ public int64 last_modify { get; set; }
public int64 size { get; set; }
public int64 file_count { get; set; }
- public string head_cmmt_id { get; set; }
-@@ -40,7 +40,7 @@ public class Repo : Object {
+ public string last_modifier { get; set; }
+@@ -45,7 +45,7 @@ public class Repo : Object {
public string repo_id { get; set; }
public string repo_name { get; set; }
public string repo_desc { get; set; }
// Section 2: Encryption related
// Members in this section should be set for every Repo object
-@@ -63,7 +63,7 @@ public class Repo : Object {
+@@ -68,7 +68,7 @@ public class Repo : Object {
get { return _relay_id; }
set { _relay_id = value; }
}
public bool auto_sync { get; set; }
public bool worktree_invalid { get; set; }
-@@ -155,7 +155,7 @@ public class DeletedEntry : Object {
+@@ -162,7 +162,7 @@ public class DeletedEntry : Object {
public string obj_name { get; set; }
public string basedir { get; set; }
public int mode { get; set; }
--- /dev/null
+From 13f95a28ce12216ba51cf0ca8d61c3d89689d02b Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Wed, 6 Jun 2018 18:11:47 -0300
+Subject: [PATCH] Remove API deprecated in openssl 1.1
+
+Openssl 1.1 has deprecated RAND_pseudo_bytes. It won't compile with
+openssl built witout deprecated API.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+---
+ common/seafile-crypt.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/common/seafile-crypt.c b/common/seafile-crypt.c
+index c7d1702..c3cebf5 100644
+--- a/common/seafile-crypt.c
++++ b/common/seafile-crypt.c
+@@ -81,9 +81,14 @@ seafile_generate_random_key (const char *passwd, char *random_key)
+
+ int rc = RAND_bytes (secret_key, sizeof(secret_key));
+ if (rc != 1) {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || OPENSSL_API_COMPAT < 0x10100000L
+ seaf_warning ("Failed to generate secret key for repo encryption "
+ "with RAND_bytes(), use RAND_pseudo_bytes().\n");
+ RAND_pseudo_bytes (secret_key, sizeof(secret_key));
++#else
++ seaf_warning ("Failed to generate secret key for repo encryption "
++ "with RAND_bytes().\n");
++#endif
+ }
+
+ seafile_derive_key (passwd, strlen(passwd), 2, key, iv);
+--
+2.16.4
+
--- /dev/null
+From 25dcf165f77c94f758383d35632293d69666d0ad Mon Sep 17 00:00:00 2001
+From: cuihaikuo <haikuo.cui@seafile.com>
+Date: Thu, 7 Jun 2018 11:56:44 +0800
+Subject: [PATCH] Fix that table SystemInfo can't be created in sqlite db.
+
+---
+ server/seafile-session.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/server/seafile-session.c b/server/seafile-session.c
+index 76d9c12..2a1fc0c 100644
+--- a/server/seafile-session.c
++++ b/server/seafile-session.c
+@@ -424,9 +424,17 @@ create_system_default_repo (void *data)
+ void
+ schedule_create_system_default_repo (SeafileSession *session)
+ {
+- char *sql = "CREATE TABLE IF NOT EXISTS SystemInfo "
++ int db_type = seaf_db_type (session->db);
++ char *sql;
++
++ if (db_type == SEAF_DB_TYPE_MYSQL)
++ sql = "CREATE TABLE IF NOT EXISTS SystemInfo "
+ "(id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, "
+ "info_key VARCHAR(256), info_value VARCHAR(1024))";
++ else
++ sql = "CREATE TABLE IF NOT EXISTS SystemInfo( "
++ "info_key VARCHAR(256), info_value VARCHAR(1024))";
++
+ if (seaf_db_query (session->db, sql) < 0)
+ return;
+
--- /dev/null
+--- a/tools/seafile-admin
++++ b/tools/seafile-admin
+@@ -831,7 +831,22 @@ def setup_seafile(args):
+ conf[CONF_SEAFILE_CENTRAL_CONF_DIR] = os.path.join(cwd, 'conf')
+ config_ccnet_seafile()
+ init_ccnet_seafile()
+- init_seahub()
++
++ # make sure ccnet-server is running to avoid an error creating django superuser
++ if not is_running('ccnet-server'):
++ argv = [
++ 'ccnet-server',
++ '-F',
++ conf[CONF_SEAFILE_CENTRAL_CONF_DIR],
++ '-c',
++ conf[CONF_CCNET_DIR],
++ '-d'
++ ]
++ run_argv(argv)
++ init_seahub()
++ pkill('ccnet-server')
++ else:
++ init_seahub()
+
+ print
+ print '-----------------------------------------------------------------'
# - check if default mode has changed from being tcp_only
#
PKG_NAME:=shadowsocks-libev
-PKG_VERSION:=3.1.3
-PKG_RELEASE:=2
+PKG_VERSION:=3.2.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
-PKG_HASH:=58fb438d2cfe33cfa6ac8c50e587e2138c50e59a4b943f88d22883bf2e192a96
+PKG_HASH:=5521cf623a07fd1e393528516a83acd2b66c5d4bb4535a52662806a6a060c606
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
socks5 ss plain
--------> tcp:local_address:local_port ----> ss server -------> dest
-`ss-redir`. The REDIRECT and TPROXY part are to be provided by `ss-rules` script. REDIRECT only works for tcp traffic (see also darkk/redsocks). TPROXY is used to proxy udp messages, but it's only available in the PREROUTING chain and as such cannot proxy local out traffic.
+`ss-redir`. The REDIRECT and TPROXY part are to be provided by `ss-rules` script. REDIRECT is for tcp traffic (`SO_ORIGINAL_DST` only supports TCP). TPROXY is for udp messages, but it's only available in the PREROUTING chain and as such cannot proxy local out traffic.
plain plain ss plain
---------> REDIRECT ------> tcp:local_address:local_port ----> ss server -----> original dest
include $(TOPDIR)/rules.mk
PKG_NAME:=shorewall-core
-PKG_MAJOR_MINOR_VERSION:=5.1
-PKG_BUGFIX_MAJOR_VERSION:=12
-PKG_BUGFIX_MINOR_VERSION:=.3
+PKG_MAJOR_MINOR_VERSION:=5.2
+PKG_BUGFIX_MAJOR_VERSION:=0
+PKG_BUGFIX_MINOR_VERSION:=.5
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=146c7fdae3f81a950182bc77e17d516a8885454d22351cb9cf90b562e985785a
+PKG_HASH:=6d6187181560371f9bd84f2c14e83298f593f0b1cd8ce14e23e4a1df04b1a684
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
include $(TOPDIR)/rules.mk
PKG_NAME:=shorewall-lite
-PKG_MAJOR_MINOR_VERSION:=5.1
-PKG_BUGFIX_MAJOR_VERSION:=12
-PKG_BUGFIX_MINOR_VERSION:=.3
+PKG_MAJOR_MINOR_VERSION:=5.2
+PKG_BUGFIX_MAJOR_VERSION:=0
+PKG_BUGFIX_MINOR_VERSION:=.5
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=41a9c0e618bf22cca5cbbd5e507a8420f87e5e3c062459b6b607b980966b708c
+PKG_HASH:=ca52182d995ecc0adcf882419e94d60968a3701979b99d6b30ba61e7a26ea0cb
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
include $(TOPDIR)/rules.mk
PKG_NAME:=shorewall
-PKG_MAJOR_MINOR_VERSION:=5.1
-PKG_BUGFIX_MAJOR_VERSION:=12
-PKG_BUGFIX_MINOR_VERSION:=.3
+PKG_MAJOR_MINOR_VERSION:=5.2
+PKG_BUGFIX_MAJOR_VERSION:=0
+PKG_BUGFIX_MINOR_VERSION:=.5
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=c1bdb6eef7059247737d74ffd9475b11a036253c2d8667d4fea296a1be0768bc
+PKG_HASH:=1c05202d03ec568007b8b3b36188e5bc2f3e0d7290e56162b032cce5a7d9b800
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
BLACKLIST_LOG_LEVEL=
-@@ -101,7 +101,7 @@ RESTOREFILE=restore
+@@ -103,7 +103,7 @@ RESTOREFILE=restore
SHOREWALL_SHELL=/bin/sh
===================================================================
--- shorewall-5.1.9.orig/configfiles/shorewall.conf 2017-12-18 08:09:12.043625770 +0100
+++ shorewall-5.1.9/configfiles/shorewall.conf 2017-12-18 08:09:54.353402257 +0100
-@@ -93,7 +93,7 @@
+@@ -95,7 +95,7 @@
NFACCT=
include $(TOPDIR)/rules.mk
PKG_NAME:=shorewall6-lite
-PKG_MAJOR_MINOR_VERSION:=5.1
-PKG_BUGFIX_MAJOR_VERSION:=12
-PKG_BUGFIX_MINOR_VERSION:=.3
+PKG_MAJOR_MINOR_VERSION:=5.2
+PKG_BUGFIX_MAJOR_VERSION:=0
+PKG_BUGFIX_MINOR_VERSION:=.5
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=1cdd4f0e7b5dc45db897bd6b2d3740fb3dfbcdffe2abc1fd7cdaabb9161dc8f9
+PKG_HASH:=c215259bfdc4e6199a77b893d81471bb6ad53c2e53d3b934e4b1c833c4446bb6
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
include $(TOPDIR)/rules.mk
PKG_NAME:=shorewall6
-PKG_MAJOR_MINOR_VERSION:=5.1
-PKG_BUGFIX_MAJOR_VERSION:=12
-PKG_BUGFIX_MINOR_VERSION:=.3
+PKG_MAJOR_MINOR_VERSION:=5.2
+PKG_BUGFIX_MAJOR_VERSION:=0
+PKG_BUGFIX_MINOR_VERSION:=.5
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=082a1c1baa2bb301c258cd3401a8aa6cdcde0f14fe67eb40f3009c4d3e4860f5
+PKG_HASH:=f42ae5b9f30c728d0b0a59008b53ca15485ed054bb5d09a7abd44e6eb29586a8
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
BLACKLIST_LOG_LEVEL=
-@@ -98,7 +98,7 @@
+@@ -100,7 +100,7 @@
SHOREWALL_SHELL=/bin/sh
===================================================================
--- shorewall6-5.1.9.orig/configfiles/shorewall6.conf 2017-12-18 08:13:01.999494346 +0100
+++ shorewall6-5.1.9/configfiles/shorewall6.conf 2017-12-18 08:13:37.253618974 +0100
-@@ -92,7 +92,7 @@
+@@ -94,7 +94,7 @@
PERL=/usr/bin/perl
-# Copyright (c) 2017 Stan Grishin (stangri@melmac.net)
+# Copyright 2017-2018 Stan Grishin (stangri@melmac.net)
+# TLD optimization written by Dirk Brenken (dev@brenken.org)
# This is free software, licensed under the GNU General Public License v3.
include $(TOPDIR)/rules.mk
PKG_NAME:=simple-adblock
-PKG_VERSION:=1.5.8
-PKG_RELEASE:=1
+PKG_VERSION:=1.6.3
+PKG_RELEASE:=5
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
include $(INCLUDE_DIR)/package.mk
-define Package/$(PKG_NAME)
+define Package/simple-adblock
SECTION:=net
CATEGORY:=Network
TITLE:=Simple AdBlock Service
PKGARCH:=all
endef
-define Package/$(PKG_NAME)/description
+define Package/simple-adblock/description
This service provides dnsmasq-based ad blocking.
Please see the README for further information.
endef
-define Package/$(PKG_NAME)/conffiles
+define Package/simple-adblock/conffiles
/etc/config/simple-adblock
endef
define Build/Compile
endef
-define Package/$(PKG_NAME)/install
+define Package/simple-adblock/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/simple-adblock.init $(1)/etc/init.d/simple-adblock
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/simple-adblock.conf $(1)/etc/config/simple-adblock
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+ $(INSTALL_BIN) ./files/simple-adblock.hotplug $(1)/etc/hotplug.d/iface/80-simple-adblock
endef
-define Package/$(PKG_NAME)/prerm
+define Package/simple-adblock/postinst
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
+ /etc/init.d/simple-adblock enable
+ while uci -q del ucitrack.@simple-adblock[-1]; do :; done
+ uci -q batch <<-EOF >/dev/null
+ add ucitrack simple-adblock
+ set ucitrack.@simple-adblock[0].init='simple-adblock'
+ commit ucitrack
+ EOF
+ fi
+ exit 0
+endef
+
+define Package/simple-adblock/prerm
+ #!/bin/sh
+ # check if we are on real system
+ if [ -z "$${IPKG_INSTROOT}" ]; then
+ while uci -q del ucitrack.@simple-adblock[-1]; do :; done
echo "Stopping service and removing rc.d symlink for simple-adblock"
/etc/init.d/simple-adblock stop || true
/etc/init.d/simple-adblock killcache || true
- /etc/init.d/simple-adblock disable
+ /etc/init.d/simple-adblock disable || true
fi
exit 0
endef
-$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,simple-adblock))
## Screenshot (luci-app-simple-adblock)
-![screenshot](https://raw.githubusercontent.com/stangri/screenshots/master/simple-adblock/screenshot04.png "screenshot")
+![screenshot](https://raw.githubusercontent.com/stangri/openwrt_packages/master/screenshots/simple-adblock/screenshot06.png "screenshot")
## Requirements
## How to install
-Install ```simple-adblock``` and ```luci-app-simple-adblock``` packages from Web UI or run the following in the command line:
+Install ```simple-adblock``` and ```luci-app-simple-adblock``` packages from Web UI or run the following in the command line:
```sh
opkg update; opkg install simple-adblock luci-app-simple-adblock
```
-If ```simple-adblock``` and ```luci-app-simple-adblock``` packages are not found in the official feed/repo for your version of OpenWrt/LEDE Project, you will need to [add a custom repo to your router](#add-custom-repo-to-your-router) first.
+If ```simple-adblock``` and ```luci-app-simple-adblock``` packages are not found in the official feed/repo for your version of OpenWrt/LEDE Project, you will need to [add a custom repo to your router](#add-custom-repo-to-your-router) first.
#### Add custom repo to your router
###### OpenWrt 15.05.1
```sh
opkg update; opkg install ca-certificates wget libopenssl
-echo -e -n 'untrusted comment: public key 7ffc7517c4cc0c56\nRWR//HUXxMwMVnx7fESOKO7x8XoW4/dRidJPjt91hAAU2L59mYvHy0Fa\n' > /tmp/stangri-repo.pub && opkg-key add /tmp/stangri-repo.pub
+echo -e -n 'untrusted comment: LEDE usign key of Stan Grishin\nRWR//HUXxMwMVnx7fESOKO7x8XoW4/dRidJPjt91hAAU2L59mYvHy0Fa\n' > /tmp/stangri-repo.pub && opkg-key add /tmp/stangri-repo.pub
! grep -q 'stangri_repo' /etc/opkg/customfeeds.conf && echo 'src/gz stangri_repo https://raw.githubusercontent.com/stangri/openwrt-repo/master' >> /etc/opkg/customfeeds.conf
opkg update
```
###### LEDE Project and OpenWrt 18.xx or later
```sh
-opkg update; opkg install uclient-fetch libustream-mbedtls
-echo -e -n 'untrusted comment: public key 7ffc7517c4cc0c56\nRWR//HUXxMwMVnx7fESOKO7x8XoW4/dRidJPjt91hAAU2L59mYvHy0Fa\n' > /tmp/stangri-repo.pub && opkg-key add /tmp/stangri-repo.pub
+opkg update
+opkg list-installed | grep -q uclient-fetch || opkg install uclient-fetch
+opkg list-installed | grep -q libustream || opkg install libustream-mbedtls
+echo -e -n 'untrusted comment: LEDE usign key of Stan Grishin\nRWR//HUXxMwMVnx7fESOKO7x8XoW4/dRidJPjt91hAAU2L59mYvHy0Fa\n' > /tmp/stangri-repo.pub && opkg-key add /tmp/stangri-repo.pub
! grep -q 'stangri_repo' /etc/opkg/customfeeds.conf && echo 'src/gz stangri_repo https://raw.githubusercontent.com/stangri/openwrt-repo/master' >> /etc/opkg/customfeeds.conf
opkg update
```
In general, whatever domain is specified to be whitelisted; it, along with with its subdomains will be whitelisted, but not any fake domains containing it.
## Documentation / Discussion
-Please head to [OpenWrt Forum](https://forum.openwrt.org/viewtopic.php?pid=307950) or [LEDE Project Forum](https://forum.lede-project.org/t/simple-adblock-fast-lean-and-fully-uci-luci-configurable-adblocking/1327/) for discussion of this package.
+Please head [LEDE Project Forum](https://forum.lede-project.org/t/simple-adblock-fast-lean-and-fully-uci-luci-configurable-adblocking/1327/) for discussion of this package.
## What's New
1.5.8:
list blacklist_hosts_url 'http://www.malwaredomainlist.com/hostslist/hosts.txt'
list blacklist_hosts_url 'https://adaway.org/hosts.txt'
list blacklist_hosts_url 'http://someonewhocares.org/hosts/hosts'
+ list blacklist_hosts_url 'https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt'
list blacklist_hosts_url 'https://zeustracker.abuse.ch/blocklist.php?download=hostfile'
list blacklist_domains_url 'http://mirror1.malwaredomains.com/files/justdomains'
list blacklist_domains_url 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt'
--- /dev/null
+#!/bin/sh
+
+if [[ "$ACTION" == "ifup" ]]; then
+ sleep 10 && /etc/init.d/simple-adblock start &
+fi
#!/bin/sh /etc/rc.common
+# TLD optimization written by Dirk Brenken (dev@brenken.org)
PKG_VERSION=
export START=94
export USE_PROCD=1
-readonly A_TMP='/var/hosts.allowed.tmp'
-readonly B_TMP='/var/hosts.blocked.tmp'
-readonly T_TMP='/var/simple-adblock.hosts'
-readonly dl='wget --no-check-certificate -qO-'
+readonly packageName='simple-adblock'
+readonly serviceName="$packageName $PKG_VERSION"
+readonly PID="/var/run/${packageName}.pid"
+readonly dnsmasqFile="/var/dnsmasq.d/${packageName}"
+export EXTRA_COMMANDS="check killcache"
+export EXTRA_HELP=" check Checks if specified domain is found in current blacklist"
+
+readonly A_TMP='/var/simple-adblock.hosts.a.tmp'
+readonly B_TMP='/var/simple-adblock.hosts.b.tmp'
+readonly CACHE_TMP='/var/simple-adblock.cache'
readonly h_filter='/localhost/d;/^#/d;/^[^0-9]/d;s/^0\.0\.0\.0.//;s/^127\.0\.0\.1.//;s/[[:space:]]*#.*$//;s/[[:cntrl:]]$//;s/[[:space:]]//g;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;'
readonly d_filter='/^#/d;s/[[:space:]]*#.*$//;s/[[:space:]]*$//;s/[[:cntrl:]]$//;/[[:space:]]/d;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;'
readonly f_filter='s|^|local=/|;s|$|/|'
+readonly checkmark='\xe2\x9c\x93'
+readonly xmark='\xe2\x9c\x97'
readonly _OK_='\033[0;32m\xe2\x9c\x93\033[0m'
readonly _FAIL_='\033[0;31m\xe2\x9c\x97\033[0m'
readonly __OK__='\033[0;32m[\xe2\x9c\x93]\033[0m'
readonly __FAIL__='\033[0;31m[\xe2\x9c\x97]\033[0m'
readonly _ERROR_='\033[0;31mERROR\033[0m'
-export EXTRA_COMMANDS="check killcache"
-export EXTRA_HELP=" check Checks if specified <string> is found in current blacklist"
-
-readonly packageName='simple-adblock'
-readonly serviceName="$packageName $PKG_VERSION"
-ok() { case $verbosity in 1) output "$_OK_";; 2) output "$__OK__\n";; esac; }
-okn() { case $verbosity in 1) output "$_OK_\n";; 2) output "$__OK__\n";; esac; }
-fail() { case $verbosity in 1) output "$_FAIL_";; 2) output "$__FAIL__\n";; esac; }
-failn() { case $verbosity in 1) output "$_FAIL_\n";; 2) output "$__FAIL__\n";; esac; }
-output() { [[ $# -ne 1 ]] && { [[ ! $((verbosity & $1)) -gt 0 ]] && return 0 || shift; }; local msg; msg=$(echo -n "${1/$serviceName /service }" | sed 's|\\033\[[0-9]\?;\?[0-9]\?[0-9]\?m||g'); [[ -t 1 ]] && echo -e -n "$1"; [[ $(echo -e -n "$msg" | wc -l) -gt 0 ]] && logger -t "${packageName:-service} [$$]" "$(echo -e -n ${logmsg}${msg})" && logmsg='' || logmsg=${logmsg}${msg}; }
-led_on(){ [[ -n "$led" && -e "$led/trigger" ]] && echo "default-on" > "$led/trigger"; }
-led_off(){ [[ -n "$led" && -e "$led/trigger" ]] && echo "none" > "$led/trigger"; }
-export serviceEnabled verbosity force_dns debug led wan_if wan_gw wanphysdev hosts_file
+create_lock() { [ -e "$PID" ] && return 1; touch "$PID"; }
+remove_lock() { [ -e "$PID" ] && rm -f "$PID"; rm -f /var/simple-adblock_tmp_* >/dev/null 2>&1; }
+trap remove_lock EXIT
+output_ok() { case $verbosity in 1) output 1 "$_OK_";; 2) output 2 "$__OK__\n";; esac; }
+output_okn() { case $verbosity in 1) output 1 "$_OK_\n";; 2) output 2 "$__OK__\n";; esac; }
+output_fail() { case $verbosity in 1) output 1 "$_FAIL_";; 2) output 2 "$__FAIL__\n";; esac; }
+output_failn() { case $verbosity in 1) output 1 "$_FAIL_\n";; 2) output 2 "$__FAIL__\n";; esac; }
+export logmsg
+output() {
+# Can take a single parameter (text) to be output at any verbosity
+# Or target verbosity level and text to be output at specifc verbosity
+ if [[ $# -ne 1 ]]; then
+ [[ ! $((verbosity & $1)) -gt 0 ]] && return 0 || shift
+ fi
+ [[ -t 1 ]] && echo -e -n "$1" # if we're running in console, echo text
+ # strip text of ASCII control characters and send completed lines to log
+ local msg=$(echo -n "${1/$serviceName /service }" | sed 's|\\033\[[0-9]\?;\?[0-9]\?[0-9]\?m||g');
+ if [[ $(echo -e -n "$msg" | wc -l) -gt 0 ]]; then
+ logger -t "${packageName:-service} [$$]" "$(echo -e -n ${logmsg}${msg})"
+ logmsg=''
+ else
+ logmsg=${logmsg}${msg}
+ fi
+}
+led_on(){ [[ -n "${1}" && -e "${1}/trigger" ]] && echo "default-on" > "${1}/trigger" 2>&1; }
+led_off(){ [[ -n "${1}" && -e "${1}/trigger" ]] && echo "none" > "${1}/trigger" 2>&1; }
+boot() { load_package_config; ( sleep $bootDelay && rc_procd start_service && rc_procd service_triggers | cat & ); }
-boot() { ( sleep 120 && rc_procd start_service && rc_procd service_triggers | cat &); }
+export serviceEnabled verbosity forceDNS debug led wan_if wan_gw wanphysdev bootDelay dl_command serviceStatus
load_package_config() {
config_load "$packageName"
config_get_bool serviceEnabled 'config' 'enabled' 1
- config_get_bool force_dns 'config' 'force_dns' 1
+ config_get_bool forceDNS 'config' 'force_dns' 1
config_get_bool debug 'config' 'debug' 0
+ config_get bootDelay 'config' 'boot_delay' '120'
+ config_get dlTimeout 'config' 'download_timeout' '20'
config_get verbosity 'config' 'verbosity' '2'
- config_get hosts_file 'config' 'hosts_file' "/var/dnsmasq.d/${packageName}"
config_get led 'config' 'led'
- source /lib/functions/network.sh
+ if [ -z "${verbosity##*[!0-9]*}" ] || [ $verbosity -lt 0 ] || [ $verbosity -gt 2 ]; then
+ verbosity=1
+ fi
+ source /lib/functions/network.sh
+ dl_command="wget --no-check-certificate --timeout $dlTimeout -qO-"
+ led="${led:+/sys/class/leds/$led}"
}
is_enabled() {
- local sleepCount=1
- load_package_config
+ local sleepCount=1
+ load_package_config
- if [ "$debug" -ne 0 ]; then
- exec 1>>/tmp/simple-adblock.log
- exec 2>&1
- set -x
+ if [ "$debug" -ne 0 ]; then
+ exec 1>>/tmp/simple-adblock.log
+ exec 2>&1
+ set -x
+ fi
+
+ if [ $serviceEnabled -eq 0 ]; then
+ if [ "$1" == "on_start" ]; then
+ output "$packageName is currently disabled.\n"
+ output "Run the following commands before starting service again:\n"
+ output "uci set $packageName.config.enabled='1'; uci commit;\n"
fi
+ return 1
+ fi
+ network_flush_cache; network_find_wan wan_if; network_get_gateway wan_gw $wan_if;
+ [ -n "$wan_gw" ] && return 0
+ output "$_ERROR_: $serviceName failed to discover WAN gateway.\n"; return 1;
+}
- led="${led:+/sys/class/leds/$led}"
- [ $serviceEnabled -gt 0 ] || return 1
- while : ; do
- network_flush_cache; network_find_wan wan_if; network_get_gateway wan_gw $wan_if;
- [[ $sleepCount -ge 25 || -n "$wan_gw" ]] && break
- output "$serviceName waiting for wan gateway...\n"; sleep 2; let "sleepCount+=1";
- done
- [ -n "$wan_gw" ] && return 0
- output "$_ERROR_: $serviceName failed to discover WAN gateway.\n"; return 1;
+dnsmasq_kill() { killall -q -HUP dnsmasq; }
+dnsmasq_restart() { /etc/init.d/dnsmasq restart >/dev/null 2>&1; }
+reload_dnsmasq() {
+ case $1 in
+ on_start)
+ if [ -s $dnsmasqFile ]; then
+ output 3 'Restarting dnsmasq '
+ if dnsmasq_restart; then
+ led_on "$led"
+ output_okn
+ else
+ output_failn
+ output "$_ERROR_: $serviceName failed to restart dnsmasq!\n"
+ serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
+ return 1
+ fi
+ else
+ output "$_ERROR_: $serviceName failed to create its data file!\n"
+ serviceStatus="${serviceStatus:-'Failed to create data file'}"
+ return 1
+ fi
+ ;;
+ on_stop)
+ [ -f $dnsmasqFile ] && mv $dnsmasqFile $CACHE_TMP
+ output 3 'Restarting dnsmasq '
+ if dnsmasq_restart; then
+ led_off "$led"
+ output_okn
+ output "$serviceName stopped.\n"
+ return 0
+ else
+ output_failn;
+ output "$_ERROR_: $serviceName failed to restart dnsmasq!\n"
+ return 1
+ fi
+ ;;
+ quiet | *)
+ dnsmasq_restart && return 0 || return 1
+ ;;
+ esac
}
-iptables_destroy() {
- [ $force_dns -eq 0 ] && return 0
- [ -z "$packageName" ] && return 1
- iptables-save | grep -Fv -- "$packageName" | iptables-restore
- lsmod | grep -q ip6table_nat && ip6tables-save | grep -Fv -- "$packageName" | ip6tables-restore
- [ -z "$1" ] && output 'No longer forcing local DNS server.\n'
+ubus_status(){
+ case "$1" in
+ add)
+ ubus_status set "$(ubus_status get)${2}"
+ ;;
+ del | set)
+ ubus call service set "{ \"name\": \"${packageName}\", \"instances\": { \"status\": { \"command\": [ \"\" ], \"data\": { \"status\": \"${2}\" }}}}"
+ # ubus call service set "{ \"name\": \"${packageName}\", \"instances\": { \"status\": { \"data\": { \"status\": \"${2}\" }}}}"
+ ;;
+ get)
+ echo "$(ubus call service list "{\"name\": \"${packageName}\"}" | jsonfilter -l1 -e "@['${packageName}']['instances']['status']['data']['status']")"
+ ;;
+ esac
}
-iptables_create() {
- local ip ipv6 label ipv6wan brname
- network_get_ipaddr ip lan; network_get_ipaddr6 ipv6 lan; network_get_device brname lan; network_get_physdev wanphysdev wan;
- ipv6wan=$(ifconfig $wanphysdev | grep inet6 | awk '{print $3}')
-
- iptables_destroy 'quiet'
- if [ $force_dns -ne 0 ]; then
- [ -n "$ip" ] && iptables -t nat -A prerouting_rule -i $brname -p tcp --dport 53 -j DNAT --to $ip -m comment --comment "$packageName"
- [ -n "$ip" ] && iptables -t nat -A prerouting_rule -i $brname -p udp --dport 53 -j DNAT --to $ip -m comment --comment "$packageName"
- if [[ -n "$ipv6" && -n "$ipv6wan" ]] && lsmod | grep -q ip6table_nat; then
- ip6tables -t nat -A PREROUTING -i $brname -p tcp --dport 53 -j DNAT --to-destination [$ipv6] -m comment --comment "$packageName"
- ip6tables -t nat -A PREROUTING -i $brname -p udp --dport 53 -j DNAT --to-destination [$ipv6] -m comment --comment "$packageName"
- label="$ip/$ipv6"
- else
- label="$ip"
- fi
- if [ -z "$1" ]; then
- if [ -n "$label" ]; then
- output "Forcing local DNS server: $label.\n"
- else
- output "$_ERROR_: $serviceName failed to obtain LAN IP address for DNS forcing!\n"
- fi
- fi
+is_chaos_calmer() { ubus -S call system board | grep -q 'Chaos Calmer'; }
+
+remove_fw3_redirect() {
+ config_get name "$1" 'name'
+ if [[ -n "$name" && "$name" != "${name//simple_adblock}" ]]; then
+ uci -q del "firewall.$1"
fi
}
-stop_adblocking() {
- load_package_config
- [ -f $hosts_file ] && mv $hosts_file $T_TMP
- output 3 "Restarting dnsmasq "
- led_off
- /etc/init.d/dnsmasq restart >/dev/null 2>&1
- if [[ $? -eq 0 ]]; then
- okn; output "$serviceName stopped.\n";
- else
- failn; output "$_ERROR_: $serviceName failed to reload dnsmasq!\n";
+fw3_setup() {
+ config_load 'firewall'
+ config_foreach remove_fw3_redirect 'redirect'
+ if [ "$1" == "start" ]; then
+ uci -q add firewall redirect >/dev/null 2>&1
+ uci -q set firewall.@redirect[-1].name='simple_adblock_dns_hijack'
+ uci -q set firewall.@redirect[-1].target='DNAT'
+ uci -q set firewall.@redirect[-1].src='lan'
+ uci -q set firewall.@redirect[-1].proto='tcpudp'
+ uci -q set firewall.@redirect[-1].src_dport='53'
+ uci -q set firewall.@redirect[-1].dest_port='53'
+ uci -q set firewall.@redirect[-1].dest_ip="$ip"
+ uci -q set firewall.@redirect[-1].reflection='0'
+ fi
+
+ if [ -n "$(uci changes firewall)" ]; then
+ uci -q commit firewall
+ /etc/init.d/firewall restart >/dev/null 2>&1
fi
}
process_url() {
local label type D_TMP R_TMP
[[ -n "$1" && -n "$2" && -n "$3" ]] || return 1
- local url=$1
- [ "$2" == "hosts" ] && label="Hosts: $(echo $1 | cut -d'/' -f3)" filter="$h_filter" || label="Domains: $(echo $1 | cut -d'/' -f3)" filter="$d_filter"
- [ "$3" == "blocked" ] && { type='Blocked'; D_TMP="$B_TMP"; } || { type='Allowed'; D_TMP="$A_TMP"; }
- R_TMP="/var/simple-adblock_$(head -c40 /dev/urandom 2>/dev/null | tr -dc 'A-Za-z0-9' 2>/dev/null)"
- while [ -e "$R_TMP" ]; do R_TMP="/var/simple-adblock_$(head -c40 /dev/urandom 2>/dev/null | tr -dc 'A-Za-z0-9' 2>/dev/null)"; done
+# ping -W5 -c1 "$(echo $1 | awk -F '/' '{print $3}')" 1>/dev/null 2>/dev/null || { output_fail; return 1; }
+ if [ "$2" == "hosts" ]; then
+ label="Hosts: $(echo $1 | cut -d'/' -f3)" filter="$h_filter"
+ else
+ label="Domains: $(echo $1 | cut -d'/' -f3)" filter="$d_filter"
+ fi
+ if [ "$3" == "blocked" ]; then
+ type='Blocked'; D_TMP="$B_TMP";
+ else
+ type='Allowed'; D_TMP="$A_TMP";
+ fi
+ while [[ -z "$R_TMP" || -e "$R_TMP" ]]; do
+ R_TMP="/var/${packageName}_tmp_$(head -c40 /dev/urandom 2>/dev/null | tr -dc 'A-Za-z0-9' 2>/dev/null)"
+ done
touch "$R_TMP"
- output 2 "[DL] $type $label "
- $dl "${url}" > "$R_TMP" 2>/dev/null && ok || fail
- { sed -i "$filter" "$R_TMP"; cat "$R_TMP" >> "$D_TMP"; rm -f "$R_TMP"; } &
+ if ! $dl_command "$1" > "$R_TMP" 2>/dev/null; then
+ output 2 "[DL] $type $label $__FAIL__\n"
+ output 1 "$_FAIL_"
+ ubus_status add '-'
+ return 1
+ fi
+ sed -i "$filter" "$R_TMP"
+ cat "$R_TMP" >> "$D_TMP"
+ rm -f "$R_TMP" >/dev/null 2>/dev/null
+ output 2 "[DL] $type $label $__OK__\n"
+ output 1 "$_OK_"
+ ubus_status add '+'
+ return 0
}
-start_adblocking() {
- local whitelist_domains blacklist_domains whitelist_domains_urls blacklist_domains_urls blacklist_hosts_urls
- config_get whitelist_domains 'config' 'whitelist_domain'
- config_get blacklist_domains 'config' 'blacklist_domain'
- config_get whitelist_domains_urls 'config' 'whitelist_domains_url'
- config_get blacklist_domains_urls 'config' 'blacklist_domains_url'
- config_get blacklist_hosts_urls 'config' 'blacklist_hosts_url'
-
- local hf w_filter
-
- [ ! -d ${hosts_file%/*} ] && mkdir -p ${hosts_file%/*}
- [ ! -f "$hosts_file" ] && touch "$hosts_file"
- if [[ -s $T_TMP && ! "$1" == "reload" ]]; then
- output 3 'Found existing data file, reusing it '
- mv $T_TMP $hosts_file && okn || failn
- else
- [ -f $A_TMP ] && rm -f $A_TMP; [ -f $B_TMP ] && rm -f $B_TMP; [ -f $T_TMP ] && rm -f $T_TMP; [ -f $hosts_file ] && rm -f $hosts_file;
- if [ "$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo")" -lt 32 ]; then
- output 1 'Low free memory, restarting dnsmasq...'
- /etc/init.d/dnsmasq restart >/dev/null 2>&1 && okn || failn
- fi
- touch $A_TMP; touch $B_TMP; touch $T_TMP;
- if [ -n "$blacklist_hosts_urls" ]; then
- output 1 '[DL] Blocked Hosts '
- for hf in ${blacklist_hosts_urls}; do process_url "$hf" 'hosts' 'blocked'; done
- output 1 '\n'
- fi
- if [ -n "$blacklist_domains_urls" ]; then
- output 1 '[DL] Blocked Domains '
- for hf in ${blacklist_domains_urls}; do process_url "$hf" 'domains' 'blocked'; done
+download_lists() {
+ local i hf w_filter whitelist_domains blacklist_domains whitelist_domains_urls blacklist_domains_urls blacklist_hosts_urls j=0
+ config_get whitelist_domains 'config' 'whitelist_domain'
+ config_get blacklist_domains 'config' 'blacklist_domain'
+ config_get whitelist_domains_urls 'config' 'whitelist_domains_url'
+ config_get blacklist_domains_urls 'config' 'blacklist_domains_url'
+ config_get blacklist_hosts_urls 'config' 'blacklist_hosts_url'
+
+ ubus_status set 'Reloading '
+ [ ! -d ${dnsmasqFile%/*} ] && mkdir -p ${dnsmasqFile%/*}
+ for i in $A_TMP $B_TMP $CACHE_TMP $dnsmasqFile; do [ -f $i ] && rm -f $i; done
+ if [ "$(awk '/^MemFree/ {print int($2/1000)}' "/proc/meminfo")" -lt 32 ]; then
+ output 3 'Low free memory, restarting dnsmasq...'
+ reload_dnsmasq 'quiet' && output_okn || output_failn
+ fi
+ touch $A_TMP; touch $B_TMP;
+ output 1 'Downloading lists '
+ if [ -n "$blacklist_hosts_urls" ]; then
+ for hf in ${blacklist_hosts_urls}; do
+ process_url "$hf" 'hosts' 'blocked' &
+ done
+ fi
+ if [ -n "$blacklist_domains_urls" ]; then
+ for hf in ${blacklist_domains_urls}; do
+ process_url "$hf" 'domains' 'blocked' &
+ done
+ fi
+ if [ -n "$whitelist_domains_urls" ]; then
+ for hf in ${whitelist_domains_urls}; do
+ process_url "$hf" 'domains' 'allowed' &
+ done
+ fi
+ wait
+ i="$(ubus_status get)"
+ [ "${i//-}" != "$i" ] && serviceStatus="${serviceStatus:-'Download error'}" || unset serviceStatus
+ i="${i//Reloading }"
+ i="${i//-/$xmark}"
+ i="${i//+/$checkmark}"
+ [ "$verbosity" == "1" ] && logmsg="${logmsg}${i}"
+ output 1 '\n'
+
+ [ -n "$blacklist_domains" ] && for hf in ${blacklist_domains}; do echo "$hf" | sed "$d_filter" >> $B_TMP; done
+ whitelist_domains="${whitelist_domains}"$'\n'"$(cat $A_TMP)"
+ [ -n "$whitelist_domains" ] && for hf in ${whitelist_domains}; do hf=$(echo $hf | sed 's/\./\\./g'); w_filter="$w_filter/^${hf}$/d;/\\.${hf}$/d;"; done
+ if [ -s $B_TMP ]; then
+ output 1 'Processing downloads '
+ output 2 'Sorting combined list '
+ if sort $B_TMP | uniq > $A_TMP; then
+ output_ok
+ else
+ output_fail
+ serviceStatus="${serviceStatus:-'Sorting error'}"
+ fi
+ output 2 'Optimizing combined list '
+ if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$A_TMP" > "$B_TMP"; then
+ if sort "$B_TMP" > "$A_TMP"; then
+ if awk '{if(NR==1){tld=$NF};while(getline){if($NF!~tld"\\."){print tld;tld=$NF}}print tld}' "$A_TMP" > "$B_TMP"; then
+ if awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$B_TMP" > "$A_TMP"; then
+ if sort "$A_TMP" | uniq > "$B_TMP"; then
+ output_ok
+ else
+ output_fail
+ serviceStatus="${serviceStatus:-'Data file optimization error'}"
+ mv $A_TMP $B_TMP
+ fi
+ else
+ output_fail
+ serviceStatus="${serviceStatus:-'Data file optimization error'}"
+ fi
+ else
+ output_fail
+ serviceStatus="${serviceStatus:-'Data file optimization error'}"
+ mv $A_TMP $B_TMP
+ fi
+ else
+ output_fail
+ serviceStatus="${serviceStatus:-'Data file optimization error'}"
+ fi
+ else
+ output_fail
+ serviceStatus="${serviceStatus:-'Data file optimization error'}"
+ mv $A_TMP $B_TMP
+ fi
+ output 2 'Whitelisting domains '
+ if sed -i "$w_filter" $B_TMP; then
+ output_ok
+ else
+ output_fail
+ serviceStatus="${serviceStatus:-'Whitelist processing error'}"
+ fi
+ output 2 'Formatting merged file '
+ if sed "$f_filter" $B_TMP > $A_TMP; then
+ output_ok
+ else
+ output_fail
+ serviceStatus="${serviceStatus:-'Data file formatting error'}"
+ fi
+ output 2 'Creating dnsmasq config '
+ if mv $A_TMP $dnsmasqFile; then
+ output_ok
+ else
+ output_fail
+ serviceStatus="${serviceStatus:-'Error moving data file'}"
+ fi
+ output 2 'Removing temporary files '
+ rm -f /var/simple-adblock_tmp_* >/dev/null 2>&1;
+ for i in $A_TMP $B_TMP $CACHE_TMP; do if [ -s $i ]; then rm -f $i || j=1; fi; done
+ if [ $j -eq 0 ]; then
+ output_ok
+ else
+ output_fail
+ serviceStatus="${serviceStatus:-'Error removing temporary files'}"
+ fi
output 1 '\n'
+ fi
+}
+
+start_service() {
+ local ip status
+ if create_lock; then
+ is_enabled 'on_start' || return 1
+ procd_open_instance
+ procd_set_param command /bin/true
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ network_get_ipaddr ip 'lan'
+ if [[ $forceDNS -ne 0 && -n "$ip" ]]; then
+ if is_chaos_calmer; then
+ fw3_setup 'start'
+ else
+ procd_open_data
+ json_add_array firewall
+ json_add_object ""
+ json_add_string type redirect
+ json_add_string target 'DNAT'
+ json_add_string src 'lan'
+ json_add_string proto 'tcpudp'
+ json_add_string src_dport '53'
+ json_add_string dest_port '53'
+ json_add_string dest_ip "$ip"
+ json_add_string name 'simple_adblock_dns_hijack'
+ json_add_string reflection '0'
+ json_close_object
+ json_close_array
+ procd_close_data
+ fi
fi
- if [ -n "$whitelist_domains_urls" ]; then
- output 1 '[DL] Allowed Domains '
- for hf in ${whitelist_domains_urls}; do process_url "$hf" 'domains' 'allowed'; done
- output 1 '\n'
+ procd_close_instance
+ status="$(ubus_status get)"
+ if [ -s "$CACHE_TMP" ] && [ "$1" != "reload" ]; then
+ output "Starting $serviceName...\n"
+ output 3 'Found existing data file, reusing it '
+ mv $CACHE_TMP $dnsmasqFile && output_okn || output_failn
+ reload_dnsmasq 'on_start' || serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
+ elif [ "$1" == "reload" ] || [ "$status" == "${status//Success}" ]; then
+ output "Reloading $serviceName...\n"
+ download_lists
+ reload_dnsmasq 'on_start' || serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
+ elif [ ! -s "$dnsmasqFile" ]; then
+ output "Starting $serviceName...\n"
+ download_lists
+ reload_dnsmasq 'on_start' || serviceStatus="${serviceStatus:-'DNSMASQ restart error'}"
fi
- output 3 'Waiting for background processes '
- wait && okn
- [ -n "$blacklist_domains" ] && for hf in ${blacklist_domains}; do echo "$hf" | sed "$d_filter" >> $B_TMP; done
- whitelist_domains="${whitelist_domains}"$'\n'"$(cat $A_TMP)"
- [ -n "$whitelist_domains" ] && for hf in ${whitelist_domains}; do hf=$(echo $hf | sed 's/\./\\./g'); w_filter="$w_filter/^${hf}$/d;/\\.${hf}$/d;"; done
- if [ -s $B_TMP ]; then
- output 1 'Processing downloads '
- output 2 'Sorting merged file '; sort $B_TMP | uniq > $T_TMP && ok || fail
- output 2 'Whitelisting domains '; sed -i "$w_filter" $T_TMP && ok || fail
- output 2 'Formatting merged file '; sed "$f_filter" $T_TMP > $B_TMP && mv $B_TMP $hosts_file && ok || fail
- output 1 '\n'
- output 3 'Removing temporary files '
- [ -f $A_TMP ] && rm -f $A_TMP; [ -f $B_TMP ] && rm -f $B_TMP; [ -f $T_TMP ] && rm -f $T_TMP;
- okn
+ if [ -s "$dnsmasqFile" ]; then
+ if [ -z "$serviceStatus" ]; then
+ output "$serviceName is blocking $(wc -l < $dnsmasqFile) domains "; output_okn;
+ serviceStatus="Success: $(wc -l < $dnsmasqFile) domains blocked"
+ else
+ output "$serviceName is blocking $(wc -l < $dnsmasqFile) domains with error: $serviceStatus "; output_failn;
+ serviceStatus="$(wc -l < $dnsmasqFile) domains blocked with error: $serviceStatus"
+ fi
fi
+ [ -n "$serviceStatus" ] && ubus_status set "$serviceStatus"
+ remove_lock
+ else
+ output "$serviceName: another instance is starting up "; output_failn;
+ return 1
fi
+}
- if [ -s $hosts_file ]; then
- output 3 'Restarting dnsmasq '
- /etc/init.d/dnsmasq restart >/dev/null 2>&1
- if [[ $? -eq 0 ]]; then
- led_on; okn;
- output "$serviceName blocking $(wc -l < $hosts_file) domains $_OK_\n"
- else
- failn; output "$_ERROR_: $serviceName failed to reload dnsmasq!\n";
- exit 1
- fi
+service_started() { procd_set_config_changed firewall; }
+reload_service() { start_service 'reload'; }
+killcache() { [ -s $CACHE_TMP ] && rm -f $CACHE_TMP >/dev/null 2>/dev/null; }
+
+stop_service() {
+ load_package_config
+ if [ $serviceEnabled -gt 0 ]; then
+ output "Stopping $serviceName...\n"
+ reload_dnsmasq 'on_stop'
else
- output "$_ERROR_: $serviceName failed to create its data file!\n"
- exit 1
+ reload_dnsmasq 'quiet'
fi
+ ubus_status set 'Stopped'
+ procd_set_config_changed firewall
}
check() {
load_package_config
local string="$1"
- if [ ! -f $hosts_file ]; then
- echo "No local blacklist ($hosts_file) found."
+ if [ ! -f $dnsmasqFile ]; then
+ echo "No local blacklist ($dnsmasqFile) found."
elif [ -z "$string" ]; then
- echo "Usage: /etc/init.d/${serviceName} check <string>"
- elif grep -m1 -q $string $hosts_file; then
- echo "Found $(grep $string $hosts_file | wc -l) matches for $string in $hosts_file:"
- grep $string $hosts_file | sed 's|local=/||;s|/$||;'
+ echo "Usage: /etc/init.d/${packageName} check 'domain'"
+ elif grep -m1 -q $string $dnsmasqFile; then
+ echo "Found $(grep $string $dnsmasqFile | wc -l) matches for $string in $dnsmasqFile:"
+ grep $string $dnsmasqFile | sed 's|local=/||;s|/$||;'
else
echo "The $string is not found in current blacklist."
fi
}
-
-start_service() {
- is_enabled || return 1
- if [ -f "$hosts_file" ]; then
- output "Reloading $serviceName...\n"
- iptables_create 'quiet'
- start_adblocking 'reload'
- else
- output "Starting $serviceName...\n"
- iptables_create
- start_adblocking
- fi
-}
-
-stop_service() {
- load_package_config
- output "Stopping $serviceName...\n"
- iptables_destroy
- stop_adblocking
-}
-
-killcache() { [ -s $T_TMP ] && rm -f $T_TMP; }
include $(TOPDIR)/rules.mk
PKG_NAME:=snort
-PKG_VERSION:=2.9.7.2
-PKG_RELEASE:=4
+PKG_VERSION:=2.9.11.1
+PKG_RELEASE:=6
PKG_LICENSE:=GPL-2.0
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
@SF/$(PKG_NAME)
-PKG_HASH:=db57c532919d9ababac127f29dbdc05ed832394880e46cad81a5dde713ccb4be
+PKG_HASH:=9f6b3aeac5a109f55504bd370564ac431cb1773507929dc461626898f33f46cd
-PKG_BUILD_DEPENDS:=librpc
+PKG_BUILD_DEPENDS:=libtirpc
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
SUBMENU:=Firewall
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libdaq +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +SNORT_LZMA:liblzma
+ DEPENDS:=+libdaq +libdnet +libnghttp2 +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +SNORT_LZMA:liblzma
TITLE:=Lightweight Network Intrusion Detection System
URL:=http://www.snort.org/
MENU:=1
MAKE_FLAGS += \
extra_incl=""
+
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/snort/dynamic_preproc
}
procd_open_instance
- procd_set_param command $PROG "-q" "--daq-dir" "/usr/lib/daq/" "-i" "$interface" "-s" "-N"
+ procd_set_param command $PROG "-q" "--daq-dir" "/usr/lib/daq/" "-i" "$interface" "-c" "$config_file" "-s" "-N"
procd_set_param file $CONFIGFILE
procd_set_param respawn
procd_close_instance
---- /dev/null
-+++ b/acinclude.m4
-@@ -0,0 +1 @@
-+sinclude(m4/libprelude.m4)
---- a/configure.in
-+++ b/configure.in
-@@ -285,21 +285,7 @@ AC_CHECK_TYPES([int8_t,int16_t,int32_t,i
+diff -u --recursive snort-2.9.11.1-vanilla/configure.in snort-2.9.11.1/configure.in
+--- snort-2.9.11.1-vanilla/configure.in 2018-03-02 15:41:50.601809500 -0500
++++ snort-2.9.11.1/configure.in 2018-03-02 16:19:08.119307772 -0500
+@@ -282,21 +282,7 @@
AC_CHECK_TYPES([boolean])
# In case INADDR_NONE is not defined (like on Solaris)
AC_MSG_RESULT($have_inaddr_none)
if test "x$have_inaddr_none" = "xno"; then
AC_DEFINE([INADDR_NONE],[-1],[For INADDR_NONE definition])
-@@ -433,16 +419,7 @@ if test "x$LPCAP" = "xno"; then
+@@ -428,17 +414,7 @@
+ fi
fi
- AC_MSG_CHECKING([for pcap_lex_destroy])
+-AC_MSG_CHECKING([for pcap_lex_destroy])
-AC_RUN_IFELSE(
-[AC_LANG_PROGRAM(
-[[
AC_MSG_RESULT($have_pcap_lex_destroy)
if test "x$have_pcap_lex_destroy" = "xyes"; then
AC_DEFINE([HAVE_PCAP_LEX_DESTROY],[1],[Can cleanup lex buffer stack created by pcap bpf filter])
-@@ -727,54 +704,21 @@ if test "x$ac_cv_func_daq_dp_add_dc" = "
+@@ -715,18 +691,7 @@
+
+ AC_CHECK_FUNCS([daq_hup_apply] [daq_acquire_with_meta] [daq_dp_add_dc])
+
+-AC_MSG_CHECKING([for daq real addresses])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+- DAQ_PktHdr_t hdr;
+- hdr.n_real_dPort = 0;
+-]])],
+-[have_daq_real_addresses="yes"],
+-[have_daq_real_addresses="no"])
++have_daq_address_space_id="yes"
+ AC_MSG_RESULT($have_daq_real_addresses)
+ if test "x$have_daq_real_addresses" = "xyes"; then
+ AC_DEFINE([HAVE_DAQ_REAL_ADDRESSES],[1],
+@@ -753,56 +718,21 @@
fi
[DAQ version supports flow ID in header.])
fi
--AC_MSG_CHECKING([for DAQ_VERDICT_RETRY])
+-AC_MSG_CHECKING([for daq extended flow modifiers])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+- DAQ_ModFlow_t mod;
+- mod.type = 0;
+- mod.length = 0;
+- mod.value = NULL;
+-]])],
+-[have_daq_ext_modflow="yes"],
+-[have_daq_ext_modflow="no"])
++have_daq_ext_modflow="no"
+ AC_MSG_RESULT($have_daq_ext_modflow)
+ if test "x$have_daq_ext_modflow" = "xyes"; then
+ CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_EXT_MODFLOW"
+@@ -810,20 +740,7 @@
+ [DAQ version supports extended flow modifiers.])
+ fi
+
+-AC_MSG_CHECKING([for daq query flow])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+- DAQ_QueryFlow_t mod;
+- mod.type = 0;
+- mod.length = 0;
+- mod.value = NULL;
+-]])],
+-[have_daq_queryflow="yes"],
+-[have_daq_queryflow="no"])
++have_daq_queryflow="no"
+ AC_MSG_RESULT($have_daq_queryflow)
+ if test "x$have_daq_queryflow" = "xyes"; then
+ CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_QUERYFLOW"
+@@ -831,17 +748,7 @@
+ [DAQ version supports query flow.])
+ fi
+
+-AC_MSG_CHECKING([for daq data channel flags])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+- DAQ_Data_Channel_Params_t params;
+-]])],
+-[have_daq_data_channel_flags="yes"],
+-[have_daq_data_channel_flags="no"])
++have_daq_data_channel_flags="no"
+ AC_MSG_RESULT($have_daq_data_channel_flags)
+ if test "x$have_daq_data_channel_flags" = "xyes"; then
+ CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_PARAMS"
+@@ -849,18 +756,7 @@
+ [DAQ version supports data channel.])
+ fi
+
+-AC_MSG_CHECKING([for separate IP versions on pinhole endpoints])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+- DAQ_DP_key_t dpKey;
+- dpKey.src_af = 0;
+-]])],
+-[have_daq_data_channel_separate_ip_versions="yes"],
+-[have_daq_data_channel_separate_ip_versions="no"])
++have_daq_data_channel_separate_ip_versions="no"
+ AC_MSG_RESULT($have_daq_data_channel_separate_ip_versions)
+ if test "x$have_daq_data_channel_separate_ip_versions" = "xyes"; then
+ CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_SEPARATE_IP_VERSIONS"
+@@ -869,35 +765,14 @@
+ fi
+
+ AC_MSG_CHECKING([for DAQ_VERDICT_RETRY])
-AC_RUN_IFELSE(
-[AC_LANG_PROGRAM(
-[[
AC_MSG_RESULT($have_daq_verdict_retry)
if test "x$have_daq_verdict_retry" = "xyes"; then
AC_DEFINE([HAVE_DAQ_VERDICT_RETRY],[1],
+ [DAQ version supports DAQ_VERDICT_RETRY in DAQ_Verdict.])
+ fi
+
+-AC_MSG_CHECKING([for daq packet trace])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+- DAQ_PktHdr_t hdr;
+- hdr.flags = DAQ_PKT_FLAG_TRACE_ENABLED;
+-]])],
+-[have_daq_packet_trace="yes"],
+-[have_daq_packet_trace="no"])
++have_daq_packet_trace="no"
+ AC_MSG_RESULT($have_daq_packet_trace)
+ if test "x$have_daq_packet_trace" = "xyes"; then
+ AC_DEFINE([HAVE_DAQ_PKT_TRACE],[1],
+@@ -906,18 +781,7 @@
+ echo "DAQ version doesn't support packet trace."
+ fi
+
+-AC_MSG_CHECKING([for daq verdict reason])
+-AC_RUN_IFELSE(
+-[AC_LANG_PROGRAM(
+-[[
+-#include <daq.h>
+-]],
+-[[
+- DAQ_ModFlow_t fl;
+- fl.type = DAQ_MODFLOW_TYPE_VER_REASON;
+-]])],
+-[have_daq_verdict_reason="yes"],
+-[have_daq_verdict_reason="no"])
++have_daq_verdict_reason="no"
+ AC_MSG_RESULT($have_daq_verdict_reason)
+ if test "x$have_daq_verdict_reason" = "xyes"; then
+ AC_DEFINE([HAVE_DAQ_VERDICT_REASON],[1],
+++ /dev/null
---- a/configure.in
-+++ b/configure.in
-@@ -11,14 +11,6 @@ AM_INIT_AUTOMAKE(snort,2.9.7.2)
- NO_OPTIMIZE="no"
- ADD_WERROR="no"
-
--# Test for -Werror and sed it out for now since some of the auto tests,
--# for example AC_CHECK_LIB, will fail because of
--# warning: conflicting types for built-in function <func>
--if eval "echo $CFLAGS | grep -e -Werror"; then
-- CFLAGS=`echo $CFLAGS | sed -e "s/-Werror//g"`
-- ADD_WERROR="yes"
--fi
--
- # Disable annoying practice of recursively re-running the autotools
- AM_MAINTAINER_MODE
- AC_PROG_CC_STDC
#
-# Copyright (C) 2006-2015 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=socat
PKG_VERSION:=1.7.3.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
CONFIGURE_ARGS+= --disable-openssl
endif
+# PowerPC has different TERMIOS bits
+ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
+ CONFIGURE_VARS += \
+ sc_cv_sys_crdly_shift=12 \
+ sc_cv_sys_tabdly_shift=10 \
+ sc_cv_sys_csize_shift=8
+else
+ CONFIGURE_VARS += \
+ sc_cv_sys_crdly_shift=9 \
+ sc_cv_sys_tabdly_shift=11 \
+ sc_cv_sys_csize_shift=4
+endif
+
CONFIGURE_VARS += \
sc_cv_termios_ispeed="no" \
- sc_cv_sys_crdly_shift=9 \
- sc_cv_sys_tabdly_shift=11 \
- sc_cv_sys_csize_shift=4 \
+ ac_cv_header_bsd_libutil_h=no \
+ ac_cv_lib_bsd_openpty=no \
BUILD_DATE=$(SOURCE_DATE_EPOCH)
define Package/socat/install
CATEGORY:=Network
DEPENDS:=+libpcap
TITLE:=softflowd
- URL:=http://code.google.com/p/softflowd/
+ URL:=https://code.google.com/archive/p/softflowd/
endef
define Package/softflowd/description
--- /dev/null
+#
+# Copyright (C) 2018 The Regents of the University of California
+#
+# This is free software, licensed under the GNU General Public License v3.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=spoofer
+PKG_VERSION:=1.3.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.caida.org/projects/spoofer/downloads
+PKG_HASH:=376f9a4b2d0404de3c37df645672a954b4916ad56508fadfe3f99120e5b0f87e
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=LICENSE
+
+HOST_BUILD_DEPENDS:=protobuf/host
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+
+$(eval $(call HostBuild))
+
+define Package/spoofer
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Measure your ISP's resistance to spoofed IP packets
+ URL:=https://spoofer.caida.org/
+ MAINTAINER:=Ken Keys <spoofer-info@caida.org>
+ DEPENDS:=+protobuf-lite +libpcap +libpthread +libopenssl
+endef
+
+define Package/spoofer/description
+The spoofer client is part of a system to measure the Internet's
+resistance to packets with a spoofed (forged) source IP address.
+
+This package comes bundled with a small certificate file that allows
+secure communication with the spoofer server without depending on
+the large ca-certificates package. But if the server's private
+certificate ever changes, it will be necessary to either install the
+ca-certificates package or install an updated version of this package
+that has a newer bundled certificate.
+
+endef
+
+CONFIGURE_ARGS += \
+ --enable-prober \
+ --disable-manager
+
+CONFIGURE_VARS += \
+ PROTOC=$(STAGING_DIR_HOSTPKG)/bin/protoc
+
+EXTRA_CXXFLAGS += -std=gnu++14
+
+SPOOFER_SRC=$(PKG_BUILD_DIR)
+
+define Package/spoofer/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/prober/spoofer-prober $(1)/usr/bin
+ $(INSTALL_BIN) $(SPOOFER_SRC)/openwrt-files/spoofer $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) $(SPOOFER_SRC)/openwrt-files/initscript $(1)/etc/init.d/spoofer
+ $(INSTALL_DIR) $(1)/usr/share/spoofer
+ $(INSTALL_DATA) $(SPOOFER_SRC)/gd_bundle.crt $(1)/usr/share/spoofer
+ $(INSTALL_DATA) $(SPOOFER_SRC)/openwrt-files/spoofer-lib.sh $(1)/usr/share/spoofer
+endef
+
+$(eval $(call BuildPackage,spoofer))
include $(TOPDIR)/rules.mk
PKG_NAME:=sqm-scripts
-PKG_SOURCE_VERSION:=8217081f7e52af342c362b29480461575c496387
-PKG_VERSION:=1.1.3
-PKG_RELEASE:=2
+PKG_SOURCE_VERSION:=d0ac824ec0c5d0fc3593ce90d83a007da505856e
+PKG_VERSION:=1.2.4
+PKG_RELEASE:=1
PKG_LICENSE:=GPLv2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz
-PKG_MIRROR_HASH:=a287ce3bf68ed76f4fd7ae3df5e0066d99105b5c139c88bce99555dcb1d230a3
+PKG_MIRROR_HASH:=2882aeae9f8b7827655bae8b0ecae60c405795a2a51aec8d3f2ae5fccecd76b9
PKG_SOURCE_URL:=https://github.com/tohojo/sqm-scripts.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
TITLE:=SQM Scripts - LuCI interface
MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
PKGARCH:=all
- DEPENDS:= lua luci-base +sqm-scripts
+ DEPENDS:= +lua +luci-base +sqm-scripts
SUBMENU:=3. Applications
endef
--- /dev/null
+if PACKAGE_squid
+
+ comment "Optional features"
+
+ config SQUID_enable-ipv6
+ bool "Enable support for IP version 6"
+ default y
+
+ config SQUID_enable-snmp
+ bool "Enable SNMP monitoring support"
+ default n
+
+ config SQUID_enable-icmp
+ bool "Enable ICMP pinging and Network Measurement"
+ default n
+
+ config SQUID_enable-icap-client
+ bool "Enable ICAP client support"
+ default n
+
+ config SQUID_enable-dlmalloc
+ bool "Compile & use the malloc package by Doug Lea"
+ default y
+
+ config SQUID_enable-ssl-crtd
+ bool "Enable dynamic SSL certificate generation "
+ depends on !SQUID_use-gnutls
+ default n
+
+ config SQUID_auth-basic
+ bool "Enable the Basic authentication scheme"
+ default n
+
+ config SQUID_auth-digest
+ bool "Enable the Digest authentication scheme"
+ default n
+
+ config SQUID_auth-negotiate
+ bool "Enable the Negotiate authentication scheme"
+ default n
+
+ config SQUID_auth-ntlm
+ bool "Enable the NTLM authentication scheme"
+ default n
+
+ comment "Optional packages"
+
+ choice
+ prompt "Choose SSL Library"
+ default SQUID_use-openssl
+
+ config SQUID_use-openssl
+ bool "Use OpenSSL (default)"
+
+ config SQUID_use-gnutls
+ bool "Use GnuTLS (experimental, see help)"
+ help
+ Use GnuTLS in place of OpenSSL for the core features of receiving
+ TLS connections from clients and making TLS connections to servers.
+ The GnuTLS support is still very much experimental and should be
+ tested before use.
+
+ SSL-Bump and certificate generation features are not yet supported
+ by GnuTLS builds. Nor are many other less commonly used Squid
+ TLS/SSL features.
+
+ squid.conf directives and configuration options which have undergone
+ name changes from 'ssl' to 'tls' prefix in Squid-4 have GnuTLS
+ support, unless explicitly stated otherwise.
+
+ Advanced configuration with specific selection of ciphers and
+ similar settings should still work, but needs the GnuTLS Priority
+ Strings instead of the OpenSSL options when using GnuTLS.
+ endchoice
+
+ config SQUID_with-libcap
+ bool "Use libcap - Linux capabilities library"
+ default n
+
+ config SQUID_with-nettle
+ bool "Use nettle - GNU crypto library"
+ default n
+
+ config SQUID_with-expat
+ bool "Use expat - XML parsing library"
+ default n
+
+ config SQUID_with-libxml2
+ bool "Use libxml2 - Gnome XML library"
+ default n
+
+ comment "Additional tools"
+
+endif
+
include $(TOPDIR)/rules.mk
PKG_NAME:=squid
-PKG_VERSION:=3.5.27
+PKG_VERSION:=4.3
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://www3.us.squid-cache.org/Versions/v3/3.5/ \
- http://www2.pl.squid-cache.org/Versions/v3/3.5/ \
- http://www.squid-cache.org/Versions/v3/3.5/
-PKG_HASH:=5ddb4367f2dc635921f9ca7a59d8b87edb0412fa203d1543393ac3c7f9fef0ec
+PKG_SOURCE_URL:=http://www3.us.squid-cache.org/Versions/v4/ \
+ http://www2.pl.squid-cache.org/Versions/v4/ \
+ http://www.squid-cache.org/Versions/v4/
+PKG_HASH:=322612ef0544828f6c673a25124b32364fb41ef5e2847e21c89480b5546a4c7c
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
URL:=http://www.squid-cache.org/
- MENU:=1
endef
define Package/squid
$(call Package/squid/Default)
- DEPENDS:=+libopenssl +libpthread +librt +libltdl +libstdcpp
+ MENU:=1
+ DEPENDS:=+libpthread +librt +libltdl +libstdcpp +libatomic +USE_GLIBC:libbsd
+ DEPENDS+= +SQUID_use-gnutls:libgnutls +SQUID_use-openssl:libopenssl
+ DEPENDS+= +SQUID_with-libcap:libcap
+ DEPENDS+= +SQUID_with-nettle:libnettle
+ DEPENDS+= +SQUID_with-expat:libexpat
+ DEPENDS+= +SQUID_with-libxml2:libxml2
+ USERID:=squid=137:squid=137
TITLE:=full-featured Web proxy cache
endef
frequently-requested web pages.
endef
+define Package/squid/config
+ source "$(SOURCE)/Config.in"
+endef
+
+define Package/squid/conffiles
+ /etc/squid/squid.conf
+endef
+
define Package/squid-mod-cachemgr
$(call Package/squid/Default)
DEPENDS:=squid
endef
CONFIGURE_ARGS += \
+ BUILDCXX=$(HOSTCXX) \
+ BUILDCXXFLAGS=$(if $(HOST_CXXFLAGS),$(HOST_CXXFLAGS),-O2) \
--config-cache \
--datadir=/usr/share/squid \
--libexecdir=/usr/lib/squid \
--sysconfdir=/etc/squid \
--enable-shared \
--disable-static \
- --enable-icmp \
--enable-delay-pools \
- --enable-icap-client \
--enable-kill-parent-hack \
- --disable-snmp \
--enable-ssl \
- --enable-ssl-crtd \
--enable-cache-digests \
--enable-linux-netfilter \
--disable-unlinkd \
--disable-auto-locale \
--with-dl \
--with-pthreads \
- --without-expat \
- --without-libxml2 \
- --without-gnutls \
- --without-nettle \
- --with-openssl=$(STAGING_DIR)/usr \
--enable-epoll \
- --with-maxfd=4096 \
+ --with-maxfd=2048 \
+ --disable-ecap \
--disable-external-acl-helpers \
- --disable-auth-negotiate \
- --disable-auth-ntlm \
- --disable-auth-digest \
- --disable-auth-basic \
--disable-arch-native \
--with-krb5-config=no \
--without-mit-krb5 \
- --without-libcap \
- --without-netfilter-conntrack
+ --without-netfilter-conntrack \
+ --disable-ident-lookups \
+ $(if $(CONFIG_SQUID_auth-basic),--enable,--disable)-auth-basic \
+ $(if $(CONFIG_SQUID_auth-digest),--enable,--disable)-auth-digest \
+ $(if $(CONFIG_SQUID_auth-ntlm),--enable,--disable)-auth-ntlm \
+ $(if $(CONFIG_SQUID_auth-negotiate),--enable,--disable)-auth-negotiate \
+ $(if $(CONFIG_SQUID_enable-ipv6),--enable,--disable)-dlmalloc \
+ $(if $(CONFIG_SQUID_enable-ipv6),--enable,--disable)-ipv6 \
+ $(if $(CONFIG_SQUID_enable-ssl-crtd),--enable-ssl-crtd) \
+ $(if $(CONFIG_SQUID_use-gnutls),--with,--without)-gnutls \
+ $(if $(CONFIG_SQUID_use-gnutls),--without-openssl) \
+ $(if $(CONFIG_SQUID_use-gnutls),,--with-openssl="$(STAGING_DIR)/usr") \
+ $(if $(CONFIG_SQUID_enable-icmp),--enable,--disable)-icmp \
+ $(if $(CONFIG_SQUID_enable-icap-client),--enable,--disable)-icap-client \
+ $(if $(CONFIG_SQUID_enable-snmp),--enable,--disable)-snmp \
+ $(if $(CONFIG_SQUID_with-libcap),--with,--without)-libcap \
+ $(if $(CONFIG_SQUID_with-nettle),--with,--without)-nettle \
+ $(if $(CONFIG_SQUID_with-expat),--with,--without)-expat \
+ $(if $(CONFIG_SQUID_with-libxml2),--with,--without)-libxml2
CONFIGURE_VARS += \
ac_cv_header_linux_netfilter_ipv4_h=yes \
- ac_cv_epoll_works=yes \
- squid_cv_gnu_atomics=no
+ ac_cv_epoll_works=yes
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib all
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib/squid
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/squid/ssl_crtd $(1)/usr/lib/squid
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/squid/* $(1)/usr/lib/squid/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/squid.config $(1)/etc/config/squid
$(INSTALL_DIR) $(1)/etc/squid
- $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/squid/mime.conf $(1)/etc/squid/
+ $(CP) $(PKG_INSTALL_DIR)/etc/squid/* $(1)/etc/squid/
$(INSTALL_CONF) ./files/squid.conf $(1)/etc/squid/
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_DIR) $(1)/usr/share/squid/icons/
$(CP) $(PKG_INSTALL_DIR)/usr/share/squid/icons/* $(1)/usr/share/squid/icons/
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/mib.txt $(1)/usr/share/squid/
$(INSTALL_DIR) $(1)/usr/share/squid/errors/templates/
$(CP) $(PKG_INSTALL_DIR)/usr/share/squid/errors/templates/* $(1)/usr/share/squid/errors/templates/
-acl localnet src 10.0.0.0/8
-acl localnet src 172.16.0.0/12
-acl localnet src 192.168.0.0/16
-acl localnet src fc00::/7
-acl localnet src fe80::/10
-
-acl ssl_ports port 443
-
-acl safe_ports port 80
-acl safe_ports port 21
-acl safe_ports port 443
-acl safe_ports port 70
-acl safe_ports port 210
-acl safe_ports port 1025-65535
-acl safe_ports port 280
-acl safe_ports port 488
-acl safe_ports port 591
-acl safe_ports port 777
-acl connect method connect
-
-http_access deny !safe_ports
-http_access deny connect !ssl_ports
+#
+# Recommended minimum configuration:
+#
+# Example rule allowing access from your local networks.
+# Adapt to list your (internal) IP networks from where browsing
+# should be allowed
+acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
+acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
+acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
+acl localhet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
+acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
+acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
+acl localnet src fc00::/7 # RFC 4193 local private network range
+acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
+
+acl SSL_ports port 443
+acl Safe_ports port 80 # http
+acl Safe_ports port 21 # ftp
+acl Safe_ports port 443 # https
+acl Safe_ports port 70 # gopher
+acl Safe_ports port 210 # wais
+acl Safe_ports port 1025-65535 # unregistered ports
+acl Safe_ports port 280 # http-mgmt
+acl Safe_ports port 488 # gss-http
+acl Safe_ports port 591 # filemaker
+acl Safe_ports port 777 # multiling http
+acl CONNECT method CONNECT
+
+#
+# Recommended minimum Access Permission configuration:
+#
+# Deny requests to certain unsafe ports
+http_access deny !Safe_ports
+
+# Deny CONNECT to other than secure SSL ports
+http_access deny CONNECT !SSL_ports
+
+# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager
-http_access deny to_localhost
+# We strongly recommend the following be uncommented to protect innocent
+# web applications running on the proxy server who think the only
+# one who can access services on "localhost" is a local user
+#http_access deny to_localhost
+#
+# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
+#
+
+# Example rule allowing access from your local networks.
+# Adapt localnet in the ACL section to list your (internal) IP networks
+# from where browsing should be allowed
http_access allow localnet
http_access allow localhost
+# And finally deny all other access to this proxy
http_access deny all
-refresh_pattern ^ftp: 1440 20% 10080
-refresh_pattern ^gopher: 1440 0% 1440
-refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
-refresh_pattern . 0 20% 4320
+# Uncomment and adjust the following to add a disk cache directory.
+#cache_dir ufs /usr/local/squid/var/cache/squid 100 16 256
+
+#
+# Add any of your own refresh_pattern entries above these.
+#
+refresh_pattern ^ftp: 1440 20% 10080
+refresh_pattern ^gopher: 1440 0% 1440
+refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
+refresh_pattern . 0 20% 4320
+
+# Squid user
+cache_effective_user squid
-access_log none
-cache_log /dev/null
-cache_store_log stdio:/dev/null
-logfile_rotate 0
+#
+# Logs, best to use only for debugging as they can become very large
+#
-logfile_daemon /dev/null
+access_log none # daemon:/tmp/squid_access.log
+cache_log /dev/null # /tmp/squid_cache.log
'mime_table:string:/etc/squid/mime.conf'
}
+create_squid_user() {
+ user_exists squid || user_add squid $USERID
+ group_exists squid || group_add squid $USERID && group_add_user squid squid
+}
+
start_service() {
local config_file http_port http_port_options ssldb ssldb_options coredump_dir visible_hostname pinger_enable
config_dir=$(dirname $CONFIGFILE)
[ -d $config_dir ] || mkdir -p $config_dir && chown nobody:nogroup $config_dir
[ -d $coredump_dir ] || mkdir -p $coredump_dir && chown nobody:nogroup $coredump_dir
- [ "$ssldb" ] && ( [ -f "$ssldb"/size ] || /usr/lib/squid/ssl_crtd -c -s $ssldb && chown -R nobody:nogroup $ssldb )
+ [ "$ssldb" ] && ( [ -f "$ssldb"/size ] || /usr/lib/squid/security_file_certgen -c -s $ssldb $ssldb_options && chown -R nobody:nogroup $ssldb )
cat $config_file > $CONFIGFILE
echo http_port $http_port $http_port_options >> $CONFIGFILE
echo pinger_enable $pinger_enable >> $CONFIGFILE
cat $mime_table > $MIMETABLE
echo mime_table $MIMETABLE >> $CONFIGFILE
- [ "$ssldb" ] && echo sslcrtd_program /usr/lib/squid/ssl_crtd -s $ssldb $ssldb_options >> $CONFIGFILE
+ [ "$ssldb" ] && echo sslcrtd_program /usr/lib/squid/security_file_certgen -s $ssldb $ssldb_options >> $CONFIGFILE
$PROG -s -f $CONFIGFILE -N -z 2>/dev/null
procd_open_instance
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -7984,7 +7984,7 @@ cache_cf.o: cf_parser.cci
+From fac6f63a52a2f4cbb3748cd5687eca5409093904 Mon Sep 17 00:00:00 2001
+From: Marko Ratkaj <marko.ratkaj@sartura.hr>
+Date: Thu, 20 Apr 2017 15:15:50 +0200
+Subject: [PATCH] foo
+
+Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
+---
+ src/Makefile.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: squid-4.0.21/src/Makefile.in
+===================================================================
+--- squid-4.0.21.orig/src/Makefile.in
++++ squid-4.0.21/src/Makefile.in
+@@ -7642,7 +7642,8 @@ cache_cf.o: cf_parser.cci
# cf_gen builds the configuration files.
cf_gen$(EXEEXT): $(cf_gen_SOURCES) $(cf_gen_DEPENDENCIES) cf_gen_defines.cci
- $(BUILDCXX) $(BUILDCXXFLAGS) -o $@ $(srcdir)/cf_gen.cc -I$(srcdir) -I$(top_builddir)/include/ -I$(top_builddir)/src
+ g++ -o $@ $(srcdir)/cf_gen.cc -I$(srcdir) -I$(top_builddir)/include/ -I$(top_builddir)/src
++
# squid.conf.default is built by cf_gen when making cf_parser.cci
squid.conf.default squid.conf.documented: cf_parser.cci
---- a/configure
-+++ b/configure
-@@ -20842,7 +20842,7 @@ else
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
-+_as_fn_error $? "cannot run test program while cross compiling
- See \`config.log' for more details" "$LINENO" 5; }
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-@@ -29142,7 +29142,7 @@ else
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
-+_as_fn_error $? "cannot run test program while cross compiling
- See \`config.log' for more details" "$LINENO" 5; }
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-@@ -29167,7 +29167,7 @@ else
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
-+_as_fn_error $? "cannot run test program while cross compiling
- See \`config.log' for more details" "$LINENO" 5; }
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--- /dev/null
+--- squid-4.0.21.orig/src/tools.cc
++++ squid-4.0.21/src/tools.cc
+@@ -581,7 +581,8 @@
+ }
+ #else
+
+- setuid(0);
++ if (setuid(0) < 0)
++ debugs(50, 1, "no_suid: setuid (0)");
+ #endif
+ #if HAVE_PRCTL && defined(PR_SET_DUMPABLE)
+ /* Set Linux DUMPABLE flag */
#
-# Copyright (C) 2012-2015 OpenWrt.org
+# Copyright (C) 2012-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=strongswan
-PKG_VERSION:=5.6.2
+PKG_VERSION:=5.7.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=e0a60a30ebf3c534c223559e1686497a21ded709a5d605c5123c2f52bcc22e92
+PKG_HASH:=d6fd0994320bc027090f6ee34964e59c42e761e7dac36cfcf1836c8cefc53c5c
PKG_SOURCE_URL:=http://download.strongswan.org/ http://download2.strongswan.org/
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
+# strongswan-mod-mysql needs iconv
+include $(INCLUDE_DIR)/nls.mk
define Package/strongswan/Default
SUBMENU:=VPN
$(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/_updown $(1)/usr/lib/ipsec/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-updown.so $(1)/usr/lib/ipsec/plugins/
- $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/ipsec
+ $(CP) ./files/etc/hotplug.d/ipsec/01-user \
+ $(1)/etc/hotplug.d/ipsec/01-user
endef
define Plugin/vici/install
--- /dev/null
+#!/bin/sh
+
+[ -e "/etc/ipsec.user" ] && {
+ . /etc/ipsec.user "$2"
+}
+
+exit 0
--- /dev/null
+From 129ab919a8c3abfc17bea776f0774e0ccf33ca09 Mon Sep 17 00:00:00 2001
+From: Tobias Brunner <tobias@strongswan.org>
+Date: Tue, 25 Sep 2018 14:50:08 +0200
+Subject: [PATCH] gmp: Fix buffer overflow with very small RSA keys
+
+Because `keylen` is unsigned the subtraction results in an integer
+underflow if the key length is < 11 bytes.
+
+This is only a problem when verifying signatures with a public key (for
+private keys the plugin enforces a minimum modulus length) and to do so
+we usually only use trusted keys. However, the x509 plugin actually
+calls issued_by() on a parsed certificate to check if it is self-signed,
+which is the reason this issue was found by OSS-Fuzz in the first place.
+So, unfortunately, this can be triggered by sending an invalid client
+cert to a peer.
+
+Fixes: 5955db5b124a ("gmp: Don't parse PKCS1 v1.5 RSA signatures to verify them")
+Fixes: CVE-2018-17540
+---
+ src/libstrongswan/plugins/gmp/gmp_rsa_private_key.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libstrongswan/plugins/gmp/gmp_rsa_private_key.c b/src/libstrongswan/plugins/gmp/gmp_rsa_private_key.c
+index e9a83fdf49a1..a255a40abce2 100644
+--- a/src/libstrongswan/plugins/gmp/gmp_rsa_private_key.c
++++ b/src/libstrongswan/plugins/gmp/gmp_rsa_private_key.c
+@@ -301,7 +301,7 @@ bool gmp_emsa_pkcs1_signature_data(hash_algorithm_t hash_algorithm,
+ data = digestInfo;
+ }
+
+- if (data.len > keylen - 11)
++ if (keylen < 11 || data.len > keylen - 11)
+ {
+ chunk_free(&digestInfo);
+ DBG1(DBG_LIB, "signature value of %zu bytes is too long for key of "
+--
+2.7.4
+
+#undef encrypt
--- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
+++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
-@@ -19,6 +19,7 @@
+@@ -40,6 +40,7 @@
*/
#define _GNU_SOURCE
+#include <musl.h>
#include <sys/types.h>
#include <sys/socket.h>
- #include <stdint.h>
+ #include <sys/ioctl.h>
--- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
+++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
@@ -37,6 +37,8 @@
--- /dev/null
+--- a/src/_updown/_updown.in
++++ b/src/_updown/_updown.in
+@@ -22,6 +22,13 @@
+ # that, and use the (left/right)updown parameters in ipsec.conf to make
+ # strongSwan use yours instead of this default one.
+
++# Add your custom commands to the file "/etc/ipsec.user". Other packages could
++# also install their scripts in the directory "/etc/hotplug.d/ipsec".
++# This files/scripts are executed by the openwrt hotplug functionality on
++# ipsec events.
++
++/sbin/hotplug-call ipsec "$1"
++
+ # PLUTO_VERSION
+ # indicates what version of this interface is being
+ # used. This document describes version 1.1. This
+++ /dev/null
---- a/src/_updown/_updown.in
-+++ b/src/_updown/_updown.in
-@@ -16,11 +16,9 @@
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- # for more details.
-
--# CAUTION: Installing a new version of strongSwan will install a new
--# copy of this script, wiping out any custom changes you make. If
--# you need changes, make a copy of this under another name, and customize
--# that, and use the (left/right)updown parameters in ipsec.conf to make
--# strongSwan use yours instead of this default one.
-+# Add your custom ip rules to the /etc/ipsec.user file if you need that functionality.
-+
-+[ -e /etc/ipsec.user ] && . /etc/ipsec.user "$1"
-
- # PLUTO_VERSION
- # indicates what version of this interface is being
ARG_DISBL_SET([curve25519], [disable Curve25519 Diffie-Hellman plugin.])
ARG_DISBL_SET([hmac], [disable HMAC crypto implementation plugin.])
ARG_ENABL_SET([md4], [enable MD4 software implementation plugin.])
-@@ -1379,6 +1380,7 @@ ADD_PLUGIN([gcrypt], [s ch
+@@ -1407,6 +1408,7 @@ ADD_PLUGIN([gcrypt], [s ch
ADD_PLUGIN([af-alg], [s charon scepclient pki scripts medsrv attest nm cmd aikgen])
ADD_PLUGIN([fips-prf], [s charon nm cmd])
ADD_PLUGIN([gmp], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen fuzz])
ADD_PLUGIN([curve25519], [s charon pki scripts nm cmd])
ADD_PLUGIN([agent], [s charon nm cmd])
ADD_PLUGIN([keychain], [s charon cmd])
-@@ -1516,6 +1518,7 @@ AM_CONDITIONAL(USE_SHA3, test x$sha3 = x
+@@ -1547,6 +1549,7 @@ AM_CONDITIONAL(USE_SHA3, test x$sha3 = x
AM_CONDITIONAL(USE_MGF1, test x$mgf1 = xtrue)
AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
AM_CONDITIONAL(USE_CURVE25519, test x$curve25519 = xtrue)
AM_CONDITIONAL(USE_RDRAND, test x$rdrand = xtrue)
AM_CONDITIONAL(USE_AESNI, test x$aesni = xtrue)
-@@ -1783,6 +1786,7 @@ AC_CONFIG_FILES([
+@@ -1823,6 +1826,7 @@ AC_CONFIG_FILES([
src/libstrongswan/plugins/mgf1/Makefile
src/libstrongswan/plugins/fips_prf/Makefile
src/libstrongswan/plugins/gmp/Makefile
src/libstrongswan/plugins/aesni/Makefile
--- a/src/libstrongswan/Makefile.am
+++ b/src/libstrongswan/Makefile.am
-@@ -323,6 +323,13 @@ if MONOLITHIC
+@@ -341,6 +341,13 @@ if MONOLITHIC
endif
endif
include $(TOPDIR)/rules.mk
PKG_NAME:=stubby
-PKG_VERSION:=0.2.2
-PKG_RELEASE:=1
+PKG_VERSION:=0.2.3
+PKG_RELEASE:=3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/getdnsapi/$(PKG_NAME)
-PKG_SOURCE_VERSION:=1a6acd642c7dc9a04cf092e1a3837c5636d4b465
-PKG_MIRROR_HASH:=f5a270a0ef4e7e2f0387b649ed77d66917ba9bd88dee14e3f9edd2573e8d3c3a
+PKG_SOURCE_VERSION:=8fb853ac8d6148fd9b53fdcbc107ecd375071ec5
+PKG_MIRROR_HASH:=db736f4a728970d2441009ac19716d6129700eab3f441a5db3a0c26d41bf162c
PKG_FIXUP:=autoreconf
URL:=https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby
endef
-define Package/stubby/description
- This package contains the Stubby daemon (which utilizes the getdns library).
-
- See https://github.com/openwrt/packages/blob/master/net/stubby/files/README.md for more details.
-endef
-
define Package/stubby
$(call Package/stubby/Default)
SECTION:=net
SUBMENU:=IP Addresses and Names
TITLE+= - (daemon that uses getdns)
USERID:=stubby=410:stubby=410
- DEPENDS:= +libyaml +getdns
+ DEPENDS:= +libyaml +getdns +ca-certificates
+endef
+
+define Package/stubby/description
+ This package contains the Stubby daemon (which utilizes the getdns library).
+
+ See https://github.com/openwrt/packages/blob/master/net/stubby/files/README.md for more details.
+endef
+
+define Package/stubby/conffiles
+/etc/stubby/stubby.yml
endef
define Package/stubby/install
$(INSTALL_DIR) $(1)/etc/stubby
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/stubby/stubby.yml $(1)/etc/stubby/stubby.yml.default
$(INSTALL_DATA) ./files/stubby.yml $(1)/etc/stubby/stubby.yml
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DATA) ./files/stubby.conf $(1)/etc/config/stubby
endef
define Package/stubby/conffiles
/etc/stubby/stubby.yml
+ /etc/config/stubby
endef
$(eval $(call BuildPackage,stubby))
# Stubby for OpenWRT
## Stubby Description
-[Stubby](https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby) is an application that acts as a local DNS Privacy stub resolver (using DNS-over-TLS). Stubby encrypts DNS queries sent from a client machine (desktop or laptop) to a DNS Privacy resolver increasing end user privacy.
+
+[Stubby](https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby) is
+an application that acts as a local DNS Privacy stub resolver (using
+DNS-over-TLS). Stubby encrypts DNS queries sent from a client machine to a DNS
+Privacy resolver increasing end user privacy.
+
+Stubby is useful on an OpenWRT device, because it can sit between the usual DNS
+resolver (dnsmasq by default) and the upstream DNS resolver and be used to
+ensure that DNS traffic is encrypted between the OpenWRT device and the
+resolver.
Stubby is developed by the [getdns](http://getdnsapi.net/) project.
-For more background and FAQ see our [About Stubby](https://dnsprivacy.org/wiki/display/DP/About+Stubby) page. Stubby is in the early stages of development but is suitable for technical/advanced users. A more generally user-friendly version is on the way!
+For more background and FAQ see the [About
+Stubby](https://dnsprivacy.org/wiki/display/DP/About+Stubby) page.
+
+
+## Installation
+
+Installation of this package can be achieved at the command line using `opkg
+install stubby`, or via the LUCI Web Interface. Installing the stubby package
+will also install the required dependency packages, including the
+`ca-certificates` package.
+
+## Configuration
+
+The default configuration of the package has been chosen to ensure that stubby
+should work after installation.
+
+By default, configuration of stubby is integrated with the OpenWRT UCI system
+using the file `/etc/config/stubby`. The configuration options available are
+also documented in that file. If for some reason you wish to configure stubby
+using the `/etc/stubby/stubby.yml` file, then you simply need to set `option
+manual '1'` in `/etc/config/stubby` and all other settings in
+`/etc/config/stubby` will be ignored.
+
+### Stubby port and addresses
+
+The default configuration ensures that stubby listens on port 5453 on the
+loopback interfaces for IPv4 and IPv6. As such, by default, stubby will respond
+only to lookups from the OpenWRT device itself.
+
+By setting the listening ports to non-standard values, this allows users to keep
+the main name server daemon in place (dnsmasq/unbound/etc.) and have that name
+server forward to stubby.
+
+### Upstream resolvers
+
+The default package configuration uses the CloudFlare resolvers, configured for
+both IPv4 and IPv6.
+
+CloudFlare have not published SPKI pinsets, and even though they are available,
+they have made no commitment to maintaining them. Using the currently known SPKI
+pinsets for CloudFlare brings the risk that in the future they may be changed by
+CloudFlare, and DNS would stop working. The default configuration has those SPKI
+entries commented out for this reason.
+
+[CloudFlare's privacy
+statement](https://developers.cloudflare.com/1.1.1.1/commitment-to-privacy/)
+details how they treat data from DNS requests.
+
+More resolvers are available in the [upstream stubby example
+configuration](https://github.com/getdnsapi/stubby/blob/develop/stubby.yml.example)
+and the [DNS Privacy
+list](https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Test+Servers).
+
+## Integration of stubby with dnsmasq
+
+The recommended way to use stubby on an OpenWRT device is to integrate it with a
+caching resolver. The default caching resolver in OpenWRT is dnsmasq.
+
+### Set dnsmasq to send DNS requests to stubby
+
+Since dnsmasq responds to LAN DNS requests on port 53 of the OpenWRT device by
+default, all that is required is to have dnsmasq forward those requests to
+stubby which is listening on port 5453 of the OpenWRT device. To achieve this,
+we need to set the `server` option in the dnsmasq configuration in the
+`/etc/config/dhcp` file to `'127.0.0.1#5453'`. We also need to tell dnsmasq not
+to use resolvers found in `/etc/resolv.conf` by setting the dnsmasq option
+`noresolv` to `1` in the same file. This can be achieved by editing the
+`/etc/config/dhcp` file directly or executing the following commands at the
+command line:
+
+ uci add_list dhcp.@dnsmasq[-1].server='127.0.0.1#5453'
+ uci dhcp.@dnsmasq[-1].noresolv=1
+ uci commit
+
+The same outcome can be achieved in the LUCI web interface as follows:
+
+1. Select the Network->DHCP and DNS menu entry.
+2. In the "General Settings" tab, enter the address `127.0.0.1#5453` as the only
+ entry in the "DNS Forwardings" dialogue.
+3. In the "Resolv and Host files" tab tick the "Ignore resolve file" checkbox.
+
+### Disable sending DNS requests to ISP provided DNS servers
+
+The configuration changes in the previous section ensure that DNS queries are
+sent over TLS encrypted connections *once dnsmasq and stubby are started*. When
+the OpenWRT device is first brought up, there is a possibility that DNS queries
+can go to ISP provided DNS servers ahead of dnsmasq and stubby being active. In
+order to mitigate this leakage, it's necessary to ensure that upstream resolvers
+aren't available, and the only DNS resolver used by the system is
+dnsmasq+stubby.
+
+This requires setting the option `peerdns` to `0` and the option `dns` to the
+loopback address for both the `wan` and `wan6` interfaces in the
+`/etc/config/network` file. This can be achieved by editing the
+`/etc/config/network` file directly, or by executing the following commands:
+
+ uci set network.wan.peerdns='0'
+ uci set network.wan.dns='127.0.0.1'
+ uci set network.wan6.peerdns='0'
+ uci set network.wan6.dns='0::1'
+ uci commit
+
+The same outcome can also be achieved using the LUCI web interface as follows:
+
+1. Select the Network->Interfaces menu entry.
+2. Click on Edit for the WAN interfaces.
+3. Choose the Advanced Settings tab.
+4. Unselect the "Use DNS servers advertised by peer" checkbox
+5. Enter `127.0.0.1` in the "Use custom DNS servers" dialogue box.
+6. Repeat the above steps for the WAN6 interface, but use the address `0::1`
+ instead of `127.0.0.1`.
+
+### Enabling DNSSEC
+
+The configuration described above ensures that DNS queries are executed over TLS
+encrypted links. However, the responses themselves are not validated; DNSSEC
+provides the ability to validate returned DNS responses, and mitigate against
+DNS poisoning risks.
+
+With the combination of stubby+dnsmasq there are two possible ways to enable
+DNSSEC:
+
+1. Configure stubby to perform DNSSEC validation, and configure dnsmasq to proxy
+ the DNSSEC data to clients.
+2. Configure stubby not to perform DNSSEC validation and configure dnsmasq to
+ require DNSSEC validation.
+
+Either option achieves the same outcome, and there appears to be little reason
+for choosing one over the other other than that the second option is easier to
+configure in the LUCI web interface. Both options are detailed below, and both
+require that the `dnsmasq` package on the OpenWRT device is replaced with the
+`dnsmasq-full` package. That can be achieved by running the following command:
+
+ opkg install dnsmasq-full --download-only && opkg remove dnsmasq && opkg install dnsmasq-full --cache . && rm *.ipk
+
+#### DNSSEC by stubby
+
+Configuring stubby to perform DNSSEC validation requires setting the stubby
+configuration option `dnssec_return_status` to `'1'` in `/etc/config/stubby`,
+which can be done by editing the file directly or by executing the commands:
+
+ uci set stubby.global.dnssec_return_status=1
+ uci commit
+
+With stubby performing DNSSEC validation, dnsmasq needs to be configured to
+proxy the DNSSEC data to clients. This requires setting the option `proxydnssec`
+to 1 in the dnsmasq configuration in `/etc/config/dhcp`. That can be achieved by
+the following commands:
+
+ uci set dhcp.@dnsmasq[-1].proxydnssec=1
+ uci commit
+
+#### DNSSEC by dnsmasq
+
+Configuring dnsmasq to perform DNSSEC validation requires setting the dnsmasq
+option `dnssec` to `1` in the `/etc/config/dhcp` file. In addition, it is
+advisable to also set the dnsmasq option `dnsseccheckunsigned` to `1`. this can
+be achieved by editing the file `/etc/config/dhcp` or by executing the following
+commands:
+
+ uci set dhcp.@dnsmasq[-1].dnssec=1
+ uci set dhcp.@dnsmasq[-1].dnsseccheckunsigned=1
+ uci commit
+
+The same options can be set in the LUCI web interface as follows:
+
+1. Select the "Network->DHCP and DNS" menu entry.
+2. Select the "Advanced Settings" tab.
+3. Ensure both the "DNSSEC" and "DNSSEC check unsigned" check boxes are ticked.
+
+#### Validating DNSSEC operation
+
+Having configured DNSSEC validation using one of the two approaches above, it's
+important to check it's actually working. The following command can be used:
+
+ dig dnssectest.sidn.nl +dnssec +multi @192.168.1.1
+
+This command should return output like the following:
+
+ ; <<>> DiG 9.11.4-P1-RedHat-9.11.4-5.P1.fc28 <<>> dnssectest.sidn.nl +dnssec +multi @192.168.1.1
+ ;; global options: +cmd
+ ;; Got answer:
+ ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26579
+ ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
+
+ ;; OPT PSEUDOSECTION:
+ ; EDNS: version: 0, flags: do; udp: 512
+ ;; QUESTION SECTION:
+ ;dnssectest.sidn.nl. IN A
+
+ ;; ANSWER SECTION:
+ dnssectest.sidn.nl. 14399 IN A 213.136.9.12
+ dnssectest.sidn.nl. 14399 IN RRSIG A 8 3 14400 (
+ 20181104071058 20181005071058 42033 sidn.nl.
+ YAQl3tef36M9EQUOmCneHKCCkxox3csLpfUOql5i/6ND
+ zPrQFsNr3g32HPoxOsi+hD2BE5+bEsnARayDSVLyx0qU
+ 6Hpi2rzQ0zGNZZkCJhCsdp3wnM1BWlMgPrCD0iIsJDok
+ +DH5zu+yYufVUdSLQrMqA3MZDFUIqDUqSZuYDF4= )
+
+ ;; Query time: 77 msec
+ ;; SERVER: 192.168.1.1#53(192.168.1.1)
+ ;; WHEN: Sat Oct 06 20:36:25 BST 2018
+ ;; MSG SIZE rcvd: 230
+
+The key thing to note is the `flags: qr rd ra ad` part - the `ad` flag signifies
+that DNSSEC validation is working. If that flag is absent DNSSEC validation is
+not working.
+
+## Appendix: stubby configuration options
+
+This section details the options available for use in the `/etc/config/stubby`
+file. The `global` configuration section specifies the configuration parameters
+for the stubby daemon. One or more `resolver` sections are used to configure
+upstream resolvers for the stubby daemon to use.
+
+### `global` section options
+
+#### `option manual`
+
+Specify whether to use this file to configure the stubby service. If this is set
+to `'1'` stubby will be configured using the file `/etc/stubby/stubby.yml`. If this
+is set to `'0'`, configuration options will be taken from this file, and the service
+will be managed through UCI.
+
+#### `option trigger`
+
+This specifies an interface to trigger stubby start up on; stubby startup will
+be triggered by a procd signal associated with this interface being ready. If
+this interface is restarted, stubby will also be restarted.
+
+This option can also be set to `'timed'`, in which case a time, specified by the
+option `triggerdelay`, will be waited before starting stubby.
+
+
+#### `option triggerdelay`
+
+If the `trigger` option specifies an interface, this option sets the time that
+is waited after the procd signal is received before starting stubby.
+
+If `trigger` is set to `'timed'` then this is the delay before starting stubby.
+This option is specified in seconds and defaults to the value `'2'`.
+
+#### `list dns_transport`
+
+The `dns_transport` list specifies the allowed transports. Allowed values are:
+`GETDNS_TRANSPORT_UDP`, `GETDNS_TRANSPORT_TCP` and `GETDNS_TRANSPORT_TLS`. The
+transports are tried in the order listed.
+
+#### `option tls_authentication`
+
+This option specifies whether TLS authentication is mandatory. A value of `'1'`
+mandates TLS authentication, and is the default.
+
+If this is set to `'0'`, and `GETDNS_TRANSPORT_TCP` or `GETDNS_TRANSPORT_UDP`
+appears in the `dns_transport` list, stubby is allowed to fall back to non-TLS
+authenticated lookups. You probably don't want this though.
+
+#### `option tls_query_padding_blocksize`
+
+This option specifies the block size to pad DNS queries to. You shouldn't need
+to set this to anything but `'128'` (the default), as recommended by
+https://tools.ietf.org/html/draft-ietf-dprive-padding-policy-03
+
+#### `option tls_connection_retries`
+
+This option specifies the number of connection failures stubby permits before
+Stubby backs-off from using an individual upstream resolver. You shouldn't need
+to change this from the default value of `'2'`.
+
+#### `option tls_backoff_time`
+
+This option specifies the maximum time in seconds Stubby will back-off from
+using an individual upstream after failures. You shouldn't need to change this
+from the default value of `'3600'`.
+
+#### `option timeout`
+
+This option specifies the timeout on getting a response to an individual
+request. This is specified in milliseconds. You shouldn't need to change this
+from the default value of ` '5000'`.
+
+#### `option dnssec_return_status`
+
+This option specifies whether stubby should require DNSSEC validation. Specify
+to `'1'` to turn on validation, and `'0'` to turn it off. By default it is off.
+
+#### `option appdata_dir`
+
+This option specifies the location for storing stubby runtime data. In
+particular, if DNSSEC is turned on, stubby will store its automatically
+retrieved trust anchor data here. The default value is `'/var/lib/stubby'`.
+
+#### `option dnssec_trust_anchors`
+
+This option sets the location of the file containing the trust anchor data used
+for DNSSEC validation. If this is not specified, stubby will automatically
+retrieve a trust anchor at startup. It's unlikely you'll want to manage the
+trust anchor data manually, so in most cases this is not needed. By default,
+this is unset.
+
+#### `option edns_client_subnet_private`
-## Prerequisites
+This option specifies whether to enforce ECS client privacy. The default is
+`'1'`. Set to `'0'` to disable client privacy.
-You must have a ca cert bundle installed on your device for stubby to make the TLS enabled connections.
+For more details see Section 7.1.2 [here](https://tools.ietf.org/html/rfc7871).
-- You can install this by running the following: opkg install ca-certificates
-- You can also install this through the LUCI web interface
+#### `option idle_timeout`
-## Package Overview
-This package has some modifications that makes it differ from the default upstream configuration. They are outlined below.
+This option specifies the time (in milliseconds) to hold TLS connections open to
+avoid the overhead of opening a new connection for every query. You should not
+normally need to change this from the default value (currently `'10000'`).
-### General Cleanup
-Comments are removed, etc.
+See [here](https://tools.ietf.org/html/rfc7828) for more details.
-### EDNS Client-Subnet Option Changed to 0
-The value of "edns_client_subnet_private" is '1' in the upstream default config. This informs the upstream resolver to NOT forward your connection's IP to any other upstream servers. This is good for privacy, but could result in sub-optimal routing to CDNs, etc.
+#### `option round_robin_upstreams`
-To give a more "comparable" DNS experience similar to google/opendns, this package disables this option.
+This option specifies how stubby will use the upstream DNS resolvers. Set to
+`'1'` (the default) to instruct stubby to distribute queries across all
+available name servers - this will use multiple simultaneous connections which
+can give better performance in most (but not all) cases. Set to `'0'` to treat
+the upstream resolvers as an ordered list and use a single upstream resolver
+until it becomes unavailable, then use the next one.
-### Default Listening Ports Changed
-The value of "listen_addresses" in the default config does not list port numbers, which will cause stubby to default to port 53. However, Openwrt defaults to dnsmasq as the main name server daemon, which runs on port 53. By setting the listening ports to non-standard values, this allows users to keep the main name server daemon in place (dnsmasq/unbound/etc.) and have that name server forward to stubby.
+#### `list listen_address`
-Additionally, due to the slight overhead involved with DNS-over-TLS, it is recommended to have a caching name server on the network.
+This list sets the addresses and ports for the stubby daemon to listen for
+requests on. the default configuration configures stubby to listen on port 5453
+on the loopback interface for both IPv4 and IPv6.
-### Round Robin Upstream Setting Changed
+#### `option log_level`
-The default stubby config list multiple upstream resolvers, and because of this, it makes sense to "load balance" between them. However, in this package's default stubby config, the only upstream service listed is quad9. One entry is for ipv6 and one for ipv4.
+If set, this option specifies the level of logging from the stubby
+daemon. By default, this option is not set.
-By setting the "round_robin_upstreams" value to 0, we are simply forcing stubby to try and use ipv6 connectivity to quad9 first, and if not available, simply use the ipv4 service.
+The possible levels are:
-quad9 is an Anycast DNS service. This should take care of any needed "failover" in the event that one of quad9's nodes goes down.
+ '0': EMERG - System is unusable
+ '1': ALERT - Action must be taken immediately
+ '2': CRIT - Critical conditions
+ '3': ERROR - Error conditions
+ '4': WARN - Warning conditions
+ '5': NOTICE - Normal, but significant, condition
+ '6': INFO - Informational message
+ '7': DEBUG - Debug-level message
-### Upstream Resolvers Changed
+#### `option command_line_arguments`
-Most of the default resolvers for stubby are in Europe. To provide a better experience for a larger number of users, this package defaults to using quad9's DNS service.
+This option specifies additional command line arguments for
+stubby daemon. By default, this is an empty string.
+
+### `resolver` section options
-Note: quad9 has multiple IPs available for their service. The "features" applied are based on the endpoint your DNS client connects to. For this package, the default resolvers are set to the non-filtering, EDNS Client-Subnet capable endpoints.
+#### `option address`
-https://www.quad9.net/faq/#Is_there_a_service_that_Quad9_offers_that_does_not_have_the_blocklist_or_other_security
+This option specifies the resolver IP address, and can either be an IPv4 or an
+IPv6 address.
-https://www.quad9.net/faq/#Does_Quad9_support_DNS_over_TLS
+#### `option tls_auth_name`
-``````
+This option specifies the upstream domain name used for TLS authentication with
+the supplied server certificate
-# IPv6 addresses
-# Quad 9 IPv6
- - address_data: 2620:fe::10
- tls_auth_name: "dns.quad9.net"
+#### `list spki`
-# IPv4 addresses
-# Quad 9 service
- - address_data: 9.9.9.10
- tls_auth_name: "dns.quad9.net"
+This list specifies the SPKI pinset which is verified against the keys in the
+server cerrtificate. The values takes the form `'<digest type>/value>'`, where
+the `digest type` is the hashing algorithm used, and the value is the Base64
+encoded hash of the public key. At present, only `sha256` is
+supported for the digest type.
-``````
+This should ONLY be used if the upstream resolver has committed to maintaining
+the pinset. CloudFlare have made no such commitment, and so we do not specify
+the SPKI values in the default configuration, even though they are available.
--- /dev/null
+config stubby 'global'
+ option manual '0'
+ option trigger 'wan'
+ # option triggerdelay '2'
+ list dns_transport 'GETDNS_TRANSPORT_TLS'
+ option tls_authentication '1'
+ option tls_query_padding_blocksize '128'
+ # option tls_connection_retries '2'
+ # option tls_backoff_time '3600'
+ # option timeout '5000'
+ # option dnssec_return_status '0'
+ option appdata_dir '/var/lib/stubby'
+ # option dnssec_trust_anchors '/var/lib/stubby/getdns-root.key'
+ option edns_client_subnet_private '1'
+ option idle_timeout '10000'
+ option round_robin_upstreams '1'
+ list listen_address '127.0.0.1@5453'
+ list listen_address '0::1@5453'
+ # option log_level '7'
+ # option command_line_arguments ''
+
+# Upstream resolvers are specified using 'resolver' sections.
+config resolver
+ option address '2606:4700:4700::1111'
+ option tls_auth_name 'cloudflare-dns.com'
+ # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+
+config resolver
+ option address '2606:4700:4700::1001'
+ option tls_auth_name 'cloudflare-dns.com'
+ # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+
+config resolver
+ option address '1.1.1.1'
+ option tls_auth_name 'cloudflare-dns.com'
+ # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+
+config resolver
+ option address '1.0.0.1'
+ option tls_auth_name 'cloudflare-dns.com'
+ # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
START=50
STOP=51
-PROG=/usr/sbin/stubby
+PROG="/usr/sbin/stubby"
+
+stubby="/usr/sbin/stubby"
+stubby_init="/etc/init.d/stubby"
+stubby_config_dir="/var/etc/stubby"
+stubby_config="$stubby_config_dir/stubby.yml"
+stubby_pid_file="/var/run/stubby.pid"
+stubby_manual_config="/etc/stubby/stubby.yml"
+
+boot()
+{
+ stubby_boot=1
+ rc_procd start_service
+}
+
+generate_config()
+{
+ local config_file="$1"
+ local round_robin
+ local tls_authentication
+ local tls_query_padding_blocksize
+ local edns_client_subnet_private
+ local idle_timeout
+ local appdata_dir
+ local tls_connection_retries
+ local tls_backoff_time
+ local timeout
+ local dnssec_return_status
+ local dnssec_trust_anchors
+ local listen_addresses_section=0
+ local dns_transport_list_section=0
+ local upstream_recursive_servers_section=0
+ local stubby_args
+ local command_line_arguments
+ local log_level
+
+ # Generate configuration. See: https://github.com/getdnsapi/stubby/blob/develop/stubby.yml.example
+ echo "# Autogenerated configuration from uci data" > "$config_file"
+ echo "resolution_type: GETDNS_RESOLUTION_STUB" >> "$config_file"
+
+ config_get round_robin "global" round_robin_upstreams "1"
+ echo "round_robin_upstreams: $round_robin" >> "$config_file"
+
+ config_get appdata_dir "global" appdata_dir "/var/lib/stubby"
+ echo "appdata_dir: \"$appdata_dir\"" >> "$config_file"
+
+ config_get tls_connection_retries "global" tls_connection_retries ""
+ if [ -n "$tls_connection_retries" ]; then
+ echo "tls_connection_retries: $tls_connection_retries" >> "$config_file"
+ fi
+
+ config_get tls_backoff_time "global" tls_backoff_time ""
+ if [ -n "$tls_backoff_time" ]; then
+ echo "tls_backoff_time: $tls_backoff_time" >> "$config_file"
+ fi
+
+ config_get timeout "global" timeout ""
+ if [ -n "$timeout" ]; then
+ echo "timeout: $timeout" >> "$config_file"
+ fi
+
+ config_get_bool tls_authentication "global" tls_authentication "1"
+ if [ "$tls_authentication" = "1" ]; then
+ echo "tls_authentication: GETDNS_AUTHENTICATION_REQUIRED" >> "$config_file"
+ else
+ echo "tls_authentication: GETDNS_AUTHENTICATION_NONE" >> "$config_file"
+ fi
+
+ config_get_bool dnssec_return_status "global" dnssec_return_status "0"
+ if [ "$dnssec_return_status" = "1" ]; then
+ echo "dnssec_return_status: GETDNS_EXTENSION_TRUE" >> "$config_file"
+ fi
+
+ config_get dnssec_trust_anchors "global" dnssec_trust_anchors ""
+ if [ -n "$dnssec_trust_anchors" ]; then
+ echo "dnssec_trust_anchors: \"$dnssec_trust_anchors\"" >> "$config_file"
+ fi
+
+ config_get tls_query_padding_blocksize "global" tls_query_padding_blocksize "128"
+ echo "tls_query_padding_blocksize: $tls_query_padding_blocksize" >> "$config_file"
+
+ config_get_bool edns_client_subnet_private "global" edns_client_subnet_private "1"
+ echo "edns_client_subnet_private: $edns_client_subnet_private" >> "$config_file"
+
+ config_get idle_timeout "global" idle_timeout "10000"
+ echo "idle_timeout: $idle_timeout" >> "$config_file"
+
+ handle_listen_address_value()
+ {
+ local value="$1"
+
+ if [ "$listen_addresses_section" = 0 ]; then
+ echo "listen_addresses:" >> "$config_file"
+ listen_addresses_section=1
+ fi
+ echo " - $value" >> "$config_file"
+ }
+ config_list_foreach "global" listen_address handle_listen_address_value
+
+ handle_dns_transport_list_value()
+ {
+ local value="$1"
+
+ if [ "$dns_transport_list_section" = 0 ]; then
+ echo "dns_transport_list:" >> "$config_file"
+ dns_transport_list_section=1
+ fi
+ echo " - $value" >> "$config_file"
+ }
+ config_list_foreach "global" dns_transport handle_dns_transport_list_value
+
+ handle_resolver()
+ {
+ local config=$1
+ local address
+ local tls_auth_name
+ local spki
+ local tls_pubkey_pinset_section=0
+
+ if [ "$upstream_recursive_servers_section" = 0 ]; then
+ echo "upstream_recursive_servers:" >> "$config_file"
+ upstream_recursive_servers_section=1
+ fi
+ config_get address "$config" address
+ config_get tls_auth_name "$config" tls_auth_name
+ echo " - address_data: $address" >> "$config_file"
+ echo " tls_auth_name: \"$tls_auth_name\"" >> "$config_file"
+
+ handle_resolver_spki()
+ {
+ local val="$1"
+ local digest="${val%/*}"
+ local value="${val#*/}"
+
+ if [ "$tls_pubkey_pinset_section" = 0 ]; then
+ echo " tls_pubkey_pinset:" >> "$config_file"
+ tls_pubkey_pinset_section=1
+ fi
+ echo " - digest: \"$digest\"" >> "$config_file"
+ echo " value: $value" >> "$config_file"
+ }
+ config_list_foreach "$config" spki handle_resolver_spki
+ }
+
+ config_foreach handle_resolver resolver
+}
start_service() {
- procd_open_instance stubby
- procd_set_param command /usr/sbin/stubby
+ local config_file_tmp
+ local manual
+ local log_level
+ local command_line_arguments
+ local stubby_args
+
+ mkdir -p "$stubby_config_dir"
+
+ config_load "stubby"
- procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
+ config_get_bool manual "global" manual "0"
- procd_set_param limits core="unlimited"
+ if [ "$manual" = "1" ]; then
+ cp "$stubby_manual_config" "$stubby_config"
+ else
+ config_file_tmp="$stubby_config.$$"
+ generate_config "$config_file_tmp"
+ mv "$config_file_tmp" "$stubby_config"
+ fi
- procd_set_param file /etc/stubby/stubby.yml
+ stubby_args=""
+ config_get command_line_arguments "global" command_line_arguments ""
+ if [ -n "$command_line_arguments" ]; then
+ stubby_args="$command_line_arguments"
+ fi
- procd_set_param stdout 1
- procd_set_param stderr 1
- procd_set_param user stubby
- procd_close_instance
+ config_get log_level "global" log_level ""
+ if [ -n "$log_level" ]; then
+ stubby_args="$stubby_args -v$log_level"
+ fi
+
+ if [ $("${stubby_init}" enabled; printf "%u" ${?}) -eq 0 ]; then
+ if [ -n "${stubby_boot}" ]; then
+ local trigger="$(uci_get stubby global trigger)"
+ if [ "${trigger}" != "timed" ]; then
+ return 0
+ fi
+ fi
+ procd_open_instance "stubby"
+ procd_set_param command "$stubby" "$stubby_args" -C "$stubby_config"
+ procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
+ procd_set_param file "$stubby_config"
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_set_param pidfile "$stubby_pid_file"
+ procd_set_param user stubby
+ procd_close_instance
+ fi
}
+service_triggers()
+{
+ local trigger="$(uci_get stubby global trigger)"
+ local delay="$(uci_get stubby global triggerdelay "2")"
+
+ if [ "${trigger}" != "none" ] && [ "${trigger}" != "timed" ]; then
+ PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
+ procd_add_interface_trigger "interface.*.up" "${trigger}" "${stubby_init}" start
+ fi
+ procd_add_reload_trigger "stubby"
+}
-#NOTE: See '/etc/stubby/stubby.yml.default' for original config file and descriptions
-
+# Note: by default on OpenWRT stubby configuration is handled via
+# the UCI system and the file /etc/config/stubby. If you want to
+# use this file to configure stubby, then set "option manual '1'"
+# in /etc/config/stubby.
resolution_type: GETDNS_RESOLUTION_STUB
-
-dns_transport_list:
- - GETDNS_TRANSPORT_TLS
-
+round_robin_upstreams: 1
+appdata_dir: "/var/lib/stubby"
tls_authentication: GETDNS_AUTHENTICATION_REQUIRED
-
tls_query_padding_blocksize: 128
-
-edns_client_subnet_private : 0
-
+edns_client_subnet_private: 1
idle_timeout: 10000
-
listen_addresses:
- 127.0.0.1@5453
- - 0::1@5453
-
-round_robin_upstreams: 0
-
+ - 0::1@5453
+dns_transport_list:
+ - GETDNS_TRANSPORT_TLS
upstream_recursive_servers:
-# Quad 9 IPv6
- - address_data: 2620:fe::10
- tls_auth_name: "dns.quad9.net"
-# IPv4 addresses
-# Quad 9 service
- - address_data: 9.9.9.10
- tls_auth_name: "dns.quad9.net"
+ - address_data: 2606:4700:4700::1111
+ tls_auth_name: "cloudflare-dns.com"
+ - address_data: 2606:4700:4700::1111
+ tls_auth_name: "cloudflare-dns.com"
+ - address_data: 1.1.1.1
+ tls_auth_name: "cloudflare-dns.com"
+ - address_data: 1.0.0.1
+ tls_auth_name: "cloudflare-dns.com"
include $(TOPDIR)/rules.mk
PKG_NAME:=stunnel
-PKG_VERSION:=5.44
-PKG_RELEASE:=4
+PKG_VERSION:=5.48
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
PKG_SOURCE_URL:= \
http://ftp.nluug.nl/pub/networking/stunnel/ \
http://www.usenix.org.uk/mirrors/stunnel/ \
- https://www.stunnel.org/downloads/
+ https://www.stunnel.org/downloads/ \
+ https://www.usenix.org.uk/mirrors/stunnel/archive/$(word 1, $(subst .,$(space),$(PKG_VERSION))).x/
+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=990a325dbb47d77d88772dd02fbbd27d91b1fea3ece76c9ff4461eca93f12299
+PKG_HASH:=1011d5a302ce6a227882d094282993a3187250f42f8a801dcc1620da63b2b8df
PKG_FIXUP:=autoreconf
PKG_FIXUP:=patch-libtool
PKG_NAME:=subversion
PKG_RELEASE:=1
-PKG_VERSION:=1.9.7
+PKG_VERSION:=1.10.2
PKG_SOURCE_URL:=@APACHE/subversion
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=c3b118333ce12e501d509e66bb0a47bcc34d053990acab45559431ac3e491623
+PKG_HASH:=5b35e3a858d948de9e8892bf494893c9f7886782f6abbe166c0487c19cf6ed88
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
PKG_FIXUP:=autoreconf
PKG_MACRO_PATHS:=build/ac-macros
+PKG_BUILD_DEPENDS:=apr-util
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
--without-junit \
--without-berkeley-db \
--without-apxs \
- --without-sasl
+ --without-sasl \
+ --with-lz4=internal \
+ --with-utf8proc=internal
ifdef $(INTL_FULL)
CONFIGURE_ARGS += --enable-nls
PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
PKG_NAME:=sysrepo
-PKG_VERSION:=0.7.3
-PKG_RELEASE:=2
+PKG_VERSION:=0.7.5
+PKG_RELEASE:=3
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=91e65c6f7d8826197b2806ab6d5466d16882b07f
-PKG_MIRROR_HASH:=1662c158d5eac3e6c9f400517bd02b1967632f3d8b3516523da669bbd1c28c4
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/sysrepo/sysrepo.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
-
-PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/sysrepo/sysrepo/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=3ef20e1e005fd22f13d1996231ccfc72241f3f76c5700397ad59dda0f9b29f72
CMAKE_INSTALL:=1
CATEGORY:=Utilities
URL:=$(PKG_SOURCE_URL)
TITLE:=YANG-based data store library
- DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python-base +SYSREPO_LUA:lua
+ DEPENDS:=+libyang +libprotobuf-c +libev +libredblack +librt +libpthread +SYSREPO_BINDINGS:libstdcpp +SYSREPO_PYTHON:python-base +SYSREPO_LUA:lua
MENU:=1
endef
-DOPER_DATA_PROVIDE_TIMEOUT=4 \
-DNOTIF_AGE_TIMEOUT=120 \
-DNOTIF_TIME_WINDOW=20 \
- -DUSE_SR_MEM_MGMT=0
+ -DUSE_SR_MEM_MGMT=0 \
+ -DFILE_FORMAT_EXT:STRING=xml
ifeq ($(CONFIG_SYSREPO_LUA),y)
CMAKE_OPTIONS += \
CMAKE_OPTIONS += \
-DCMAKE_DISABLE_FIND_PACKAGE_SWIG=FALSE \
-DGEN_LANGUAGE_BINDINGS:BOOL=TRUE \
- -DSWIG_DIR=$(STAGING_DIR)/host/share/swig
+ -DSWIG_DIR=$(STAGING_DIR)/host/share/swig \
+ -DCALL_TARGET_BINS_DIRECTLY=OFF
endif
define Package/libsysrepo/install
$(INSTALL_CONF) $(PKG_BUILD_DIR)/yang/sysrepo-persistent-data.yang $(1)/etc/sysrepo/yang/internal
$(INSTALL_DIR) $(1)/etc/sysrepo/yang
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf-acm@2012-02-22.yang $(1)/etc/sysrepo/yang/ietf-netconf-acm@2012-02-22.yang
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf-notifications.yang $(1)/etc/sysrepo/yang/ietf-netconf-notifications@2012-02-06..yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf-acm@2018-02-14.yang $(1)/etc/sysrepo/yang/ietf-netconf-acm@2018-02-14.yang
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf-notifications.yang $(1)/etc/sysrepo/yang/ietf-netconf-notifications@2012-02-06.yang
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/nc-notifications.yang $(1)/etc/sysrepo/yang/nc-notifications@2008-07-14.yang
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/notifications.yang $(1)/etc/sysrepo/yang/notifications@2008-07-14.yang
$(INSTALL_DATA) $(PKG_BUILD_DIR)/yang/ietf-netconf@2011-06-01.yang $(1)/etc/sysrepo/yang/ietf-netconf@2011-06-01.yang
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepocfg $(1)/bin/
endef
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsysrepo.pc $(1)/usr/lib/pkgconfig/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/src/libsysrepo.so* $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/inc/* $(1)/usr/include/
+endef
+
$(eval $(call BuildPackage,libsysrepo))
$(eval $(call BuildPackage,sysrepo))
$(eval $(call BuildPackage,sysrepoctl))
# Warning, problems can occur if the device restarts in the middle of this uci-default script
if [ -x /bin/sysrepoctl ]; then
- match=$(sysrepoctl -l | grep "ietf-netconf-acm ")
+ match=$(sysrepoctl -l | grep "notifications ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-acm@2012-02-22.yang -p 644
+ sysrepoctl --install --yang=/etc/sysrepo/yang/notifications@2008-07-14.yang -p 666
fi
- match=$(sysrepoctl -l | grep "ietf-netconf-notifications ")
+ match=$(sysrepoctl -l | grep "nc-notifications ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-notifications@2012-02-06..yang -p 600
+ sysrepoctl --install --yang=/etc/sysrepo/yang/nc-notifications@2008-07-14.yang -p 666
fi
- match=$(sysrepoctl -l | grep "nc-notifications ")
+ match=$(sysrepoctl -l | grep "ietf-netconf-acm ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/nc-notifications@2008-07-14.yang -p 666
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-acm@2018-02-14.yang -p 644
fi
- match=$(sysrepoctl -l | grep "notifications ")
+ match=$(sysrepoctl -l | grep "ietf-netconf-notifications ")
if [ ! "$match" ]; then
- sysrepoctl --install --yang=/etc/sysrepo/yang/notifications@2008-07-14.yang -p 666
+ sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf-notifications@2012-02-06.yang -p 600
fi
match=$(sysrepoctl -l | grep "ietf-netconf ")
if [ ! "$match" ]; then
sysrepoctl --install --yang=/etc/sysrepo/yang/ietf-netconf@2011-06-01.yang -p 600
fi
+ sysrepoctl -m ietf-netconf -e writable-running
+ sysrepoctl -m ietf-netconf -e candidate
+ sysrepoctl -m ietf-netconf -e rollback-on-error
+ sysrepoctl -m ietf-netconf -e validate
+ sysrepoctl -m ietf-netconf -e startup
+ sysrepoctl -m ietf-netconf -e xpath
fi
exit 0
STOP=10
USE_PROCD=1
-PROG_DEAMON=/bin/sysrepod
+PROG_DAEMON=/bin/sysrepod
PROG_PLUGIN=/bin/sysrepo-plugind
start_service() {
procd_open_instance
- procd_set_param command ${PROG_DEAMON}
+ procd_set_param command ${PROG_DAEMON}
procd_append_param command -d -l 0
procd_set_param respawn
procd_close_instance
{
kill -9 `ps | grep netopeer2-server | grep -v grep | awk '{print $1}'` >/dev/null 2>&1
service_stop ${PROG_PLUGIN}
- service_stop ${PROG_DEAMON}
+ service_stop ${PROG_DAEMON}
rm -rf /var/run/sysrepo-subscriptions/*
}
--- /dev/null
+Index: sysrepo-0.7.5/src/common/sysrepo.pb-c.c
+===================================================================
+--- /dev/null
++++ sysrepo-0.7.5/src/common/sysrepo.pb-c.c
+@@ -0,0 +1,10537 @@
++/* Generated by the protocol buffer compiler. DO NOT EDIT! */
++/* Generated from: sysrepo.proto */
++
++/* Do not generate deprecated warnings for self */
++#ifndef PROTOBUF_C__NO_DEPRECATED
++#define PROTOBUF_C__NO_DEPRECATED
++#endif
++
++#include "sysrepo.pb-c.h"
++void sr__value__init
++ (Sr__Value *message)
++{
++ static Sr__Value init_value = SR__VALUE__INIT;
++ *message = init_value;
++}
++size_t sr__value__get_packed_size
++ (const Sr__Value *message)
++{
++ assert(message->base.descriptor == &sr__value__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__value__pack
++ (const Sr__Value *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__value__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__value__pack_to_buffer
++ (const Sr__Value *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__value__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Value *
++ sr__value__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Value *)
++ protobuf_c_message_unpack (&sr__value__descriptor,
++ allocator, len, data);
++}
++void sr__value__free_unpacked
++ (Sr__Value *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__value__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__node__init
++ (Sr__Node *message)
++{
++ static Sr__Node init_value = SR__NODE__INIT;
++ *message = init_value;
++}
++size_t sr__node__get_packed_size
++ (const Sr__Node *message)
++{
++ assert(message->base.descriptor == &sr__node__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__node__pack
++ (const Sr__Node *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__node__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__node__pack_to_buffer
++ (const Sr__Node *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__node__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Node *
++ sr__node__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Node *)
++ protobuf_c_message_unpack (&sr__node__descriptor,
++ allocator, len, data);
++}
++void sr__node__free_unpacked
++ (Sr__Node *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__node__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__error__init
++ (Sr__Error *message)
++{
++ static Sr__Error init_value = SR__ERROR__INIT;
++ *message = init_value;
++}
++size_t sr__error__get_packed_size
++ (const Sr__Error *message)
++{
++ assert(message->base.descriptor == &sr__error__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__error__pack
++ (const Sr__Error *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__error__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__error__pack_to_buffer
++ (const Sr__Error *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__error__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Error *
++ sr__error__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Error *)
++ protobuf_c_message_unpack (&sr__error__descriptor,
++ allocator, len, data);
++}
++void sr__error__free_unpacked
++ (Sr__Error *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__error__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_start_req__init
++ (Sr__SessionStartReq *message)
++{
++ static Sr__SessionStartReq init_value = SR__SESSION_START_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_start_req__get_packed_size
++ (const Sr__SessionStartReq *message)
++{
++ assert(message->base.descriptor == &sr__session_start_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_start_req__pack
++ (const Sr__SessionStartReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_start_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_start_req__pack_to_buffer
++ (const Sr__SessionStartReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_start_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionStartReq *
++ sr__session_start_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionStartReq *)
++ protobuf_c_message_unpack (&sr__session_start_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_start_req__free_unpacked
++ (Sr__SessionStartReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_start_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_start_resp__init
++ (Sr__SessionStartResp *message)
++{
++ static Sr__SessionStartResp init_value = SR__SESSION_START_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_start_resp__get_packed_size
++ (const Sr__SessionStartResp *message)
++{
++ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_start_resp__pack
++ (const Sr__SessionStartResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_start_resp__pack_to_buffer
++ (const Sr__SessionStartResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionStartResp *
++ sr__session_start_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionStartResp *)
++ protobuf_c_message_unpack (&sr__session_start_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_start_resp__free_unpacked
++ (Sr__SessionStartResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_stop_req__init
++ (Sr__SessionStopReq *message)
++{
++ static Sr__SessionStopReq init_value = SR__SESSION_STOP_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_stop_req__get_packed_size
++ (const Sr__SessionStopReq *message)
++{
++ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_stop_req__pack
++ (const Sr__SessionStopReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_stop_req__pack_to_buffer
++ (const Sr__SessionStopReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionStopReq *
++ sr__session_stop_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionStopReq *)
++ protobuf_c_message_unpack (&sr__session_stop_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_stop_req__free_unpacked
++ (Sr__SessionStopReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_stop_resp__init
++ (Sr__SessionStopResp *message)
++{
++ static Sr__SessionStopResp init_value = SR__SESSION_STOP_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_stop_resp__get_packed_size
++ (const Sr__SessionStopResp *message)
++{
++ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_stop_resp__pack
++ (const Sr__SessionStopResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_stop_resp__pack_to_buffer
++ (const Sr__SessionStopResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionStopResp *
++ sr__session_stop_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionStopResp *)
++ protobuf_c_message_unpack (&sr__session_stop_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_stop_resp__free_unpacked
++ (Sr__SessionStopResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_refresh_req__init
++ (Sr__SessionRefreshReq *message)
++{
++ static Sr__SessionRefreshReq init_value = SR__SESSION_REFRESH_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_refresh_req__get_packed_size
++ (const Sr__SessionRefreshReq *message)
++{
++ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_refresh_req__pack
++ (const Sr__SessionRefreshReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_refresh_req__pack_to_buffer
++ (const Sr__SessionRefreshReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionRefreshReq *
++ sr__session_refresh_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionRefreshReq *)
++ protobuf_c_message_unpack (&sr__session_refresh_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_refresh_req__free_unpacked
++ (Sr__SessionRefreshReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_refresh_resp__init
++ (Sr__SessionRefreshResp *message)
++{
++ static Sr__SessionRefreshResp init_value = SR__SESSION_REFRESH_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_refresh_resp__get_packed_size
++ (const Sr__SessionRefreshResp *message)
++{
++ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_refresh_resp__pack
++ (const Sr__SessionRefreshResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_refresh_resp__pack_to_buffer
++ (const Sr__SessionRefreshResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionRefreshResp *
++ sr__session_refresh_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionRefreshResp *)
++ protobuf_c_message_unpack (&sr__session_refresh_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_refresh_resp__free_unpacked
++ (Sr__SessionRefreshResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_check_req__init
++ (Sr__SessionCheckReq *message)
++{
++ static Sr__SessionCheckReq init_value = SR__SESSION_CHECK_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_check_req__get_packed_size
++ (const Sr__SessionCheckReq *message)
++{
++ assert(message->base.descriptor == &sr__session_check_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_check_req__pack
++ (const Sr__SessionCheckReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_check_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_check_req__pack_to_buffer
++ (const Sr__SessionCheckReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_check_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionCheckReq *
++ sr__session_check_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionCheckReq *)
++ protobuf_c_message_unpack (&sr__session_check_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_check_req__free_unpacked
++ (Sr__SessionCheckReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_check_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_check_resp__init
++ (Sr__SessionCheckResp *message)
++{
++ static Sr__SessionCheckResp init_value = SR__SESSION_CHECK_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_check_resp__get_packed_size
++ (const Sr__SessionCheckResp *message)
++{
++ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_check_resp__pack
++ (const Sr__SessionCheckResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_check_resp__pack_to_buffer
++ (const Sr__SessionCheckResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionCheckResp *
++ sr__session_check_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionCheckResp *)
++ protobuf_c_message_unpack (&sr__session_check_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_check_resp__free_unpacked
++ (Sr__SessionCheckResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_switch_ds_req__init
++ (Sr__SessionSwitchDsReq *message)
++{
++ static Sr__SessionSwitchDsReq init_value = SR__SESSION_SWITCH_DS_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_switch_ds_req__get_packed_size
++ (const Sr__SessionSwitchDsReq *message)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_switch_ds_req__pack
++ (const Sr__SessionSwitchDsReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_switch_ds_req__pack_to_buffer
++ (const Sr__SessionSwitchDsReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionSwitchDsReq *
++ sr__session_switch_ds_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionSwitchDsReq *)
++ protobuf_c_message_unpack (&sr__session_switch_ds_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_switch_ds_req__free_unpacked
++ (Sr__SessionSwitchDsReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_switch_ds_resp__init
++ (Sr__SessionSwitchDsResp *message)
++{
++ static Sr__SessionSwitchDsResp init_value = SR__SESSION_SWITCH_DS_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_switch_ds_resp__get_packed_size
++ (const Sr__SessionSwitchDsResp *message)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_switch_ds_resp__pack
++ (const Sr__SessionSwitchDsResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_switch_ds_resp__pack_to_buffer
++ (const Sr__SessionSwitchDsResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionSwitchDsResp *
++ sr__session_switch_ds_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionSwitchDsResp *)
++ protobuf_c_message_unpack (&sr__session_switch_ds_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_switch_ds_resp__free_unpacked
++ (Sr__SessionSwitchDsResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_set_opts_req__init
++ (Sr__SessionSetOptsReq *message)
++{
++ static Sr__SessionSetOptsReq init_value = SR__SESSION_SET_OPTS_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__session_set_opts_req__get_packed_size
++ (const Sr__SessionSetOptsReq *message)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_set_opts_req__pack
++ (const Sr__SessionSetOptsReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_set_opts_req__pack_to_buffer
++ (const Sr__SessionSetOptsReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionSetOptsReq *
++ sr__session_set_opts_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionSetOptsReq *)
++ protobuf_c_message_unpack (&sr__session_set_opts_req__descriptor,
++ allocator, len, data);
++}
++void sr__session_set_opts_req__free_unpacked
++ (Sr__SessionSetOptsReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__session_set_opts_resp__init
++ (Sr__SessionSetOptsResp *message)
++{
++ static Sr__SessionSetOptsResp init_value = SR__SESSION_SET_OPTS_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__session_set_opts_resp__get_packed_size
++ (const Sr__SessionSetOptsResp *message)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__session_set_opts_resp__pack
++ (const Sr__SessionSetOptsResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__session_set_opts_resp__pack_to_buffer
++ (const Sr__SessionSetOptsResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SessionSetOptsResp *
++ sr__session_set_opts_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SessionSetOptsResp *)
++ protobuf_c_message_unpack (&sr__session_set_opts_resp__descriptor,
++ allocator, len, data);
++}
++void sr__session_set_opts_resp__free_unpacked
++ (Sr__SessionSetOptsResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__version_verify_req__init
++ (Sr__VersionVerifyReq *message)
++{
++ static Sr__VersionVerifyReq init_value = SR__VERSION_VERIFY_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__version_verify_req__get_packed_size
++ (const Sr__VersionVerifyReq *message)
++{
++ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__version_verify_req__pack
++ (const Sr__VersionVerifyReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__version_verify_req__pack_to_buffer
++ (const Sr__VersionVerifyReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__VersionVerifyReq *
++ sr__version_verify_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__VersionVerifyReq *)
++ protobuf_c_message_unpack (&sr__version_verify_req__descriptor,
++ allocator, len, data);
++}
++void sr__version_verify_req__free_unpacked
++ (Sr__VersionVerifyReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__version_verify_resp__init
++ (Sr__VersionVerifyResp *message)
++{
++ static Sr__VersionVerifyResp init_value = SR__VERSION_VERIFY_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__version_verify_resp__get_packed_size
++ (const Sr__VersionVerifyResp *message)
++{
++ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__version_verify_resp__pack
++ (const Sr__VersionVerifyResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__version_verify_resp__pack_to_buffer
++ (const Sr__VersionVerifyResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__VersionVerifyResp *
++ sr__version_verify_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__VersionVerifyResp *)
++ protobuf_c_message_unpack (&sr__version_verify_resp__descriptor,
++ allocator, len, data);
++}
++void sr__version_verify_resp__free_unpacked
++ (Sr__VersionVerifyResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__schema_revision__init
++ (Sr__SchemaRevision *message)
++{
++ static Sr__SchemaRevision init_value = SR__SCHEMA_REVISION__INIT;
++ *message = init_value;
++}
++size_t sr__schema_revision__get_packed_size
++ (const Sr__SchemaRevision *message)
++{
++ assert(message->base.descriptor == &sr__schema_revision__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__schema_revision__pack
++ (const Sr__SchemaRevision *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__schema_revision__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__schema_revision__pack_to_buffer
++ (const Sr__SchemaRevision *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__schema_revision__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SchemaRevision *
++ sr__schema_revision__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SchemaRevision *)
++ protobuf_c_message_unpack (&sr__schema_revision__descriptor,
++ allocator, len, data);
++}
++void sr__schema_revision__free_unpacked
++ (Sr__SchemaRevision *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__schema_revision__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__schema_submodule__init
++ (Sr__SchemaSubmodule *message)
++{
++ static Sr__SchemaSubmodule init_value = SR__SCHEMA_SUBMODULE__INIT;
++ *message = init_value;
++}
++size_t sr__schema_submodule__get_packed_size
++ (const Sr__SchemaSubmodule *message)
++{
++ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__schema_submodule__pack
++ (const Sr__SchemaSubmodule *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__schema_submodule__pack_to_buffer
++ (const Sr__SchemaSubmodule *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SchemaSubmodule *
++ sr__schema_submodule__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SchemaSubmodule *)
++ protobuf_c_message_unpack (&sr__schema_submodule__descriptor,
++ allocator, len, data);
++}
++void sr__schema_submodule__free_unpacked
++ (Sr__SchemaSubmodule *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__schema__init
++ (Sr__Schema *message)
++{
++ static Sr__Schema init_value = SR__SCHEMA__INIT;
++ *message = init_value;
++}
++size_t sr__schema__get_packed_size
++ (const Sr__Schema *message)
++{
++ assert(message->base.descriptor == &sr__schema__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__schema__pack
++ (const Sr__Schema *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__schema__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__schema__pack_to_buffer
++ (const Sr__Schema *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__schema__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Schema *
++ sr__schema__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Schema *)
++ protobuf_c_message_unpack (&sr__schema__descriptor,
++ allocator, len, data);
++}
++void sr__schema__free_unpacked
++ (Sr__Schema *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__schema__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__list_schemas_req__init
++ (Sr__ListSchemasReq *message)
++{
++ static Sr__ListSchemasReq init_value = SR__LIST_SCHEMAS_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__list_schemas_req__get_packed_size
++ (const Sr__ListSchemasReq *message)
++{
++ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__list_schemas_req__pack
++ (const Sr__ListSchemasReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__list_schemas_req__pack_to_buffer
++ (const Sr__ListSchemasReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ListSchemasReq *
++ sr__list_schemas_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ListSchemasReq *)
++ protobuf_c_message_unpack (&sr__list_schemas_req__descriptor,
++ allocator, len, data);
++}
++void sr__list_schemas_req__free_unpacked
++ (Sr__ListSchemasReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__list_schemas_resp__init
++ (Sr__ListSchemasResp *message)
++{
++ static Sr__ListSchemasResp init_value = SR__LIST_SCHEMAS_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__list_schemas_resp__get_packed_size
++ (const Sr__ListSchemasResp *message)
++{
++ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__list_schemas_resp__pack
++ (const Sr__ListSchemasResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__list_schemas_resp__pack_to_buffer
++ (const Sr__ListSchemasResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ListSchemasResp *
++ sr__list_schemas_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ListSchemasResp *)
++ protobuf_c_message_unpack (&sr__list_schemas_resp__descriptor,
++ allocator, len, data);
++}
++void sr__list_schemas_resp__free_unpacked
++ (Sr__ListSchemasResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_schema_req__init
++ (Sr__GetSchemaReq *message)
++{
++ static Sr__GetSchemaReq init_value = SR__GET_SCHEMA_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_schema_req__get_packed_size
++ (const Sr__GetSchemaReq *message)
++{
++ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_schema_req__pack
++ (const Sr__GetSchemaReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_schema_req__pack_to_buffer
++ (const Sr__GetSchemaReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSchemaReq *
++ sr__get_schema_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSchemaReq *)
++ protobuf_c_message_unpack (&sr__get_schema_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_schema_req__free_unpacked
++ (Sr__GetSchemaReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_schema_resp__init
++ (Sr__GetSchemaResp *message)
++{
++ static Sr__GetSchemaResp init_value = SR__GET_SCHEMA_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_schema_resp__get_packed_size
++ (const Sr__GetSchemaResp *message)
++{
++ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_schema_resp__pack
++ (const Sr__GetSchemaResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_schema_resp__pack_to_buffer
++ (const Sr__GetSchemaResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSchemaResp *
++ sr__get_schema_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSchemaResp *)
++ protobuf_c_message_unpack (&sr__get_schema_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_schema_resp__free_unpacked
++ (Sr__GetSchemaResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_item_req__init
++ (Sr__GetItemReq *message)
++{
++ static Sr__GetItemReq init_value = SR__GET_ITEM_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_item_req__get_packed_size
++ (const Sr__GetItemReq *message)
++{
++ assert(message->base.descriptor == &sr__get_item_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_item_req__pack
++ (const Sr__GetItemReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_item_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_item_req__pack_to_buffer
++ (const Sr__GetItemReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_item_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetItemReq *
++ sr__get_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetItemReq *)
++ protobuf_c_message_unpack (&sr__get_item_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_item_req__free_unpacked
++ (Sr__GetItemReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_item_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_item_resp__init
++ (Sr__GetItemResp *message)
++{
++ static Sr__GetItemResp init_value = SR__GET_ITEM_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_item_resp__get_packed_size
++ (const Sr__GetItemResp *message)
++{
++ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_item_resp__pack
++ (const Sr__GetItemResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_item_resp__pack_to_buffer
++ (const Sr__GetItemResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetItemResp *
++ sr__get_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetItemResp *)
++ protobuf_c_message_unpack (&sr__get_item_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_item_resp__free_unpacked
++ (Sr__GetItemResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_items_req__init
++ (Sr__GetItemsReq *message)
++{
++ static Sr__GetItemsReq init_value = SR__GET_ITEMS_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_items_req__get_packed_size
++ (const Sr__GetItemsReq *message)
++{
++ assert(message->base.descriptor == &sr__get_items_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_items_req__pack
++ (const Sr__GetItemsReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_items_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_items_req__pack_to_buffer
++ (const Sr__GetItemsReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_items_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetItemsReq *
++ sr__get_items_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetItemsReq *)
++ protobuf_c_message_unpack (&sr__get_items_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_items_req__free_unpacked
++ (Sr__GetItemsReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_items_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_items_resp__init
++ (Sr__GetItemsResp *message)
++{
++ static Sr__GetItemsResp init_value = SR__GET_ITEMS_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_items_resp__get_packed_size
++ (const Sr__GetItemsResp *message)
++{
++ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_items_resp__pack
++ (const Sr__GetItemsResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_items_resp__pack_to_buffer
++ (const Sr__GetItemsResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetItemsResp *
++ sr__get_items_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetItemsResp *)
++ protobuf_c_message_unpack (&sr__get_items_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_items_resp__free_unpacked
++ (Sr__GetItemsResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtree_req__init
++ (Sr__GetSubtreeReq *message)
++{
++ static Sr__GetSubtreeReq init_value = SR__GET_SUBTREE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtree_req__get_packed_size
++ (const Sr__GetSubtreeReq *message)
++{
++ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtree_req__pack
++ (const Sr__GetSubtreeReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtree_req__pack_to_buffer
++ (const Sr__GetSubtreeReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreeReq *
++ sr__get_subtree_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreeReq *)
++ protobuf_c_message_unpack (&sr__get_subtree_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtree_req__free_unpacked
++ (Sr__GetSubtreeReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtree_resp__init
++ (Sr__GetSubtreeResp *message)
++{
++ static Sr__GetSubtreeResp init_value = SR__GET_SUBTREE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtree_resp__get_packed_size
++ (const Sr__GetSubtreeResp *message)
++{
++ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtree_resp__pack
++ (const Sr__GetSubtreeResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtree_resp__pack_to_buffer
++ (const Sr__GetSubtreeResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreeResp *
++ sr__get_subtree_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreeResp *)
++ protobuf_c_message_unpack (&sr__get_subtree_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtree_resp__free_unpacked
++ (Sr__GetSubtreeResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtrees_req__init
++ (Sr__GetSubtreesReq *message)
++{
++ static Sr__GetSubtreesReq init_value = SR__GET_SUBTREES_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtrees_req__get_packed_size
++ (const Sr__GetSubtreesReq *message)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtrees_req__pack
++ (const Sr__GetSubtreesReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtrees_req__pack_to_buffer
++ (const Sr__GetSubtreesReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreesReq *
++ sr__get_subtrees_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreesReq *)
++ protobuf_c_message_unpack (&sr__get_subtrees_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtrees_req__free_unpacked
++ (Sr__GetSubtreesReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtrees_resp__init
++ (Sr__GetSubtreesResp *message)
++{
++ static Sr__GetSubtreesResp init_value = SR__GET_SUBTREES_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtrees_resp__get_packed_size
++ (const Sr__GetSubtreesResp *message)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtrees_resp__pack
++ (const Sr__GetSubtreesResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtrees_resp__pack_to_buffer
++ (const Sr__GetSubtreesResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreesResp *
++ sr__get_subtrees_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreesResp *)
++ protobuf_c_message_unpack (&sr__get_subtrees_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtrees_resp__free_unpacked
++ (Sr__GetSubtreesResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtree_chunk_req__init
++ (Sr__GetSubtreeChunkReq *message)
++{
++ static Sr__GetSubtreeChunkReq init_value = SR__GET_SUBTREE_CHUNK_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtree_chunk_req__get_packed_size
++ (const Sr__GetSubtreeChunkReq *message)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtree_chunk_req__pack
++ (const Sr__GetSubtreeChunkReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtree_chunk_req__pack_to_buffer
++ (const Sr__GetSubtreeChunkReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreeChunkReq *
++ sr__get_subtree_chunk_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreeChunkReq *)
++ protobuf_c_message_unpack (&sr__get_subtree_chunk_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtree_chunk_req__free_unpacked
++ (Sr__GetSubtreeChunkReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_subtree_chunk_resp__init
++ (Sr__GetSubtreeChunkResp *message)
++{
++ static Sr__GetSubtreeChunkResp init_value = SR__GET_SUBTREE_CHUNK_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_subtree_chunk_resp__get_packed_size
++ (const Sr__GetSubtreeChunkResp *message)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_subtree_chunk_resp__pack
++ (const Sr__GetSubtreeChunkResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_subtree_chunk_resp__pack_to_buffer
++ (const Sr__GetSubtreeChunkResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetSubtreeChunkResp *
++ sr__get_subtree_chunk_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetSubtreeChunkResp *)
++ protobuf_c_message_unpack (&sr__get_subtree_chunk_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_subtree_chunk_resp__free_unpacked
++ (Sr__GetSubtreeChunkResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__set_item_req__init
++ (Sr__SetItemReq *message)
++{
++ static Sr__SetItemReq init_value = SR__SET_ITEM_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__set_item_req__get_packed_size
++ (const Sr__SetItemReq *message)
++{
++ assert(message->base.descriptor == &sr__set_item_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__set_item_req__pack
++ (const Sr__SetItemReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__set_item_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__set_item_req__pack_to_buffer
++ (const Sr__SetItemReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__set_item_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SetItemReq *
++ sr__set_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SetItemReq *)
++ protobuf_c_message_unpack (&sr__set_item_req__descriptor,
++ allocator, len, data);
++}
++void sr__set_item_req__free_unpacked
++ (Sr__SetItemReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__set_item_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__set_item_resp__init
++ (Sr__SetItemResp *message)
++{
++ static Sr__SetItemResp init_value = SR__SET_ITEM_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__set_item_resp__get_packed_size
++ (const Sr__SetItemResp *message)
++{
++ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__set_item_resp__pack
++ (const Sr__SetItemResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__set_item_resp__pack_to_buffer
++ (const Sr__SetItemResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SetItemResp *
++ sr__set_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SetItemResp *)
++ protobuf_c_message_unpack (&sr__set_item_resp__descriptor,
++ allocator, len, data);
++}
++void sr__set_item_resp__free_unpacked
++ (Sr__SetItemResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__set_item_str_req__init
++ (Sr__SetItemStrReq *message)
++{
++ static Sr__SetItemStrReq init_value = SR__SET_ITEM_STR_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__set_item_str_req__get_packed_size
++ (const Sr__SetItemStrReq *message)
++{
++ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__set_item_str_req__pack
++ (const Sr__SetItemStrReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__set_item_str_req__pack_to_buffer
++ (const Sr__SetItemStrReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SetItemStrReq *
++ sr__set_item_str_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SetItemStrReq *)
++ protobuf_c_message_unpack (&sr__set_item_str_req__descriptor,
++ allocator, len, data);
++}
++void sr__set_item_str_req__free_unpacked
++ (Sr__SetItemStrReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__set_item_str_resp__init
++ (Sr__SetItemStrResp *message)
++{
++ static Sr__SetItemStrResp init_value = SR__SET_ITEM_STR_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__set_item_str_resp__get_packed_size
++ (const Sr__SetItemStrResp *message)
++{
++ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__set_item_str_resp__pack
++ (const Sr__SetItemStrResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__set_item_str_resp__pack_to_buffer
++ (const Sr__SetItemStrResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SetItemStrResp *
++ sr__set_item_str_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SetItemStrResp *)
++ protobuf_c_message_unpack (&sr__set_item_str_resp__descriptor,
++ allocator, len, data);
++}
++void sr__set_item_str_resp__free_unpacked
++ (Sr__SetItemStrResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__delete_item_req__init
++ (Sr__DeleteItemReq *message)
++{
++ static Sr__DeleteItemReq init_value = SR__DELETE_ITEM_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__delete_item_req__get_packed_size
++ (const Sr__DeleteItemReq *message)
++{
++ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__delete_item_req__pack
++ (const Sr__DeleteItemReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__delete_item_req__pack_to_buffer
++ (const Sr__DeleteItemReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DeleteItemReq *
++ sr__delete_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DeleteItemReq *)
++ protobuf_c_message_unpack (&sr__delete_item_req__descriptor,
++ allocator, len, data);
++}
++void sr__delete_item_req__free_unpacked
++ (Sr__DeleteItemReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__delete_item_resp__init
++ (Sr__DeleteItemResp *message)
++{
++ static Sr__DeleteItemResp init_value = SR__DELETE_ITEM_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__delete_item_resp__get_packed_size
++ (const Sr__DeleteItemResp *message)
++{
++ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__delete_item_resp__pack
++ (const Sr__DeleteItemResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__delete_item_resp__pack_to_buffer
++ (const Sr__DeleteItemResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DeleteItemResp *
++ sr__delete_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DeleteItemResp *)
++ protobuf_c_message_unpack (&sr__delete_item_resp__descriptor,
++ allocator, len, data);
++}
++void sr__delete_item_resp__free_unpacked
++ (Sr__DeleteItemResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__move_item_req__init
++ (Sr__MoveItemReq *message)
++{
++ static Sr__MoveItemReq init_value = SR__MOVE_ITEM_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__move_item_req__get_packed_size
++ (const Sr__MoveItemReq *message)
++{
++ assert(message->base.descriptor == &sr__move_item_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__move_item_req__pack
++ (const Sr__MoveItemReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__move_item_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__move_item_req__pack_to_buffer
++ (const Sr__MoveItemReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__move_item_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__MoveItemReq *
++ sr__move_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__MoveItemReq *)
++ protobuf_c_message_unpack (&sr__move_item_req__descriptor,
++ allocator, len, data);
++}
++void sr__move_item_req__free_unpacked
++ (Sr__MoveItemReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__move_item_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__move_item_resp__init
++ (Sr__MoveItemResp *message)
++{
++ static Sr__MoveItemResp init_value = SR__MOVE_ITEM_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__move_item_resp__get_packed_size
++ (const Sr__MoveItemResp *message)
++{
++ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__move_item_resp__pack
++ (const Sr__MoveItemResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__move_item_resp__pack_to_buffer
++ (const Sr__MoveItemResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__MoveItemResp *
++ sr__move_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__MoveItemResp *)
++ protobuf_c_message_unpack (&sr__move_item_resp__descriptor,
++ allocator, len, data);
++}
++void sr__move_item_resp__free_unpacked
++ (Sr__MoveItemResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__validate_req__init
++ (Sr__ValidateReq *message)
++{
++ static Sr__ValidateReq init_value = SR__VALIDATE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__validate_req__get_packed_size
++ (const Sr__ValidateReq *message)
++{
++ assert(message->base.descriptor == &sr__validate_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__validate_req__pack
++ (const Sr__ValidateReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__validate_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__validate_req__pack_to_buffer
++ (const Sr__ValidateReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__validate_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ValidateReq *
++ sr__validate_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ValidateReq *)
++ protobuf_c_message_unpack (&sr__validate_req__descriptor,
++ allocator, len, data);
++}
++void sr__validate_req__free_unpacked
++ (Sr__ValidateReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__validate_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__validate_resp__init
++ (Sr__ValidateResp *message)
++{
++ static Sr__ValidateResp init_value = SR__VALIDATE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__validate_resp__get_packed_size
++ (const Sr__ValidateResp *message)
++{
++ assert(message->base.descriptor == &sr__validate_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__validate_resp__pack
++ (const Sr__ValidateResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__validate_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__validate_resp__pack_to_buffer
++ (const Sr__ValidateResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__validate_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ValidateResp *
++ sr__validate_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ValidateResp *)
++ protobuf_c_message_unpack (&sr__validate_resp__descriptor,
++ allocator, len, data);
++}
++void sr__validate_resp__free_unpacked
++ (Sr__ValidateResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__validate_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__commit_req__init
++ (Sr__CommitReq *message)
++{
++ static Sr__CommitReq init_value = SR__COMMIT_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__commit_req__get_packed_size
++ (const Sr__CommitReq *message)
++{
++ assert(message->base.descriptor == &sr__commit_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__commit_req__pack
++ (const Sr__CommitReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__commit_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__commit_req__pack_to_buffer
++ (const Sr__CommitReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__commit_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CommitReq *
++ sr__commit_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CommitReq *)
++ protobuf_c_message_unpack (&sr__commit_req__descriptor,
++ allocator, len, data);
++}
++void sr__commit_req__free_unpacked
++ (Sr__CommitReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__commit_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__commit_resp__init
++ (Sr__CommitResp *message)
++{
++ static Sr__CommitResp init_value = SR__COMMIT_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__commit_resp__get_packed_size
++ (const Sr__CommitResp *message)
++{
++ assert(message->base.descriptor == &sr__commit_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__commit_resp__pack
++ (const Sr__CommitResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__commit_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__commit_resp__pack_to_buffer
++ (const Sr__CommitResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__commit_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CommitResp *
++ sr__commit_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CommitResp *)
++ protobuf_c_message_unpack (&sr__commit_resp__descriptor,
++ allocator, len, data);
++}
++void sr__commit_resp__free_unpacked
++ (Sr__CommitResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__commit_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__discard_changes_req__init
++ (Sr__DiscardChangesReq *message)
++{
++ static Sr__DiscardChangesReq init_value = SR__DISCARD_CHANGES_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__discard_changes_req__get_packed_size
++ (const Sr__DiscardChangesReq *message)
++{
++ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__discard_changes_req__pack
++ (const Sr__DiscardChangesReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__discard_changes_req__pack_to_buffer
++ (const Sr__DiscardChangesReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DiscardChangesReq *
++ sr__discard_changes_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DiscardChangesReq *)
++ protobuf_c_message_unpack (&sr__discard_changes_req__descriptor,
++ allocator, len, data);
++}
++void sr__discard_changes_req__free_unpacked
++ (Sr__DiscardChangesReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__discard_changes_resp__init
++ (Sr__DiscardChangesResp *message)
++{
++ static Sr__DiscardChangesResp init_value = SR__DISCARD_CHANGES_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__discard_changes_resp__get_packed_size
++ (const Sr__DiscardChangesResp *message)
++{
++ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__discard_changes_resp__pack
++ (const Sr__DiscardChangesResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__discard_changes_resp__pack_to_buffer
++ (const Sr__DiscardChangesResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DiscardChangesResp *
++ sr__discard_changes_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DiscardChangesResp *)
++ protobuf_c_message_unpack (&sr__discard_changes_resp__descriptor,
++ allocator, len, data);
++}
++void sr__discard_changes_resp__free_unpacked
++ (Sr__DiscardChangesResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__copy_config_req__init
++ (Sr__CopyConfigReq *message)
++{
++ static Sr__CopyConfigReq init_value = SR__COPY_CONFIG_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__copy_config_req__get_packed_size
++ (const Sr__CopyConfigReq *message)
++{
++ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__copy_config_req__pack
++ (const Sr__CopyConfigReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__copy_config_req__pack_to_buffer
++ (const Sr__CopyConfigReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CopyConfigReq *
++ sr__copy_config_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CopyConfigReq *)
++ protobuf_c_message_unpack (&sr__copy_config_req__descriptor,
++ allocator, len, data);
++}
++void sr__copy_config_req__free_unpacked
++ (Sr__CopyConfigReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__copy_config_resp__init
++ (Sr__CopyConfigResp *message)
++{
++ static Sr__CopyConfigResp init_value = SR__COPY_CONFIG_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__copy_config_resp__get_packed_size
++ (const Sr__CopyConfigResp *message)
++{
++ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__copy_config_resp__pack
++ (const Sr__CopyConfigResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__copy_config_resp__pack_to_buffer
++ (const Sr__CopyConfigResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CopyConfigResp *
++ sr__copy_config_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CopyConfigResp *)
++ protobuf_c_message_unpack (&sr__copy_config_resp__descriptor,
++ allocator, len, data);
++}
++void sr__copy_config_resp__free_unpacked
++ (Sr__CopyConfigResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__lock_req__init
++ (Sr__LockReq *message)
++{
++ static Sr__LockReq init_value = SR__LOCK_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__lock_req__get_packed_size
++ (const Sr__LockReq *message)
++{
++ assert(message->base.descriptor == &sr__lock_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__lock_req__pack
++ (const Sr__LockReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__lock_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__lock_req__pack_to_buffer
++ (const Sr__LockReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__lock_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__LockReq *
++ sr__lock_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__LockReq *)
++ protobuf_c_message_unpack (&sr__lock_req__descriptor,
++ allocator, len, data);
++}
++void sr__lock_req__free_unpacked
++ (Sr__LockReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__lock_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__lock_resp__init
++ (Sr__LockResp *message)
++{
++ static Sr__LockResp init_value = SR__LOCK_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__lock_resp__get_packed_size
++ (const Sr__LockResp *message)
++{
++ assert(message->base.descriptor == &sr__lock_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__lock_resp__pack
++ (const Sr__LockResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__lock_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__lock_resp__pack_to_buffer
++ (const Sr__LockResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__lock_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__LockResp *
++ sr__lock_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__LockResp *)
++ protobuf_c_message_unpack (&sr__lock_resp__descriptor,
++ allocator, len, data);
++}
++void sr__lock_resp__free_unpacked
++ (Sr__LockResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__lock_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__unlock_req__init
++ (Sr__UnlockReq *message)
++{
++ static Sr__UnlockReq init_value = SR__UNLOCK_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__unlock_req__get_packed_size
++ (const Sr__UnlockReq *message)
++{
++ assert(message->base.descriptor == &sr__unlock_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__unlock_req__pack
++ (const Sr__UnlockReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__unlock_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__unlock_req__pack_to_buffer
++ (const Sr__UnlockReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__unlock_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__UnlockReq *
++ sr__unlock_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__UnlockReq *)
++ protobuf_c_message_unpack (&sr__unlock_req__descriptor,
++ allocator, len, data);
++}
++void sr__unlock_req__free_unpacked
++ (Sr__UnlockReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__unlock_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__unlock_resp__init
++ (Sr__UnlockResp *message)
++{
++ static Sr__UnlockResp init_value = SR__UNLOCK_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__unlock_resp__get_packed_size
++ (const Sr__UnlockResp *message)
++{
++ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__unlock_resp__pack
++ (const Sr__UnlockResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__unlock_resp__pack_to_buffer
++ (const Sr__UnlockResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__UnlockResp *
++ sr__unlock_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__UnlockResp *)
++ protobuf_c_message_unpack (&sr__unlock_resp__descriptor,
++ allocator, len, data);
++}
++void sr__unlock_resp__free_unpacked
++ (Sr__UnlockResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__subscribe_req__init
++ (Sr__SubscribeReq *message)
++{
++ static Sr__SubscribeReq init_value = SR__SUBSCRIBE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__subscribe_req__get_packed_size
++ (const Sr__SubscribeReq *message)
++{
++ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__subscribe_req__pack
++ (const Sr__SubscribeReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__subscribe_req__pack_to_buffer
++ (const Sr__SubscribeReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SubscribeReq *
++ sr__subscribe_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SubscribeReq *)
++ protobuf_c_message_unpack (&sr__subscribe_req__descriptor,
++ allocator, len, data);
++}
++void sr__subscribe_req__free_unpacked
++ (Sr__SubscribeReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__subscribe_resp__init
++ (Sr__SubscribeResp *message)
++{
++ static Sr__SubscribeResp init_value = SR__SUBSCRIBE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__subscribe_resp__get_packed_size
++ (const Sr__SubscribeResp *message)
++{
++ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__subscribe_resp__pack
++ (const Sr__SubscribeResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__subscribe_resp__pack_to_buffer
++ (const Sr__SubscribeResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SubscribeResp *
++ sr__subscribe_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SubscribeResp *)
++ protobuf_c_message_unpack (&sr__subscribe_resp__descriptor,
++ allocator, len, data);
++}
++void sr__subscribe_resp__free_unpacked
++ (Sr__SubscribeResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__unsubscribe_req__init
++ (Sr__UnsubscribeReq *message)
++{
++ static Sr__UnsubscribeReq init_value = SR__UNSUBSCRIBE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__unsubscribe_req__get_packed_size
++ (const Sr__UnsubscribeReq *message)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__unsubscribe_req__pack
++ (const Sr__UnsubscribeReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__unsubscribe_req__pack_to_buffer
++ (const Sr__UnsubscribeReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__UnsubscribeReq *
++ sr__unsubscribe_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__UnsubscribeReq *)
++ protobuf_c_message_unpack (&sr__unsubscribe_req__descriptor,
++ allocator, len, data);
++}
++void sr__unsubscribe_req__free_unpacked
++ (Sr__UnsubscribeReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__unsubscribe_resp__init
++ (Sr__UnsubscribeResp *message)
++{
++ static Sr__UnsubscribeResp init_value = SR__UNSUBSCRIBE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__unsubscribe_resp__get_packed_size
++ (const Sr__UnsubscribeResp *message)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__unsubscribe_resp__pack
++ (const Sr__UnsubscribeResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__unsubscribe_resp__pack_to_buffer
++ (const Sr__UnsubscribeResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__UnsubscribeResp *
++ sr__unsubscribe_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__UnsubscribeResp *)
++ protobuf_c_message_unpack (&sr__unsubscribe_resp__descriptor,
++ allocator, len, data);
++}
++void sr__unsubscribe_resp__free_unpacked
++ (Sr__UnsubscribeResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__check_enabled_running_req__init
++ (Sr__CheckEnabledRunningReq *message)
++{
++ static Sr__CheckEnabledRunningReq init_value = SR__CHECK_ENABLED_RUNNING_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__check_enabled_running_req__get_packed_size
++ (const Sr__CheckEnabledRunningReq *message)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__check_enabled_running_req__pack
++ (const Sr__CheckEnabledRunningReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__check_enabled_running_req__pack_to_buffer
++ (const Sr__CheckEnabledRunningReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CheckEnabledRunningReq *
++ sr__check_enabled_running_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CheckEnabledRunningReq *)
++ protobuf_c_message_unpack (&sr__check_enabled_running_req__descriptor,
++ allocator, len, data);
++}
++void sr__check_enabled_running_req__free_unpacked
++ (Sr__CheckEnabledRunningReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__check_enabled_running_resp__init
++ (Sr__CheckEnabledRunningResp *message)
++{
++ static Sr__CheckEnabledRunningResp init_value = SR__CHECK_ENABLED_RUNNING_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__check_enabled_running_resp__get_packed_size
++ (const Sr__CheckEnabledRunningResp *message)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__check_enabled_running_resp__pack
++ (const Sr__CheckEnabledRunningResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__check_enabled_running_resp__pack_to_buffer
++ (const Sr__CheckEnabledRunningResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CheckEnabledRunningResp *
++ sr__check_enabled_running_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CheckEnabledRunningResp *)
++ protobuf_c_message_unpack (&sr__check_enabled_running_resp__descriptor,
++ allocator, len, data);
++}
++void sr__check_enabled_running_resp__free_unpacked
++ (Sr__CheckEnabledRunningResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__module_install_notification__init
++ (Sr__ModuleInstallNotification *message)
++{
++ static Sr__ModuleInstallNotification init_value = SR__MODULE_INSTALL_NOTIFICATION__INIT;
++ *message = init_value;
++}
++size_t sr__module_install_notification__get_packed_size
++ (const Sr__ModuleInstallNotification *message)
++{
++ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__module_install_notification__pack
++ (const Sr__ModuleInstallNotification *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__module_install_notification__pack_to_buffer
++ (const Sr__ModuleInstallNotification *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ModuleInstallNotification *
++ sr__module_install_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ModuleInstallNotification *)
++ protobuf_c_message_unpack (&sr__module_install_notification__descriptor,
++ allocator, len, data);
++}
++void sr__module_install_notification__free_unpacked
++ (Sr__ModuleInstallNotification *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__feature_enable_notification__init
++ (Sr__FeatureEnableNotification *message)
++{
++ static Sr__FeatureEnableNotification init_value = SR__FEATURE_ENABLE_NOTIFICATION__INIT;
++ *message = init_value;
++}
++size_t sr__feature_enable_notification__get_packed_size
++ (const Sr__FeatureEnableNotification *message)
++{
++ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__feature_enable_notification__pack
++ (const Sr__FeatureEnableNotification *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__feature_enable_notification__pack_to_buffer
++ (const Sr__FeatureEnableNotification *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__FeatureEnableNotification *
++ sr__feature_enable_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__FeatureEnableNotification *)
++ protobuf_c_message_unpack (&sr__feature_enable_notification__descriptor,
++ allocator, len, data);
++}
++void sr__feature_enable_notification__free_unpacked
++ (Sr__FeatureEnableNotification *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__module_change_notification__init
++ (Sr__ModuleChangeNotification *message)
++{
++ static Sr__ModuleChangeNotification init_value = SR__MODULE_CHANGE_NOTIFICATION__INIT;
++ *message = init_value;
++}
++size_t sr__module_change_notification__get_packed_size
++ (const Sr__ModuleChangeNotification *message)
++{
++ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__module_change_notification__pack
++ (const Sr__ModuleChangeNotification *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__module_change_notification__pack_to_buffer
++ (const Sr__ModuleChangeNotification *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ModuleChangeNotification *
++ sr__module_change_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ModuleChangeNotification *)
++ protobuf_c_message_unpack (&sr__module_change_notification__descriptor,
++ allocator, len, data);
++}
++void sr__module_change_notification__free_unpacked
++ (Sr__ModuleChangeNotification *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__subtree_change_notification__init
++ (Sr__SubtreeChangeNotification *message)
++{
++ static Sr__SubtreeChangeNotification init_value = SR__SUBTREE_CHANGE_NOTIFICATION__INIT;
++ *message = init_value;
++}
++size_t sr__subtree_change_notification__get_packed_size
++ (const Sr__SubtreeChangeNotification *message)
++{
++ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__subtree_change_notification__pack
++ (const Sr__SubtreeChangeNotification *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__subtree_change_notification__pack_to_buffer
++ (const Sr__SubtreeChangeNotification *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__SubtreeChangeNotification *
++ sr__subtree_change_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__SubtreeChangeNotification *)
++ protobuf_c_message_unpack (&sr__subtree_change_notification__descriptor,
++ allocator, len, data);
++}
++void sr__subtree_change_notification__free_unpacked
++ (Sr__SubtreeChangeNotification *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__change__init
++ (Sr__Change *message)
++{
++ static Sr__Change init_value = SR__CHANGE__INIT;
++ *message = init_value;
++}
++size_t sr__change__get_packed_size
++ (const Sr__Change *message)
++{
++ assert(message->base.descriptor == &sr__change__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__change__pack
++ (const Sr__Change *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__change__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__change__pack_to_buffer
++ (const Sr__Change *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__change__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Change *
++ sr__change__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Change *)
++ protobuf_c_message_unpack (&sr__change__descriptor,
++ allocator, len, data);
++}
++void sr__change__free_unpacked
++ (Sr__Change *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__change__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_changes_req__init
++ (Sr__GetChangesReq *message)
++{
++ static Sr__GetChangesReq init_value = SR__GET_CHANGES_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__get_changes_req__get_packed_size
++ (const Sr__GetChangesReq *message)
++{
++ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_changes_req__pack
++ (const Sr__GetChangesReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_changes_req__pack_to_buffer
++ (const Sr__GetChangesReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetChangesReq *
++ sr__get_changes_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetChangesReq *)
++ protobuf_c_message_unpack (&sr__get_changes_req__descriptor,
++ allocator, len, data);
++}
++void sr__get_changes_req__free_unpacked
++ (Sr__GetChangesReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__get_changes_resp__init
++ (Sr__GetChangesResp *message)
++{
++ static Sr__GetChangesResp init_value = SR__GET_CHANGES_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__get_changes_resp__get_packed_size
++ (const Sr__GetChangesResp *message)
++{
++ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__get_changes_resp__pack
++ (const Sr__GetChangesResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__get_changes_resp__pack_to_buffer
++ (const Sr__GetChangesResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__GetChangesResp *
++ sr__get_changes_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__GetChangesResp *)
++ protobuf_c_message_unpack (&sr__get_changes_resp__descriptor,
++ allocator, len, data);
++}
++void sr__get_changes_resp__free_unpacked
++ (Sr__GetChangesResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__check_exec_perm_req__init
++ (Sr__CheckExecPermReq *message)
++{
++ static Sr__CheckExecPermReq init_value = SR__CHECK_EXEC_PERM_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__check_exec_perm_req__get_packed_size
++ (const Sr__CheckExecPermReq *message)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__check_exec_perm_req__pack
++ (const Sr__CheckExecPermReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__check_exec_perm_req__pack_to_buffer
++ (const Sr__CheckExecPermReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CheckExecPermReq *
++ sr__check_exec_perm_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CheckExecPermReq *)
++ protobuf_c_message_unpack (&sr__check_exec_perm_req__descriptor,
++ allocator, len, data);
++}
++void sr__check_exec_perm_req__free_unpacked
++ (Sr__CheckExecPermReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__check_exec_perm_resp__init
++ (Sr__CheckExecPermResp *message)
++{
++ static Sr__CheckExecPermResp init_value = SR__CHECK_EXEC_PERM_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__check_exec_perm_resp__get_packed_size
++ (const Sr__CheckExecPermResp *message)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__check_exec_perm_resp__pack
++ (const Sr__CheckExecPermResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__check_exec_perm_resp__pack_to_buffer
++ (const Sr__CheckExecPermResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CheckExecPermResp *
++ sr__check_exec_perm_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CheckExecPermResp *)
++ protobuf_c_message_unpack (&sr__check_exec_perm_resp__descriptor,
++ allocator, len, data);
++}
++void sr__check_exec_perm_resp__free_unpacked
++ (Sr__CheckExecPermResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__rpcreq__init
++ (Sr__RPCReq *message)
++{
++ static Sr__RPCReq init_value = SR__RPCREQ__INIT;
++ *message = init_value;
++}
++size_t sr__rpcreq__get_packed_size
++ (const Sr__RPCReq *message)
++{
++ assert(message->base.descriptor == &sr__rpcreq__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__rpcreq__pack
++ (const Sr__RPCReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__rpcreq__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__rpcreq__pack_to_buffer
++ (const Sr__RPCReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__rpcreq__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__RPCReq *
++ sr__rpcreq__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__RPCReq *)
++ protobuf_c_message_unpack (&sr__rpcreq__descriptor,
++ allocator, len, data);
++}
++void sr__rpcreq__free_unpacked
++ (Sr__RPCReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__rpcreq__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__rpcresp__init
++ (Sr__RPCResp *message)
++{
++ static Sr__RPCResp init_value = SR__RPCRESP__INIT;
++ *message = init_value;
++}
++size_t sr__rpcresp__get_packed_size
++ (const Sr__RPCResp *message)
++{
++ assert(message->base.descriptor == &sr__rpcresp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__rpcresp__pack
++ (const Sr__RPCResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__rpcresp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__rpcresp__pack_to_buffer
++ (const Sr__RPCResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__rpcresp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__RPCResp *
++ sr__rpcresp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__RPCResp *)
++ protobuf_c_message_unpack (&sr__rpcresp__descriptor,
++ allocator, len, data);
++}
++void sr__rpcresp__free_unpacked
++ (Sr__RPCResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__rpcresp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__event_notif_req__init
++ (Sr__EventNotifReq *message)
++{
++ static Sr__EventNotifReq init_value = SR__EVENT_NOTIF_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__event_notif_req__get_packed_size
++ (const Sr__EventNotifReq *message)
++{
++ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__event_notif_req__pack
++ (const Sr__EventNotifReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__event_notif_req__pack_to_buffer
++ (const Sr__EventNotifReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__EventNotifReq *
++ sr__event_notif_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__EventNotifReq *)
++ protobuf_c_message_unpack (&sr__event_notif_req__descriptor,
++ allocator, len, data);
++}
++void sr__event_notif_req__free_unpacked
++ (Sr__EventNotifReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__event_notif_resp__init
++ (Sr__EventNotifResp *message)
++{
++ static Sr__EventNotifResp init_value = SR__EVENT_NOTIF_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__event_notif_resp__get_packed_size
++ (const Sr__EventNotifResp *message)
++{
++ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__event_notif_resp__pack
++ (const Sr__EventNotifResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__event_notif_resp__pack_to_buffer
++ (const Sr__EventNotifResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__EventNotifResp *
++ sr__event_notif_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__EventNotifResp *)
++ protobuf_c_message_unpack (&sr__event_notif_resp__descriptor,
++ allocator, len, data);
++}
++void sr__event_notif_resp__free_unpacked
++ (Sr__EventNotifResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__event_notif_replay_req__init
++ (Sr__EventNotifReplayReq *message)
++{
++ static Sr__EventNotifReplayReq init_value = SR__EVENT_NOTIF_REPLAY_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__event_notif_replay_req__get_packed_size
++ (const Sr__EventNotifReplayReq *message)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__event_notif_replay_req__pack
++ (const Sr__EventNotifReplayReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__event_notif_replay_req__pack_to_buffer
++ (const Sr__EventNotifReplayReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__EventNotifReplayReq *
++ sr__event_notif_replay_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__EventNotifReplayReq *)
++ protobuf_c_message_unpack (&sr__event_notif_replay_req__descriptor,
++ allocator, len, data);
++}
++void sr__event_notif_replay_req__free_unpacked
++ (Sr__EventNotifReplayReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__event_notif_replay_resp__init
++ (Sr__EventNotifReplayResp *message)
++{
++ static Sr__EventNotifReplayResp init_value = SR__EVENT_NOTIF_REPLAY_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__event_notif_replay_resp__get_packed_size
++ (const Sr__EventNotifReplayResp *message)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__event_notif_replay_resp__pack
++ (const Sr__EventNotifReplayResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__event_notif_replay_resp__pack_to_buffer
++ (const Sr__EventNotifReplayResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__EventNotifReplayResp *
++ sr__event_notif_replay_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__EventNotifReplayResp *)
++ protobuf_c_message_unpack (&sr__event_notif_replay_resp__descriptor,
++ allocator, len, data);
++}
++void sr__event_notif_replay_resp__free_unpacked
++ (Sr__EventNotifReplayResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__data_provide_req__init
++ (Sr__DataProvideReq *message)
++{
++ static Sr__DataProvideReq init_value = SR__DATA_PROVIDE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__data_provide_req__get_packed_size
++ (const Sr__DataProvideReq *message)
++{
++ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__data_provide_req__pack
++ (const Sr__DataProvideReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__data_provide_req__pack_to_buffer
++ (const Sr__DataProvideReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DataProvideReq *
++ sr__data_provide_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DataProvideReq *)
++ protobuf_c_message_unpack (&sr__data_provide_req__descriptor,
++ allocator, len, data);
++}
++void sr__data_provide_req__free_unpacked
++ (Sr__DataProvideReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__data_provide_resp__init
++ (Sr__DataProvideResp *message)
++{
++ static Sr__DataProvideResp init_value = SR__DATA_PROVIDE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__data_provide_resp__get_packed_size
++ (const Sr__DataProvideResp *message)
++{
++ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__data_provide_resp__pack
++ (const Sr__DataProvideResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__data_provide_resp__pack_to_buffer
++ (const Sr__DataProvideResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DataProvideResp *
++ sr__data_provide_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DataProvideResp *)
++ protobuf_c_message_unpack (&sr__data_provide_resp__descriptor,
++ allocator, len, data);
++}
++void sr__data_provide_resp__free_unpacked
++ (Sr__DataProvideResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__module_install_req__init
++ (Sr__ModuleInstallReq *message)
++{
++ static Sr__ModuleInstallReq init_value = SR__MODULE_INSTALL_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__module_install_req__get_packed_size
++ (const Sr__ModuleInstallReq *message)
++{
++ assert(message->base.descriptor == &sr__module_install_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__module_install_req__pack
++ (const Sr__ModuleInstallReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__module_install_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__module_install_req__pack_to_buffer
++ (const Sr__ModuleInstallReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__module_install_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ModuleInstallReq *
++ sr__module_install_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ModuleInstallReq *)
++ protobuf_c_message_unpack (&sr__module_install_req__descriptor,
++ allocator, len, data);
++}
++void sr__module_install_req__free_unpacked
++ (Sr__ModuleInstallReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__module_install_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__module_install_resp__init
++ (Sr__ModuleInstallResp *message)
++{
++ static Sr__ModuleInstallResp init_value = SR__MODULE_INSTALL_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__module_install_resp__get_packed_size
++ (const Sr__ModuleInstallResp *message)
++{
++ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__module_install_resp__pack
++ (const Sr__ModuleInstallResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__module_install_resp__pack_to_buffer
++ (const Sr__ModuleInstallResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__ModuleInstallResp *
++ sr__module_install_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__ModuleInstallResp *)
++ protobuf_c_message_unpack (&sr__module_install_resp__descriptor,
++ allocator, len, data);
++}
++void sr__module_install_resp__free_unpacked
++ (Sr__ModuleInstallResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__feature_enable_req__init
++ (Sr__FeatureEnableReq *message)
++{
++ static Sr__FeatureEnableReq init_value = SR__FEATURE_ENABLE_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__feature_enable_req__get_packed_size
++ (const Sr__FeatureEnableReq *message)
++{
++ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__feature_enable_req__pack
++ (const Sr__FeatureEnableReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__feature_enable_req__pack_to_buffer
++ (const Sr__FeatureEnableReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__FeatureEnableReq *
++ sr__feature_enable_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__FeatureEnableReq *)
++ protobuf_c_message_unpack (&sr__feature_enable_req__descriptor,
++ allocator, len, data);
++}
++void sr__feature_enable_req__free_unpacked
++ (Sr__FeatureEnableReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__feature_enable_resp__init
++ (Sr__FeatureEnableResp *message)
++{
++ static Sr__FeatureEnableResp init_value = SR__FEATURE_ENABLE_RESP__INIT;
++ *message = init_value;
++}
++size_t sr__feature_enable_resp__get_packed_size
++ (const Sr__FeatureEnableResp *message)
++{
++ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__feature_enable_resp__pack
++ (const Sr__FeatureEnableResp *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__feature_enable_resp__pack_to_buffer
++ (const Sr__FeatureEnableResp *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__FeatureEnableResp *
++ sr__feature_enable_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__FeatureEnableResp *)
++ protobuf_c_message_unpack (&sr__feature_enable_resp__descriptor,
++ allocator, len, data);
++}
++void sr__feature_enable_resp__free_unpacked
++ (Sr__FeatureEnableResp *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__unsubscribe_destination_req__init
++ (Sr__UnsubscribeDestinationReq *message)
++{
++ static Sr__UnsubscribeDestinationReq init_value = SR__UNSUBSCRIBE_DESTINATION_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__unsubscribe_destination_req__get_packed_size
++ (const Sr__UnsubscribeDestinationReq *message)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__unsubscribe_destination_req__pack
++ (const Sr__UnsubscribeDestinationReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__unsubscribe_destination_req__pack_to_buffer
++ (const Sr__UnsubscribeDestinationReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__UnsubscribeDestinationReq *
++ sr__unsubscribe_destination_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__UnsubscribeDestinationReq *)
++ protobuf_c_message_unpack (&sr__unsubscribe_destination_req__descriptor,
++ allocator, len, data);
++}
++void sr__unsubscribe_destination_req__free_unpacked
++ (Sr__UnsubscribeDestinationReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__commit_timeout_req__init
++ (Sr__CommitTimeoutReq *message)
++{
++ static Sr__CommitTimeoutReq init_value = SR__COMMIT_TIMEOUT_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__commit_timeout_req__get_packed_size
++ (const Sr__CommitTimeoutReq *message)
++{
++ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__commit_timeout_req__pack
++ (const Sr__CommitTimeoutReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__commit_timeout_req__pack_to_buffer
++ (const Sr__CommitTimeoutReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__CommitTimeoutReq *
++ sr__commit_timeout_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__CommitTimeoutReq *)
++ protobuf_c_message_unpack (&sr__commit_timeout_req__descriptor,
++ allocator, len, data);
++}
++void sr__commit_timeout_req__free_unpacked
++ (Sr__CommitTimeoutReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__oper_data_timeout_req__init
++ (Sr__OperDataTimeoutReq *message)
++{
++ static Sr__OperDataTimeoutReq init_value = SR__OPER_DATA_TIMEOUT_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__oper_data_timeout_req__get_packed_size
++ (const Sr__OperDataTimeoutReq *message)
++{
++ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__oper_data_timeout_req__pack
++ (const Sr__OperDataTimeoutReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__oper_data_timeout_req__pack_to_buffer
++ (const Sr__OperDataTimeoutReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__OperDataTimeoutReq *
++ sr__oper_data_timeout_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__OperDataTimeoutReq *)
++ protobuf_c_message_unpack (&sr__oper_data_timeout_req__descriptor,
++ allocator, len, data);
++}
++void sr__oper_data_timeout_req__free_unpacked
++ (Sr__OperDataTimeoutReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__internal_state_data_req__init
++ (Sr__InternalStateDataReq *message)
++{
++ static Sr__InternalStateDataReq init_value = SR__INTERNAL_STATE_DATA_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__internal_state_data_req__get_packed_size
++ (const Sr__InternalStateDataReq *message)
++{
++ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__internal_state_data_req__pack
++ (const Sr__InternalStateDataReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__internal_state_data_req__pack_to_buffer
++ (const Sr__InternalStateDataReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__InternalStateDataReq *
++ sr__internal_state_data_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__InternalStateDataReq *)
++ protobuf_c_message_unpack (&sr__internal_state_data_req__descriptor,
++ allocator, len, data);
++}
++void sr__internal_state_data_req__free_unpacked
++ (Sr__InternalStateDataReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__notif_store_cleanup_req__init
++ (Sr__NotifStoreCleanupReq *message)
++{
++ static Sr__NotifStoreCleanupReq init_value = SR__NOTIF_STORE_CLEANUP_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__notif_store_cleanup_req__get_packed_size
++ (const Sr__NotifStoreCleanupReq *message)
++{
++ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__notif_store_cleanup_req__pack
++ (const Sr__NotifStoreCleanupReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__notif_store_cleanup_req__pack_to_buffer
++ (const Sr__NotifStoreCleanupReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__NotifStoreCleanupReq *
++ sr__notif_store_cleanup_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__NotifStoreCleanupReq *)
++ protobuf_c_message_unpack (&sr__notif_store_cleanup_req__descriptor,
++ allocator, len, data);
++}
++void sr__notif_store_cleanup_req__free_unpacked
++ (Sr__NotifStoreCleanupReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__delayed_msg_req__init
++ (Sr__DelayedMsgReq *message)
++{
++ static Sr__DelayedMsgReq init_value = SR__DELAYED_MSG_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__delayed_msg_req__get_packed_size
++ (const Sr__DelayedMsgReq *message)
++{
++ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__delayed_msg_req__pack
++ (const Sr__DelayedMsgReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__delayed_msg_req__pack_to_buffer
++ (const Sr__DelayedMsgReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__DelayedMsgReq *
++ sr__delayed_msg_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__DelayedMsgReq *)
++ protobuf_c_message_unpack (&sr__delayed_msg_req__descriptor,
++ allocator, len, data);
++}
++void sr__delayed_msg_req__free_unpacked
++ (Sr__DelayedMsgReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__nacm_reload_req__init
++ (Sr__NacmReloadReq *message)
++{
++ static Sr__NacmReloadReq init_value = SR__NACM_RELOAD_REQ__INIT;
++ *message = init_value;
++}
++size_t sr__nacm_reload_req__get_packed_size
++ (const Sr__NacmReloadReq *message)
++{
++ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__nacm_reload_req__pack
++ (const Sr__NacmReloadReq *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__nacm_reload_req__pack_to_buffer
++ (const Sr__NacmReloadReq *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__NacmReloadReq *
++ sr__nacm_reload_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__NacmReloadReq *)
++ protobuf_c_message_unpack (&sr__nacm_reload_req__descriptor,
++ allocator, len, data);
++}
++void sr__nacm_reload_req__free_unpacked
++ (Sr__NacmReloadReq *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__request__init
++ (Sr__Request *message)
++{
++ static Sr__Request init_value = SR__REQUEST__INIT;
++ *message = init_value;
++}
++size_t sr__request__get_packed_size
++ (const Sr__Request *message)
++{
++ assert(message->base.descriptor == &sr__request__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__request__pack
++ (const Sr__Request *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__request__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__request__pack_to_buffer
++ (const Sr__Request *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__request__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Request *
++ sr__request__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Request *)
++ protobuf_c_message_unpack (&sr__request__descriptor,
++ allocator, len, data);
++}
++void sr__request__free_unpacked
++ (Sr__Request *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__request__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__response__init
++ (Sr__Response *message)
++{
++ static Sr__Response init_value = SR__RESPONSE__INIT;
++ *message = init_value;
++}
++size_t sr__response__get_packed_size
++ (const Sr__Response *message)
++{
++ assert(message->base.descriptor == &sr__response__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__response__pack
++ (const Sr__Response *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__response__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__response__pack_to_buffer
++ (const Sr__Response *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__response__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Response *
++ sr__response__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Response *)
++ protobuf_c_message_unpack (&sr__response__descriptor,
++ allocator, len, data);
++}
++void sr__response__free_unpacked
++ (Sr__Response *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__response__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__notification__init
++ (Sr__Notification *message)
++{
++ static Sr__Notification init_value = SR__NOTIFICATION__INIT;
++ *message = init_value;
++}
++size_t sr__notification__get_packed_size
++ (const Sr__Notification *message)
++{
++ assert(message->base.descriptor == &sr__notification__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__notification__pack
++ (const Sr__Notification *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__notification__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__notification__pack_to_buffer
++ (const Sr__Notification *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__notification__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Notification *
++ sr__notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Notification *)
++ protobuf_c_message_unpack (&sr__notification__descriptor,
++ allocator, len, data);
++}
++void sr__notification__free_unpacked
++ (Sr__Notification *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__notification__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__notification_ack__init
++ (Sr__NotificationAck *message)
++{
++ static Sr__NotificationAck init_value = SR__NOTIFICATION_ACK__INIT;
++ *message = init_value;
++}
++size_t sr__notification_ack__get_packed_size
++ (const Sr__NotificationAck *message)
++{
++ assert(message->base.descriptor == &sr__notification_ack__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__notification_ack__pack
++ (const Sr__NotificationAck *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__notification_ack__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__notification_ack__pack_to_buffer
++ (const Sr__NotificationAck *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__notification_ack__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__NotificationAck *
++ sr__notification_ack__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__NotificationAck *)
++ protobuf_c_message_unpack (&sr__notification_ack__descriptor,
++ allocator, len, data);
++}
++void sr__notification_ack__free_unpacked
++ (Sr__NotificationAck *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__notification_ack__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__internal_request__init
++ (Sr__InternalRequest *message)
++{
++ static Sr__InternalRequest init_value = SR__INTERNAL_REQUEST__INIT;
++ *message = init_value;
++}
++size_t sr__internal_request__get_packed_size
++ (const Sr__InternalRequest *message)
++{
++ assert(message->base.descriptor == &sr__internal_request__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__internal_request__pack
++ (const Sr__InternalRequest *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__internal_request__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__internal_request__pack_to_buffer
++ (const Sr__InternalRequest *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__internal_request__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__InternalRequest *
++ sr__internal_request__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__InternalRequest *)
++ protobuf_c_message_unpack (&sr__internal_request__descriptor,
++ allocator, len, data);
++}
++void sr__internal_request__free_unpacked
++ (Sr__InternalRequest *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__internal_request__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++void sr__msg__init
++ (Sr__Msg *message)
++{
++ static Sr__Msg init_value = SR__MSG__INIT;
++ *message = init_value;
++}
++size_t sr__msg__get_packed_size
++ (const Sr__Msg *message)
++{
++ assert(message->base.descriptor == &sr__msg__descriptor);
++ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
++}
++size_t sr__msg__pack
++ (const Sr__Msg *message,
++ uint8_t *out)
++{
++ assert(message->base.descriptor == &sr__msg__descriptor);
++ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
++}
++size_t sr__msg__pack_to_buffer
++ (const Sr__Msg *message,
++ ProtobufCBuffer *buffer)
++{
++ assert(message->base.descriptor == &sr__msg__descriptor);
++ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
++}
++Sr__Msg *
++ sr__msg__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data)
++{
++ return (Sr__Msg *)
++ protobuf_c_message_unpack (&sr__msg__descriptor,
++ allocator, len, data);
++}
++void sr__msg__free_unpacked
++ (Sr__Msg *message,
++ ProtobufCAllocator *allocator)
++{
++ assert(message->base.descriptor == &sr__msg__descriptor);
++ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
++}
++static const ProtobufCEnumValue sr__value__types__enum_values_by_number[22] =
++{
++ { "LIST", "SR__VALUE__TYPES__LIST", 1 },
++ { "CONTAINER", "SR__VALUE__TYPES__CONTAINER", 2 },
++ { "CONTAINER_PRESENCE", "SR__VALUE__TYPES__CONTAINER_PRESENCE", 3 },
++ { "LEAF_EMPTY", "SR__VALUE__TYPES__LEAF_EMPTY", 4 },
++ { "BINARY", "SR__VALUE__TYPES__BINARY", 10 },
++ { "BITS", "SR__VALUE__TYPES__BITS", 11 },
++ { "BOOL", "SR__VALUE__TYPES__BOOL", 12 },
++ { "DECIMAL64", "SR__VALUE__TYPES__DECIMAL64", 13 },
++ { "ENUM", "SR__VALUE__TYPES__ENUM", 14 },
++ { "IDENTITYREF", "SR__VALUE__TYPES__IDENTITYREF", 15 },
++ { "INSTANCEID", "SR__VALUE__TYPES__INSTANCEID", 16 },
++ { "INT8", "SR__VALUE__TYPES__INT8", 17 },
++ { "INT16", "SR__VALUE__TYPES__INT16", 18 },
++ { "INT32", "SR__VALUE__TYPES__INT32", 19 },
++ { "INT64", "SR__VALUE__TYPES__INT64", 20 },
++ { "STRING", "SR__VALUE__TYPES__STRING", 21 },
++ { "UINT8", "SR__VALUE__TYPES__UINT8", 22 },
++ { "UINT16", "SR__VALUE__TYPES__UINT16", 23 },
++ { "UINT32", "SR__VALUE__TYPES__UINT32", 24 },
++ { "UINT64", "SR__VALUE__TYPES__UINT64", 25 },
++ { "ANYXML", "SR__VALUE__TYPES__ANYXML", 26 },
++ { "ANYDATA", "SR__VALUE__TYPES__ANYDATA", 27 },
++};
++static const ProtobufCIntRange sr__value__types__value_ranges[] = {
++{1, 0},{10, 4},{0, 22}
++};
++static const ProtobufCEnumValueIndex sr__value__types__enum_values_by_name[22] =
++{
++ { "ANYDATA", 21 },
++ { "ANYXML", 20 },
++ { "BINARY", 4 },
++ { "BITS", 5 },
++ { "BOOL", 6 },
++ { "CONTAINER", 1 },
++ { "CONTAINER_PRESENCE", 2 },
++ { "DECIMAL64", 7 },
++ { "ENUM", 8 },
++ { "IDENTITYREF", 9 },
++ { "INSTANCEID", 10 },
++ { "INT16", 12 },
++ { "INT32", 13 },
++ { "INT64", 14 },
++ { "INT8", 11 },
++ { "LEAF_EMPTY", 3 },
++ { "LIST", 0 },
++ { "STRING", 15 },
++ { "UINT16", 17 },
++ { "UINT32", 18 },
++ { "UINT64", 19 },
++ { "UINT8", 16 },
++};
++const ProtobufCEnumDescriptor sr__value__types__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.Value.Types",
++ "Types",
++ "Sr__Value__Types",
++ "sr",
++ 22,
++ sr__value__types__enum_values_by_number,
++ 22,
++ sr__value__types__enum_values_by_name,
++ 2,
++ sr__value__types__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCFieldDescriptor sr__value__field_descriptors[21] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "type",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, type),
++ &sr__value__types__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "dflt",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, dflt),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "binary_val",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, binary_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "bits_val",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, bits_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "bool_val",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_BOOL,
++ offsetof(Sr__Value, has_bool_val),
++ offsetof(Sr__Value, bool_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "decimal64_val",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_DOUBLE,
++ offsetof(Sr__Value, has_decimal64_val),
++ offsetof(Sr__Value, decimal64_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enum_val",
++ 14,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, enum_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "identityref_val",
++ 15,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, identityref_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "instanceid_val",
++ 16,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, instanceid_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "int8_val",
++ 17,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_INT32,
++ offsetof(Sr__Value, has_int8_val),
++ offsetof(Sr__Value, int8_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "int16_val",
++ 18,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_INT32,
++ offsetof(Sr__Value, has_int16_val),
++ offsetof(Sr__Value, int16_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "int32_val",
++ 19,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_INT32,
++ offsetof(Sr__Value, has_int32_val),
++ offsetof(Sr__Value, int32_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "int64_val",
++ 20,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_INT64,
++ offsetof(Sr__Value, has_int64_val),
++ offsetof(Sr__Value, int64_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "string_val",
++ 21,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, string_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "uint8_val",
++ 22,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__Value, has_uint8_val),
++ offsetof(Sr__Value, uint8_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "uint16_val",
++ 23,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__Value, has_uint16_val),
++ offsetof(Sr__Value, uint16_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "uint32_val",
++ 24,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__Value, has_uint32_val),
++ offsetof(Sr__Value, uint32_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "uint64_val",
++ 25,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT64,
++ offsetof(Sr__Value, has_uint64_val),
++ offsetof(Sr__Value, uint64_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "anyxml_val",
++ 26,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, anyxml_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "anydata_val",
++ 27,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Value, anydata_val),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__value__field_indices_by_name[] = {
++ 20, /* field[20] = anydata_val */
++ 19, /* field[19] = anyxml_val */
++ 3, /* field[3] = binary_val */
++ 4, /* field[4] = bits_val */
++ 5, /* field[5] = bool_val */
++ 6, /* field[6] = decimal64_val */
++ 2, /* field[2] = dflt */
++ 7, /* field[7] = enum_val */
++ 8, /* field[8] = identityref_val */
++ 9, /* field[9] = instanceid_val */
++ 11, /* field[11] = int16_val */
++ 12, /* field[12] = int32_val */
++ 13, /* field[13] = int64_val */
++ 10, /* field[10] = int8_val */
++ 14, /* field[14] = string_val */
++ 1, /* field[1] = type */
++ 16, /* field[16] = uint16_val */
++ 17, /* field[17] = uint32_val */
++ 18, /* field[18] = uint64_val */
++ 15, /* field[15] = uint8_val */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__value__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 3 },
++ { 0, 21 }
++};
++const ProtobufCMessageDescriptor sr__value__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Value",
++ "Value",
++ "Sr__Value",
++ "sr",
++ sizeof(Sr__Value),
++ 21,
++ sr__value__field_descriptors,
++ sr__value__field_indices_by_name,
++ 2, sr__value__number_ranges,
++ (ProtobufCMessageInit) sr__value__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__node__field_descriptors[3] =
++{
++ {
++ "value",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Node, value),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_name",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Node, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "children",
++ 3,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__Node, n_children),
++ offsetof(Sr__Node, children),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__node__field_indices_by_name[] = {
++ 2, /* field[2] = children */
++ 1, /* field[1] = module_name */
++ 0, /* field[0] = value */
++};
++static const ProtobufCIntRange sr__node__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__node__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Node",
++ "Node",
++ "Sr__Node",
++ "sr",
++ sizeof(Sr__Node),
++ 3,
++ sr__node__field_descriptors,
++ sr__node__field_indices_by_name,
++ 1, sr__node__number_ranges,
++ (ProtobufCMessageInit) sr__node__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__error__field_descriptors[2] =
++{
++ {
++ "message",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Error, message),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Error, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__error__field_indices_by_name[] = {
++ 0, /* field[0] = message */
++ 1, /* field[1] = xpath */
++};
++static const ProtobufCIntRange sr__error__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__error__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Error",
++ "Error",
++ "Sr__Error",
++ "sr",
++ sizeof(Sr__Error),
++ 2,
++ sr__error__field_descriptors,
++ sr__error__field_indices_by_name,
++ 1, sr__error__number_ranges,
++ (ProtobufCMessageInit) sr__error__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_start_req__field_descriptors[4] =
++{
++ {
++ "datastore",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStartReq, datastore),
++ &sr__data_store__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "user_name",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStartReq, user_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "options",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStartReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "commit_id",
++ 4,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__SessionStartReq, has_commit_id),
++ offsetof(Sr__SessionStartReq, commit_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_start_req__field_indices_by_name[] = {
++ 3, /* field[3] = commit_id */
++ 0, /* field[0] = datastore */
++ 2, /* field[2] = options */
++ 1, /* field[1] = user_name */
++};
++static const ProtobufCIntRange sr__session_start_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 4 }
++};
++const ProtobufCMessageDescriptor sr__session_start_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionStartReq",
++ "SessionStartReq",
++ "Sr__SessionStartReq",
++ "sr",
++ sizeof(Sr__SessionStartReq),
++ 4,
++ sr__session_start_req__field_descriptors,
++ sr__session_start_req__field_indices_by_name,
++ 1, sr__session_start_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_start_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_start_resp__field_descriptors[1] =
++{
++ {
++ "session_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStartResp, session_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_start_resp__field_indices_by_name[] = {
++ 0, /* field[0] = session_id */
++};
++static const ProtobufCIntRange sr__session_start_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_start_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionStartResp",
++ "SessionStartResp",
++ "Sr__SessionStartResp",
++ "sr",
++ sizeof(Sr__SessionStartResp),
++ 1,
++ sr__session_start_resp__field_descriptors,
++ sr__session_start_resp__field_indices_by_name,
++ 1, sr__session_start_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_start_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_stop_req__field_descriptors[1] =
++{
++ {
++ "session_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStopReq, session_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_stop_req__field_indices_by_name[] = {
++ 0, /* field[0] = session_id */
++};
++static const ProtobufCIntRange sr__session_stop_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_stop_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionStopReq",
++ "SessionStopReq",
++ "Sr__SessionStopReq",
++ "sr",
++ sizeof(Sr__SessionStopReq),
++ 1,
++ sr__session_stop_req__field_descriptors,
++ sr__session_stop_req__field_indices_by_name,
++ 1, sr__session_stop_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_stop_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_stop_resp__field_descriptors[1] =
++{
++ {
++ "session_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionStopResp, session_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_stop_resp__field_indices_by_name[] = {
++ 0, /* field[0] = session_id */
++};
++static const ProtobufCIntRange sr__session_stop_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_stop_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionStopResp",
++ "SessionStopResp",
++ "Sr__SessionStopResp",
++ "sr",
++ sizeof(Sr__SessionStopResp),
++ 1,
++ sr__session_stop_resp__field_descriptors,
++ sr__session_stop_resp__field_indices_by_name,
++ 1, sr__session_stop_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_stop_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__session_refresh_req__field_descriptors NULL
++#define sr__session_refresh_req__field_indices_by_name NULL
++#define sr__session_refresh_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__session_refresh_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionRefreshReq",
++ "SessionRefreshReq",
++ "Sr__SessionRefreshReq",
++ "sr",
++ sizeof(Sr__SessionRefreshReq),
++ 0,
++ sr__session_refresh_req__field_descriptors,
++ sr__session_refresh_req__field_indices_by_name,
++ 0, sr__session_refresh_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_refresh_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_refresh_resp__field_descriptors[1] =
++{
++ {
++ "errors",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__SessionRefreshResp, n_errors),
++ offsetof(Sr__SessionRefreshResp, errors),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_refresh_resp__field_indices_by_name[] = {
++ 0, /* field[0] = errors */
++};
++static const ProtobufCIntRange sr__session_refresh_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_refresh_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionRefreshResp",
++ "SessionRefreshResp",
++ "Sr__SessionRefreshResp",
++ "sr",
++ sizeof(Sr__SessionRefreshResp),
++ 1,
++ sr__session_refresh_resp__field_descriptors,
++ sr__session_refresh_resp__field_indices_by_name,
++ 1, sr__session_refresh_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_refresh_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__session_check_req__field_descriptors NULL
++#define sr__session_check_req__field_indices_by_name NULL
++#define sr__session_check_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__session_check_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionCheckReq",
++ "SessionCheckReq",
++ "Sr__SessionCheckReq",
++ "sr",
++ sizeof(Sr__SessionCheckReq),
++ 0,
++ sr__session_check_req__field_descriptors,
++ sr__session_check_req__field_indices_by_name,
++ 0, sr__session_check_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_check_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_check_resp__field_descriptors[1] =
++{
++ {
++ "errors",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__SessionCheckResp, n_errors),
++ offsetof(Sr__SessionCheckResp, errors),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_check_resp__field_indices_by_name[] = {
++ 0, /* field[0] = errors */
++};
++static const ProtobufCIntRange sr__session_check_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_check_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionCheckResp",
++ "SessionCheckResp",
++ "Sr__SessionCheckResp",
++ "sr",
++ sizeof(Sr__SessionCheckResp),
++ 1,
++ sr__session_check_resp__field_descriptors,
++ sr__session_check_resp__field_indices_by_name,
++ 1, sr__session_check_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_check_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_switch_ds_req__field_descriptors[1] =
++{
++ {
++ "datastore",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionSwitchDsReq, datastore),
++ &sr__data_store__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_switch_ds_req__field_indices_by_name[] = {
++ 0, /* field[0] = datastore */
++};
++static const ProtobufCIntRange sr__session_switch_ds_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_switch_ds_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionSwitchDsReq",
++ "SessionSwitchDsReq",
++ "Sr__SessionSwitchDsReq",
++ "sr",
++ sizeof(Sr__SessionSwitchDsReq),
++ 1,
++ sr__session_switch_ds_req__field_descriptors,
++ sr__session_switch_ds_req__field_indices_by_name,
++ 1, sr__session_switch_ds_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_switch_ds_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__session_switch_ds_resp__field_descriptors NULL
++#define sr__session_switch_ds_resp__field_indices_by_name NULL
++#define sr__session_switch_ds_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__session_switch_ds_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionSwitchDsResp",
++ "SessionSwitchDsResp",
++ "Sr__SessionSwitchDsResp",
++ "sr",
++ sizeof(Sr__SessionSwitchDsResp),
++ 0,
++ sr__session_switch_ds_resp__field_descriptors,
++ sr__session_switch_ds_resp__field_indices_by_name,
++ 0, sr__session_switch_ds_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_switch_ds_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__session_set_opts_req__field_descriptors[1] =
++{
++ {
++ "options",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SessionSetOptsReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__session_set_opts_req__field_indices_by_name[] = {
++ 0, /* field[0] = options */
++};
++static const ProtobufCIntRange sr__session_set_opts_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__session_set_opts_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionSetOptsReq",
++ "SessionSetOptsReq",
++ "Sr__SessionSetOptsReq",
++ "sr",
++ sizeof(Sr__SessionSetOptsReq),
++ 1,
++ sr__session_set_opts_req__field_descriptors,
++ sr__session_set_opts_req__field_indices_by_name,
++ 1, sr__session_set_opts_req__number_ranges,
++ (ProtobufCMessageInit) sr__session_set_opts_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__session_set_opts_resp__field_descriptors NULL
++#define sr__session_set_opts_resp__field_indices_by_name NULL
++#define sr__session_set_opts_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__session_set_opts_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SessionSetOptsResp",
++ "SessionSetOptsResp",
++ "Sr__SessionSetOptsResp",
++ "sr",
++ sizeof(Sr__SessionSetOptsResp),
++ 0,
++ sr__session_set_opts_resp__field_descriptors,
++ sr__session_set_opts_resp__field_indices_by_name,
++ 0, sr__session_set_opts_resp__number_ranges,
++ (ProtobufCMessageInit) sr__session_set_opts_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__version_verify_req__field_descriptors[1] =
++{
++ {
++ "soname",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__VersionVerifyReq, soname),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__version_verify_req__field_indices_by_name[] = {
++ 0, /* field[0] = soname */
++};
++static const ProtobufCIntRange sr__version_verify_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__version_verify_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.VersionVerifyReq",
++ "VersionVerifyReq",
++ "Sr__VersionVerifyReq",
++ "sr",
++ sizeof(Sr__VersionVerifyReq),
++ 1,
++ sr__version_verify_req__field_descriptors,
++ sr__version_verify_req__field_indices_by_name,
++ 1, sr__version_verify_req__number_ranges,
++ (ProtobufCMessageInit) sr__version_verify_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__version_verify_resp__field_descriptors[1] =
++{
++ {
++ "soname",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__VersionVerifyResp, soname),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__version_verify_resp__field_indices_by_name[] = {
++ 0, /* field[0] = soname */
++};
++static const ProtobufCIntRange sr__version_verify_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__version_verify_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.VersionVerifyResp",
++ "VersionVerifyResp",
++ "Sr__VersionVerifyResp",
++ "sr",
++ sizeof(Sr__VersionVerifyResp),
++ 1,
++ sr__version_verify_resp__field_descriptors,
++ sr__version_verify_resp__field_indices_by_name,
++ 1, sr__version_verify_resp__number_ranges,
++ (ProtobufCMessageInit) sr__version_verify_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__schema_revision__field_descriptors[3] =
++{
++ {
++ "revision",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SchemaRevision, revision),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "file_path_yang",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SchemaRevision, file_path_yang),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "file_path_yin",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SchemaRevision, file_path_yin),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__schema_revision__field_indices_by_name[] = {
++ 1, /* field[1] = file_path_yang */
++ 2, /* field[2] = file_path_yin */
++ 0, /* field[0] = revision */
++};
++static const ProtobufCIntRange sr__schema_revision__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__schema_revision__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SchemaRevision",
++ "SchemaRevision",
++ "Sr__SchemaRevision",
++ "sr",
++ sizeof(Sr__SchemaRevision),
++ 3,
++ sr__schema_revision__field_descriptors,
++ sr__schema_revision__field_indices_by_name,
++ 1, sr__schema_revision__number_ranges,
++ (ProtobufCMessageInit) sr__schema_revision__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__schema_submodule__field_descriptors[2] =
++{
++ {
++ "submodule_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SchemaSubmodule, submodule_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "revision",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SchemaSubmodule, revision),
++ &sr__schema_revision__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__schema_submodule__field_indices_by_name[] = {
++ 1, /* field[1] = revision */
++ 0, /* field[0] = submodule_name */
++};
++static const ProtobufCIntRange sr__schema_submodule__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__schema_submodule__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SchemaSubmodule",
++ "SchemaSubmodule",
++ "Sr__SchemaSubmodule",
++ "sr",
++ sizeof(Sr__SchemaSubmodule),
++ 2,
++ sr__schema_submodule__field_descriptors,
++ sr__schema_submodule__field_indices_by_name,
++ 1, sr__schema_submodule__number_ranges,
++ (ProtobufCMessageInit) sr__schema_submodule__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__schema__field_descriptors[8] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "ns",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, ns),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "prefix",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, prefix),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "installed",
++ 4,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, installed),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "implemented",
++ 5,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, implemented),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "revision",
++ 6,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Schema, revision),
++ &sr__schema_revision__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "submodules",
++ 7,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__Schema, n_submodules),
++ offsetof(Sr__Schema, submodules),
++ &sr__schema_submodule__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enabled_features",
++ 8,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_STRING,
++ offsetof(Sr__Schema, n_enabled_features),
++ offsetof(Sr__Schema, enabled_features),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__schema__field_indices_by_name[] = {
++ 7, /* field[7] = enabled_features */
++ 4, /* field[4] = implemented */
++ 3, /* field[3] = installed */
++ 0, /* field[0] = module_name */
++ 1, /* field[1] = ns */
++ 2, /* field[2] = prefix */
++ 5, /* field[5] = revision */
++ 6, /* field[6] = submodules */
++};
++static const ProtobufCIntRange sr__schema__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 8 }
++};
++const ProtobufCMessageDescriptor sr__schema__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Schema",
++ "Schema",
++ "Sr__Schema",
++ "sr",
++ sizeof(Sr__Schema),
++ 8,
++ sr__schema__field_descriptors,
++ sr__schema__field_indices_by_name,
++ 1, sr__schema__number_ranges,
++ (ProtobufCMessageInit) sr__schema__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__list_schemas_req__field_descriptors NULL
++#define sr__list_schemas_req__field_indices_by_name NULL
++#define sr__list_schemas_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__list_schemas_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ListSchemasReq",
++ "ListSchemasReq",
++ "Sr__ListSchemasReq",
++ "sr",
++ sizeof(Sr__ListSchemasReq),
++ 0,
++ sr__list_schemas_req__field_descriptors,
++ sr__list_schemas_req__field_indices_by_name,
++ 0, sr__list_schemas_req__number_ranges,
++ (ProtobufCMessageInit) sr__list_schemas_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__list_schemas_resp__field_descriptors[1] =
++{
++ {
++ "schemas",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__ListSchemasResp, n_schemas),
++ offsetof(Sr__ListSchemasResp, schemas),
++ &sr__schema__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__list_schemas_resp__field_indices_by_name[] = {
++ 0, /* field[0] = schemas */
++};
++static const ProtobufCIntRange sr__list_schemas_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__list_schemas_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ListSchemasResp",
++ "ListSchemasResp",
++ "Sr__ListSchemasResp",
++ "sr",
++ sizeof(Sr__ListSchemasResp),
++ 1,
++ sr__list_schemas_resp__field_descriptors,
++ sr__list_schemas_resp__field_indices_by_name,
++ 1, sr__list_schemas_resp__number_ranges,
++ (ProtobufCMessageInit) sr__list_schemas_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_schema_req__field_descriptors[5] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "revision",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaReq, revision),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "submodule_name",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaReq, submodule_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "submodule_revision",
++ 4,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaReq, submodule_revision),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "yang_format",
++ 5,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaReq, yang_format),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_schema_req__field_indices_by_name[] = {
++ 0, /* field[0] = module_name */
++ 1, /* field[1] = revision */
++ 2, /* field[2] = submodule_name */
++ 3, /* field[3] = submodule_revision */
++ 4, /* field[4] = yang_format */
++};
++static const ProtobufCIntRange sr__get_schema_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 5 }
++};
++const ProtobufCMessageDescriptor sr__get_schema_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSchemaReq",
++ "GetSchemaReq",
++ "Sr__GetSchemaReq",
++ "sr",
++ sizeof(Sr__GetSchemaReq),
++ 5,
++ sr__get_schema_req__field_descriptors,
++ sr__get_schema_req__field_indices_by_name,
++ 1, sr__get_schema_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_schema_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_schema_resp__field_descriptors[1] =
++{
++ {
++ "schema_content",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSchemaResp, schema_content),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_schema_resp__field_indices_by_name[] = {
++ 0, /* field[0] = schema_content */
++};
++static const ProtobufCIntRange sr__get_schema_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_schema_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSchemaResp",
++ "GetSchemaResp",
++ "Sr__GetSchemaResp",
++ "sr",
++ sizeof(Sr__GetSchemaResp),
++ 1,
++ sr__get_schema_resp__field_descriptors,
++ sr__get_schema_resp__field_indices_by_name,
++ 1, sr__get_schema_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_schema_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_item_req__field_descriptors[1] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetItemReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_item_req__field_indices_by_name[] = {
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_item_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_item_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetItemReq",
++ "GetItemReq",
++ "Sr__GetItemReq",
++ "sr",
++ sizeof(Sr__GetItemReq),
++ 1,
++ sr__get_item_req__field_descriptors,
++ sr__get_item_req__field_indices_by_name,
++ 1, sr__get_item_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_item_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_item_resp__field_descriptors[1] =
++{
++ {
++ "value",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetItemResp, value),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_item_resp__field_indices_by_name[] = {
++ 0, /* field[0] = value */
++};
++static const ProtobufCIntRange sr__get_item_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_item_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetItemResp",
++ "GetItemResp",
++ "Sr__GetItemResp",
++ "sr",
++ sizeof(Sr__GetItemResp),
++ 1,
++ sr__get_item_resp__field_descriptors,
++ sr__get_item_resp__field_indices_by_name,
++ 1, sr__get_item_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_item_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_items_req__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetItemsReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "limit",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__GetItemsReq, has_limit),
++ offsetof(Sr__GetItemsReq, limit),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "offset",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__GetItemsReq, has_offset),
++ offsetof(Sr__GetItemsReq, offset),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_items_req__field_indices_by_name[] = {
++ 1, /* field[1] = limit */
++ 2, /* field[2] = offset */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_items_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__get_items_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetItemsReq",
++ "GetItemsReq",
++ "Sr__GetItemsReq",
++ "sr",
++ sizeof(Sr__GetItemsReq),
++ 3,
++ sr__get_items_req__field_descriptors,
++ sr__get_items_req__field_indices_by_name,
++ 1, sr__get_items_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_items_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_items_resp__field_descriptors[1] =
++{
++ {
++ "values",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__GetItemsResp, n_values),
++ offsetof(Sr__GetItemsResp, values),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_items_resp__field_indices_by_name[] = {
++ 0, /* field[0] = values */
++};
++static const ProtobufCIntRange sr__get_items_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_items_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetItemsResp",
++ "GetItemsResp",
++ "Sr__GetItemsResp",
++ "sr",
++ sizeof(Sr__GetItemsResp),
++ 1,
++ sr__get_items_resp__field_descriptors,
++ sr__get_items_resp__field_indices_by_name,
++ 1, sr__get_items_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_items_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtree_req__field_descriptors[1] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtree_req__field_indices_by_name[] = {
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_subtree_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_subtree_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreeReq",
++ "GetSubtreeReq",
++ "Sr__GetSubtreeReq",
++ "sr",
++ sizeof(Sr__GetSubtreeReq),
++ 1,
++ sr__get_subtree_req__field_descriptors,
++ sr__get_subtree_req__field_indices_by_name,
++ 1, sr__get_subtree_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtree_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtree_resp__field_descriptors[1] =
++{
++ {
++ "tree",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeResp, tree),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtree_resp__field_indices_by_name[] = {
++ 0, /* field[0] = tree */
++};
++static const ProtobufCIntRange sr__get_subtree_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_subtree_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreeResp",
++ "GetSubtreeResp",
++ "Sr__GetSubtreeResp",
++ "sr",
++ sizeof(Sr__GetSubtreeResp),
++ 1,
++ sr__get_subtree_resp__field_descriptors,
++ sr__get_subtree_resp__field_indices_by_name,
++ 1, sr__get_subtree_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtree_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtrees_req__field_descriptors[1] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreesReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtrees_req__field_indices_by_name[] = {
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_subtrees_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_subtrees_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreesReq",
++ "GetSubtreesReq",
++ "Sr__GetSubtreesReq",
++ "sr",
++ sizeof(Sr__GetSubtreesReq),
++ 1,
++ sr__get_subtrees_req__field_descriptors,
++ sr__get_subtrees_req__field_indices_by_name,
++ 1, sr__get_subtrees_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtrees_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtrees_resp__field_descriptors[1] =
++{
++ {
++ "trees",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__GetSubtreesResp, n_trees),
++ offsetof(Sr__GetSubtreesResp, trees),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtrees_resp__field_indices_by_name[] = {
++ 0, /* field[0] = trees */
++};
++static const ProtobufCIntRange sr__get_subtrees_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_subtrees_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreesResp",
++ "GetSubtreesResp",
++ "Sr__GetSubtreesResp",
++ "sr",
++ sizeof(Sr__GetSubtreesResp),
++ 1,
++ sr__get_subtrees_resp__field_descriptors,
++ sr__get_subtrees_resp__field_indices_by_name,
++ 1, sr__get_subtrees_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtrees_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtree_chunk_req__field_descriptors[6] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "single",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, single),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "slice_offset",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, slice_offset),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "slice_width",
++ 4,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, slice_width),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "child_limit",
++ 5,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, child_limit),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "depth_limit",
++ 6,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetSubtreeChunkReq, depth_limit),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtree_chunk_req__field_indices_by_name[] = {
++ 4, /* field[4] = child_limit */
++ 5, /* field[5] = depth_limit */
++ 1, /* field[1] = single */
++ 2, /* field[2] = slice_offset */
++ 3, /* field[3] = slice_width */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_subtree_chunk_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 6 }
++};
++const ProtobufCMessageDescriptor sr__get_subtree_chunk_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreeChunkReq",
++ "GetSubtreeChunkReq",
++ "Sr__GetSubtreeChunkReq",
++ "sr",
++ sizeof(Sr__GetSubtreeChunkReq),
++ 6,
++ sr__get_subtree_chunk_req__field_descriptors,
++ sr__get_subtree_chunk_req__field_indices_by_name,
++ 1, sr__get_subtree_chunk_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtree_chunk_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_subtree_chunk_resp__field_descriptors[2] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_STRING,
++ offsetof(Sr__GetSubtreeChunkResp, n_xpath),
++ offsetof(Sr__GetSubtreeChunkResp, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "chunk",
++ 2,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__GetSubtreeChunkResp, n_chunk),
++ offsetof(Sr__GetSubtreeChunkResp, chunk),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_subtree_chunk_resp__field_indices_by_name[] = {
++ 1, /* field[1] = chunk */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_subtree_chunk_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__get_subtree_chunk_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetSubtreeChunkResp",
++ "GetSubtreeChunkResp",
++ "Sr__GetSubtreeChunkResp",
++ "sr",
++ sizeof(Sr__GetSubtreeChunkResp),
++ 2,
++ sr__get_subtree_chunk_resp__field_descriptors,
++ sr__get_subtree_chunk_resp__field_indices_by_name,
++ 1, sr__get_subtree_chunk_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_subtree_chunk_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__set_item_req__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "value",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemReq, value),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "options",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__set_item_req__field_indices_by_name[] = {
++ 2, /* field[2] = options */
++ 1, /* field[1] = value */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__set_item_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__set_item_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SetItemReq",
++ "SetItemReq",
++ "Sr__SetItemReq",
++ "sr",
++ sizeof(Sr__SetItemReq),
++ 3,
++ sr__set_item_req__field_descriptors,
++ sr__set_item_req__field_indices_by_name,
++ 1, sr__set_item_req__number_ranges,
++ (ProtobufCMessageInit) sr__set_item_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__set_item_resp__field_descriptors NULL
++#define sr__set_item_resp__field_indices_by_name NULL
++#define sr__set_item_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__set_item_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SetItemResp",
++ "SetItemResp",
++ "Sr__SetItemResp",
++ "sr",
++ sizeof(Sr__SetItemResp),
++ 0,
++ sr__set_item_resp__field_descriptors,
++ sr__set_item_resp__field_indices_by_name,
++ 0, sr__set_item_resp__number_ranges,
++ (ProtobufCMessageInit) sr__set_item_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__set_item_str_req__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemStrReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "value",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemStrReq, value),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "options",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SetItemStrReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__set_item_str_req__field_indices_by_name[] = {
++ 2, /* field[2] = options */
++ 1, /* field[1] = value */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__set_item_str_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__set_item_str_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SetItemStrReq",
++ "SetItemStrReq",
++ "Sr__SetItemStrReq",
++ "sr",
++ sizeof(Sr__SetItemStrReq),
++ 3,
++ sr__set_item_str_req__field_descriptors,
++ sr__set_item_str_req__field_indices_by_name,
++ 1, sr__set_item_str_req__number_ranges,
++ (ProtobufCMessageInit) sr__set_item_str_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__set_item_str_resp__field_descriptors NULL
++#define sr__set_item_str_resp__field_indices_by_name NULL
++#define sr__set_item_str_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__set_item_str_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SetItemStrResp",
++ "SetItemStrResp",
++ "Sr__SetItemStrResp",
++ "sr",
++ sizeof(Sr__SetItemStrResp),
++ 0,
++ sr__set_item_str_resp__field_descriptors,
++ sr__set_item_str_resp__field_indices_by_name,
++ 0, sr__set_item_str_resp__number_ranges,
++ (ProtobufCMessageInit) sr__set_item_str_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__delete_item_req__field_descriptors[2] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DeleteItemReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "options",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DeleteItemReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__delete_item_req__field_indices_by_name[] = {
++ 1, /* field[1] = options */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__delete_item_req__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 3, 1 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__delete_item_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DeleteItemReq",
++ "DeleteItemReq",
++ "Sr__DeleteItemReq",
++ "sr",
++ sizeof(Sr__DeleteItemReq),
++ 2,
++ sr__delete_item_req__field_descriptors,
++ sr__delete_item_req__field_indices_by_name,
++ 2, sr__delete_item_req__number_ranges,
++ (ProtobufCMessageInit) sr__delete_item_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__delete_item_resp__field_descriptors NULL
++#define sr__delete_item_resp__field_indices_by_name NULL
++#define sr__delete_item_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__delete_item_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DeleteItemResp",
++ "DeleteItemResp",
++ "Sr__DeleteItemResp",
++ "sr",
++ sizeof(Sr__DeleteItemResp),
++ 0,
++ sr__delete_item_resp__field_descriptors,
++ sr__delete_item_resp__field_indices_by_name,
++ 0, sr__delete_item_resp__number_ranges,
++ (ProtobufCMessageInit) sr__delete_item_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCEnumValue sr__move_item_req__move_position__enum_values_by_number[4] =
++{
++ { "BEFORE", "SR__MOVE_ITEM_REQ__MOVE_POSITION__BEFORE", 1 },
++ { "AFTER", "SR__MOVE_ITEM_REQ__MOVE_POSITION__AFTER", 2 },
++ { "FIRST", "SR__MOVE_ITEM_REQ__MOVE_POSITION__FIRST", 3 },
++ { "LAST", "SR__MOVE_ITEM_REQ__MOVE_POSITION__LAST", 4 },
++};
++static const ProtobufCIntRange sr__move_item_req__move_position__value_ranges[] = {
++{1, 0},{0, 4}
++};
++static const ProtobufCEnumValueIndex sr__move_item_req__move_position__enum_values_by_name[4] =
++{
++ { "AFTER", 1 },
++ { "BEFORE", 0 },
++ { "FIRST", 2 },
++ { "LAST", 3 },
++};
++const ProtobufCEnumDescriptor sr__move_item_req__move_position__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.MoveItemReq.MovePosition",
++ "MovePosition",
++ "Sr__MoveItemReq__MovePosition",
++ "sr",
++ 4,
++ sr__move_item_req__move_position__enum_values_by_number,
++ 4,
++ sr__move_item_req__move_position__enum_values_by_name,
++ 1,
++ sr__move_item_req__move_position__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCFieldDescriptor sr__move_item_req__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__MoveItemReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "position",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__MoveItemReq, position),
++ &sr__move_item_req__move_position__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "relative_item",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__MoveItemReq, relative_item),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__move_item_req__field_indices_by_name[] = {
++ 1, /* field[1] = position */
++ 2, /* field[2] = relative_item */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__move_item_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__move_item_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.MoveItemReq",
++ "MoveItemReq",
++ "Sr__MoveItemReq",
++ "sr",
++ sizeof(Sr__MoveItemReq),
++ 3,
++ sr__move_item_req__field_descriptors,
++ sr__move_item_req__field_indices_by_name,
++ 1, sr__move_item_req__number_ranges,
++ (ProtobufCMessageInit) sr__move_item_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__move_item_resp__field_descriptors NULL
++#define sr__move_item_resp__field_indices_by_name NULL
++#define sr__move_item_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__move_item_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.MoveItemResp",
++ "MoveItemResp",
++ "Sr__MoveItemResp",
++ "sr",
++ sizeof(Sr__MoveItemResp),
++ 0,
++ sr__move_item_resp__field_descriptors,
++ sr__move_item_resp__field_indices_by_name,
++ 0, sr__move_item_resp__number_ranges,
++ (ProtobufCMessageInit) sr__move_item_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__validate_req__field_descriptors NULL
++#define sr__validate_req__field_indices_by_name NULL
++#define sr__validate_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__validate_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ValidateReq",
++ "ValidateReq",
++ "Sr__ValidateReq",
++ "sr",
++ sizeof(Sr__ValidateReq),
++ 0,
++ sr__validate_req__field_descriptors,
++ sr__validate_req__field_indices_by_name,
++ 0, sr__validate_req__number_ranges,
++ (ProtobufCMessageInit) sr__validate_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__validate_resp__field_descriptors[1] =
++{
++ {
++ "errors",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__ValidateResp, n_errors),
++ offsetof(Sr__ValidateResp, errors),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__validate_resp__field_indices_by_name[] = {
++ 0, /* field[0] = errors */
++};
++static const ProtobufCIntRange sr__validate_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__validate_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ValidateResp",
++ "ValidateResp",
++ "Sr__ValidateResp",
++ "sr",
++ sizeof(Sr__ValidateResp),
++ 1,
++ sr__validate_resp__field_descriptors,
++ sr__validate_resp__field_indices_by_name,
++ 1, sr__validate_resp__number_ranges,
++ (ProtobufCMessageInit) sr__validate_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__commit_req__field_descriptors NULL
++#define sr__commit_req__field_indices_by_name NULL
++#define sr__commit_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__commit_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CommitReq",
++ "CommitReq",
++ "Sr__CommitReq",
++ "sr",
++ sizeof(Sr__CommitReq),
++ 0,
++ sr__commit_req__field_descriptors,
++ sr__commit_req__field_indices_by_name,
++ 0, sr__commit_req__number_ranges,
++ (ProtobufCMessageInit) sr__commit_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__commit_resp__field_descriptors[1] =
++{
++ {
++ "errors",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__CommitResp, n_errors),
++ offsetof(Sr__CommitResp, errors),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__commit_resp__field_indices_by_name[] = {
++ 0, /* field[0] = errors */
++};
++static const ProtobufCIntRange sr__commit_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__commit_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CommitResp",
++ "CommitResp",
++ "Sr__CommitResp",
++ "sr",
++ sizeof(Sr__CommitResp),
++ 1,
++ sr__commit_resp__field_descriptors,
++ sr__commit_resp__field_indices_by_name,
++ 1, sr__commit_resp__number_ranges,
++ (ProtobufCMessageInit) sr__commit_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__discard_changes_req__field_descriptors NULL
++#define sr__discard_changes_req__field_indices_by_name NULL
++#define sr__discard_changes_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__discard_changes_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DiscardChangesReq",
++ "DiscardChangesReq",
++ "Sr__DiscardChangesReq",
++ "sr",
++ sizeof(Sr__DiscardChangesReq),
++ 0,
++ sr__discard_changes_req__field_descriptors,
++ sr__discard_changes_req__field_indices_by_name,
++ 0, sr__discard_changes_req__number_ranges,
++ (ProtobufCMessageInit) sr__discard_changes_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__discard_changes_resp__field_descriptors NULL
++#define sr__discard_changes_resp__field_indices_by_name NULL
++#define sr__discard_changes_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__discard_changes_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DiscardChangesResp",
++ "DiscardChangesResp",
++ "Sr__DiscardChangesResp",
++ "sr",
++ sizeof(Sr__DiscardChangesResp),
++ 0,
++ sr__discard_changes_resp__field_descriptors,
++ sr__discard_changes_resp__field_indices_by_name,
++ 0, sr__discard_changes_resp__number_ranges,
++ (ProtobufCMessageInit) sr__discard_changes_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__copy_config_req__field_descriptors[3] =
++{
++ {
++ "src_datastore",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CopyConfigReq, src_datastore),
++ &sr__data_store__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "dst_datastore",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CopyConfigReq, dst_datastore),
++ &sr__data_store__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_name",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CopyConfigReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__copy_config_req__field_indices_by_name[] = {
++ 1, /* field[1] = dst_datastore */
++ 2, /* field[2] = module_name */
++ 0, /* field[0] = src_datastore */
++};
++static const ProtobufCIntRange sr__copy_config_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__copy_config_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CopyConfigReq",
++ "CopyConfigReq",
++ "Sr__CopyConfigReq",
++ "sr",
++ sizeof(Sr__CopyConfigReq),
++ 3,
++ sr__copy_config_req__field_descriptors,
++ sr__copy_config_req__field_indices_by_name,
++ 1, sr__copy_config_req__number_ranges,
++ (ProtobufCMessageInit) sr__copy_config_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__copy_config_resp__field_descriptors[1] =
++{
++ {
++ "errors",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__CopyConfigResp, n_errors),
++ offsetof(Sr__CopyConfigResp, errors),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__copy_config_resp__field_indices_by_name[] = {
++ 0, /* field[0] = errors */
++};
++static const ProtobufCIntRange sr__copy_config_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__copy_config_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CopyConfigResp",
++ "CopyConfigResp",
++ "Sr__CopyConfigResp",
++ "sr",
++ sizeof(Sr__CopyConfigResp),
++ 1,
++ sr__copy_config_resp__field_descriptors,
++ sr__copy_config_resp__field_indices_by_name,
++ 1, sr__copy_config_resp__number_ranges,
++ (ProtobufCMessageInit) sr__copy_config_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__lock_req__field_descriptors[1] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__LockReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__lock_req__field_indices_by_name[] = {
++ 0, /* field[0] = module_name */
++};
++static const ProtobufCIntRange sr__lock_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__lock_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.LockReq",
++ "LockReq",
++ "Sr__LockReq",
++ "sr",
++ sizeof(Sr__LockReq),
++ 1,
++ sr__lock_req__field_descriptors,
++ sr__lock_req__field_indices_by_name,
++ 1, sr__lock_req__number_ranges,
++ (ProtobufCMessageInit) sr__lock_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__lock_resp__field_descriptors NULL
++#define sr__lock_resp__field_indices_by_name NULL
++#define sr__lock_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__lock_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.LockResp",
++ "LockResp",
++ "Sr__LockResp",
++ "sr",
++ sizeof(Sr__LockResp),
++ 0,
++ sr__lock_resp__field_descriptors,
++ sr__lock_resp__field_indices_by_name,
++ 0, sr__lock_resp__number_ranges,
++ (ProtobufCMessageInit) sr__lock_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__unlock_req__field_descriptors[1] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnlockReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__unlock_req__field_indices_by_name[] = {
++ 0, /* field[0] = module_name */
++};
++static const ProtobufCIntRange sr__unlock_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__unlock_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.UnlockReq",
++ "UnlockReq",
++ "Sr__UnlockReq",
++ "sr",
++ sizeof(Sr__UnlockReq),
++ 1,
++ sr__unlock_req__field_descriptors,
++ sr__unlock_req__field_indices_by_name,
++ 1, sr__unlock_req__number_ranges,
++ (ProtobufCMessageInit) sr__unlock_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__unlock_resp__field_descriptors NULL
++#define sr__unlock_resp__field_indices_by_name NULL
++#define sr__unlock_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__unlock_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.UnlockResp",
++ "UnlockResp",
++ "Sr__UnlockResp",
++ "sr",
++ sizeof(Sr__UnlockResp),
++ 0,
++ sr__unlock_resp__field_descriptors,
++ sr__unlock_resp__field_indices_by_name,
++ 0, sr__unlock_resp__number_ranges,
++ (ProtobufCMessageInit) sr__unlock_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__subscribe_req__field_descriptors[10] =
++{
++ {
++ "type",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, type),
++ &sr__subscription_type__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "destination",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, destination),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_name",
++ 4,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 5,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "notif_event",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_ENUM,
++ offsetof(Sr__SubscribeReq, has_notif_event),
++ offsetof(Sr__SubscribeReq, notif_event),
++ &sr__notification_event__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "priority",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__SubscribeReq, has_priority),
++ offsetof(Sr__SubscribeReq, priority),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enable_running",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_BOOL,
++ offsetof(Sr__SubscribeReq, has_enable_running),
++ offsetof(Sr__SubscribeReq, enable_running),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enable_event",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_BOOL,
++ offsetof(Sr__SubscribeReq, has_enable_event),
++ offsetof(Sr__SubscribeReq, enable_event),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "api_variant",
++ 20,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubscribeReq, api_variant),
++ &sr__api_variant__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__subscribe_req__field_indices_by_name[] = {
++ 9, /* field[9] = api_variant */
++ 1, /* field[1] = destination */
++ 8, /* field[8] = enable_event */
++ 7, /* field[7] = enable_running */
++ 3, /* field[3] = module_name */
++ 5, /* field[5] = notif_event */
++ 6, /* field[6] = priority */
++ 2, /* field[2] = subscription_id */
++ 0, /* field[0] = type */
++ 4, /* field[4] = xpath */
++};
++static const ProtobufCIntRange sr__subscribe_req__number_ranges[3 + 1] =
++{
++ { 1, 0 },
++ { 10, 5 },
++ { 20, 9 },
++ { 0, 10 }
++};
++const ProtobufCMessageDescriptor sr__subscribe_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SubscribeReq",
++ "SubscribeReq",
++ "Sr__SubscribeReq",
++ "sr",
++ sizeof(Sr__SubscribeReq),
++ 10,
++ sr__subscribe_req__field_descriptors,
++ sr__subscribe_req__field_indices_by_name,
++ 3, sr__subscribe_req__number_ranges,
++ (ProtobufCMessageInit) sr__subscribe_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__subscribe_resp__field_descriptors NULL
++#define sr__subscribe_resp__field_indices_by_name NULL
++#define sr__subscribe_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__subscribe_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SubscribeResp",
++ "SubscribeResp",
++ "Sr__SubscribeResp",
++ "sr",
++ sizeof(Sr__SubscribeResp),
++ 0,
++ sr__subscribe_resp__field_descriptors,
++ sr__subscribe_resp__field_indices_by_name,
++ 0, sr__subscribe_resp__number_ranges,
++ (ProtobufCMessageInit) sr__subscribe_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__unsubscribe_req__field_descriptors[4] =
++{
++ {
++ "type",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnsubscribeReq, type),
++ &sr__subscription_type__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "destination",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnsubscribeReq, destination),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnsubscribeReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_name",
++ 4,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnsubscribeReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__unsubscribe_req__field_indices_by_name[] = {
++ 1, /* field[1] = destination */
++ 3, /* field[3] = module_name */
++ 2, /* field[2] = subscription_id */
++ 0, /* field[0] = type */
++};
++static const ProtobufCIntRange sr__unsubscribe_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 4 }
++};
++const ProtobufCMessageDescriptor sr__unsubscribe_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.UnsubscribeReq",
++ "UnsubscribeReq",
++ "Sr__UnsubscribeReq",
++ "sr",
++ sizeof(Sr__UnsubscribeReq),
++ 4,
++ sr__unsubscribe_req__field_descriptors,
++ sr__unsubscribe_req__field_indices_by_name,
++ 1, sr__unsubscribe_req__number_ranges,
++ (ProtobufCMessageInit) sr__unsubscribe_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__unsubscribe_resp__field_descriptors NULL
++#define sr__unsubscribe_resp__field_indices_by_name NULL
++#define sr__unsubscribe_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__unsubscribe_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.UnsubscribeResp",
++ "UnsubscribeResp",
++ "Sr__UnsubscribeResp",
++ "sr",
++ sizeof(Sr__UnsubscribeResp),
++ 0,
++ sr__unsubscribe_resp__field_descriptors,
++ sr__unsubscribe_resp__field_indices_by_name,
++ 0, sr__unsubscribe_resp__number_ranges,
++ (ProtobufCMessageInit) sr__unsubscribe_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__check_enabled_running_req__field_descriptors[1] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CheckEnabledRunningReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__check_enabled_running_req__field_indices_by_name[] = {
++ 0, /* field[0] = module_name */
++};
++static const ProtobufCIntRange sr__check_enabled_running_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__check_enabled_running_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CheckEnabledRunningReq",
++ "CheckEnabledRunningReq",
++ "Sr__CheckEnabledRunningReq",
++ "sr",
++ sizeof(Sr__CheckEnabledRunningReq),
++ 1,
++ sr__check_enabled_running_req__field_descriptors,
++ sr__check_enabled_running_req__field_indices_by_name,
++ 1, sr__check_enabled_running_req__number_ranges,
++ (ProtobufCMessageInit) sr__check_enabled_running_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__check_enabled_running_resp__field_descriptors[1] =
++{
++ {
++ "enabled",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CheckEnabledRunningResp, enabled),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__check_enabled_running_resp__field_indices_by_name[] = {
++ 0, /* field[0] = enabled */
++};
++static const ProtobufCIntRange sr__check_enabled_running_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__check_enabled_running_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CheckEnabledRunningResp",
++ "CheckEnabledRunningResp",
++ "Sr__CheckEnabledRunningResp",
++ "sr",
++ sizeof(Sr__CheckEnabledRunningResp),
++ 1,
++ sr__check_enabled_running_resp__field_descriptors,
++ sr__check_enabled_running_resp__field_indices_by_name,
++ 1, sr__check_enabled_running_resp__number_ranges,
++ (ProtobufCMessageInit) sr__check_enabled_running_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__module_install_notification__field_descriptors[3] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallNotification, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "revision",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallNotification, revision),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "state",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallNotification, state),
++ &sr__module_state__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__module_install_notification__field_indices_by_name[] = {
++ 0, /* field[0] = module_name */
++ 1, /* field[1] = revision */
++ 2, /* field[2] = state */
++};
++static const ProtobufCIntRange sr__module_install_notification__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__module_install_notification__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ModuleInstallNotification",
++ "ModuleInstallNotification",
++ "Sr__ModuleInstallNotification",
++ "sr",
++ sizeof(Sr__ModuleInstallNotification),
++ 3,
++ sr__module_install_notification__field_descriptors,
++ sr__module_install_notification__field_indices_by_name,
++ 1, sr__module_install_notification__number_ranges,
++ (ProtobufCMessageInit) sr__module_install_notification__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__feature_enable_notification__field_descriptors[3] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableNotification, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "feature_name",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableNotification, feature_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enabled",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableNotification, enabled),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__feature_enable_notification__field_indices_by_name[] = {
++ 2, /* field[2] = enabled */
++ 1, /* field[1] = feature_name */
++ 0, /* field[0] = module_name */
++};
++static const ProtobufCIntRange sr__feature_enable_notification__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__feature_enable_notification__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.FeatureEnableNotification",
++ "FeatureEnableNotification",
++ "Sr__FeatureEnableNotification",
++ "sr",
++ sizeof(Sr__FeatureEnableNotification),
++ 3,
++ sr__feature_enable_notification__field_descriptors,
++ sr__feature_enable_notification__field_indices_by_name,
++ 1, sr__feature_enable_notification__number_ranges,
++ (ProtobufCMessageInit) sr__feature_enable_notification__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__module_change_notification__field_descriptors[2] =
++{
++ {
++ "event",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleChangeNotification, event),
++ &sr__notification_event__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_name",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleChangeNotification, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__module_change_notification__field_indices_by_name[] = {
++ 0, /* field[0] = event */
++ 1, /* field[1] = module_name */
++};
++static const ProtobufCIntRange sr__module_change_notification__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__module_change_notification__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ModuleChangeNotification",
++ "ModuleChangeNotification",
++ "Sr__ModuleChangeNotification",
++ "sr",
++ sizeof(Sr__ModuleChangeNotification),
++ 2,
++ sr__module_change_notification__field_descriptors,
++ sr__module_change_notification__field_indices_by_name,
++ 1, sr__module_change_notification__number_ranges,
++ (ProtobufCMessageInit) sr__module_change_notification__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__subtree_change_notification__field_descriptors[2] =
++{
++ {
++ "event",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubtreeChangeNotification, event),
++ &sr__notification_event__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__SubtreeChangeNotification, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__subtree_change_notification__field_indices_by_name[] = {
++ 0, /* field[0] = event */
++ 1, /* field[1] = xpath */
++};
++static const ProtobufCIntRange sr__subtree_change_notification__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__subtree_change_notification__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.SubtreeChangeNotification",
++ "SubtreeChangeNotification",
++ "Sr__SubtreeChangeNotification",
++ "sr",
++ sizeof(Sr__SubtreeChangeNotification),
++ 2,
++ sr__subtree_change_notification__field_descriptors,
++ sr__subtree_change_notification__field_indices_by_name,
++ 1, sr__subtree_change_notification__number_ranges,
++ (ProtobufCMessageInit) sr__subtree_change_notification__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__change__field_descriptors[3] =
++{
++ {
++ "changeOperation",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Change, changeoperation),
++ &sr__change_operation__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "new_value",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Change, new_value),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "old_value",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Change, old_value),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__change__field_indices_by_name[] = {
++ 0, /* field[0] = changeOperation */
++ 1, /* field[1] = new_value */
++ 2, /* field[2] = old_value */
++};
++static const ProtobufCIntRange sr__change__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__change__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Change",
++ "Change",
++ "Sr__Change",
++ "sr",
++ sizeof(Sr__Change),
++ 3,
++ sr__change__field_descriptors,
++ sr__change__field_indices_by_name,
++ 1, sr__change__number_ranges,
++ (ProtobufCMessageInit) sr__change__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_changes_req__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetChangesReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "limit",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetChangesReq, limit),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "offset",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__GetChangesReq, offset),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_changes_req__field_indices_by_name[] = {
++ 1, /* field[1] = limit */
++ 2, /* field[2] = offset */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__get_changes_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__get_changes_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetChangesReq",
++ "GetChangesReq",
++ "Sr__GetChangesReq",
++ "sr",
++ sizeof(Sr__GetChangesReq),
++ 3,
++ sr__get_changes_req__field_descriptors,
++ sr__get_changes_req__field_indices_by_name,
++ 1, sr__get_changes_req__number_ranges,
++ (ProtobufCMessageInit) sr__get_changes_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__get_changes_resp__field_descriptors[1] =
++{
++ {
++ "changes",
++ 1,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__GetChangesResp, n_changes),
++ offsetof(Sr__GetChangesResp, changes),
++ &sr__change__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__get_changes_resp__field_indices_by_name[] = {
++ 0, /* field[0] = changes */
++};
++static const ProtobufCIntRange sr__get_changes_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__get_changes_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.GetChangesResp",
++ "GetChangesResp",
++ "Sr__GetChangesResp",
++ "sr",
++ sizeof(Sr__GetChangesResp),
++ 1,
++ sr__get_changes_resp__field_descriptors,
++ sr__get_changes_resp__field_indices_by_name,
++ 1, sr__get_changes_resp__number_ranges,
++ (ProtobufCMessageInit) sr__get_changes_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__check_exec_perm_req__field_descriptors[1] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CheckExecPermReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__check_exec_perm_req__field_indices_by_name[] = {
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__check_exec_perm_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__check_exec_perm_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CheckExecPermReq",
++ "CheckExecPermReq",
++ "Sr__CheckExecPermReq",
++ "sr",
++ sizeof(Sr__CheckExecPermReq),
++ 1,
++ sr__check_exec_perm_req__field_descriptors,
++ sr__check_exec_perm_req__field_indices_by_name,
++ 1, sr__check_exec_perm_req__number_ranges,
++ (ProtobufCMessageInit) sr__check_exec_perm_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__check_exec_perm_resp__field_descriptors[1] =
++{
++ {
++ "permitted",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CheckExecPermResp, permitted),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__check_exec_perm_resp__field_indices_by_name[] = {
++ 0, /* field[0] = permitted */
++};
++static const ProtobufCIntRange sr__check_exec_perm_resp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__check_exec_perm_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CheckExecPermResp",
++ "CheckExecPermResp",
++ "Sr__CheckExecPermResp",
++ "sr",
++ sizeof(Sr__CheckExecPermResp),
++ 1,
++ sr__check_exec_perm_resp__field_descriptors,
++ sr__check_exec_perm_resp__field_indices_by_name,
++ 1, sr__check_exec_perm_resp__number_ranges,
++ (ProtobufCMessageInit) sr__check_exec_perm_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__rpcreq__field_descriptors[7] =
++{
++ {
++ "action",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCReq, action),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "orig_api_variant",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCReq, orig_api_variant),
++ &sr__api_variant__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "input",
++ 4,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__RPCReq, n_input),
++ offsetof(Sr__RPCReq, input),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "input_tree",
++ 5,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__RPCReq, n_input_tree),
++ offsetof(Sr__RPCReq, input_tree),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscriber_address",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCReq, subscriber_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__RPCReq, has_subscription_id),
++ offsetof(Sr__RPCReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__rpcreq__field_indices_by_name[] = {
++ 0, /* field[0] = action */
++ 3, /* field[3] = input */
++ 4, /* field[4] = input_tree */
++ 2, /* field[2] = orig_api_variant */
++ 5, /* field[5] = subscriber_address */
++ 6, /* field[6] = subscription_id */
++ 1, /* field[1] = xpath */
++};
++static const ProtobufCIntRange sr__rpcreq__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 5 },
++ { 0, 7 }
++};
++const ProtobufCMessageDescriptor sr__rpcreq__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.RPCReq",
++ "RPCReq",
++ "Sr__RPCReq",
++ "sr",
++ sizeof(Sr__RPCReq),
++ 7,
++ sr__rpcreq__field_descriptors,
++ sr__rpcreq__field_indices_by_name,
++ 2, sr__rpcreq__number_ranges,
++ (ProtobufCMessageInit) sr__rpcreq__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__rpcresp__field_descriptors[5] =
++{
++ {
++ "action",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCResp, action),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCResp, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "orig_api_variant",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__RPCResp, orig_api_variant),
++ &sr__api_variant__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "output",
++ 4,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__RPCResp, n_output),
++ offsetof(Sr__RPCResp, output),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "output_tree",
++ 5,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__RPCResp, n_output_tree),
++ offsetof(Sr__RPCResp, output_tree),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__rpcresp__field_indices_by_name[] = {
++ 0, /* field[0] = action */
++ 2, /* field[2] = orig_api_variant */
++ 3, /* field[3] = output */
++ 4, /* field[4] = output_tree */
++ 1, /* field[1] = xpath */
++};
++static const ProtobufCIntRange sr__rpcresp__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 5 }
++};
++const ProtobufCMessageDescriptor sr__rpcresp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.RPCResp",
++ "RPCResp",
++ "Sr__RPCResp",
++ "sr",
++ sizeof(Sr__RPCResp),
++ 5,
++ sr__rpcresp__field_descriptors,
++ sr__rpcresp__field_indices_by_name,
++ 1, sr__rpcresp__number_ranges,
++ (ProtobufCMessageInit) sr__rpcresp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCEnumValue sr__event_notif_req__notif_type__enum_values_by_number[4] =
++{
++ { "REALTIME", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REALTIME", 1 },
++ { "REPLAY", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY", 2 },
++ { "REPLAY_COMPLETE", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_COMPLETE", 3 },
++ { "REPLAY_STOP", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_STOP", 4 },
++};
++static const ProtobufCIntRange sr__event_notif_req__notif_type__value_ranges[] = {
++{1, 0},{0, 4}
++};
++static const ProtobufCEnumValueIndex sr__event_notif_req__notif_type__enum_values_by_name[4] =
++{
++ { "REALTIME", 0 },
++ { "REPLAY", 1 },
++ { "REPLAY_COMPLETE", 2 },
++ { "REPLAY_STOP", 3 },
++};
++const ProtobufCEnumDescriptor sr__event_notif_req__notif_type__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.EventNotifReq.NotifType",
++ "NotifType",
++ "Sr__EventNotifReq__NotifType",
++ "sr",
++ 4,
++ sr__event_notif_req__notif_type__enum_values_by_number,
++ 4,
++ sr__event_notif_req__notif_type__enum_values_by_name,
++ 1,
++ sr__event_notif_req__notif_type__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__event_notif_req__notif_flags__enum_values_by_number[2] =
++{
++ { "DEFAULT", "SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__DEFAULT", 0 },
++ { "EPHEMERAL", "SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__EPHEMERAL", 1 },
++};
++static const ProtobufCIntRange sr__event_notif_req__notif_flags__value_ranges[] = {
++{0, 0},{0, 2}
++};
++static const ProtobufCEnumValueIndex sr__event_notif_req__notif_flags__enum_values_by_name[2] =
++{
++ { "DEFAULT", 0 },
++ { "EPHEMERAL", 1 },
++};
++const ProtobufCEnumDescriptor sr__event_notif_req__notif_flags__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.EventNotifReq.NotifFlags",
++ "NotifFlags",
++ "Sr__EventNotifReq__NotifFlags",
++ "sr",
++ 2,
++ sr__event_notif_req__notif_flags__enum_values_by_number,
++ 2,
++ sr__event_notif_req__notif_flags__enum_values_by_name,
++ 1,
++ sr__event_notif_req__notif_flags__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCFieldDescriptor sr__event_notif_req__field_descriptors[9] =
++{
++ {
++ "type",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, type),
++ &sr__event_notif_req__notif_type__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "options",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, options),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "values",
++ 4,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__EventNotifReq, n_values),
++ offsetof(Sr__EventNotifReq, values),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "trees",
++ 5,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__EventNotifReq, n_trees),
++ offsetof(Sr__EventNotifReq, trees),
++ &sr__node__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "timestamp",
++ 6,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, timestamp),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscriber_address",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, subscriber_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__EventNotifReq, has_subscription_id),
++ offsetof(Sr__EventNotifReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "do_not_send_reply",
++ 20,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReq, do_not_send_reply),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__event_notif_req__field_indices_by_name[] = {
++ 8, /* field[8] = do_not_send_reply */
++ 1, /* field[1] = options */
++ 6, /* field[6] = subscriber_address */
++ 7, /* field[7] = subscription_id */
++ 5, /* field[5] = timestamp */
++ 4, /* field[4] = trees */
++ 0, /* field[0] = type */
++ 3, /* field[3] = values */
++ 2, /* field[2] = xpath */
++};
++static const ProtobufCIntRange sr__event_notif_req__number_ranges[3 + 1] =
++{
++ { 1, 0 },
++ { 10, 6 },
++ { 20, 8 },
++ { 0, 9 }
++};
++const ProtobufCMessageDescriptor sr__event_notif_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.EventNotifReq",
++ "EventNotifReq",
++ "Sr__EventNotifReq",
++ "sr",
++ sizeof(Sr__EventNotifReq),
++ 9,
++ sr__event_notif_req__field_descriptors,
++ sr__event_notif_req__field_indices_by_name,
++ 3, sr__event_notif_req__number_ranges,
++ (ProtobufCMessageInit) sr__event_notif_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__event_notif_resp__field_descriptors NULL
++#define sr__event_notif_resp__field_indices_by_name NULL
++#define sr__event_notif_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__event_notif_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.EventNotifResp",
++ "EventNotifResp",
++ "Sr__EventNotifResp",
++ "sr",
++ sizeof(Sr__EventNotifResp),
++ 0,
++ sr__event_notif_resp__field_descriptors,
++ sr__event_notif_resp__field_indices_by_name,
++ 0, sr__event_notif_resp__number_ranges,
++ (ProtobufCMessageInit) sr__event_notif_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__event_notif_replay_req__field_descriptors[6] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "start_time",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, start_time),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "stop_time",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, stop_time),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscriber_address",
++ 10,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, subscriber_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 11,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "api_variant",
++ 12,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__EventNotifReplayReq, api_variant),
++ &sr__api_variant__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__event_notif_replay_req__field_indices_by_name[] = {
++ 5, /* field[5] = api_variant */
++ 1, /* field[1] = start_time */
++ 2, /* field[2] = stop_time */
++ 3, /* field[3] = subscriber_address */
++ 4, /* field[4] = subscription_id */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__event_notif_replay_req__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 3 },
++ { 0, 6 }
++};
++const ProtobufCMessageDescriptor sr__event_notif_replay_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.EventNotifReplayReq",
++ "EventNotifReplayReq",
++ "Sr__EventNotifReplayReq",
++ "sr",
++ sizeof(Sr__EventNotifReplayReq),
++ 6,
++ sr__event_notif_replay_req__field_descriptors,
++ sr__event_notif_replay_req__field_indices_by_name,
++ 2, sr__event_notif_replay_req__number_ranges,
++ (ProtobufCMessageInit) sr__event_notif_replay_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__event_notif_replay_resp__field_descriptors NULL
++#define sr__event_notif_replay_resp__field_indices_by_name NULL
++#define sr__event_notif_replay_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__event_notif_replay_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.EventNotifReplayResp",
++ "EventNotifReplayResp",
++ "Sr__EventNotifReplayResp",
++ "sr",
++ sizeof(Sr__EventNotifReplayResp),
++ 0,
++ sr__event_notif_replay_resp__field_descriptors,
++ sr__event_notif_replay_resp__field_indices_by_name,
++ 0, sr__event_notif_replay_resp__number_ranges,
++ (ProtobufCMessageInit) sr__event_notif_replay_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__data_provide_req__field_descriptors[4] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscriber_address",
++ 10,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideReq, subscriber_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 11,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideReq, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "request_id",
++ 20,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideReq, request_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__data_provide_req__field_indices_by_name[] = {
++ 3, /* field[3] = request_id */
++ 1, /* field[1] = subscriber_address */
++ 2, /* field[2] = subscription_id */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__data_provide_req__number_ranges[3 + 1] =
++{
++ { 1, 0 },
++ { 10, 1 },
++ { 20, 3 },
++ { 0, 4 }
++};
++const ProtobufCMessageDescriptor sr__data_provide_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DataProvideReq",
++ "DataProvideReq",
++ "Sr__DataProvideReq",
++ "sr",
++ sizeof(Sr__DataProvideReq),
++ 4,
++ sr__data_provide_req__field_descriptors,
++ sr__data_provide_req__field_indices_by_name,
++ 3, sr__data_provide_req__number_ranges,
++ (ProtobufCMessageInit) sr__data_provide_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__data_provide_resp__field_descriptors[3] =
++{
++ {
++ "xpath",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideResp, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "values",
++ 2,
++ PROTOBUF_C_LABEL_REPEATED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ offsetof(Sr__DataProvideResp, n_values),
++ offsetof(Sr__DataProvideResp, values),
++ &sr__value__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "request_id",
++ 10,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DataProvideResp, request_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__data_provide_resp__field_indices_by_name[] = {
++ 2, /* field[2] = request_id */
++ 1, /* field[1] = values */
++ 0, /* field[0] = xpath */
++};
++static const ProtobufCIntRange sr__data_provide_resp__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 2 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__data_provide_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DataProvideResp",
++ "DataProvideResp",
++ "Sr__DataProvideResp",
++ "sr",
++ sizeof(Sr__DataProvideResp),
++ 3,
++ sr__data_provide_resp__field_descriptors,
++ sr__data_provide_resp__field_indices_by_name,
++ 2, sr__data_provide_resp__number_ranges,
++ (ProtobufCMessageInit) sr__data_provide_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__module_install_req__field_descriptors[4] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "revision",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallReq, revision),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "file_name",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallReq, file_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "installed",
++ 4,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__ModuleInstallReq, installed),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__module_install_req__field_indices_by_name[] = {
++ 2, /* field[2] = file_name */
++ 3, /* field[3] = installed */
++ 0, /* field[0] = module_name */
++ 1, /* field[1] = revision */
++};
++static const ProtobufCIntRange sr__module_install_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 4 }
++};
++const ProtobufCMessageDescriptor sr__module_install_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ModuleInstallReq",
++ "ModuleInstallReq",
++ "Sr__ModuleInstallReq",
++ "sr",
++ sizeof(Sr__ModuleInstallReq),
++ 4,
++ sr__module_install_req__field_descriptors,
++ sr__module_install_req__field_indices_by_name,
++ 1, sr__module_install_req__number_ranges,
++ (ProtobufCMessageInit) sr__module_install_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__module_install_resp__field_descriptors NULL
++#define sr__module_install_resp__field_indices_by_name NULL
++#define sr__module_install_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__module_install_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.ModuleInstallResp",
++ "ModuleInstallResp",
++ "Sr__ModuleInstallResp",
++ "sr",
++ sizeof(Sr__ModuleInstallResp),
++ 0,
++ sr__module_install_resp__field_descriptors,
++ sr__module_install_resp__field_indices_by_name,
++ 0, sr__module_install_resp__number_ranges,
++ (ProtobufCMessageInit) sr__module_install_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__feature_enable_req__field_descriptors[3] =
++{
++ {
++ "module_name",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableReq, module_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "feature_name",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableReq, feature_name),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "enabled",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__FeatureEnableReq, enabled),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__feature_enable_req__field_indices_by_name[] = {
++ 2, /* field[2] = enabled */
++ 1, /* field[1] = feature_name */
++ 0, /* field[0] = module_name */
++};
++static const ProtobufCIntRange sr__feature_enable_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 3 }
++};
++const ProtobufCMessageDescriptor sr__feature_enable_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.FeatureEnableReq",
++ "FeatureEnableReq",
++ "Sr__FeatureEnableReq",
++ "sr",
++ sizeof(Sr__FeatureEnableReq),
++ 3,
++ sr__feature_enable_req__field_descriptors,
++ sr__feature_enable_req__field_indices_by_name,
++ 1, sr__feature_enable_req__number_ranges,
++ (ProtobufCMessageInit) sr__feature_enable_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__feature_enable_resp__field_descriptors NULL
++#define sr__feature_enable_resp__field_indices_by_name NULL
++#define sr__feature_enable_resp__number_ranges NULL
++const ProtobufCMessageDescriptor sr__feature_enable_resp__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.FeatureEnableResp",
++ "FeatureEnableResp",
++ "Sr__FeatureEnableResp",
++ "sr",
++ sizeof(Sr__FeatureEnableResp),
++ 0,
++ sr__feature_enable_resp__field_descriptors,
++ sr__feature_enable_resp__field_indices_by_name,
++ 0, sr__feature_enable_resp__number_ranges,
++ (ProtobufCMessageInit) sr__feature_enable_resp__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__unsubscribe_destination_req__field_descriptors[1] =
++{
++ {
++ "destination",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__UnsubscribeDestinationReq, destination),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__unsubscribe_destination_req__field_indices_by_name[] = {
++ 0, /* field[0] = destination */
++};
++static const ProtobufCIntRange sr__unsubscribe_destination_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__unsubscribe_destination_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.UnsubscribeDestinationReq",
++ "UnsubscribeDestinationReq",
++ "Sr__UnsubscribeDestinationReq",
++ "sr",
++ sizeof(Sr__UnsubscribeDestinationReq),
++ 1,
++ sr__unsubscribe_destination_req__field_descriptors,
++ sr__unsubscribe_destination_req__field_indices_by_name,
++ 1, sr__unsubscribe_destination_req__number_ranges,
++ (ProtobufCMessageInit) sr__unsubscribe_destination_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__commit_timeout_req__field_descriptors[2] =
++{
++ {
++ "commit_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CommitTimeoutReq, commit_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "expired",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__CommitTimeoutReq, expired),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__commit_timeout_req__field_indices_by_name[] = {
++ 0, /* field[0] = commit_id */
++ 1, /* field[1] = expired */
++};
++static const ProtobufCIntRange sr__commit_timeout_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__commit_timeout_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.CommitTimeoutReq",
++ "CommitTimeoutReq",
++ "Sr__CommitTimeoutReq",
++ "sr",
++ sizeof(Sr__CommitTimeoutReq),
++ 2,
++ sr__commit_timeout_req__field_descriptors,
++ sr__commit_timeout_req__field_indices_by_name,
++ 1, sr__commit_timeout_req__number_ranges,
++ (ProtobufCMessageInit) sr__commit_timeout_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__oper_data_timeout_req__field_descriptors[1] =
++{
++ {
++ "request_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__OperDataTimeoutReq, request_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__oper_data_timeout_req__field_indices_by_name[] = {
++ 0, /* field[0] = request_id */
++};
++static const ProtobufCIntRange sr__oper_data_timeout_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__oper_data_timeout_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.OperDataTimeoutReq",
++ "OperDataTimeoutReq",
++ "Sr__OperDataTimeoutReq",
++ "sr",
++ sizeof(Sr__OperDataTimeoutReq),
++ 1,
++ sr__oper_data_timeout_req__field_descriptors,
++ sr__oper_data_timeout_req__field_indices_by_name,
++ 1, sr__oper_data_timeout_req__number_ranges,
++ (ProtobufCMessageInit) sr__oper_data_timeout_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__internal_state_data_req__field_descriptors[2] =
++{
++ {
++ "request_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalStateDataReq, request_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "xpath",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalStateDataReq, xpath),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__internal_state_data_req__field_indices_by_name[] = {
++ 0, /* field[0] = request_id */
++ 1, /* field[1] = xpath */
++};
++static const ProtobufCIntRange sr__internal_state_data_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 2 }
++};
++const ProtobufCMessageDescriptor sr__internal_state_data_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.InternalStateDataReq",
++ "InternalStateDataReq",
++ "Sr__InternalStateDataReq",
++ "sr",
++ sizeof(Sr__InternalStateDataReq),
++ 2,
++ sr__internal_state_data_req__field_descriptors,
++ sr__internal_state_data_req__field_indices_by_name,
++ 1, sr__internal_state_data_req__number_ranges,
++ (ProtobufCMessageInit) sr__internal_state_data_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__notif_store_cleanup_req__field_descriptors NULL
++#define sr__notif_store_cleanup_req__field_indices_by_name NULL
++#define sr__notif_store_cleanup_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__notif_store_cleanup_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.NotifStoreCleanupReq",
++ "NotifStoreCleanupReq",
++ "Sr__NotifStoreCleanupReq",
++ "sr",
++ sizeof(Sr__NotifStoreCleanupReq),
++ 0,
++ sr__notif_store_cleanup_req__field_descriptors,
++ sr__notif_store_cleanup_req__field_indices_by_name,
++ 0, sr__notif_store_cleanup_req__number_ranges,
++ (ProtobufCMessageInit) sr__notif_store_cleanup_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__delayed_msg_req__field_descriptors[1] =
++{
++ {
++ "message",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__DelayedMsgReq, message),
++ &sr__msg__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__delayed_msg_req__field_indices_by_name[] = {
++ 0, /* field[0] = message */
++};
++static const ProtobufCIntRange sr__delayed_msg_req__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 1 }
++};
++const ProtobufCMessageDescriptor sr__delayed_msg_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.DelayedMsgReq",
++ "DelayedMsgReq",
++ "Sr__DelayedMsgReq",
++ "sr",
++ sizeof(Sr__DelayedMsgReq),
++ 1,
++ sr__delayed_msg_req__field_descriptors,
++ sr__delayed_msg_req__field_indices_by_name,
++ 1, sr__delayed_msg_req__number_ranges,
++ (ProtobufCMessageInit) sr__delayed_msg_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++#define sr__nacm_reload_req__field_descriptors NULL
++#define sr__nacm_reload_req__field_indices_by_name NULL
++#define sr__nacm_reload_req__number_ranges NULL
++const ProtobufCMessageDescriptor sr__nacm_reload_req__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.NacmReloadReq",
++ "NacmReloadReq",
++ "Sr__NacmReloadReq",
++ "sr",
++ sizeof(Sr__NacmReloadReq),
++ 0,
++ sr__nacm_reload_req__field_descriptors,
++ sr__nacm_reload_req__field_indices_by_name,
++ 0, sr__nacm_reload_req__number_ranges,
++ (ProtobufCMessageInit) sr__nacm_reload_req__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__request__field_descriptors[37] =
++{
++ {
++ "_id",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, _id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "operation",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, operation),
++ &sr__operation__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_start_req",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_start_req),
++ &sr__session_start_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_stop_req",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_stop_req),
++ &sr__session_stop_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_refresh_req",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_refresh_req),
++ &sr__session_refresh_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_check_req",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_check_req),
++ &sr__session_check_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_switch_ds_req",
++ 14,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_switch_ds_req),
++ &sr__session_switch_ds_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_set_opts_req",
++ 15,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, session_set_opts_req),
++ &sr__session_set_opts_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "version_verify_req",
++ 16,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, version_verify_req),
++ &sr__version_verify_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "list_schemas_req",
++ 20,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, list_schemas_req),
++ &sr__list_schemas_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_schema_req",
++ 21,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_schema_req),
++ &sr__get_schema_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_install_req",
++ 22,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, module_install_req),
++ &sr__module_install_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "feature_enable_req",
++ 23,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, feature_enable_req),
++ &sr__feature_enable_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_item_req",
++ 30,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_item_req),
++ &sr__get_item_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_items_req",
++ 31,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_items_req),
++ &sr__get_items_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtree_req",
++ 32,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_subtree_req),
++ &sr__get_subtree_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtrees_req",
++ 33,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_subtrees_req),
++ &sr__get_subtrees_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtree_chunk_req",
++ 34,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_subtree_chunk_req),
++ &sr__get_subtree_chunk_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "set_item_req",
++ 40,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, set_item_req),
++ &sr__set_item_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "delete_item_req",
++ 41,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, delete_item_req),
++ &sr__delete_item_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "move_item_req",
++ 42,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, move_item_req),
++ &sr__move_item_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "set_item_str_req",
++ 43,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, set_item_str_req),
++ &sr__set_item_str_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "validate_req",
++ 50,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, validate_req),
++ &sr__validate_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "commit_req",
++ 51,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, commit_req),
++ &sr__commit_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "discard_changes_req",
++ 52,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, discard_changes_req),
++ &sr__discard_changes_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "copy_config_req",
++ 53,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, copy_config_req),
++ &sr__copy_config_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "lock_req",
++ 60,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, lock_req),
++ &sr__lock_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "unlock_req",
++ 61,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, unlock_req),
++ &sr__unlock_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscribe_req",
++ 70,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, subscribe_req),
++ &sr__subscribe_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "unsubscribe_req",
++ 71,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, unsubscribe_req),
++ &sr__unsubscribe_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "check_enabled_running_req",
++ 72,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, check_enabled_running_req),
++ &sr__check_enabled_running_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_changes_req",
++ 73,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, get_changes_req),
++ &sr__get_changes_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "data_provide_req",
++ 80,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, data_provide_req),
++ &sr__data_provide_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "check_exec_perm_req",
++ 81,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, check_exec_perm_req),
++ &sr__check_exec_perm_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "rpc_req",
++ 82,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, rpc_req),
++ &sr__rpcreq__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "event_notif_req",
++ 83,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, event_notif_req),
++ &sr__event_notif_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "event_notif_replay_req",
++ 84,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Request, event_notif_replay_req),
++ &sr__event_notif_replay_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__request__field_indices_by_name[] = {
++ 0, /* field[0] = _id */
++ 30, /* field[30] = check_enabled_running_req */
++ 33, /* field[33] = check_exec_perm_req */
++ 23, /* field[23] = commit_req */
++ 25, /* field[25] = copy_config_req */
++ 32, /* field[32] = data_provide_req */
++ 19, /* field[19] = delete_item_req */
++ 24, /* field[24] = discard_changes_req */
++ 36, /* field[36] = event_notif_replay_req */
++ 35, /* field[35] = event_notif_req */
++ 12, /* field[12] = feature_enable_req */
++ 31, /* field[31] = get_changes_req */
++ 13, /* field[13] = get_item_req */
++ 14, /* field[14] = get_items_req */
++ 10, /* field[10] = get_schema_req */
++ 17, /* field[17] = get_subtree_chunk_req */
++ 15, /* field[15] = get_subtree_req */
++ 16, /* field[16] = get_subtrees_req */
++ 9, /* field[9] = list_schemas_req */
++ 26, /* field[26] = lock_req */
++ 11, /* field[11] = module_install_req */
++ 20, /* field[20] = move_item_req */
++ 1, /* field[1] = operation */
++ 34, /* field[34] = rpc_req */
++ 5, /* field[5] = session_check_req */
++ 4, /* field[4] = session_refresh_req */
++ 7, /* field[7] = session_set_opts_req */
++ 2, /* field[2] = session_start_req */
++ 3, /* field[3] = session_stop_req */
++ 6, /* field[6] = session_switch_ds_req */
++ 18, /* field[18] = set_item_req */
++ 21, /* field[21] = set_item_str_req */
++ 28, /* field[28] = subscribe_req */
++ 27, /* field[27] = unlock_req */
++ 29, /* field[29] = unsubscribe_req */
++ 22, /* field[22] = validate_req */
++ 8, /* field[8] = version_verify_req */
++};
++static const ProtobufCIntRange sr__request__number_ranges[9 + 1] =
++{
++ { 1, 0 },
++ { 10, 2 },
++ { 20, 9 },
++ { 30, 13 },
++ { 40, 18 },
++ { 50, 22 },
++ { 60, 26 },
++ { 70, 28 },
++ { 80, 32 },
++ { 0, 37 }
++};
++const ProtobufCMessageDescriptor sr__request__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Request",
++ "Request",
++ "Sr__Request",
++ "sr",
++ sizeof(Sr__Request),
++ 37,
++ sr__request__field_descriptors,
++ sr__request__field_indices_by_name,
++ 9, sr__request__number_ranges,
++ (ProtobufCMessageInit) sr__request__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__response__field_descriptors[38] =
++{
++ {
++ "operation",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, operation),
++ &sr__operation__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "result",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, result),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "error",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, error),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_start_resp",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_start_resp),
++ &sr__session_start_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_stop_resp",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_stop_resp),
++ &sr__session_stop_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_refresh_resp",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_refresh_resp),
++ &sr__session_refresh_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_check_resp",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_check_resp),
++ &sr__session_check_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_switch_ds_resp",
++ 14,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_switch_ds_resp),
++ &sr__session_switch_ds_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_set_opts_resp",
++ 15,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, session_set_opts_resp),
++ &sr__session_set_opts_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "version_verify_resp",
++ 16,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, version_verify_resp),
++ &sr__version_verify_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "list_schemas_resp",
++ 20,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, list_schemas_resp),
++ &sr__list_schemas_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_schema_resp",
++ 21,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_schema_resp),
++ &sr__get_schema_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_install_resp",
++ 22,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, module_install_resp),
++ &sr__module_install_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "feature_enable_resp",
++ 23,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, feature_enable_resp),
++ &sr__feature_enable_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_item_resp",
++ 30,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_item_resp),
++ &sr__get_item_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_items_resp",
++ 31,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_items_resp),
++ &sr__get_items_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtree_resp",
++ 32,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_subtree_resp),
++ &sr__get_subtree_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtrees_resp",
++ 33,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_subtrees_resp),
++ &sr__get_subtrees_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_subtree_chunk_resp",
++ 34,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_subtree_chunk_resp),
++ &sr__get_subtree_chunk_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "set_item_resp",
++ 40,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, set_item_resp),
++ &sr__set_item_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "delete_item_resp",
++ 41,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, delete_item_resp),
++ &sr__delete_item_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "move_item_resp",
++ 42,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, move_item_resp),
++ &sr__move_item_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "set_item_str_resp",
++ 43,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, set_item_str_resp),
++ &sr__set_item_str_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "validate_resp",
++ 50,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, validate_resp),
++ &sr__validate_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "commit_resp",
++ 51,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, commit_resp),
++ &sr__commit_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "discard_changes_resp",
++ 52,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, discard_changes_resp),
++ &sr__discard_changes_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "copy_config_resp",
++ 53,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, copy_config_resp),
++ &sr__copy_config_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "lock_resp",
++ 60,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, lock_resp),
++ &sr__lock_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "unlock_resp",
++ 61,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, unlock_resp),
++ &sr__unlock_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscribe_resp",
++ 70,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, subscribe_resp),
++ &sr__subscribe_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "unsubscribe_resp",
++ 71,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, unsubscribe_resp),
++ &sr__unsubscribe_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "check_enabled_running_resp",
++ 72,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, check_enabled_running_resp),
++ &sr__check_enabled_running_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "get_changes_resp",
++ 73,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, get_changes_resp),
++ &sr__get_changes_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "data_provide_resp",
++ 80,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, data_provide_resp),
++ &sr__data_provide_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "check_exec_perm_resp",
++ 81,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, check_exec_perm_resp),
++ &sr__check_exec_perm_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "rpc_resp",
++ 82,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, rpc_resp),
++ &sr__rpcresp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "event_notif_resp",
++ 83,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, event_notif_resp),
++ &sr__event_notif_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "event_notif_replay_resp",
++ 84,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Response, event_notif_replay_resp),
++ &sr__event_notif_replay_resp__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__response__field_indices_by_name[] = {
++ 31, /* field[31] = check_enabled_running_resp */
++ 34, /* field[34] = check_exec_perm_resp */
++ 24, /* field[24] = commit_resp */
++ 26, /* field[26] = copy_config_resp */
++ 33, /* field[33] = data_provide_resp */
++ 20, /* field[20] = delete_item_resp */
++ 25, /* field[25] = discard_changes_resp */
++ 2, /* field[2] = error */
++ 37, /* field[37] = event_notif_replay_resp */
++ 36, /* field[36] = event_notif_resp */
++ 13, /* field[13] = feature_enable_resp */
++ 32, /* field[32] = get_changes_resp */
++ 14, /* field[14] = get_item_resp */
++ 15, /* field[15] = get_items_resp */
++ 11, /* field[11] = get_schema_resp */
++ 18, /* field[18] = get_subtree_chunk_resp */
++ 16, /* field[16] = get_subtree_resp */
++ 17, /* field[17] = get_subtrees_resp */
++ 10, /* field[10] = list_schemas_resp */
++ 27, /* field[27] = lock_resp */
++ 12, /* field[12] = module_install_resp */
++ 21, /* field[21] = move_item_resp */
++ 0, /* field[0] = operation */
++ 1, /* field[1] = result */
++ 35, /* field[35] = rpc_resp */
++ 6, /* field[6] = session_check_resp */
++ 5, /* field[5] = session_refresh_resp */
++ 8, /* field[8] = session_set_opts_resp */
++ 3, /* field[3] = session_start_resp */
++ 4, /* field[4] = session_stop_resp */
++ 7, /* field[7] = session_switch_ds_resp */
++ 19, /* field[19] = set_item_resp */
++ 22, /* field[22] = set_item_str_resp */
++ 29, /* field[29] = subscribe_resp */
++ 28, /* field[28] = unlock_resp */
++ 30, /* field[30] = unsubscribe_resp */
++ 23, /* field[23] = validate_resp */
++ 9, /* field[9] = version_verify_resp */
++};
++static const ProtobufCIntRange sr__response__number_ranges[9 + 1] =
++{
++ { 1, 0 },
++ { 10, 3 },
++ { 20, 10 },
++ { 30, 14 },
++ { 40, 19 },
++ { 50, 23 },
++ { 60, 27 },
++ { 70, 29 },
++ { 80, 33 },
++ { 0, 38 }
++};
++const ProtobufCMessageDescriptor sr__response__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Response",
++ "Response",
++ "Sr__Response",
++ "sr",
++ sizeof(Sr__Response),
++ 38,
++ sr__response__field_descriptors,
++ sr__response__field_indices_by_name,
++ 9, sr__response__number_ranges,
++ (ProtobufCMessageInit) sr__response__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__notification__field_descriptors[10] =
++{
++ {
++ "type",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, type),
++ &sr__subscription_type__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "destination_address",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, destination_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "source_address",
++ 3,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_STRING,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, source_address),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "source_pid",
++ 4,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, source_pid),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subscription_id",
++ 5,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, subscription_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "commit_id",
++ 6,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__Notification, has_commit_id),
++ offsetof(Sr__Notification, commit_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_install_notif",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, module_install_notif),
++ &sr__module_install_notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "feature_enable_notif",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, feature_enable_notif),
++ &sr__feature_enable_notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "module_change_notif",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, module_change_notif),
++ &sr__module_change_notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "subtree_change_notif",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Notification, subtree_change_notif),
++ &sr__subtree_change_notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__notification__field_indices_by_name[] = {
++ 5, /* field[5] = commit_id */
++ 1, /* field[1] = destination_address */
++ 7, /* field[7] = feature_enable_notif */
++ 8, /* field[8] = module_change_notif */
++ 6, /* field[6] = module_install_notif */
++ 2, /* field[2] = source_address */
++ 3, /* field[3] = source_pid */
++ 4, /* field[4] = subscription_id */
++ 9, /* field[9] = subtree_change_notif */
++ 0, /* field[0] = type */
++};
++static const ProtobufCIntRange sr__notification__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 6 },
++ { 0, 10 }
++};
++const ProtobufCMessageDescriptor sr__notification__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Notification",
++ "Notification",
++ "Sr__Notification",
++ "sr",
++ sizeof(Sr__Notification),
++ 10,
++ sr__notification__field_descriptors,
++ sr__notification__field_indices_by_name,
++ 2, sr__notification__number_ranges,
++ (ProtobufCMessageInit) sr__notification__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__notification_ack__field_descriptors[4] =
++{
++ {
++ "notif",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__NotificationAck, notif),
++ &sr__notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "result",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__NotificationAck, result),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "error",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__NotificationAck, error),
++ &sr__error__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "do_not_send_abort",
++ 4,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_BOOL,
++ 0, /* quantifier_offset */
++ offsetof(Sr__NotificationAck, do_not_send_abort),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__notification_ack__field_indices_by_name[] = {
++ 3, /* field[3] = do_not_send_abort */
++ 2, /* field[2] = error */
++ 0, /* field[0] = notif */
++ 1, /* field[1] = result */
++};
++static const ProtobufCIntRange sr__notification_ack__number_ranges[1 + 1] =
++{
++ { 1, 0 },
++ { 0, 4 }
++};
++const ProtobufCMessageDescriptor sr__notification_ack__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.NotificationAck",
++ "NotificationAck",
++ "Sr__NotificationAck",
++ "sr",
++ sizeof(Sr__NotificationAck),
++ 4,
++ sr__notification_ack__field_descriptors,
++ sr__notification_ack__field_indices_by_name,
++ 1, sr__notification_ack__number_ranges,
++ (ProtobufCMessageInit) sr__notification_ack__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCFieldDescriptor sr__internal_request__field_descriptors[9] =
++{
++ {
++ "operation",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, operation),
++ &sr__operation__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "postpone_timeout",
++ 2,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_UINT32,
++ offsetof(Sr__InternalRequest, has_postpone_timeout),
++ offsetof(Sr__InternalRequest, postpone_timeout),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "unsubscribe_dst_req",
++ 10,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, unsubscribe_dst_req),
++ &sr__unsubscribe_destination_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "commit_timeout_req",
++ 11,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, commit_timeout_req),
++ &sr__commit_timeout_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "oper_data_timeout_req",
++ 12,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, oper_data_timeout_req),
++ &sr__oper_data_timeout_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "internal_state_data_req",
++ 13,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, internal_state_data_req),
++ &sr__internal_state_data_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "notif_store_cleanup_req",
++ 14,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, notif_store_cleanup_req),
++ &sr__notif_store_cleanup_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "delayed_msg_req",
++ 15,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, delayed_msg_req),
++ &sr__delayed_msg_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "nacm_reload_req",
++ 16,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__InternalRequest, nacm_reload_req),
++ &sr__nacm_reload_req__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__internal_request__field_indices_by_name[] = {
++ 3, /* field[3] = commit_timeout_req */
++ 7, /* field[7] = delayed_msg_req */
++ 5, /* field[5] = internal_state_data_req */
++ 8, /* field[8] = nacm_reload_req */
++ 6, /* field[6] = notif_store_cleanup_req */
++ 4, /* field[4] = oper_data_timeout_req */
++ 0, /* field[0] = operation */
++ 1, /* field[1] = postpone_timeout */
++ 2, /* field[2] = unsubscribe_dst_req */
++};
++static const ProtobufCIntRange sr__internal_request__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 10, 2 },
++ { 0, 9 }
++};
++const ProtobufCMessageDescriptor sr__internal_request__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.InternalRequest",
++ "InternalRequest",
++ "Sr__InternalRequest",
++ "sr",
++ sizeof(Sr__InternalRequest),
++ 9,
++ sr__internal_request__field_descriptors,
++ sr__internal_request__field_indices_by_name,
++ 2, sr__internal_request__number_ranges,
++ (ProtobufCMessageInit) sr__internal_request__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCEnumValue sr__msg__msg_type__enum_values_by_number[5] =
++{
++ { "REQUEST", "SR__MSG__MSG_TYPE__REQUEST", 1 },
++ { "RESPONSE", "SR__MSG__MSG_TYPE__RESPONSE", 2 },
++ { "NOTIFICATION", "SR__MSG__MSG_TYPE__NOTIFICATION", 3 },
++ { "NOTIFICATION_ACK", "SR__MSG__MSG_TYPE__NOTIFICATION_ACK", 4 },
++ { "INTERNAL_REQUEST", "SR__MSG__MSG_TYPE__INTERNAL_REQUEST", 5 },
++};
++static const ProtobufCIntRange sr__msg__msg_type__value_ranges[] = {
++{1, 0},{0, 5}
++};
++static const ProtobufCEnumValueIndex sr__msg__msg_type__enum_values_by_name[5] =
++{
++ { "INTERNAL_REQUEST", 4 },
++ { "NOTIFICATION", 2 },
++ { "NOTIFICATION_ACK", 3 },
++ { "REQUEST", 0 },
++ { "RESPONSE", 1 },
++};
++const ProtobufCEnumDescriptor sr__msg__msg_type__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.Msg.MsgType",
++ "MsgType",
++ "Sr__Msg__MsgType",
++ "sr",
++ 5,
++ sr__msg__msg_type__enum_values_by_number,
++ 5,
++ sr__msg__msg_type__enum_values_by_name,
++ 1,
++ sr__msg__msg_type__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCFieldDescriptor sr__msg__field_descriptors[8] =
++{
++ {
++ "type",
++ 1,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_ENUM,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, type),
++ &sr__msg__msg_type__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "session_id",
++ 2,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT32,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, session_id),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "request",
++ 3,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, request),
++ &sr__request__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "response",
++ 4,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, response),
++ &sr__response__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "notification",
++ 5,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, notification),
++ &sr__notification__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "notification_ack",
++ 6,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, notification_ack),
++ &sr__notification_ack__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "internal_request",
++ 7,
++ PROTOBUF_C_LABEL_OPTIONAL,
++ PROTOBUF_C_TYPE_MESSAGE,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, internal_request),
++ &sr__internal_request__descriptor,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++ {
++ "_sysrepo_mem_ctx",
++ 20,
++ PROTOBUF_C_LABEL_REQUIRED,
++ PROTOBUF_C_TYPE_UINT64,
++ 0, /* quantifier_offset */
++ offsetof(Sr__Msg, _sysrepo_mem_ctx),
++ NULL,
++ NULL,
++ 0, /* flags */
++ 0,NULL,NULL /* reserved1,reserved2, etc */
++ },
++};
++static const unsigned sr__msg__field_indices_by_name[] = {
++ 7, /* field[7] = _sysrepo_mem_ctx */
++ 6, /* field[6] = internal_request */
++ 4, /* field[4] = notification */
++ 5, /* field[5] = notification_ack */
++ 2, /* field[2] = request */
++ 3, /* field[3] = response */
++ 1, /* field[1] = session_id */
++ 0, /* field[0] = type */
++};
++static const ProtobufCIntRange sr__msg__number_ranges[2 + 1] =
++{
++ { 1, 0 },
++ { 20, 7 },
++ { 0, 8 }
++};
++const ProtobufCMessageDescriptor sr__msg__descriptor =
++{
++ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
++ "sr.Msg",
++ "Msg",
++ "Sr__Msg",
++ "sr",
++ sizeof(Sr__Msg),
++ 8,
++ sr__msg__field_descriptors,
++ sr__msg__field_indices_by_name,
++ 2, sr__msg__number_ranges,
++ (ProtobufCMessageInit) sr__msg__init,
++ NULL,NULL,NULL /* reserved[123] */
++};
++static const ProtobufCEnumValue sr__api_variant__enum_values_by_number[2] =
++{
++ { "VALUES", "SR__API_VARIANT__VALUES", 1 },
++ { "TREES", "SR__API_VARIANT__TREES", 2 },
++};
++static const ProtobufCIntRange sr__api_variant__value_ranges[] = {
++{1, 0},{0, 2}
++};
++static const ProtobufCEnumValueIndex sr__api_variant__enum_values_by_name[2] =
++{
++ { "TREES", 1 },
++ { "VALUES", 0 },
++};
++const ProtobufCEnumDescriptor sr__api_variant__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.ApiVariant",
++ "ApiVariant",
++ "Sr__ApiVariant",
++ "sr",
++ 2,
++ sr__api_variant__enum_values_by_number,
++ 2,
++ sr__api_variant__enum_values_by_name,
++ 1,
++ sr__api_variant__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__data_store__enum_values_by_number[3] =
++{
++ { "STARTUP", "SR__DATA_STORE__STARTUP", 1 },
++ { "RUNNING", "SR__DATA_STORE__RUNNING", 2 },
++ { "CANDIDATE", "SR__DATA_STORE__CANDIDATE", 3 },
++};
++static const ProtobufCIntRange sr__data_store__value_ranges[] = {
++{1, 0},{0, 3}
++};
++static const ProtobufCEnumValueIndex sr__data_store__enum_values_by_name[3] =
++{
++ { "CANDIDATE", 2 },
++ { "RUNNING", 1 },
++ { "STARTUP", 0 },
++};
++const ProtobufCEnumDescriptor sr__data_store__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.DataStore",
++ "DataStore",
++ "Sr__DataStore",
++ "sr",
++ 3,
++ sr__data_store__enum_values_by_number,
++ 3,
++ sr__data_store__enum_values_by_name,
++ 1,
++ sr__data_store__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__session_flags__enum_values_by_number[4] =
++{
++ { "SESS_DEFAULT", "SR__SESSION_FLAGS__SESS_DEFAULT", 0 },
++ { "SESS_CONFIG_ONLY", "SR__SESSION_FLAGS__SESS_CONFIG_ONLY", 1 },
++ { "SESS_ENABLE_NACM", "SR__SESSION_FLAGS__SESS_ENABLE_NACM", 2 },
++ { "SESS_NOTIFICATION", "SR__SESSION_FLAGS__SESS_NOTIFICATION", 1024 },
++};
++static const ProtobufCIntRange sr__session_flags__value_ranges[] = {
++{0, 0},{1024, 3},{0, 4}
++};
++static const ProtobufCEnumValueIndex sr__session_flags__enum_values_by_name[4] =
++{
++ { "SESS_CONFIG_ONLY", 1 },
++ { "SESS_DEFAULT", 0 },
++ { "SESS_ENABLE_NACM", 2 },
++ { "SESS_NOTIFICATION", 3 },
++};
++const ProtobufCEnumDescriptor sr__session_flags__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.SessionFlags",
++ "SessionFlags",
++ "Sr__SessionFlags",
++ "sr",
++ 4,
++ sr__session_flags__enum_values_by_number,
++ 4,
++ sr__session_flags__enum_values_by_name,
++ 2,
++ sr__session_flags__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__edit_flags__enum_values_by_number[3] =
++{
++ { "EDIT_DEFAULT", "SR__EDIT_FLAGS__EDIT_DEFAULT", 0 },
++ { "EDIT_NON_RECURSIVE", "SR__EDIT_FLAGS__EDIT_NON_RECURSIVE", 1 },
++ { "EDIT_STRICT", "SR__EDIT_FLAGS__EDIT_STRICT", 2 },
++};
++static const ProtobufCIntRange sr__edit_flags__value_ranges[] = {
++{0, 0},{0, 3}
++};
++static const ProtobufCEnumValueIndex sr__edit_flags__enum_values_by_name[3] =
++{
++ { "EDIT_DEFAULT", 0 },
++ { "EDIT_NON_RECURSIVE", 1 },
++ { "EDIT_STRICT", 2 },
++};
++const ProtobufCEnumDescriptor sr__edit_flags__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.EditFlags",
++ "EditFlags",
++ "Sr__EditFlags",
++ "sr",
++ 3,
++ sr__edit_flags__enum_values_by_number,
++ 3,
++ sr__edit_flags__enum_values_by_name,
++ 1,
++ sr__edit_flags__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__subscription_type__enum_values_by_number[10] =
++{
++ { "MODULE_INSTALL_SUBS", "SR__SUBSCRIPTION_TYPE__MODULE_INSTALL_SUBS", 1 },
++ { "FEATURE_ENABLE_SUBS", "SR__SUBSCRIPTION_TYPE__FEATURE_ENABLE_SUBS", 2 },
++ { "MODULE_CHANGE_SUBS", "SR__SUBSCRIPTION_TYPE__MODULE_CHANGE_SUBS", 10 },
++ { "SUBTREE_CHANGE_SUBS", "SR__SUBSCRIPTION_TYPE__SUBTREE_CHANGE_SUBS", 11 },
++ { "DP_GET_ITEMS_SUBS", "SR__SUBSCRIPTION_TYPE__DP_GET_ITEMS_SUBS", 20 },
++ { "RPC_SUBS", "SR__SUBSCRIPTION_TYPE__RPC_SUBS", 30 },
++ { "ACTION_SUBS", "SR__SUBSCRIPTION_TYPE__ACTION_SUBS", 31 },
++ { "EVENT_NOTIF_SUBS", "SR__SUBSCRIPTION_TYPE__EVENT_NOTIF_SUBS", 40 },
++ { "HELLO_SUBS", "SR__SUBSCRIPTION_TYPE__HELLO_SUBS", 50 },
++ { "COMMIT_END_SUBS", "SR__SUBSCRIPTION_TYPE__COMMIT_END_SUBS", 51 },
++};
++static const ProtobufCIntRange sr__subscription_type__value_ranges[] = {
++{1, 0},{10, 2},{20, 4},{30, 5},{40, 7},{50, 8},{0, 10}
++};
++static const ProtobufCEnumValueIndex sr__subscription_type__enum_values_by_name[10] =
++{
++ { "ACTION_SUBS", 6 },
++ { "COMMIT_END_SUBS", 9 },
++ { "DP_GET_ITEMS_SUBS", 4 },
++ { "EVENT_NOTIF_SUBS", 7 },
++ { "FEATURE_ENABLE_SUBS", 1 },
++ { "HELLO_SUBS", 8 },
++ { "MODULE_CHANGE_SUBS", 2 },
++ { "MODULE_INSTALL_SUBS", 0 },
++ { "RPC_SUBS", 5 },
++ { "SUBTREE_CHANGE_SUBS", 3 },
++};
++const ProtobufCEnumDescriptor sr__subscription_type__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.SubscriptionType",
++ "SubscriptionType",
++ "Sr__SubscriptionType",
++ "sr",
++ 10,
++ sr__subscription_type__enum_values_by_number,
++ 10,
++ sr__subscription_type__enum_values_by_name,
++ 6,
++ sr__subscription_type__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__notification_event__enum_values_by_number[4] =
++{
++ { "VERIFY_EV", "SR__NOTIFICATION_EVENT__VERIFY_EV", 1 },
++ { "APPLY_EV", "SR__NOTIFICATION_EVENT__APPLY_EV", 2 },
++ { "ABORT_EV", "SR__NOTIFICATION_EVENT__ABORT_EV", 3 },
++ { "ENABLED_EV", "SR__NOTIFICATION_EVENT__ENABLED_EV", 4 },
++};
++static const ProtobufCIntRange sr__notification_event__value_ranges[] = {
++{1, 0},{0, 4}
++};
++static const ProtobufCEnumValueIndex sr__notification_event__enum_values_by_name[4] =
++{
++ { "ABORT_EV", 2 },
++ { "APPLY_EV", 1 },
++ { "ENABLED_EV", 3 },
++ { "VERIFY_EV", 0 },
++};
++const ProtobufCEnumDescriptor sr__notification_event__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.NotificationEvent",
++ "NotificationEvent",
++ "Sr__NotificationEvent",
++ "sr",
++ 4,
++ sr__notification_event__enum_values_by_number,
++ 4,
++ sr__notification_event__enum_values_by_name,
++ 1,
++ sr__notification_event__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__module_state__enum_values_by_number[3] =
++{
++ { "UNINSTALLED", "SR__MODULE_STATE__UNINSTALLED", 1 },
++ { "IMPORTED", "SR__MODULE_STATE__IMPORTED", 2 },
++ { "IMPLEMENTED", "SR__MODULE_STATE__IMPLEMENTED", 3 },
++};
++static const ProtobufCIntRange sr__module_state__value_ranges[] = {
++{1, 0},{0, 3}
++};
++static const ProtobufCEnumValueIndex sr__module_state__enum_values_by_name[3] =
++{
++ { "IMPLEMENTED", 2 },
++ { "IMPORTED", 1 },
++ { "UNINSTALLED", 0 },
++};
++const ProtobufCEnumDescriptor sr__module_state__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.ModuleState",
++ "ModuleState",
++ "Sr__ModuleState",
++ "sr",
++ 3,
++ sr__module_state__enum_values_by_number,
++ 3,
++ sr__module_state__enum_values_by_name,
++ 1,
++ sr__module_state__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__change_operation__enum_values_by_number[4] =
++{
++ { "CREATED", "SR__CHANGE_OPERATION__CREATED", 1 },
++ { "MODIFIED", "SR__CHANGE_OPERATION__MODIFIED", 2 },
++ { "DELETED", "SR__CHANGE_OPERATION__DELETED", 3 },
++ { "MOVED", "SR__CHANGE_OPERATION__MOVED", 4 },
++};
++static const ProtobufCIntRange sr__change_operation__value_ranges[] = {
++{1, 0},{0, 4}
++};
++static const ProtobufCEnumValueIndex sr__change_operation__enum_values_by_name[4] =
++{
++ { "CREATED", 0 },
++ { "DELETED", 2 },
++ { "MODIFIED", 1 },
++ { "MOVED", 3 },
++};
++const ProtobufCEnumDescriptor sr__change_operation__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.ChangeOperation",
++ "ChangeOperation",
++ "Sr__ChangeOperation",
++ "sr",
++ 4,
++ sr__change_operation__enum_values_by_number,
++ 4,
++ sr__change_operation__enum_values_by_name,
++ 1,
++ sr__change_operation__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
++static const ProtobufCEnumValue sr__operation__enum_values_by_number[43] =
++{
++ { "SESSION_START", "SR__OPERATION__SESSION_START", 10 },
++ { "SESSION_STOP", "SR__OPERATION__SESSION_STOP", 11 },
++ { "SESSION_REFRESH", "SR__OPERATION__SESSION_REFRESH", 12 },
++ { "SESSION_CHECK", "SR__OPERATION__SESSION_CHECK", 13 },
++ { "SESSION_SWITCH_DS", "SR__OPERATION__SESSION_SWITCH_DS", 14 },
++ { "SESSION_SET_OPTS", "SR__OPERATION__SESSION_SET_OPTS", 15 },
++ { "VERSION_VERIFY", "SR__OPERATION__VERSION_VERIFY", 16 },
++ { "LIST_SCHEMAS", "SR__OPERATION__LIST_SCHEMAS", 20 },
++ { "GET_SCHEMA", "SR__OPERATION__GET_SCHEMA", 21 },
++ { "MODULE_INSTALL", "SR__OPERATION__MODULE_INSTALL", 22 },
++ { "FEATURE_ENABLE", "SR__OPERATION__FEATURE_ENABLE", 23 },
++ { "GET_ITEM", "SR__OPERATION__GET_ITEM", 30 },
++ { "GET_ITEMS", "SR__OPERATION__GET_ITEMS", 31 },
++ { "GET_SUBTREE", "SR__OPERATION__GET_SUBTREE", 32 },
++ { "GET_SUBTREES", "SR__OPERATION__GET_SUBTREES", 33 },
++ { "GET_SUBTREE_CHUNK", "SR__OPERATION__GET_SUBTREE_CHUNK", 34 },
++ { "SET_ITEM", "SR__OPERATION__SET_ITEM", 40 },
++ { "DELETE_ITEM", "SR__OPERATION__DELETE_ITEM", 41 },
++ { "MOVE_ITEM", "SR__OPERATION__MOVE_ITEM", 42 },
++ { "SET_ITEM_STR", "SR__OPERATION__SET_ITEM_STR", 43 },
++ { "VALIDATE", "SR__OPERATION__VALIDATE", 50 },
++ { "COMMIT", "SR__OPERATION__COMMIT", 51 },
++ { "DISCARD_CHANGES", "SR__OPERATION__DISCARD_CHANGES", 52 },
++ { "COPY_CONFIG", "SR__OPERATION__COPY_CONFIG", 53 },
++ { "LOCK", "SR__OPERATION__LOCK", 60 },
++ { "UNLOCK", "SR__OPERATION__UNLOCK", 61 },
++ { "SUBSCRIBE", "SR__OPERATION__SUBSCRIBE", 70 },
++ { "UNSUBSCRIBE", "SR__OPERATION__UNSUBSCRIBE", 71 },
++ { "CHECK_ENABLED_RUNNING", "SR__OPERATION__CHECK_ENABLED_RUNNING", 72 },
++ { "GET_CHANGES", "SR__OPERATION__GET_CHANGES", 73 },
++ { "DATA_PROVIDE", "SR__OPERATION__DATA_PROVIDE", 80 },
++ { "CHECK_EXEC_PERMISSION", "SR__OPERATION__CHECK_EXEC_PERMISSION", 81 },
++ { "RPC", "SR__OPERATION__RPC", 82 },
++ { "ACTION", "SR__OPERATION__ACTION", 83 },
++ { "EVENT_NOTIF", "SR__OPERATION__EVENT_NOTIF", 84 },
++ { "EVENT_NOTIF_REPLAY", "SR__OPERATION__EVENT_NOTIF_REPLAY", 85 },
++ { "UNSUBSCRIBE_DESTINATION", "SR__OPERATION__UNSUBSCRIBE_DESTINATION", 101 },
++ { "COMMIT_TIMEOUT", "SR__OPERATION__COMMIT_TIMEOUT", 102 },
++ { "OPER_DATA_TIMEOUT", "SR__OPERATION__OPER_DATA_TIMEOUT", 103 },
++ { "INTERNAL_STATE_DATA", "SR__OPERATION__INTERNAL_STATE_DATA", 104 },
++ { "NOTIF_STORE_CLEANUP", "SR__OPERATION__NOTIF_STORE_CLEANUP", 105 },
++ { "DELAYED_MSG", "SR__OPERATION__DELAYED_MSG", 106 },
++ { "NACM_RELOAD", "SR__OPERATION__NACM_RELOAD", 107 },
++};
++static const ProtobufCIntRange sr__operation__value_ranges[] = {
++{10, 0},{20, 7},{30, 11},{40, 16},{50, 20},{60, 24},{70, 26},{80, 30},{101, 36},{0, 43}
++};
++static const ProtobufCEnumValueIndex sr__operation__enum_values_by_name[43] =
++{
++ { "ACTION", 33 },
++ { "CHECK_ENABLED_RUNNING", 28 },
++ { "CHECK_EXEC_PERMISSION", 31 },
++ { "COMMIT", 21 },
++ { "COMMIT_TIMEOUT", 37 },
++ { "COPY_CONFIG", 23 },
++ { "DATA_PROVIDE", 30 },
++ { "DELAYED_MSG", 41 },
++ { "DELETE_ITEM", 17 },
++ { "DISCARD_CHANGES", 22 },
++ { "EVENT_NOTIF", 34 },
++ { "EVENT_NOTIF_REPLAY", 35 },
++ { "FEATURE_ENABLE", 10 },
++ { "GET_CHANGES", 29 },
++ { "GET_ITEM", 11 },
++ { "GET_ITEMS", 12 },
++ { "GET_SCHEMA", 8 },
++ { "GET_SUBTREE", 13 },
++ { "GET_SUBTREES", 14 },
++ { "GET_SUBTREE_CHUNK", 15 },
++ { "INTERNAL_STATE_DATA", 39 },
++ { "LIST_SCHEMAS", 7 },
++ { "LOCK", 24 },
++ { "MODULE_INSTALL", 9 },
++ { "MOVE_ITEM", 18 },
++ { "NACM_RELOAD", 42 },
++ { "NOTIF_STORE_CLEANUP", 40 },
++ { "OPER_DATA_TIMEOUT", 38 },
++ { "RPC", 32 },
++ { "SESSION_CHECK", 3 },
++ { "SESSION_REFRESH", 2 },
++ { "SESSION_SET_OPTS", 5 },
++ { "SESSION_START", 0 },
++ { "SESSION_STOP", 1 },
++ { "SESSION_SWITCH_DS", 4 },
++ { "SET_ITEM", 16 },
++ { "SET_ITEM_STR", 19 },
++ { "SUBSCRIBE", 26 },
++ { "UNLOCK", 25 },
++ { "UNSUBSCRIBE", 27 },
++ { "UNSUBSCRIBE_DESTINATION", 36 },
++ { "VALIDATE", 20 },
++ { "VERSION_VERIFY", 6 },
++};
++const ProtobufCEnumDescriptor sr__operation__descriptor =
++{
++ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
++ "sr.Operation",
++ "Operation",
++ "Sr__Operation",
++ "sr",
++ 43,
++ sr__operation__enum_values_by_number,
++ 43,
++ sr__operation__enum_values_by_name,
++ 9,
++ sr__operation__value_ranges,
++ NULL,NULL,NULL,NULL /* reserved[1234] */
++};
+Index: sysrepo-0.7.5/src/common/sysrepo.pb-c.h
+===================================================================
+--- /dev/null
++++ sysrepo-0.7.5/src/common/sysrepo.pb-c.h
+@@ -0,0 +1,4238 @@
++/* Generated by the protocol buffer compiler. DO NOT EDIT! */
++/* Generated from: sysrepo.proto */
++
++#ifndef PROTOBUF_C_sysrepo_2eproto__INCLUDED
++#define PROTOBUF_C_sysrepo_2eproto__INCLUDED
++
++#include <protobuf-c/protobuf-c.h>
++
++PROTOBUF_C__BEGIN_DECLS
++
++#if PROTOBUF_C_VERSION_NUMBER < 1000000
++# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
++#elif 1002001 < PROTOBUF_C_MIN_COMPILER_VERSION
++# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
++#endif
++
++
++typedef struct _Sr__Value Sr__Value;
++typedef struct _Sr__Node Sr__Node;
++typedef struct _Sr__Error Sr__Error;
++typedef struct _Sr__SessionStartReq Sr__SessionStartReq;
++typedef struct _Sr__SessionStartResp Sr__SessionStartResp;
++typedef struct _Sr__SessionStopReq Sr__SessionStopReq;
++typedef struct _Sr__SessionStopResp Sr__SessionStopResp;
++typedef struct _Sr__SessionRefreshReq Sr__SessionRefreshReq;
++typedef struct _Sr__SessionRefreshResp Sr__SessionRefreshResp;
++typedef struct _Sr__SessionCheckReq Sr__SessionCheckReq;
++typedef struct _Sr__SessionCheckResp Sr__SessionCheckResp;
++typedef struct _Sr__SessionSwitchDsReq Sr__SessionSwitchDsReq;
++typedef struct _Sr__SessionSwitchDsResp Sr__SessionSwitchDsResp;
++typedef struct _Sr__SessionSetOptsReq Sr__SessionSetOptsReq;
++typedef struct _Sr__SessionSetOptsResp Sr__SessionSetOptsResp;
++typedef struct _Sr__VersionVerifyReq Sr__VersionVerifyReq;
++typedef struct _Sr__VersionVerifyResp Sr__VersionVerifyResp;
++typedef struct _Sr__SchemaRevision Sr__SchemaRevision;
++typedef struct _Sr__SchemaSubmodule Sr__SchemaSubmodule;
++typedef struct _Sr__Schema Sr__Schema;
++typedef struct _Sr__ListSchemasReq Sr__ListSchemasReq;
++typedef struct _Sr__ListSchemasResp Sr__ListSchemasResp;
++typedef struct _Sr__GetSchemaReq Sr__GetSchemaReq;
++typedef struct _Sr__GetSchemaResp Sr__GetSchemaResp;
++typedef struct _Sr__GetItemReq Sr__GetItemReq;
++typedef struct _Sr__GetItemResp Sr__GetItemResp;
++typedef struct _Sr__GetItemsReq Sr__GetItemsReq;
++typedef struct _Sr__GetItemsResp Sr__GetItemsResp;
++typedef struct _Sr__GetSubtreeReq Sr__GetSubtreeReq;
++typedef struct _Sr__GetSubtreeResp Sr__GetSubtreeResp;
++typedef struct _Sr__GetSubtreesReq Sr__GetSubtreesReq;
++typedef struct _Sr__GetSubtreesResp Sr__GetSubtreesResp;
++typedef struct _Sr__GetSubtreeChunkReq Sr__GetSubtreeChunkReq;
++typedef struct _Sr__GetSubtreeChunkResp Sr__GetSubtreeChunkResp;
++typedef struct _Sr__SetItemReq Sr__SetItemReq;
++typedef struct _Sr__SetItemResp Sr__SetItemResp;
++typedef struct _Sr__SetItemStrReq Sr__SetItemStrReq;
++typedef struct _Sr__SetItemStrResp Sr__SetItemStrResp;
++typedef struct _Sr__DeleteItemReq Sr__DeleteItemReq;
++typedef struct _Sr__DeleteItemResp Sr__DeleteItemResp;
++typedef struct _Sr__MoveItemReq Sr__MoveItemReq;
++typedef struct _Sr__MoveItemResp Sr__MoveItemResp;
++typedef struct _Sr__ValidateReq Sr__ValidateReq;
++typedef struct _Sr__ValidateResp Sr__ValidateResp;
++typedef struct _Sr__CommitReq Sr__CommitReq;
++typedef struct _Sr__CommitResp Sr__CommitResp;
++typedef struct _Sr__DiscardChangesReq Sr__DiscardChangesReq;
++typedef struct _Sr__DiscardChangesResp Sr__DiscardChangesResp;
++typedef struct _Sr__CopyConfigReq Sr__CopyConfigReq;
++typedef struct _Sr__CopyConfigResp Sr__CopyConfigResp;
++typedef struct _Sr__LockReq Sr__LockReq;
++typedef struct _Sr__LockResp Sr__LockResp;
++typedef struct _Sr__UnlockReq Sr__UnlockReq;
++typedef struct _Sr__UnlockResp Sr__UnlockResp;
++typedef struct _Sr__SubscribeReq Sr__SubscribeReq;
++typedef struct _Sr__SubscribeResp Sr__SubscribeResp;
++typedef struct _Sr__UnsubscribeReq Sr__UnsubscribeReq;
++typedef struct _Sr__UnsubscribeResp Sr__UnsubscribeResp;
++typedef struct _Sr__CheckEnabledRunningReq Sr__CheckEnabledRunningReq;
++typedef struct _Sr__CheckEnabledRunningResp Sr__CheckEnabledRunningResp;
++typedef struct _Sr__ModuleInstallNotification Sr__ModuleInstallNotification;
++typedef struct _Sr__FeatureEnableNotification Sr__FeatureEnableNotification;
++typedef struct _Sr__ModuleChangeNotification Sr__ModuleChangeNotification;
++typedef struct _Sr__SubtreeChangeNotification Sr__SubtreeChangeNotification;
++typedef struct _Sr__Change Sr__Change;
++typedef struct _Sr__GetChangesReq Sr__GetChangesReq;
++typedef struct _Sr__GetChangesResp Sr__GetChangesResp;
++typedef struct _Sr__CheckExecPermReq Sr__CheckExecPermReq;
++typedef struct _Sr__CheckExecPermResp Sr__CheckExecPermResp;
++typedef struct _Sr__RPCReq Sr__RPCReq;
++typedef struct _Sr__RPCResp Sr__RPCResp;
++typedef struct _Sr__EventNotifReq Sr__EventNotifReq;
++typedef struct _Sr__EventNotifResp Sr__EventNotifResp;
++typedef struct _Sr__EventNotifReplayReq Sr__EventNotifReplayReq;
++typedef struct _Sr__EventNotifReplayResp Sr__EventNotifReplayResp;
++typedef struct _Sr__DataProvideReq Sr__DataProvideReq;
++typedef struct _Sr__DataProvideResp Sr__DataProvideResp;
++typedef struct _Sr__ModuleInstallReq Sr__ModuleInstallReq;
++typedef struct _Sr__ModuleInstallResp Sr__ModuleInstallResp;
++typedef struct _Sr__FeatureEnableReq Sr__FeatureEnableReq;
++typedef struct _Sr__FeatureEnableResp Sr__FeatureEnableResp;
++typedef struct _Sr__UnsubscribeDestinationReq Sr__UnsubscribeDestinationReq;
++typedef struct _Sr__CommitTimeoutReq Sr__CommitTimeoutReq;
++typedef struct _Sr__OperDataTimeoutReq Sr__OperDataTimeoutReq;
++typedef struct _Sr__InternalStateDataReq Sr__InternalStateDataReq;
++typedef struct _Sr__NotifStoreCleanupReq Sr__NotifStoreCleanupReq;
++typedef struct _Sr__DelayedMsgReq Sr__DelayedMsgReq;
++typedef struct _Sr__NacmReloadReq Sr__NacmReloadReq;
++typedef struct _Sr__Request Sr__Request;
++typedef struct _Sr__Response Sr__Response;
++typedef struct _Sr__Notification Sr__Notification;
++typedef struct _Sr__NotificationAck Sr__NotificationAck;
++typedef struct _Sr__InternalRequest Sr__InternalRequest;
++typedef struct _Sr__Msg Sr__Msg;
++
++
++/* --- enums --- */
++
++typedef enum _Sr__Value__Types {
++ SR__VALUE__TYPES__LIST = 1,
++ SR__VALUE__TYPES__CONTAINER = 2,
++ SR__VALUE__TYPES__CONTAINER_PRESENCE = 3,
++ SR__VALUE__TYPES__LEAF_EMPTY = 4,
++ SR__VALUE__TYPES__BINARY = 10,
++ SR__VALUE__TYPES__BITS = 11,
++ SR__VALUE__TYPES__BOOL = 12,
++ SR__VALUE__TYPES__DECIMAL64 = 13,
++ SR__VALUE__TYPES__ENUM = 14,
++ SR__VALUE__TYPES__IDENTITYREF = 15,
++ SR__VALUE__TYPES__INSTANCEID = 16,
++ SR__VALUE__TYPES__INT8 = 17,
++ SR__VALUE__TYPES__INT16 = 18,
++ SR__VALUE__TYPES__INT32 = 19,
++ SR__VALUE__TYPES__INT64 = 20,
++ SR__VALUE__TYPES__STRING = 21,
++ SR__VALUE__TYPES__UINT8 = 22,
++ SR__VALUE__TYPES__UINT16 = 23,
++ SR__VALUE__TYPES__UINT32 = 24,
++ SR__VALUE__TYPES__UINT64 = 25,
++ SR__VALUE__TYPES__ANYXML = 26,
++ SR__VALUE__TYPES__ANYDATA = 27
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__VALUE__TYPES)
++} Sr__Value__Types;
++typedef enum _Sr__MoveItemReq__MovePosition {
++ SR__MOVE_ITEM_REQ__MOVE_POSITION__BEFORE = 1,
++ SR__MOVE_ITEM_REQ__MOVE_POSITION__AFTER = 2,
++ SR__MOVE_ITEM_REQ__MOVE_POSITION__FIRST = 3,
++ SR__MOVE_ITEM_REQ__MOVE_POSITION__LAST = 4
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MOVE_ITEM_REQ__MOVE_POSITION)
++} Sr__MoveItemReq__MovePosition;
++/*
++ **
++ * @brief Type of the event notification.
++ */
++typedef enum _Sr__EventNotifReq__NotifType {
++ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REALTIME = 1,
++ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY = 2,
++ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_COMPLETE = 3,
++ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_STOP = 4
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EVENT_NOTIF_REQ__NOTIF_TYPE)
++} Sr__EventNotifReq__NotifType;
++/*
++ **
++ * @brief Flags used to override default session handling.
++ */
++typedef enum _Sr__EventNotifReq__NotifFlags {
++ /*
++ **< Notification will be handled normally.
++ */
++ SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__DEFAULT = 0,
++ /*
++ **< Notification will not be stored in the notification store.
++ */
++ SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__EPHEMERAL = 1
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EVENT_NOTIF_REQ__NOTIF_FLAGS)
++} Sr__EventNotifReq__NotifFlags;
++/*
++ **
++ * @brief Type of the message.
++ */
++typedef enum _Sr__Msg__MsgType {
++ /*
++ **< The message is a request.
++ */
++ SR__MSG__MSG_TYPE__REQUEST = 1,
++ /*
++ **< The message is a response to the request.
++ */
++ SR__MSG__MSG_TYPE__RESPONSE = 2,
++ /*
++ **< The message is a notification.
++ */
++ SR__MSG__MSG_TYPE__NOTIFICATION = 3,
++ /*
++ **< The message is a notification acknowledgment.
++ */
++ SR__MSG__MSG_TYPE__NOTIFICATION_ACK = 4,
++ /*
++ **< The message is an internal request, should not be used from the public API.
++ */
++ SR__MSG__MSG_TYPE__INTERNAL_REQUEST = 5
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MSG__MSG_TYPE)
++} Sr__Msg__MsgType;
++/*
++ **
++ * @brief Variant of the API. Currently only values (sr_val_t) vs. trees (sr_node_t).
++ */
++typedef enum _Sr__ApiVariant {
++ SR__API_VARIANT__VALUES = 1,
++ SR__API_VARIANT__TREES = 2
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__API_VARIANT)
++} Sr__ApiVariant;
++/*
++ **
++ * @brief Datastore on which the configuration session will operate.
++ */
++typedef enum _Sr__DataStore {
++ SR__DATA_STORE__STARTUP = 1,
++ SR__DATA_STORE__RUNNING = 2,
++ SR__DATA_STORE__CANDIDATE = 3
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__DATA_STORE)
++} Sr__DataStore;
++/*
++ **
++ * @brief Flags used to override default session handling.
++ */
++typedef enum _Sr__SessionFlags {
++ /*
++ **< Default (normal) session behavior.
++ */
++ SR__SESSION_FLAGS__SESS_DEFAULT = 0,
++ /*
++ **< Session will process only configuration data (e.g. sysrepo won't
++ *return any state data by ::sr_get_items / ::sr_get_items_iter calls).
++ */
++ SR__SESSION_FLAGS__SESS_CONFIG_ONLY = 1,
++ /*
++ **< Enable NETCONF access control for this session.
++ */
++ SR__SESSION_FLAGS__SESS_ENABLE_NACM = 2,
++ /*
++ **< Notification session (internal type of session).
++ */
++ SR__SESSION_FLAGS__SESS_NOTIFICATION = 1024
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__SESSION_FLAGS)
++} Sr__SessionFlags;
++/*
++ **
++ * @brief Flags used to override default behavior of data manipulation calls.
++ */
++typedef enum _Sr__EditFlags {
++ /*
++ **< Default behavior - recursive and non-strict.
++ */
++ SR__EDIT_FLAGS__EDIT_DEFAULT = 0,
++ /*
++ **< Non-recursive behavior:
++ *by ::SetItemReq, all preceding nodes (parents) of the identified element must exist,
++ *by ::DeleteItemReq xpath must not identify an non-empty list or non-empty container.
++ */
++ SR__EDIT_FLAGS__EDIT_NON_RECURSIVE = 1,
++ /*
++ **< Strict behavior:
++ *by ::SetItemReq the identified element must not exist (similar to netconf create operation),
++ *by ::DeleteItemReq the identified element must exist (similar to netconf delete operation).
++ */
++ SR__EDIT_FLAGS__EDIT_STRICT = 2
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EDIT_FLAGS)
++} Sr__EditFlags;
++typedef enum _Sr__SubscriptionType {
++ SR__SUBSCRIPTION_TYPE__MODULE_INSTALL_SUBS = 1,
++ SR__SUBSCRIPTION_TYPE__FEATURE_ENABLE_SUBS = 2,
++ SR__SUBSCRIPTION_TYPE__MODULE_CHANGE_SUBS = 10,
++ SR__SUBSCRIPTION_TYPE__SUBTREE_CHANGE_SUBS = 11,
++ SR__SUBSCRIPTION_TYPE__DP_GET_ITEMS_SUBS = 20,
++ SR__SUBSCRIPTION_TYPE__RPC_SUBS = 30,
++ SR__SUBSCRIPTION_TYPE__ACTION_SUBS = 31,
++ SR__SUBSCRIPTION_TYPE__EVENT_NOTIF_SUBS = 40,
++ /*
++ **< Used only internally to test for inactive notification subscriptions.
++ */
++ SR__SUBSCRIPTION_TYPE__HELLO_SUBS = 50,
++ /*
++ **< Used only internally to notify about the end of the commit process.
++ */
++ SR__SUBSCRIPTION_TYPE__COMMIT_END_SUBS = 51
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__SUBSCRIPTION_TYPE)
++} Sr__SubscriptionType;
++typedef enum _Sr__NotificationEvent {
++ SR__NOTIFICATION_EVENT__VERIFY_EV = 1,
++ SR__NOTIFICATION_EVENT__APPLY_EV = 2,
++ SR__NOTIFICATION_EVENT__ABORT_EV = 3,
++ SR__NOTIFICATION_EVENT__ENABLED_EV = 4
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__NOTIFICATION_EVENT)
++} Sr__NotificationEvent;
++typedef enum _Sr__ModuleState {
++ SR__MODULE_STATE__UNINSTALLED = 1,
++ SR__MODULE_STATE__IMPORTED = 2,
++ SR__MODULE_STATE__IMPLEMENTED = 3
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MODULE_STATE)
++} Sr__ModuleState;
++typedef enum _Sr__ChangeOperation {
++ SR__CHANGE_OPERATION__CREATED = 1,
++ SR__CHANGE_OPERATION__MODIFIED = 2,
++ SR__CHANGE_OPERATION__DELETED = 3,
++ SR__CHANGE_OPERATION__MOVED = 4
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__CHANGE_OPERATION)
++} Sr__ChangeOperation;
++/*
++ **
++ * @brief Requested operation.
++ */
++typedef enum _Sr__Operation {
++ SR__OPERATION__SESSION_START = 10,
++ SR__OPERATION__SESSION_STOP = 11,
++ SR__OPERATION__SESSION_REFRESH = 12,
++ SR__OPERATION__SESSION_CHECK = 13,
++ SR__OPERATION__SESSION_SWITCH_DS = 14,
++ SR__OPERATION__SESSION_SET_OPTS = 15,
++ SR__OPERATION__VERSION_VERIFY = 16,
++ SR__OPERATION__LIST_SCHEMAS = 20,
++ SR__OPERATION__GET_SCHEMA = 21,
++ SR__OPERATION__MODULE_INSTALL = 22,
++ SR__OPERATION__FEATURE_ENABLE = 23,
++ SR__OPERATION__GET_ITEM = 30,
++ SR__OPERATION__GET_ITEMS = 31,
++ SR__OPERATION__GET_SUBTREE = 32,
++ SR__OPERATION__GET_SUBTREES = 33,
++ SR__OPERATION__GET_SUBTREE_CHUNK = 34,
++ SR__OPERATION__SET_ITEM = 40,
++ SR__OPERATION__DELETE_ITEM = 41,
++ SR__OPERATION__MOVE_ITEM = 42,
++ SR__OPERATION__SET_ITEM_STR = 43,
++ SR__OPERATION__VALIDATE = 50,
++ SR__OPERATION__COMMIT = 51,
++ SR__OPERATION__DISCARD_CHANGES = 52,
++ SR__OPERATION__COPY_CONFIG = 53,
++ SR__OPERATION__LOCK = 60,
++ SR__OPERATION__UNLOCK = 61,
++ SR__OPERATION__SUBSCRIBE = 70,
++ SR__OPERATION__UNSUBSCRIBE = 71,
++ SR__OPERATION__CHECK_ENABLED_RUNNING = 72,
++ SR__OPERATION__GET_CHANGES = 73,
++ SR__OPERATION__DATA_PROVIDE = 80,
++ SR__OPERATION__CHECK_EXEC_PERMISSION = 81,
++ SR__OPERATION__RPC = 82,
++ SR__OPERATION__ACTION = 83,
++ SR__OPERATION__EVENT_NOTIF = 84,
++ SR__OPERATION__EVENT_NOTIF_REPLAY = 85,
++ SR__OPERATION__UNSUBSCRIBE_DESTINATION = 101,
++ SR__OPERATION__COMMIT_TIMEOUT = 102,
++ SR__OPERATION__OPER_DATA_TIMEOUT = 103,
++ SR__OPERATION__INTERNAL_STATE_DATA = 104,
++ SR__OPERATION__NOTIF_STORE_CLEANUP = 105,
++ SR__OPERATION__DELAYED_MSG = 106,
++ SR__OPERATION__NACM_RELOAD = 107
++ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__OPERATION)
++} Sr__Operation;
++
++/* --- messages --- */
++
++/*
++ **
++ * @brief Value of an item stored (or to be stored) in the datastore.
++ * Can be mapped to sr_val_t data structure from sysrepo library API.
++ */
++struct _Sr__Value
++{
++ ProtobufCMessage base;
++ char *xpath;
++ Sr__Value__Types type;
++ protobuf_c_boolean dflt;
++ char *binary_val;
++ char *bits_val;
++ protobuf_c_boolean has_bool_val;
++ protobuf_c_boolean bool_val;
++ protobuf_c_boolean has_decimal64_val;
++ double decimal64_val;
++ char *enum_val;
++ char *identityref_val;
++ char *instanceid_val;
++ protobuf_c_boolean has_int8_val;
++ int32_t int8_val;
++ protobuf_c_boolean has_int16_val;
++ int32_t int16_val;
++ protobuf_c_boolean has_int32_val;
++ int32_t int32_val;
++ protobuf_c_boolean has_int64_val;
++ int64_t int64_val;
++ char *string_val;
++ protobuf_c_boolean has_uint8_val;
++ uint32_t uint8_val;
++ protobuf_c_boolean has_uint16_val;
++ uint32_t uint16_val;
++ protobuf_c_boolean has_uint32_val;
++ uint32_t uint32_val;
++ protobuf_c_boolean has_uint64_val;
++ uint64_t uint64_val;
++ char *anyxml_val;
++ char *anydata_val;
++};
++#define SR__VALUE__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__value__descriptor) \
++ , NULL, 0, 0, NULL, NULL, 0,0, 0,0, NULL, NULL, NULL, 0,0, 0,0, 0,0, 0,0, NULL, 0,0, 0,0, 0,0, 0,0, NULL, NULL }
++
++
++/*
++ **
++ * @brief Item stored (or to be stored) in the datastore represented as a tree node
++ * reflecting module schema. Can be mapped to sr_node_t data structure from sysrepo library API.
++ */
++struct _Sr__Node
++{
++ ProtobufCMessage base;
++ /*
++ **< Value of the node; member *xpath* is used to store node's name.
++ */
++ Sr__Value *value;
++ /*
++ **< Name of the module that defines scheme of this node.
++ */
++ char *module_name;
++ /*
++ **< Direct descendands of this node.
++ */
++ size_t n_children;
++ Sr__Node **children;
++};
++#define SR__NODE__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__node__descriptor) \
++ , NULL, NULL, 0,NULL }
++
++
++/*
++ **
++ * @brief Error message retuned from the Sysrepo Engine.
++ */
++struct _Sr__Error
++{
++ ProtobufCMessage base;
++ char *message;
++ char *xpath;
++};
++#define SR__ERROR__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__error__descriptor) \
++ , NULL, NULL }
++
++
++/*
++ **
++ * @brief Request for starting a session. Sent by sr_session_start API call.
++ */
++struct _Sr__SessionStartReq
++{
++ ProtobufCMessage base;
++ Sr__DataStore datastore;
++ char *user_name;
++ /*
++ **< Bitwise OR of SessionFlags.
++ */
++ uint32_t options;
++ /*
++ **< Applicable if SESS_NOTIFICATION was specified.
++ */
++ protobuf_c_boolean has_commit_id;
++ uint32_t commit_id;
++};
++#define SR__SESSION_START_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_start_req__descriptor) \
++ , 0, NULL, 0, 0,0 }
++
++
++/*
++ **
++ * @brief Response to session_start request.
++ */
++struct _Sr__SessionStartResp
++{
++ ProtobufCMessage base;
++ uint32_t session_id;
++};
++#define SR__SESSION_START_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_start_resp__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Request for stopping the session. Sent by sr_session_stop API call.
++ */
++struct _Sr__SessionStopReq
++{
++ ProtobufCMessage base;
++ uint32_t session_id;
++};
++#define SR__SESSION_STOP_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_stop_req__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Response to session_stop request.
++ */
++struct _Sr__SessionStopResp
++{
++ ProtobufCMessage base;
++ uint32_t session_id;
++};
++#define SR__SESSION_STOP_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_stop_resp__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Refreshes configuration data cached within the session.
++ * Sent by sr_session_refresh API call.
++ */
++struct _Sr__SessionRefreshReq
++{
++ ProtobufCMessage base;
++};
++#define SR__SESSION_REFRESH_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_refresh_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_session_refresh request.
++ */
++struct _Sr__SessionRefreshResp
++{
++ ProtobufCMessage base;
++ size_t n_errors;
++ Sr__Error **errors;
++};
++#define SR__SESSION_REFRESH_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_refresh_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Checks aliveness and validity of the session & connection tied to it.
++ * Sent by sr_session_check API call.
++ */
++struct _Sr__SessionCheckReq
++{
++ ProtobufCMessage base;
++};
++#define SR__SESSION_CHECK_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_check_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_session_check request.
++ */
++struct _Sr__SessionCheckResp
++{
++ ProtobufCMessage base;
++ size_t n_errors;
++ Sr__Error **errors;
++};
++#define SR__SESSION_CHECK_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_check_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Changes the datastore to which the session is tied to.
++ */
++struct _Sr__SessionSwitchDsReq
++{
++ ProtobufCMessage base;
++ Sr__DataStore datastore;
++};
++#define SR__SESSION_SWITCH_DS_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_switch_ds_req__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Response to sr_session_switch_ds request.
++ */
++struct _Sr__SessionSwitchDsResp
++{
++ ProtobufCMessage base;
++};
++#define SR__SESSION_SWITCH_DS_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_switch_ds_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Request for modification of session options.
++ */
++struct _Sr__SessionSetOptsReq
++{
++ ProtobufCMessage base;
++ uint32_t options;
++};
++#define SR__SESSION_SET_OPTS_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_set_opts_req__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Response to sr_session_set_options.
++ */
++struct _Sr__SessionSetOptsResp
++{
++ ProtobufCMessage base;
++};
++#define SR__SESSION_SET_OPTS_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__session_set_opts_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Request to verify version compatibility.
++ */
++struct _Sr__VersionVerifyReq
++{
++ ProtobufCMessage base;
++ char *soname;
++};
++#define SR__VERSION_VERIFY_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__version_verify_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to version verification.
++ */
++struct _Sr__VersionVerifyResp
++{
++ ProtobufCMessage base;
++ /*
++ **< server-side SONAME version in case of versions incompatibility.
++ */
++ char *soname;
++};
++#define SR__VERSION_VERIFY_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__version_verify_resp__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Schema revision details.
++ */
++struct _Sr__SchemaRevision
++{
++ ProtobufCMessage base;
++ /*
++ **< Latest revision date of the module.
++ */
++ char *revision;
++ /*
++ **< Absolute path to file where the schema is stored (YANG format).
++ */
++ char *file_path_yang;
++ /*
++ **< Absolute path to file where the schema is stored (.yin format).
++ */
++ char *file_path_yin;
++};
++#define SR__SCHEMA_REVISION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__schema_revision__descriptor) \
++ , NULL, NULL, NULL }
++
++
++/*
++ **
++ * @brief Schema submodule information.
++ */
++struct _Sr__SchemaSubmodule
++{
++ ProtobufCMessage base;
++ /*
++ **< Submodule name
++ */
++ char *submodule_name;
++ /*
++ **< Revision of the submodule
++ */
++ Sr__SchemaRevision *revision;
++};
++#define SR__SCHEMA_SUBMODULE__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__schema_submodule__descriptor) \
++ , NULL, NULL }
++
++
++/*
++ **
++ * @brief Information about a schema installed in sysrepo datastore.
++ */
++struct _Sr__Schema
++{
++ ProtobufCMessage base;
++ /*
++ **< Name of the module.
++ */
++ char *module_name;
++ /*
++ **< Namespace of the module.
++ */
++ char *ns;
++ /*
++ **< Prefix of he module.
++ */
++ char *prefix;
++ /*
++ **< TRUE only for explicitly installed modules (those are always implemented).
++ */
++ protobuf_c_boolean installed;
++ /*
++ **< TRUE for implemented modules (do not have to be installed if they have augments,
++ *deviations or are targets for leafrefs of other implemented modules).
++ */
++ protobuf_c_boolean implemented;
++ /*
++ **< Revision of the module
++ */
++ Sr__SchemaRevision *revision;
++ /*
++ **< Submodules
++ */
++ size_t n_submodules;
++ Sr__SchemaSubmodule **submodules;
++ /*
++ **< Features enabled for the module
++ */
++ size_t n_enabled_features;
++ char **enabled_features;
++};
++#define SR__SCHEMA__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__schema__descriptor) \
++ , NULL, NULL, NULL, 0, 0, NULL, 0,NULL, 0,NULL }
++
++
++/*
++ **
++ * @brief Retrieves an array of schemas installed in the sysrepo datastore.
++ * Sent by sr_list_schemas API call.
++ */
++struct _Sr__ListSchemasReq
++{
++ ProtobufCMessage base;
++};
++#define SR__LIST_SCHEMAS_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__list_schemas_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_list_schemas request.
++ */
++struct _Sr__ListSchemasResp
++{
++ ProtobufCMessage base;
++ size_t n_schemas;
++ Sr__Schema **schemas;
++};
++#define SR__LIST_SCHEMAS_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__list_schemas_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Retrieves the content of specified schema file.
++ * Sent by sr_get_schema API call.
++ */
++struct _Sr__GetSchemaReq
++{
++ ProtobufCMessage base;
++ char *module_name;
++ char *revision;
++ char *submodule_name;
++ char *submodule_revision;
++ protobuf_c_boolean yang_format;
++};
++#define SR__GET_SCHEMA_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_schema_req__descriptor) \
++ , NULL, NULL, NULL, NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_get_schema request.
++ */
++struct _Sr__GetSchemaResp
++{
++ ProtobufCMessage base;
++ char *schema_content;
++};
++#define SR__GET_SCHEMA_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_schema_resp__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Retrieves a single data element stored under provided path.
++ * Sent by sr_get_item API call.
++ */
++struct _Sr__GetItemReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++};
++#define SR__GET_ITEM_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_item_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to get_item request.
++ */
++struct _Sr__GetItemResp
++{
++ ProtobufCMessage base;
++ Sr__Value *value;
++};
++#define SR__GET_ITEM_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_item_resp__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Retrieves an array of data elements stored under provided path.
++ * Sent by sr_get_items and sr_get_items_iter API calls.
++ */
++struct _Sr__GetItemsReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ /*
++ * The options below are applicable only for sr_get_items_iter
++ * (not set by sr_get_items).
++ */
++ protobuf_c_boolean has_limit;
++ uint32_t limit;
++ protobuf_c_boolean has_offset;
++ uint32_t offset;
++};
++#define SR__GET_ITEMS_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_items_req__descriptor) \
++ , NULL, 0,0, 0,0 }
++
++
++/*
++ **
++ * @brief Response to get_items / sr_get_items_iter request.
++ */
++struct _Sr__GetItemsResp
++{
++ ProtobufCMessage base;
++ size_t n_values;
++ Sr__Value **values;
++};
++#define SR__GET_ITEMS_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_items_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Retrieves a single subtree whose root is stored under provided path.
++ * Sent by sr_get_subtree API call.
++ */
++struct _Sr__GetSubtreeReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++};
++#define SR__GET_SUBTREE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to sr_get_subtree request.
++ */
++struct _Sr__GetSubtreeResp
++{
++ ProtobufCMessage base;
++ Sr__Node *tree;
++};
++#define SR__GET_SUBTREE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_resp__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Retrieves an array of subtrees whose root nodes match provided path.
++ * Sent by sr_get_subtrees API call.
++ */
++struct _Sr__GetSubtreesReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++};
++#define SR__GET_SUBTREES_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtrees_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to sr_get_subtrees request.
++ */
++struct _Sr__GetSubtreesResp
++{
++ ProtobufCMessage base;
++ size_t n_trees;
++ Sr__Node **trees;
++};
++#define SR__GET_SUBTREES_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtrees_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Retrieves a chunk of a single or multiple subtrees.
++ * A subtree chunk is also a tree, where the root node is the node referenced by XPath,
++ * the next level consists of its children skipping the first "slice_offset" nodes and including
++ * at most "slice_limit" nodes, while the remaining (depth_limit-2) levels always start with
++ * the first child (slice_offset is ignored) and include at most "child_limit" nodes.
++ * The chunk consists of at most "depth_limit" levels.
++ * @note Order of child nodes depends on the libyang implementation.
++ */
++struct _Sr__GetSubtreeChunkReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ protobuf_c_boolean single;
++ uint32_t slice_offset;
++ uint32_t slice_width;
++ uint32_t child_limit;
++ uint32_t depth_limit;
++};
++#define SR__GET_SUBTREE_CHUNK_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_chunk_req__descriptor) \
++ , NULL, 0, 0, 0, 0, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_get_subtree_chunk request.
++ */
++struct _Sr__GetSubtreeChunkResp
++{
++ ProtobufCMessage base;
++ /*
++ **< JSON node-id of the root node for each subtree chunk
++ */
++ size_t n_xpath;
++ char **xpath;
++ /*
++ **< first chunk may carry mutliple trees
++ */
++ size_t n_chunk;
++ Sr__Node **chunk;
++};
++#define SR__GET_SUBTREE_CHUNK_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_chunk_resp__descriptor) \
++ , 0,NULL, 0,NULL }
++
++
++/*
++ **
++ * @brief Sets the value of the leaf, leaf-list or presence container.
++ * Sent by sr_set_item API call.
++ */
++struct _Sr__SetItemReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ Sr__Value *value;
++ /*
++ **< Bitwise OR of EditFlags
++ */
++ uint32_t options;
++};
++#define SR__SET_ITEM_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_req__descriptor) \
++ , NULL, NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_set_item request.
++ */
++struct _Sr__SetItemResp
++{
++ ProtobufCMessage base;
++};
++#define SR__SET_ITEM_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Sets the value of the leaf, leaf-list or presence container.
++ * The value is transferred as string.
++ * Sent by sr_set_item_str API call.
++ */
++struct _Sr__SetItemStrReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ char *value;
++ /*
++ **< Bitwise OR of EditFlags
++ */
++ uint32_t options;
++};
++#define SR__SET_ITEM_STR_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_str_req__descriptor) \
++ , NULL, NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_set_item_str request.
++ */
++struct _Sr__SetItemStrResp
++{
++ ProtobufCMessage base;
++};
++#define SR__SET_ITEM_STR_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_str_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Deletes the nodes under the specified xpath.
++ * Sent by sr_delete_item API call.
++ */
++struct _Sr__DeleteItemReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ /*
++ **< Bitwise OR of EditFlags
++ */
++ uint32_t options;
++};
++#define SR__DELETE_ITEM_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__delete_item_req__descriptor) \
++ , NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_delete_item request.
++ */
++struct _Sr__DeleteItemResp
++{
++ ProtobufCMessage base;
++};
++#define SR__DELETE_ITEM_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__delete_item_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Move the instance of an ordered list in specified direction.
++ * Sent by sr_move_item API call.
++ */
++struct _Sr__MoveItemReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ Sr__MoveItemReq__MovePosition position;
++ char *relative_item;
++};
++#define SR__MOVE_ITEM_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__move_item_req__descriptor) \
++ , NULL, 0, NULL }
++
++
++/*
++ **
++ * @brief Response to sr_move_item request.
++ */
++struct _Sr__MoveItemResp
++{
++ ProtobufCMessage base;
++};
++#define SR__MOVE_ITEM_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__move_item_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Perform the validation of changes made in current session, but do not
++ * commit nor discard them. Sent by sr_validate API call.
++ */
++struct _Sr__ValidateReq
++{
++ ProtobufCMessage base;
++};
++#define SR__VALIDATE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__validate_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_validate request.
++ */
++struct _Sr__ValidateResp
++{
++ ProtobufCMessage base;
++ size_t n_errors;
++ Sr__Error **errors;
++};
++#define SR__VALIDATE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__validate_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Apply changes made in current session.
++ * Sent by sr_commit API call.
++ */
++struct _Sr__CommitReq
++{
++ ProtobufCMessage base;
++};
++#define SR__COMMIT_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_commit request.
++ */
++struct _Sr__CommitResp
++{
++ ProtobufCMessage base;
++ size_t n_errors;
++ Sr__Error **errors;
++};
++#define SR__COMMIT_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Discard non-committed changes made in current session.
++ * Sent by sr_discard_changes API call.
++ */
++struct _Sr__DiscardChangesReq
++{
++ ProtobufCMessage base;
++};
++#define SR__DISCARD_CHANGES_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__discard_changes_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Response to sr_discard_changes request.
++ */
++struct _Sr__DiscardChangesResp
++{
++ ProtobufCMessage base;
++};
++#define SR__DISCARD_CHANGES_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__discard_changes_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Replaces an entire configuration datastore with the contents of
++ * another complete configuration datastore. Sent by sr_copy_config request.
++ */
++struct _Sr__CopyConfigReq
++{
++ ProtobufCMessage base;
++ Sr__DataStore src_datastore;
++ Sr__DataStore dst_datastore;
++ /*
++ **< If not specified, the operation is performed on all
++ *modules that are currently active in the source datastore
++ */
++ char *module_name;
++};
++#define SR__COPY_CONFIG_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__copy_config_req__descriptor) \
++ , 0, 0, NULL }
++
++
++/*
++ **
++ * @brief Response to sr_copy_config request.
++ */
++struct _Sr__CopyConfigResp
++{
++ ProtobufCMessage base;
++ size_t n_errors;
++ Sr__Error **errors;
++};
++#define SR__COPY_CONFIG_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__copy_config_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Locks specified data model or the datastore which the session is tied to.
++ * Sent by sr_lock_datastore and sr_lock_model API calls.
++ */
++struct _Sr__LockReq
++{
++ ProtobufCMessage base;
++ /*
++ **< If module name is not set, LockReq locks whole datastore.
++ */
++ char *module_name;
++};
++#define SR__LOCK_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__lock_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to sr_lock_datastore or sr_lock_model request.
++ */
++struct _Sr__LockResp
++{
++ ProtobufCMessage base;
++};
++#define SR__LOCK_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__lock_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Unlocks specified data model or the datastore which the session is tied to.
++ * Sent by sr_unlock_datastore and sr_unlock_model API calls.
++ */
++struct _Sr__UnlockReq
++{
++ ProtobufCMessage base;
++ /*
++ **< If module name is not set, UnlockReq unlocks whole datastore.
++ */
++ char *module_name;
++};
++#define SR__UNLOCK_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__unlock_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to sr_lock_datastore or sr_lock_model request.
++ */
++struct _Sr__UnlockResp
++{
++ ProtobufCMessage base;
++};
++#define SR__UNLOCK_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__unlock_resp__descriptor) \
++ }
++
++
++struct _Sr__SubscribeReq
++{
++ ProtobufCMessage base;
++ Sr__SubscriptionType type;
++ char *destination;
++ uint32_t subscription_id;
++ char *module_name;
++ char *xpath;
++ protobuf_c_boolean has_notif_event;
++ Sr__NotificationEvent notif_event;
++ protobuf_c_boolean has_priority;
++ uint32_t priority;
++ protobuf_c_boolean has_enable_running;
++ protobuf_c_boolean enable_running;
++ protobuf_c_boolean has_enable_event;
++ protobuf_c_boolean enable_event;
++ Sr__ApiVariant api_variant;
++};
++#define SR__SUBSCRIBE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__subscribe_req__descriptor) \
++ , 0, NULL, 0, NULL, NULL, 0,0, 0,0, 0,0, 0,0, 0 }
++
++
++struct _Sr__SubscribeResp
++{
++ ProtobufCMessage base;
++};
++#define SR__SUBSCRIBE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__subscribe_resp__descriptor) \
++ }
++
++
++struct _Sr__UnsubscribeReq
++{
++ ProtobufCMessage base;
++ Sr__SubscriptionType type;
++ char *destination;
++ uint32_t subscription_id;
++ char *module_name;
++};
++#define SR__UNSUBSCRIBE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_req__descriptor) \
++ , 0, NULL, 0, NULL }
++
++
++struct _Sr__UnsubscribeResp
++{
++ ProtobufCMessage base;
++};
++#define SR__UNSUBSCRIBE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Checks whether the module has any enabled subtree.
++ * Sent by sr_check_enabled_running.
++ */
++struct _Sr__CheckEnabledRunningReq
++{
++ ProtobufCMessage base;
++ char *module_name;
++};
++#define SR__CHECK_ENABLED_RUNNING_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__check_enabled_running_req__descriptor) \
++ , NULL }
++
++
++struct _Sr__CheckEnabledRunningResp
++{
++ ProtobufCMessage base;
++ protobuf_c_boolean enabled;
++};
++#define SR__CHECK_ENABLED_RUNNING_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__check_enabled_running_resp__descriptor) \
++ , 0 }
++
++
++struct _Sr__ModuleInstallNotification
++{
++ ProtobufCMessage base;
++ char *module_name;
++ char *revision;
++ Sr__ModuleState state;
++};
++#define SR__MODULE_INSTALL_NOTIFICATION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_notification__descriptor) \
++ , NULL, NULL, 0 }
++
++
++struct _Sr__FeatureEnableNotification
++{
++ ProtobufCMessage base;
++ char *module_name;
++ char *feature_name;
++ protobuf_c_boolean enabled;
++};
++#define SR__FEATURE_ENABLE_NOTIFICATION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_notification__descriptor) \
++ , NULL, NULL, 0 }
++
++
++struct _Sr__ModuleChangeNotification
++{
++ ProtobufCMessage base;
++ Sr__NotificationEvent event;
++ char *module_name;
++};
++#define SR__MODULE_CHANGE_NOTIFICATION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__module_change_notification__descriptor) \
++ , 0, NULL }
++
++
++struct _Sr__SubtreeChangeNotification
++{
++ ProtobufCMessage base;
++ Sr__NotificationEvent event;
++ char *xpath;
++};
++#define SR__SUBTREE_CHANGE_NOTIFICATION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__subtree_change_notification__descriptor) \
++ , 0, NULL }
++
++
++struct _Sr__Change
++{
++ ProtobufCMessage base;
++ Sr__ChangeOperation changeoperation;
++ Sr__Value *new_value;
++ Sr__Value *old_value;
++};
++#define SR__CHANGE__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__change__descriptor) \
++ , 0, NULL, NULL }
++
++
++/*
++ **
++ * @brief Retrieves an array of changes made under provided path.
++ * Sent by sr_get_changes_iter or sr_get_change_next API calls.
++ */
++struct _Sr__GetChangesReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ uint32_t limit;
++ uint32_t offset;
++};
++#define SR__GET_CHANGES_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_changes_req__descriptor) \
++ , NULL, 0, 0 }
++
++
++/*
++ **
++ * @brief Response to get_changes request.
++ */
++struct _Sr__GetChangesResp
++{
++ ProtobufCMessage base;
++ size_t n_changes;
++ Sr__Change **changes;
++};
++#define SR__GET_CHANGES_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__get_changes_resp__descriptor) \
++ , 0,NULL }
++
++
++/*
++ **
++ * @brief Sends a request to check if the owner of this session is authorized to invoke
++ * the protocol operation referenced by the xpath.
++ * Sent by sr_check_exec_permission.
++ */
++struct _Sr__CheckExecPermReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++};
++#define SR__CHECK_EXEC_PERM_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__check_exec_perm_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Response to sr_check_exec_permission request.
++ */
++struct _Sr__CheckExecPermResp
++{
++ ProtobufCMessage base;
++ protobuf_c_boolean permitted;
++};
++#define SR__CHECK_EXEC_PERM_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__check_exec_perm_resp__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Sends a RPC / action request into the datastore, will be delivered to the RPC subscriber.
++ * Sent by sr_rpc_send / sr_rpc_send_tree and sr_action_send / sr_action_send_tree API calls.
++ */
++struct _Sr__RPCReq
++{
++ ProtobufCMessage base;
++ protobuf_c_boolean action;
++ char *xpath;
++ /*
++ **< which API variant was used to send RPC req.
++ */
++ Sr__ApiVariant orig_api_variant;
++ size_t n_input;
++ Sr__Value **input;
++ size_t n_input_tree;
++ Sr__Node **input_tree;
++ char *subscriber_address;
++ protobuf_c_boolean has_subscription_id;
++ uint32_t subscription_id;
++};
++#define SR__RPCREQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__rpcreq__descriptor) \
++ , 0, NULL, 0, 0,NULL, 0,NULL, NULL, 0,0 }
++
++
++/*
++ **
++ * @brief Response to sr_rpc_send / sr_rpc_send_tree or sr_action_send / sr_action_send_tree request.
++ */
++struct _Sr__RPCResp
++{
++ ProtobufCMessage base;
++ protobuf_c_boolean action;
++ char *xpath;
++ /*
++ **< which API variant was used to send RPC req.
++ */
++ Sr__ApiVariant orig_api_variant;
++ size_t n_output;
++ Sr__Value **output;
++ size_t n_output_tree;
++ Sr__Node **output_tree;
++};
++#define SR__RPCRESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__rpcresp__descriptor) \
++ , 0, NULL, 0, 0,NULL, 0,NULL }
++
++
++/*
++ **
++ * @brief Sends an event notification into the datastore, will be delivered to all notification subscribers.
++ * Sent by sr_event_notif_send API call.
++ */
++struct _Sr__EventNotifReq
++{
++ ProtobufCMessage base;
++ Sr__EventNotifReq__NotifType type;
++ /*
++ **< Bitwise OR of NotifFlags.
++ */
++ uint32_t options;
++ char *xpath;
++ size_t n_values;
++ Sr__Value **values;
++ size_t n_trees;
++ Sr__Node **trees;
++ uint64_t timestamp;
++ char *subscriber_address;
++ protobuf_c_boolean has_subscription_id;
++ uint32_t subscription_id;
++ protobuf_c_boolean do_not_send_reply;
++};
++#define SR__EVENT_NOTIF_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_req__descriptor) \
++ , 0, 0, NULL, 0,NULL, 0,NULL, 0, NULL, 0,0, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_event_notif_send request.
++ */
++struct _Sr__EventNotifResp
++{
++ ProtobufCMessage base;
++};
++#define SR__EVENT_NOTIF_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Sends a request to replay event notifications stored in the datastore.
++ * Sent by sr_event_notif_replay API call.
++ */
++struct _Sr__EventNotifReplayReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ uint64_t start_time;
++ uint64_t stop_time;
++ char *subscriber_address;
++ uint32_t subscription_id;
++ Sr__ApiVariant api_variant;
++};
++#define SR__EVENT_NOTIF_REPLAY_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_replay_req__descriptor) \
++ , NULL, 0, 0, NULL, 0, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_event_notif_replay request.
++ */
++struct _Sr__EventNotifReplayResp
++{
++ ProtobufCMessage base;
++};
++#define SR__EVENT_NOTIF_REPLAY_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_replay_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Requests operational data under given path form an operational data
++ * provider.
++ */
++struct _Sr__DataProvideReq
++{
++ ProtobufCMessage base;
++ char *xpath;
++ char *subscriber_address;
++ uint32_t subscription_id;
++ uint64_t request_id;
++};
++#define SR__DATA_PROVIDE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__data_provide_req__descriptor) \
++ , NULL, NULL, 0, 0 }
++
++
++/*
++ **
++ * @brief Response to a request of operational data under given path form an
++ * operational data provider.
++ */
++struct _Sr__DataProvideResp
++{
++ ProtobufCMessage base;
++ char *xpath;
++ size_t n_values;
++ Sr__Value **values;
++ uint64_t request_id;
++};
++#define SR__DATA_PROVIDE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__data_provide_resp__descriptor) \
++ , NULL, 0,NULL, 0 }
++
++
++/*
++ **
++ * @brief Requests installation / uinstallation of specified YANG model.
++ * Sent by sr_module_install internal API calls.
++ */
++struct _Sr__ModuleInstallReq
++{
++ ProtobufCMessage base;
++ char *module_name;
++ char *revision;
++ char *file_name;
++ protobuf_c_boolean installed;
++};
++#define SR__MODULE_INSTALL_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_req__descriptor) \
++ , NULL, NULL, NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_module_install request.
++ */
++struct _Sr__ModuleInstallResp
++{
++ ProtobufCMessage base;
++};
++#define SR__MODULE_INSTALL_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Requests enabling / disabling of specified YANG feature within the
++ * YANG model. Sent by sr_feature_enable internal API calls.
++ */
++struct _Sr__FeatureEnableReq
++{
++ ProtobufCMessage base;
++ char *module_name;
++ char *feature_name;
++ protobuf_c_boolean enabled;
++};
++#define SR__FEATURE_ENABLE_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_req__descriptor) \
++ , NULL, NULL, 0 }
++
++
++/*
++ **
++ * @brief Response to sr_feature_enable request.
++ */
++struct _Sr__FeatureEnableResp
++{
++ ProtobufCMessage base;
++};
++#define SR__FEATURE_ENABLE_RESP__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_resp__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Internal request to unsubscribe all subscriptions of a subscriber on given destination address.
++ */
++struct _Sr__UnsubscribeDestinationReq
++{
++ ProtobufCMessage base;
++ char *destination;
++};
++#define SR__UNSUBSCRIBE_DESTINATION_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_destination_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Internal request to timeout a commit, if it hasn't been terminated yet.
++ */
++struct _Sr__CommitTimeoutReq
++{
++ ProtobufCMessage base;
++ uint32_t commit_id;
++ protobuf_c_boolean expired;
++};
++#define SR__COMMIT_TIMEOUT_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_timeout_req__descriptor) \
++ , 0, 0 }
++
++
++/*
++ **
++ * @brief Internal request to timeout a request for operational data, if it hasn't been terminated yet.
++ */
++struct _Sr__OperDataTimeoutReq
++{
++ ProtobufCMessage base;
++ uint64_t request_id;
++};
++#define SR__OPER_DATA_TIMEOUT_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__oper_data_timeout_req__descriptor) \
++ , 0 }
++
++
++/*
++ **
++ * @brief Internal request for internal state data (state data provided by Sysrepo Engine itself).
++ */
++struct _Sr__InternalStateDataReq
++{
++ ProtobufCMessage base;
++ uint64_t request_id;
++ char *xpath;
++};
++#define SR__INTERNAL_STATE_DATA_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__internal_state_data_req__descriptor) \
++ , 0, NULL }
++
++
++/*
++ **
++ * @brief Internal request to cleanup aged notifications in the Notification Store.
++ */
++struct _Sr__NotifStoreCleanupReq
++{
++ ProtobufCMessage base;
++};
++#define SR__NOTIF_STORE_CLEANUP_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__notif_store_cleanup_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Message to be delivered to the client after some timeout.
++ */
++struct _Sr__DelayedMsgReq
++{
++ ProtobufCMessage base;
++ Sr__Msg *message;
++};
++#define SR__DELAYED_MSG_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__delayed_msg_req__descriptor) \
++ , NULL }
++
++
++/*
++ **
++ * @brief Internal request to reload NACM configuration from the running datastore.
++ */
++struct _Sr__NacmReloadReq
++{
++ ProtobufCMessage base;
++};
++#define SR__NACM_RELOAD_REQ__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__nacm_reload_req__descriptor) \
++ }
++
++
++/*
++ **
++ * @brief Request for an operation.
++ */
++struct _Sr__Request
++{
++ ProtobufCMessage base;
++ /*
++ * Request ID used internally by sysrepo
++ */
++ uint64_t _id;
++ Sr__Operation operation;
++ Sr__SessionStartReq *session_start_req;
++ Sr__SessionStopReq *session_stop_req;
++ Sr__SessionRefreshReq *session_refresh_req;
++ Sr__SessionCheckReq *session_check_req;
++ Sr__SessionSwitchDsReq *session_switch_ds_req;
++ Sr__SessionSetOptsReq *session_set_opts_req;
++ Sr__VersionVerifyReq *version_verify_req;
++ Sr__ListSchemasReq *list_schemas_req;
++ Sr__GetSchemaReq *get_schema_req;
++ Sr__ModuleInstallReq *module_install_req;
++ Sr__FeatureEnableReq *feature_enable_req;
++ Sr__GetItemReq *get_item_req;
++ Sr__GetItemsReq *get_items_req;
++ Sr__GetSubtreeReq *get_subtree_req;
++ Sr__GetSubtreesReq *get_subtrees_req;
++ Sr__GetSubtreeChunkReq *get_subtree_chunk_req;
++ Sr__SetItemReq *set_item_req;
++ Sr__DeleteItemReq *delete_item_req;
++ Sr__MoveItemReq *move_item_req;
++ Sr__SetItemStrReq *set_item_str_req;
++ Sr__ValidateReq *validate_req;
++ Sr__CommitReq *commit_req;
++ Sr__DiscardChangesReq *discard_changes_req;
++ Sr__CopyConfigReq *copy_config_req;
++ Sr__LockReq *lock_req;
++ Sr__UnlockReq *unlock_req;
++ Sr__SubscribeReq *subscribe_req;
++ Sr__UnsubscribeReq *unsubscribe_req;
++ Sr__CheckEnabledRunningReq *check_enabled_running_req;
++ Sr__GetChangesReq *get_changes_req;
++ Sr__DataProvideReq *data_provide_req;
++ Sr__CheckExecPermReq *check_exec_perm_req;
++ Sr__RPCReq *rpc_req;
++ Sr__EventNotifReq *event_notif_req;
++ Sr__EventNotifReplayReq *event_notif_replay_req;
++};
++#define SR__REQUEST__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__request__descriptor) \
++ , 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
++
++
++/*
++ **
++ * @brief Response to the received request.
++ */
++struct _Sr__Response
++{
++ ProtobufCMessage base;
++ Sr__Operation operation;
++ /*
++ **< Result of the operation. 0 on success, non-zero values map to sr_error_t enum in sysrepo.h.
++ */
++ uint32_t result;
++ /*
++ **< Additional error information.
++ */
++ Sr__Error *error;
++ Sr__SessionStartResp *session_start_resp;
++ Sr__SessionStopResp *session_stop_resp;
++ Sr__SessionRefreshResp *session_refresh_resp;
++ Sr__SessionCheckResp *session_check_resp;
++ Sr__SessionSwitchDsResp *session_switch_ds_resp;
++ Sr__SessionSetOptsResp *session_set_opts_resp;
++ Sr__VersionVerifyResp *version_verify_resp;
++ Sr__ListSchemasResp *list_schemas_resp;
++ Sr__GetSchemaResp *get_schema_resp;
++ Sr__ModuleInstallResp *module_install_resp;
++ Sr__FeatureEnableResp *feature_enable_resp;
++ Sr__GetItemResp *get_item_resp;
++ Sr__GetItemsResp *get_items_resp;
++ Sr__GetSubtreeResp *get_subtree_resp;
++ Sr__GetSubtreesResp *get_subtrees_resp;
++ Sr__GetSubtreeChunkResp *get_subtree_chunk_resp;
++ Sr__SetItemResp *set_item_resp;
++ Sr__DeleteItemResp *delete_item_resp;
++ Sr__MoveItemResp *move_item_resp;
++ Sr__SetItemStrResp *set_item_str_resp;
++ Sr__ValidateResp *validate_resp;
++ Sr__CommitResp *commit_resp;
++ Sr__DiscardChangesResp *discard_changes_resp;
++ Sr__CopyConfigResp *copy_config_resp;
++ Sr__LockResp *lock_resp;
++ Sr__UnlockResp *unlock_resp;
++ Sr__SubscribeResp *subscribe_resp;
++ Sr__UnsubscribeResp *unsubscribe_resp;
++ Sr__CheckEnabledRunningResp *check_enabled_running_resp;
++ Sr__GetChangesResp *get_changes_resp;
++ Sr__DataProvideResp *data_provide_resp;
++ Sr__CheckExecPermResp *check_exec_perm_resp;
++ Sr__RPCResp *rpc_resp;
++ Sr__EventNotifResp *event_notif_resp;
++ Sr__EventNotifReplayResp *event_notif_replay_resp;
++};
++#define SR__RESPONSE__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__response__descriptor) \
++ , 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
++
++
++/*
++ **
++ * @brief Notification about an event that occurred in the datastore.
++ */
++struct _Sr__Notification
++{
++ ProtobufCMessage base;
++ Sr__SubscriptionType type;
++ char *destination_address;
++ char *source_address;
++ uint32_t source_pid;
++ uint32_t subscription_id;
++ protobuf_c_boolean has_commit_id;
++ uint32_t commit_id;
++ Sr__ModuleInstallNotification *module_install_notif;
++ Sr__FeatureEnableNotification *feature_enable_notif;
++ Sr__ModuleChangeNotification *module_change_notif;
++ Sr__SubtreeChangeNotification *subtree_change_notif;
++};
++#define SR__NOTIFICATION__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__notification__descriptor) \
++ , 0, NULL, NULL, 0, 0, 0,0, NULL, NULL, NULL, NULL }
++
++
++/*
++ **
++ * @brief Notification Acknowledgment.
++ */
++struct _Sr__NotificationAck
++{
++ ProtobufCMessage base;
++ /*
++ **< Original notification.
++ */
++ Sr__Notification *notif;
++ /*
++ **< Result of the notification (success / error code).
++ */
++ uint32_t result;
++ /*
++ **< Additional error information.
++ */
++ Sr__Error *error;
++ /*
++ **< If the result is error and this flag is set to true abort notification
++ * will not be delivered to this subscriber
++ * (Subscriber doesn't want notification about changes that he refused).
++ */
++ protobuf_c_boolean do_not_send_abort;
++};
++#define SR__NOTIFICATION_ACK__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__notification_ack__descriptor) \
++ , NULL, 0, NULL, 0 }
++
++
++/*
++ **
++ * @brief Internal request sent by sysrepo. Should not be used from the public API.
++ */
++struct _Sr__InternalRequest
++{
++ ProtobufCMessage base;
++ Sr__Operation operation;
++ protobuf_c_boolean has_postpone_timeout;
++ uint32_t postpone_timeout;
++ Sr__UnsubscribeDestinationReq *unsubscribe_dst_req;
++ Sr__CommitTimeoutReq *commit_timeout_req;
++ Sr__OperDataTimeoutReq *oper_data_timeout_req;
++ Sr__InternalStateDataReq *internal_state_data_req;
++ Sr__NotifStoreCleanupReq *notif_store_cleanup_req;
++ Sr__DelayedMsgReq *delayed_msg_req;
++ Sr__NacmReloadReq *nacm_reload_req;
++};
++#define SR__INTERNAL_REQUEST__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__internal_request__descriptor) \
++ , 0, 0,0, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
++
++
++/*
++ **
++ * @brief Umbrella sysrepo message used for communication between sysrepo
++ * engine and client library.
++ */
++struct _Sr__Msg
++{
++ ProtobufCMessage base;
++ /*
++ **< Indicates type of the message.
++ */
++ Sr__Msg__MsgType type;
++ /*
++ **< Session identifier. Can be 0 (value is ignored) for session_start and version_verify requests.
++ */
++ uint32_t session_id;
++ /*
++ **< Filled in in case of type == REQUEST.
++ */
++ Sr__Request *request;
++ /*
++ **< Filled in in case of type == RESPONSE.
++ */
++ Sr__Response *response;
++ /*
++ **< Filled in in case of type == NOTIFICATION.
++ */
++ Sr__Notification *notification;
++ /*
++ **< Filled in in case of type == NOTIFICATION_ACK
++ */
++ Sr__NotificationAck *notification_ack;
++ /*
++ **< Filled in in case of type == INTERNAL.
++ */
++ Sr__InternalRequest *internal_request;
++ /*
++ **< Not part of the protocol. Used internally by Sysrepo to store a pointer to memory context.
++ */
++ uint64_t _sysrepo_mem_ctx;
++};
++#define SR__MSG__INIT \
++ { PROTOBUF_C_MESSAGE_INIT (&sr__msg__descriptor) \
++ , 0, 0, NULL, NULL, NULL, NULL, NULL, 0 }
++
++
++/* Sr__Value methods */
++void sr__value__init
++ (Sr__Value *message);
++size_t sr__value__get_packed_size
++ (const Sr__Value *message);
++size_t sr__value__pack
++ (const Sr__Value *message,
++ uint8_t *out);
++size_t sr__value__pack_to_buffer
++ (const Sr__Value *message,
++ ProtobufCBuffer *buffer);
++Sr__Value *
++ sr__value__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__value__free_unpacked
++ (Sr__Value *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Node methods */
++void sr__node__init
++ (Sr__Node *message);
++size_t sr__node__get_packed_size
++ (const Sr__Node *message);
++size_t sr__node__pack
++ (const Sr__Node *message,
++ uint8_t *out);
++size_t sr__node__pack_to_buffer
++ (const Sr__Node *message,
++ ProtobufCBuffer *buffer);
++Sr__Node *
++ sr__node__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__node__free_unpacked
++ (Sr__Node *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Error methods */
++void sr__error__init
++ (Sr__Error *message);
++size_t sr__error__get_packed_size
++ (const Sr__Error *message);
++size_t sr__error__pack
++ (const Sr__Error *message,
++ uint8_t *out);
++size_t sr__error__pack_to_buffer
++ (const Sr__Error *message,
++ ProtobufCBuffer *buffer);
++Sr__Error *
++ sr__error__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__error__free_unpacked
++ (Sr__Error *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionStartReq methods */
++void sr__session_start_req__init
++ (Sr__SessionStartReq *message);
++size_t sr__session_start_req__get_packed_size
++ (const Sr__SessionStartReq *message);
++size_t sr__session_start_req__pack
++ (const Sr__SessionStartReq *message,
++ uint8_t *out);
++size_t sr__session_start_req__pack_to_buffer
++ (const Sr__SessionStartReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionStartReq *
++ sr__session_start_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_start_req__free_unpacked
++ (Sr__SessionStartReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionStartResp methods */
++void sr__session_start_resp__init
++ (Sr__SessionStartResp *message);
++size_t sr__session_start_resp__get_packed_size
++ (const Sr__SessionStartResp *message);
++size_t sr__session_start_resp__pack
++ (const Sr__SessionStartResp *message,
++ uint8_t *out);
++size_t sr__session_start_resp__pack_to_buffer
++ (const Sr__SessionStartResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionStartResp *
++ sr__session_start_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_start_resp__free_unpacked
++ (Sr__SessionStartResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionStopReq methods */
++void sr__session_stop_req__init
++ (Sr__SessionStopReq *message);
++size_t sr__session_stop_req__get_packed_size
++ (const Sr__SessionStopReq *message);
++size_t sr__session_stop_req__pack
++ (const Sr__SessionStopReq *message,
++ uint8_t *out);
++size_t sr__session_stop_req__pack_to_buffer
++ (const Sr__SessionStopReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionStopReq *
++ sr__session_stop_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_stop_req__free_unpacked
++ (Sr__SessionStopReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionStopResp methods */
++void sr__session_stop_resp__init
++ (Sr__SessionStopResp *message);
++size_t sr__session_stop_resp__get_packed_size
++ (const Sr__SessionStopResp *message);
++size_t sr__session_stop_resp__pack
++ (const Sr__SessionStopResp *message,
++ uint8_t *out);
++size_t sr__session_stop_resp__pack_to_buffer
++ (const Sr__SessionStopResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionStopResp *
++ sr__session_stop_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_stop_resp__free_unpacked
++ (Sr__SessionStopResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionRefreshReq methods */
++void sr__session_refresh_req__init
++ (Sr__SessionRefreshReq *message);
++size_t sr__session_refresh_req__get_packed_size
++ (const Sr__SessionRefreshReq *message);
++size_t sr__session_refresh_req__pack
++ (const Sr__SessionRefreshReq *message,
++ uint8_t *out);
++size_t sr__session_refresh_req__pack_to_buffer
++ (const Sr__SessionRefreshReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionRefreshReq *
++ sr__session_refresh_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_refresh_req__free_unpacked
++ (Sr__SessionRefreshReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionRefreshResp methods */
++void sr__session_refresh_resp__init
++ (Sr__SessionRefreshResp *message);
++size_t sr__session_refresh_resp__get_packed_size
++ (const Sr__SessionRefreshResp *message);
++size_t sr__session_refresh_resp__pack
++ (const Sr__SessionRefreshResp *message,
++ uint8_t *out);
++size_t sr__session_refresh_resp__pack_to_buffer
++ (const Sr__SessionRefreshResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionRefreshResp *
++ sr__session_refresh_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_refresh_resp__free_unpacked
++ (Sr__SessionRefreshResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionCheckReq methods */
++void sr__session_check_req__init
++ (Sr__SessionCheckReq *message);
++size_t sr__session_check_req__get_packed_size
++ (const Sr__SessionCheckReq *message);
++size_t sr__session_check_req__pack
++ (const Sr__SessionCheckReq *message,
++ uint8_t *out);
++size_t sr__session_check_req__pack_to_buffer
++ (const Sr__SessionCheckReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionCheckReq *
++ sr__session_check_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_check_req__free_unpacked
++ (Sr__SessionCheckReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionCheckResp methods */
++void sr__session_check_resp__init
++ (Sr__SessionCheckResp *message);
++size_t sr__session_check_resp__get_packed_size
++ (const Sr__SessionCheckResp *message);
++size_t sr__session_check_resp__pack
++ (const Sr__SessionCheckResp *message,
++ uint8_t *out);
++size_t sr__session_check_resp__pack_to_buffer
++ (const Sr__SessionCheckResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionCheckResp *
++ sr__session_check_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_check_resp__free_unpacked
++ (Sr__SessionCheckResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionSwitchDsReq methods */
++void sr__session_switch_ds_req__init
++ (Sr__SessionSwitchDsReq *message);
++size_t sr__session_switch_ds_req__get_packed_size
++ (const Sr__SessionSwitchDsReq *message);
++size_t sr__session_switch_ds_req__pack
++ (const Sr__SessionSwitchDsReq *message,
++ uint8_t *out);
++size_t sr__session_switch_ds_req__pack_to_buffer
++ (const Sr__SessionSwitchDsReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionSwitchDsReq *
++ sr__session_switch_ds_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_switch_ds_req__free_unpacked
++ (Sr__SessionSwitchDsReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionSwitchDsResp methods */
++void sr__session_switch_ds_resp__init
++ (Sr__SessionSwitchDsResp *message);
++size_t sr__session_switch_ds_resp__get_packed_size
++ (const Sr__SessionSwitchDsResp *message);
++size_t sr__session_switch_ds_resp__pack
++ (const Sr__SessionSwitchDsResp *message,
++ uint8_t *out);
++size_t sr__session_switch_ds_resp__pack_to_buffer
++ (const Sr__SessionSwitchDsResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionSwitchDsResp *
++ sr__session_switch_ds_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_switch_ds_resp__free_unpacked
++ (Sr__SessionSwitchDsResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionSetOptsReq methods */
++void sr__session_set_opts_req__init
++ (Sr__SessionSetOptsReq *message);
++size_t sr__session_set_opts_req__get_packed_size
++ (const Sr__SessionSetOptsReq *message);
++size_t sr__session_set_opts_req__pack
++ (const Sr__SessionSetOptsReq *message,
++ uint8_t *out);
++size_t sr__session_set_opts_req__pack_to_buffer
++ (const Sr__SessionSetOptsReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionSetOptsReq *
++ sr__session_set_opts_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_set_opts_req__free_unpacked
++ (Sr__SessionSetOptsReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SessionSetOptsResp methods */
++void sr__session_set_opts_resp__init
++ (Sr__SessionSetOptsResp *message);
++size_t sr__session_set_opts_resp__get_packed_size
++ (const Sr__SessionSetOptsResp *message);
++size_t sr__session_set_opts_resp__pack
++ (const Sr__SessionSetOptsResp *message,
++ uint8_t *out);
++size_t sr__session_set_opts_resp__pack_to_buffer
++ (const Sr__SessionSetOptsResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SessionSetOptsResp *
++ sr__session_set_opts_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__session_set_opts_resp__free_unpacked
++ (Sr__SessionSetOptsResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__VersionVerifyReq methods */
++void sr__version_verify_req__init
++ (Sr__VersionVerifyReq *message);
++size_t sr__version_verify_req__get_packed_size
++ (const Sr__VersionVerifyReq *message);
++size_t sr__version_verify_req__pack
++ (const Sr__VersionVerifyReq *message,
++ uint8_t *out);
++size_t sr__version_verify_req__pack_to_buffer
++ (const Sr__VersionVerifyReq *message,
++ ProtobufCBuffer *buffer);
++Sr__VersionVerifyReq *
++ sr__version_verify_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__version_verify_req__free_unpacked
++ (Sr__VersionVerifyReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__VersionVerifyResp methods */
++void sr__version_verify_resp__init
++ (Sr__VersionVerifyResp *message);
++size_t sr__version_verify_resp__get_packed_size
++ (const Sr__VersionVerifyResp *message);
++size_t sr__version_verify_resp__pack
++ (const Sr__VersionVerifyResp *message,
++ uint8_t *out);
++size_t sr__version_verify_resp__pack_to_buffer
++ (const Sr__VersionVerifyResp *message,
++ ProtobufCBuffer *buffer);
++Sr__VersionVerifyResp *
++ sr__version_verify_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__version_verify_resp__free_unpacked
++ (Sr__VersionVerifyResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SchemaRevision methods */
++void sr__schema_revision__init
++ (Sr__SchemaRevision *message);
++size_t sr__schema_revision__get_packed_size
++ (const Sr__SchemaRevision *message);
++size_t sr__schema_revision__pack
++ (const Sr__SchemaRevision *message,
++ uint8_t *out);
++size_t sr__schema_revision__pack_to_buffer
++ (const Sr__SchemaRevision *message,
++ ProtobufCBuffer *buffer);
++Sr__SchemaRevision *
++ sr__schema_revision__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__schema_revision__free_unpacked
++ (Sr__SchemaRevision *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SchemaSubmodule methods */
++void sr__schema_submodule__init
++ (Sr__SchemaSubmodule *message);
++size_t sr__schema_submodule__get_packed_size
++ (const Sr__SchemaSubmodule *message);
++size_t sr__schema_submodule__pack
++ (const Sr__SchemaSubmodule *message,
++ uint8_t *out);
++size_t sr__schema_submodule__pack_to_buffer
++ (const Sr__SchemaSubmodule *message,
++ ProtobufCBuffer *buffer);
++Sr__SchemaSubmodule *
++ sr__schema_submodule__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__schema_submodule__free_unpacked
++ (Sr__SchemaSubmodule *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Schema methods */
++void sr__schema__init
++ (Sr__Schema *message);
++size_t sr__schema__get_packed_size
++ (const Sr__Schema *message);
++size_t sr__schema__pack
++ (const Sr__Schema *message,
++ uint8_t *out);
++size_t sr__schema__pack_to_buffer
++ (const Sr__Schema *message,
++ ProtobufCBuffer *buffer);
++Sr__Schema *
++ sr__schema__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__schema__free_unpacked
++ (Sr__Schema *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ListSchemasReq methods */
++void sr__list_schemas_req__init
++ (Sr__ListSchemasReq *message);
++size_t sr__list_schemas_req__get_packed_size
++ (const Sr__ListSchemasReq *message);
++size_t sr__list_schemas_req__pack
++ (const Sr__ListSchemasReq *message,
++ uint8_t *out);
++size_t sr__list_schemas_req__pack_to_buffer
++ (const Sr__ListSchemasReq *message,
++ ProtobufCBuffer *buffer);
++Sr__ListSchemasReq *
++ sr__list_schemas_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__list_schemas_req__free_unpacked
++ (Sr__ListSchemasReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ListSchemasResp methods */
++void sr__list_schemas_resp__init
++ (Sr__ListSchemasResp *message);
++size_t sr__list_schemas_resp__get_packed_size
++ (const Sr__ListSchemasResp *message);
++size_t sr__list_schemas_resp__pack
++ (const Sr__ListSchemasResp *message,
++ uint8_t *out);
++size_t sr__list_schemas_resp__pack_to_buffer
++ (const Sr__ListSchemasResp *message,
++ ProtobufCBuffer *buffer);
++Sr__ListSchemasResp *
++ sr__list_schemas_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__list_schemas_resp__free_unpacked
++ (Sr__ListSchemasResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSchemaReq methods */
++void sr__get_schema_req__init
++ (Sr__GetSchemaReq *message);
++size_t sr__get_schema_req__get_packed_size
++ (const Sr__GetSchemaReq *message);
++size_t sr__get_schema_req__pack
++ (const Sr__GetSchemaReq *message,
++ uint8_t *out);
++size_t sr__get_schema_req__pack_to_buffer
++ (const Sr__GetSchemaReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSchemaReq *
++ sr__get_schema_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_schema_req__free_unpacked
++ (Sr__GetSchemaReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSchemaResp methods */
++void sr__get_schema_resp__init
++ (Sr__GetSchemaResp *message);
++size_t sr__get_schema_resp__get_packed_size
++ (const Sr__GetSchemaResp *message);
++size_t sr__get_schema_resp__pack
++ (const Sr__GetSchemaResp *message,
++ uint8_t *out);
++size_t sr__get_schema_resp__pack_to_buffer
++ (const Sr__GetSchemaResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSchemaResp *
++ sr__get_schema_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_schema_resp__free_unpacked
++ (Sr__GetSchemaResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetItemReq methods */
++void sr__get_item_req__init
++ (Sr__GetItemReq *message);
++size_t sr__get_item_req__get_packed_size
++ (const Sr__GetItemReq *message);
++size_t sr__get_item_req__pack
++ (const Sr__GetItemReq *message,
++ uint8_t *out);
++size_t sr__get_item_req__pack_to_buffer
++ (const Sr__GetItemReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetItemReq *
++ sr__get_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_item_req__free_unpacked
++ (Sr__GetItemReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetItemResp methods */
++void sr__get_item_resp__init
++ (Sr__GetItemResp *message);
++size_t sr__get_item_resp__get_packed_size
++ (const Sr__GetItemResp *message);
++size_t sr__get_item_resp__pack
++ (const Sr__GetItemResp *message,
++ uint8_t *out);
++size_t sr__get_item_resp__pack_to_buffer
++ (const Sr__GetItemResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetItemResp *
++ sr__get_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_item_resp__free_unpacked
++ (Sr__GetItemResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetItemsReq methods */
++void sr__get_items_req__init
++ (Sr__GetItemsReq *message);
++size_t sr__get_items_req__get_packed_size
++ (const Sr__GetItemsReq *message);
++size_t sr__get_items_req__pack
++ (const Sr__GetItemsReq *message,
++ uint8_t *out);
++size_t sr__get_items_req__pack_to_buffer
++ (const Sr__GetItemsReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetItemsReq *
++ sr__get_items_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_items_req__free_unpacked
++ (Sr__GetItemsReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetItemsResp methods */
++void sr__get_items_resp__init
++ (Sr__GetItemsResp *message);
++size_t sr__get_items_resp__get_packed_size
++ (const Sr__GetItemsResp *message);
++size_t sr__get_items_resp__pack
++ (const Sr__GetItemsResp *message,
++ uint8_t *out);
++size_t sr__get_items_resp__pack_to_buffer
++ (const Sr__GetItemsResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetItemsResp *
++ sr__get_items_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_items_resp__free_unpacked
++ (Sr__GetItemsResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreeReq methods */
++void sr__get_subtree_req__init
++ (Sr__GetSubtreeReq *message);
++size_t sr__get_subtree_req__get_packed_size
++ (const Sr__GetSubtreeReq *message);
++size_t sr__get_subtree_req__pack
++ (const Sr__GetSubtreeReq *message,
++ uint8_t *out);
++size_t sr__get_subtree_req__pack_to_buffer
++ (const Sr__GetSubtreeReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreeReq *
++ sr__get_subtree_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtree_req__free_unpacked
++ (Sr__GetSubtreeReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreeResp methods */
++void sr__get_subtree_resp__init
++ (Sr__GetSubtreeResp *message);
++size_t sr__get_subtree_resp__get_packed_size
++ (const Sr__GetSubtreeResp *message);
++size_t sr__get_subtree_resp__pack
++ (const Sr__GetSubtreeResp *message,
++ uint8_t *out);
++size_t sr__get_subtree_resp__pack_to_buffer
++ (const Sr__GetSubtreeResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreeResp *
++ sr__get_subtree_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtree_resp__free_unpacked
++ (Sr__GetSubtreeResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreesReq methods */
++void sr__get_subtrees_req__init
++ (Sr__GetSubtreesReq *message);
++size_t sr__get_subtrees_req__get_packed_size
++ (const Sr__GetSubtreesReq *message);
++size_t sr__get_subtrees_req__pack
++ (const Sr__GetSubtreesReq *message,
++ uint8_t *out);
++size_t sr__get_subtrees_req__pack_to_buffer
++ (const Sr__GetSubtreesReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreesReq *
++ sr__get_subtrees_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtrees_req__free_unpacked
++ (Sr__GetSubtreesReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreesResp methods */
++void sr__get_subtrees_resp__init
++ (Sr__GetSubtreesResp *message);
++size_t sr__get_subtrees_resp__get_packed_size
++ (const Sr__GetSubtreesResp *message);
++size_t sr__get_subtrees_resp__pack
++ (const Sr__GetSubtreesResp *message,
++ uint8_t *out);
++size_t sr__get_subtrees_resp__pack_to_buffer
++ (const Sr__GetSubtreesResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreesResp *
++ sr__get_subtrees_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtrees_resp__free_unpacked
++ (Sr__GetSubtreesResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreeChunkReq methods */
++void sr__get_subtree_chunk_req__init
++ (Sr__GetSubtreeChunkReq *message);
++size_t sr__get_subtree_chunk_req__get_packed_size
++ (const Sr__GetSubtreeChunkReq *message);
++size_t sr__get_subtree_chunk_req__pack
++ (const Sr__GetSubtreeChunkReq *message,
++ uint8_t *out);
++size_t sr__get_subtree_chunk_req__pack_to_buffer
++ (const Sr__GetSubtreeChunkReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreeChunkReq *
++ sr__get_subtree_chunk_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtree_chunk_req__free_unpacked
++ (Sr__GetSubtreeChunkReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetSubtreeChunkResp methods */
++void sr__get_subtree_chunk_resp__init
++ (Sr__GetSubtreeChunkResp *message);
++size_t sr__get_subtree_chunk_resp__get_packed_size
++ (const Sr__GetSubtreeChunkResp *message);
++size_t sr__get_subtree_chunk_resp__pack
++ (const Sr__GetSubtreeChunkResp *message,
++ uint8_t *out);
++size_t sr__get_subtree_chunk_resp__pack_to_buffer
++ (const Sr__GetSubtreeChunkResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetSubtreeChunkResp *
++ sr__get_subtree_chunk_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_subtree_chunk_resp__free_unpacked
++ (Sr__GetSubtreeChunkResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SetItemReq methods */
++void sr__set_item_req__init
++ (Sr__SetItemReq *message);
++size_t sr__set_item_req__get_packed_size
++ (const Sr__SetItemReq *message);
++size_t sr__set_item_req__pack
++ (const Sr__SetItemReq *message,
++ uint8_t *out);
++size_t sr__set_item_req__pack_to_buffer
++ (const Sr__SetItemReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SetItemReq *
++ sr__set_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__set_item_req__free_unpacked
++ (Sr__SetItemReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SetItemResp methods */
++void sr__set_item_resp__init
++ (Sr__SetItemResp *message);
++size_t sr__set_item_resp__get_packed_size
++ (const Sr__SetItemResp *message);
++size_t sr__set_item_resp__pack
++ (const Sr__SetItemResp *message,
++ uint8_t *out);
++size_t sr__set_item_resp__pack_to_buffer
++ (const Sr__SetItemResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SetItemResp *
++ sr__set_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__set_item_resp__free_unpacked
++ (Sr__SetItemResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SetItemStrReq methods */
++void sr__set_item_str_req__init
++ (Sr__SetItemStrReq *message);
++size_t sr__set_item_str_req__get_packed_size
++ (const Sr__SetItemStrReq *message);
++size_t sr__set_item_str_req__pack
++ (const Sr__SetItemStrReq *message,
++ uint8_t *out);
++size_t sr__set_item_str_req__pack_to_buffer
++ (const Sr__SetItemStrReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SetItemStrReq *
++ sr__set_item_str_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__set_item_str_req__free_unpacked
++ (Sr__SetItemStrReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SetItemStrResp methods */
++void sr__set_item_str_resp__init
++ (Sr__SetItemStrResp *message);
++size_t sr__set_item_str_resp__get_packed_size
++ (const Sr__SetItemStrResp *message);
++size_t sr__set_item_str_resp__pack
++ (const Sr__SetItemStrResp *message,
++ uint8_t *out);
++size_t sr__set_item_str_resp__pack_to_buffer
++ (const Sr__SetItemStrResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SetItemStrResp *
++ sr__set_item_str_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__set_item_str_resp__free_unpacked
++ (Sr__SetItemStrResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DeleteItemReq methods */
++void sr__delete_item_req__init
++ (Sr__DeleteItemReq *message);
++size_t sr__delete_item_req__get_packed_size
++ (const Sr__DeleteItemReq *message);
++size_t sr__delete_item_req__pack
++ (const Sr__DeleteItemReq *message,
++ uint8_t *out);
++size_t sr__delete_item_req__pack_to_buffer
++ (const Sr__DeleteItemReq *message,
++ ProtobufCBuffer *buffer);
++Sr__DeleteItemReq *
++ sr__delete_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__delete_item_req__free_unpacked
++ (Sr__DeleteItemReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DeleteItemResp methods */
++void sr__delete_item_resp__init
++ (Sr__DeleteItemResp *message);
++size_t sr__delete_item_resp__get_packed_size
++ (const Sr__DeleteItemResp *message);
++size_t sr__delete_item_resp__pack
++ (const Sr__DeleteItemResp *message,
++ uint8_t *out);
++size_t sr__delete_item_resp__pack_to_buffer
++ (const Sr__DeleteItemResp *message,
++ ProtobufCBuffer *buffer);
++Sr__DeleteItemResp *
++ sr__delete_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__delete_item_resp__free_unpacked
++ (Sr__DeleteItemResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__MoveItemReq methods */
++void sr__move_item_req__init
++ (Sr__MoveItemReq *message);
++size_t sr__move_item_req__get_packed_size
++ (const Sr__MoveItemReq *message);
++size_t sr__move_item_req__pack
++ (const Sr__MoveItemReq *message,
++ uint8_t *out);
++size_t sr__move_item_req__pack_to_buffer
++ (const Sr__MoveItemReq *message,
++ ProtobufCBuffer *buffer);
++Sr__MoveItemReq *
++ sr__move_item_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__move_item_req__free_unpacked
++ (Sr__MoveItemReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__MoveItemResp methods */
++void sr__move_item_resp__init
++ (Sr__MoveItemResp *message);
++size_t sr__move_item_resp__get_packed_size
++ (const Sr__MoveItemResp *message);
++size_t sr__move_item_resp__pack
++ (const Sr__MoveItemResp *message,
++ uint8_t *out);
++size_t sr__move_item_resp__pack_to_buffer
++ (const Sr__MoveItemResp *message,
++ ProtobufCBuffer *buffer);
++Sr__MoveItemResp *
++ sr__move_item_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__move_item_resp__free_unpacked
++ (Sr__MoveItemResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ValidateReq methods */
++void sr__validate_req__init
++ (Sr__ValidateReq *message);
++size_t sr__validate_req__get_packed_size
++ (const Sr__ValidateReq *message);
++size_t sr__validate_req__pack
++ (const Sr__ValidateReq *message,
++ uint8_t *out);
++size_t sr__validate_req__pack_to_buffer
++ (const Sr__ValidateReq *message,
++ ProtobufCBuffer *buffer);
++Sr__ValidateReq *
++ sr__validate_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__validate_req__free_unpacked
++ (Sr__ValidateReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ValidateResp methods */
++void sr__validate_resp__init
++ (Sr__ValidateResp *message);
++size_t sr__validate_resp__get_packed_size
++ (const Sr__ValidateResp *message);
++size_t sr__validate_resp__pack
++ (const Sr__ValidateResp *message,
++ uint8_t *out);
++size_t sr__validate_resp__pack_to_buffer
++ (const Sr__ValidateResp *message,
++ ProtobufCBuffer *buffer);
++Sr__ValidateResp *
++ sr__validate_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__validate_resp__free_unpacked
++ (Sr__ValidateResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CommitReq methods */
++void sr__commit_req__init
++ (Sr__CommitReq *message);
++size_t sr__commit_req__get_packed_size
++ (const Sr__CommitReq *message);
++size_t sr__commit_req__pack
++ (const Sr__CommitReq *message,
++ uint8_t *out);
++size_t sr__commit_req__pack_to_buffer
++ (const Sr__CommitReq *message,
++ ProtobufCBuffer *buffer);
++Sr__CommitReq *
++ sr__commit_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__commit_req__free_unpacked
++ (Sr__CommitReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CommitResp methods */
++void sr__commit_resp__init
++ (Sr__CommitResp *message);
++size_t sr__commit_resp__get_packed_size
++ (const Sr__CommitResp *message);
++size_t sr__commit_resp__pack
++ (const Sr__CommitResp *message,
++ uint8_t *out);
++size_t sr__commit_resp__pack_to_buffer
++ (const Sr__CommitResp *message,
++ ProtobufCBuffer *buffer);
++Sr__CommitResp *
++ sr__commit_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__commit_resp__free_unpacked
++ (Sr__CommitResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DiscardChangesReq methods */
++void sr__discard_changes_req__init
++ (Sr__DiscardChangesReq *message);
++size_t sr__discard_changes_req__get_packed_size
++ (const Sr__DiscardChangesReq *message);
++size_t sr__discard_changes_req__pack
++ (const Sr__DiscardChangesReq *message,
++ uint8_t *out);
++size_t sr__discard_changes_req__pack_to_buffer
++ (const Sr__DiscardChangesReq *message,
++ ProtobufCBuffer *buffer);
++Sr__DiscardChangesReq *
++ sr__discard_changes_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__discard_changes_req__free_unpacked
++ (Sr__DiscardChangesReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DiscardChangesResp methods */
++void sr__discard_changes_resp__init
++ (Sr__DiscardChangesResp *message);
++size_t sr__discard_changes_resp__get_packed_size
++ (const Sr__DiscardChangesResp *message);
++size_t sr__discard_changes_resp__pack
++ (const Sr__DiscardChangesResp *message,
++ uint8_t *out);
++size_t sr__discard_changes_resp__pack_to_buffer
++ (const Sr__DiscardChangesResp *message,
++ ProtobufCBuffer *buffer);
++Sr__DiscardChangesResp *
++ sr__discard_changes_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__discard_changes_resp__free_unpacked
++ (Sr__DiscardChangesResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CopyConfigReq methods */
++void sr__copy_config_req__init
++ (Sr__CopyConfigReq *message);
++size_t sr__copy_config_req__get_packed_size
++ (const Sr__CopyConfigReq *message);
++size_t sr__copy_config_req__pack
++ (const Sr__CopyConfigReq *message,
++ uint8_t *out);
++size_t sr__copy_config_req__pack_to_buffer
++ (const Sr__CopyConfigReq *message,
++ ProtobufCBuffer *buffer);
++Sr__CopyConfigReq *
++ sr__copy_config_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__copy_config_req__free_unpacked
++ (Sr__CopyConfigReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CopyConfigResp methods */
++void sr__copy_config_resp__init
++ (Sr__CopyConfigResp *message);
++size_t sr__copy_config_resp__get_packed_size
++ (const Sr__CopyConfigResp *message);
++size_t sr__copy_config_resp__pack
++ (const Sr__CopyConfigResp *message,
++ uint8_t *out);
++size_t sr__copy_config_resp__pack_to_buffer
++ (const Sr__CopyConfigResp *message,
++ ProtobufCBuffer *buffer);
++Sr__CopyConfigResp *
++ sr__copy_config_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__copy_config_resp__free_unpacked
++ (Sr__CopyConfigResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__LockReq methods */
++void sr__lock_req__init
++ (Sr__LockReq *message);
++size_t sr__lock_req__get_packed_size
++ (const Sr__LockReq *message);
++size_t sr__lock_req__pack
++ (const Sr__LockReq *message,
++ uint8_t *out);
++size_t sr__lock_req__pack_to_buffer
++ (const Sr__LockReq *message,
++ ProtobufCBuffer *buffer);
++Sr__LockReq *
++ sr__lock_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__lock_req__free_unpacked
++ (Sr__LockReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__LockResp methods */
++void sr__lock_resp__init
++ (Sr__LockResp *message);
++size_t sr__lock_resp__get_packed_size
++ (const Sr__LockResp *message);
++size_t sr__lock_resp__pack
++ (const Sr__LockResp *message,
++ uint8_t *out);
++size_t sr__lock_resp__pack_to_buffer
++ (const Sr__LockResp *message,
++ ProtobufCBuffer *buffer);
++Sr__LockResp *
++ sr__lock_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__lock_resp__free_unpacked
++ (Sr__LockResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__UnlockReq methods */
++void sr__unlock_req__init
++ (Sr__UnlockReq *message);
++size_t sr__unlock_req__get_packed_size
++ (const Sr__UnlockReq *message);
++size_t sr__unlock_req__pack
++ (const Sr__UnlockReq *message,
++ uint8_t *out);
++size_t sr__unlock_req__pack_to_buffer
++ (const Sr__UnlockReq *message,
++ ProtobufCBuffer *buffer);
++Sr__UnlockReq *
++ sr__unlock_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__unlock_req__free_unpacked
++ (Sr__UnlockReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__UnlockResp methods */
++void sr__unlock_resp__init
++ (Sr__UnlockResp *message);
++size_t sr__unlock_resp__get_packed_size
++ (const Sr__UnlockResp *message);
++size_t sr__unlock_resp__pack
++ (const Sr__UnlockResp *message,
++ uint8_t *out);
++size_t sr__unlock_resp__pack_to_buffer
++ (const Sr__UnlockResp *message,
++ ProtobufCBuffer *buffer);
++Sr__UnlockResp *
++ sr__unlock_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__unlock_resp__free_unpacked
++ (Sr__UnlockResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SubscribeReq methods */
++void sr__subscribe_req__init
++ (Sr__SubscribeReq *message);
++size_t sr__subscribe_req__get_packed_size
++ (const Sr__SubscribeReq *message);
++size_t sr__subscribe_req__pack
++ (const Sr__SubscribeReq *message,
++ uint8_t *out);
++size_t sr__subscribe_req__pack_to_buffer
++ (const Sr__SubscribeReq *message,
++ ProtobufCBuffer *buffer);
++Sr__SubscribeReq *
++ sr__subscribe_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__subscribe_req__free_unpacked
++ (Sr__SubscribeReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SubscribeResp methods */
++void sr__subscribe_resp__init
++ (Sr__SubscribeResp *message);
++size_t sr__subscribe_resp__get_packed_size
++ (const Sr__SubscribeResp *message);
++size_t sr__subscribe_resp__pack
++ (const Sr__SubscribeResp *message,
++ uint8_t *out);
++size_t sr__subscribe_resp__pack_to_buffer
++ (const Sr__SubscribeResp *message,
++ ProtobufCBuffer *buffer);
++Sr__SubscribeResp *
++ sr__subscribe_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__subscribe_resp__free_unpacked
++ (Sr__SubscribeResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__UnsubscribeReq methods */
++void sr__unsubscribe_req__init
++ (Sr__UnsubscribeReq *message);
++size_t sr__unsubscribe_req__get_packed_size
++ (const Sr__UnsubscribeReq *message);
++size_t sr__unsubscribe_req__pack
++ (const Sr__UnsubscribeReq *message,
++ uint8_t *out);
++size_t sr__unsubscribe_req__pack_to_buffer
++ (const Sr__UnsubscribeReq *message,
++ ProtobufCBuffer *buffer);
++Sr__UnsubscribeReq *
++ sr__unsubscribe_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__unsubscribe_req__free_unpacked
++ (Sr__UnsubscribeReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__UnsubscribeResp methods */
++void sr__unsubscribe_resp__init
++ (Sr__UnsubscribeResp *message);
++size_t sr__unsubscribe_resp__get_packed_size
++ (const Sr__UnsubscribeResp *message);
++size_t sr__unsubscribe_resp__pack
++ (const Sr__UnsubscribeResp *message,
++ uint8_t *out);
++size_t sr__unsubscribe_resp__pack_to_buffer
++ (const Sr__UnsubscribeResp *message,
++ ProtobufCBuffer *buffer);
++Sr__UnsubscribeResp *
++ sr__unsubscribe_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__unsubscribe_resp__free_unpacked
++ (Sr__UnsubscribeResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CheckEnabledRunningReq methods */
++void sr__check_enabled_running_req__init
++ (Sr__CheckEnabledRunningReq *message);
++size_t sr__check_enabled_running_req__get_packed_size
++ (const Sr__CheckEnabledRunningReq *message);
++size_t sr__check_enabled_running_req__pack
++ (const Sr__CheckEnabledRunningReq *message,
++ uint8_t *out);
++size_t sr__check_enabled_running_req__pack_to_buffer
++ (const Sr__CheckEnabledRunningReq *message,
++ ProtobufCBuffer *buffer);
++Sr__CheckEnabledRunningReq *
++ sr__check_enabled_running_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__check_enabled_running_req__free_unpacked
++ (Sr__CheckEnabledRunningReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CheckEnabledRunningResp methods */
++void sr__check_enabled_running_resp__init
++ (Sr__CheckEnabledRunningResp *message);
++size_t sr__check_enabled_running_resp__get_packed_size
++ (const Sr__CheckEnabledRunningResp *message);
++size_t sr__check_enabled_running_resp__pack
++ (const Sr__CheckEnabledRunningResp *message,
++ uint8_t *out);
++size_t sr__check_enabled_running_resp__pack_to_buffer
++ (const Sr__CheckEnabledRunningResp *message,
++ ProtobufCBuffer *buffer);
++Sr__CheckEnabledRunningResp *
++ sr__check_enabled_running_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__check_enabled_running_resp__free_unpacked
++ (Sr__CheckEnabledRunningResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ModuleInstallNotification methods */
++void sr__module_install_notification__init
++ (Sr__ModuleInstallNotification *message);
++size_t sr__module_install_notification__get_packed_size
++ (const Sr__ModuleInstallNotification *message);
++size_t sr__module_install_notification__pack
++ (const Sr__ModuleInstallNotification *message,
++ uint8_t *out);
++size_t sr__module_install_notification__pack_to_buffer
++ (const Sr__ModuleInstallNotification *message,
++ ProtobufCBuffer *buffer);
++Sr__ModuleInstallNotification *
++ sr__module_install_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__module_install_notification__free_unpacked
++ (Sr__ModuleInstallNotification *message,
++ ProtobufCAllocator *allocator);
++/* Sr__FeatureEnableNotification methods */
++void sr__feature_enable_notification__init
++ (Sr__FeatureEnableNotification *message);
++size_t sr__feature_enable_notification__get_packed_size
++ (const Sr__FeatureEnableNotification *message);
++size_t sr__feature_enable_notification__pack
++ (const Sr__FeatureEnableNotification *message,
++ uint8_t *out);
++size_t sr__feature_enable_notification__pack_to_buffer
++ (const Sr__FeatureEnableNotification *message,
++ ProtobufCBuffer *buffer);
++Sr__FeatureEnableNotification *
++ sr__feature_enable_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__feature_enable_notification__free_unpacked
++ (Sr__FeatureEnableNotification *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ModuleChangeNotification methods */
++void sr__module_change_notification__init
++ (Sr__ModuleChangeNotification *message);
++size_t sr__module_change_notification__get_packed_size
++ (const Sr__ModuleChangeNotification *message);
++size_t sr__module_change_notification__pack
++ (const Sr__ModuleChangeNotification *message,
++ uint8_t *out);
++size_t sr__module_change_notification__pack_to_buffer
++ (const Sr__ModuleChangeNotification *message,
++ ProtobufCBuffer *buffer);
++Sr__ModuleChangeNotification *
++ sr__module_change_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__module_change_notification__free_unpacked
++ (Sr__ModuleChangeNotification *message,
++ ProtobufCAllocator *allocator);
++/* Sr__SubtreeChangeNotification methods */
++void sr__subtree_change_notification__init
++ (Sr__SubtreeChangeNotification *message);
++size_t sr__subtree_change_notification__get_packed_size
++ (const Sr__SubtreeChangeNotification *message);
++size_t sr__subtree_change_notification__pack
++ (const Sr__SubtreeChangeNotification *message,
++ uint8_t *out);
++size_t sr__subtree_change_notification__pack_to_buffer
++ (const Sr__SubtreeChangeNotification *message,
++ ProtobufCBuffer *buffer);
++Sr__SubtreeChangeNotification *
++ sr__subtree_change_notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__subtree_change_notification__free_unpacked
++ (Sr__SubtreeChangeNotification *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Change methods */
++void sr__change__init
++ (Sr__Change *message);
++size_t sr__change__get_packed_size
++ (const Sr__Change *message);
++size_t sr__change__pack
++ (const Sr__Change *message,
++ uint8_t *out);
++size_t sr__change__pack_to_buffer
++ (const Sr__Change *message,
++ ProtobufCBuffer *buffer);
++Sr__Change *
++ sr__change__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__change__free_unpacked
++ (Sr__Change *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetChangesReq methods */
++void sr__get_changes_req__init
++ (Sr__GetChangesReq *message);
++size_t sr__get_changes_req__get_packed_size
++ (const Sr__GetChangesReq *message);
++size_t sr__get_changes_req__pack
++ (const Sr__GetChangesReq *message,
++ uint8_t *out);
++size_t sr__get_changes_req__pack_to_buffer
++ (const Sr__GetChangesReq *message,
++ ProtobufCBuffer *buffer);
++Sr__GetChangesReq *
++ sr__get_changes_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_changes_req__free_unpacked
++ (Sr__GetChangesReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__GetChangesResp methods */
++void sr__get_changes_resp__init
++ (Sr__GetChangesResp *message);
++size_t sr__get_changes_resp__get_packed_size
++ (const Sr__GetChangesResp *message);
++size_t sr__get_changes_resp__pack
++ (const Sr__GetChangesResp *message,
++ uint8_t *out);
++size_t sr__get_changes_resp__pack_to_buffer
++ (const Sr__GetChangesResp *message,
++ ProtobufCBuffer *buffer);
++Sr__GetChangesResp *
++ sr__get_changes_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__get_changes_resp__free_unpacked
++ (Sr__GetChangesResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CheckExecPermReq methods */
++void sr__check_exec_perm_req__init
++ (Sr__CheckExecPermReq *message);
++size_t sr__check_exec_perm_req__get_packed_size
++ (const Sr__CheckExecPermReq *message);
++size_t sr__check_exec_perm_req__pack
++ (const Sr__CheckExecPermReq *message,
++ uint8_t *out);
++size_t sr__check_exec_perm_req__pack_to_buffer
++ (const Sr__CheckExecPermReq *message,
++ ProtobufCBuffer *buffer);
++Sr__CheckExecPermReq *
++ sr__check_exec_perm_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__check_exec_perm_req__free_unpacked
++ (Sr__CheckExecPermReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CheckExecPermResp methods */
++void sr__check_exec_perm_resp__init
++ (Sr__CheckExecPermResp *message);
++size_t sr__check_exec_perm_resp__get_packed_size
++ (const Sr__CheckExecPermResp *message);
++size_t sr__check_exec_perm_resp__pack
++ (const Sr__CheckExecPermResp *message,
++ uint8_t *out);
++size_t sr__check_exec_perm_resp__pack_to_buffer
++ (const Sr__CheckExecPermResp *message,
++ ProtobufCBuffer *buffer);
++Sr__CheckExecPermResp *
++ sr__check_exec_perm_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__check_exec_perm_resp__free_unpacked
++ (Sr__CheckExecPermResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__RPCReq methods */
++void sr__rpcreq__init
++ (Sr__RPCReq *message);
++size_t sr__rpcreq__get_packed_size
++ (const Sr__RPCReq *message);
++size_t sr__rpcreq__pack
++ (const Sr__RPCReq *message,
++ uint8_t *out);
++size_t sr__rpcreq__pack_to_buffer
++ (const Sr__RPCReq *message,
++ ProtobufCBuffer *buffer);
++Sr__RPCReq *
++ sr__rpcreq__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__rpcreq__free_unpacked
++ (Sr__RPCReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__RPCResp methods */
++void sr__rpcresp__init
++ (Sr__RPCResp *message);
++size_t sr__rpcresp__get_packed_size
++ (const Sr__RPCResp *message);
++size_t sr__rpcresp__pack
++ (const Sr__RPCResp *message,
++ uint8_t *out);
++size_t sr__rpcresp__pack_to_buffer
++ (const Sr__RPCResp *message,
++ ProtobufCBuffer *buffer);
++Sr__RPCResp *
++ sr__rpcresp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__rpcresp__free_unpacked
++ (Sr__RPCResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__EventNotifReq methods */
++void sr__event_notif_req__init
++ (Sr__EventNotifReq *message);
++size_t sr__event_notif_req__get_packed_size
++ (const Sr__EventNotifReq *message);
++size_t sr__event_notif_req__pack
++ (const Sr__EventNotifReq *message,
++ uint8_t *out);
++size_t sr__event_notif_req__pack_to_buffer
++ (const Sr__EventNotifReq *message,
++ ProtobufCBuffer *buffer);
++Sr__EventNotifReq *
++ sr__event_notif_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__event_notif_req__free_unpacked
++ (Sr__EventNotifReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__EventNotifResp methods */
++void sr__event_notif_resp__init
++ (Sr__EventNotifResp *message);
++size_t sr__event_notif_resp__get_packed_size
++ (const Sr__EventNotifResp *message);
++size_t sr__event_notif_resp__pack
++ (const Sr__EventNotifResp *message,
++ uint8_t *out);
++size_t sr__event_notif_resp__pack_to_buffer
++ (const Sr__EventNotifResp *message,
++ ProtobufCBuffer *buffer);
++Sr__EventNotifResp *
++ sr__event_notif_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__event_notif_resp__free_unpacked
++ (Sr__EventNotifResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__EventNotifReplayReq methods */
++void sr__event_notif_replay_req__init
++ (Sr__EventNotifReplayReq *message);
++size_t sr__event_notif_replay_req__get_packed_size
++ (const Sr__EventNotifReplayReq *message);
++size_t sr__event_notif_replay_req__pack
++ (const Sr__EventNotifReplayReq *message,
++ uint8_t *out);
++size_t sr__event_notif_replay_req__pack_to_buffer
++ (const Sr__EventNotifReplayReq *message,
++ ProtobufCBuffer *buffer);
++Sr__EventNotifReplayReq *
++ sr__event_notif_replay_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__event_notif_replay_req__free_unpacked
++ (Sr__EventNotifReplayReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__EventNotifReplayResp methods */
++void sr__event_notif_replay_resp__init
++ (Sr__EventNotifReplayResp *message);
++size_t sr__event_notif_replay_resp__get_packed_size
++ (const Sr__EventNotifReplayResp *message);
++size_t sr__event_notif_replay_resp__pack
++ (const Sr__EventNotifReplayResp *message,
++ uint8_t *out);
++size_t sr__event_notif_replay_resp__pack_to_buffer
++ (const Sr__EventNotifReplayResp *message,
++ ProtobufCBuffer *buffer);
++Sr__EventNotifReplayResp *
++ sr__event_notif_replay_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__event_notif_replay_resp__free_unpacked
++ (Sr__EventNotifReplayResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DataProvideReq methods */
++void sr__data_provide_req__init
++ (Sr__DataProvideReq *message);
++size_t sr__data_provide_req__get_packed_size
++ (const Sr__DataProvideReq *message);
++size_t sr__data_provide_req__pack
++ (const Sr__DataProvideReq *message,
++ uint8_t *out);
++size_t sr__data_provide_req__pack_to_buffer
++ (const Sr__DataProvideReq *message,
++ ProtobufCBuffer *buffer);
++Sr__DataProvideReq *
++ sr__data_provide_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__data_provide_req__free_unpacked
++ (Sr__DataProvideReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DataProvideResp methods */
++void sr__data_provide_resp__init
++ (Sr__DataProvideResp *message);
++size_t sr__data_provide_resp__get_packed_size
++ (const Sr__DataProvideResp *message);
++size_t sr__data_provide_resp__pack
++ (const Sr__DataProvideResp *message,
++ uint8_t *out);
++size_t sr__data_provide_resp__pack_to_buffer
++ (const Sr__DataProvideResp *message,
++ ProtobufCBuffer *buffer);
++Sr__DataProvideResp *
++ sr__data_provide_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__data_provide_resp__free_unpacked
++ (Sr__DataProvideResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ModuleInstallReq methods */
++void sr__module_install_req__init
++ (Sr__ModuleInstallReq *message);
++size_t sr__module_install_req__get_packed_size
++ (const Sr__ModuleInstallReq *message);
++size_t sr__module_install_req__pack
++ (const Sr__ModuleInstallReq *message,
++ uint8_t *out);
++size_t sr__module_install_req__pack_to_buffer
++ (const Sr__ModuleInstallReq *message,
++ ProtobufCBuffer *buffer);
++Sr__ModuleInstallReq *
++ sr__module_install_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__module_install_req__free_unpacked
++ (Sr__ModuleInstallReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__ModuleInstallResp methods */
++void sr__module_install_resp__init
++ (Sr__ModuleInstallResp *message);
++size_t sr__module_install_resp__get_packed_size
++ (const Sr__ModuleInstallResp *message);
++size_t sr__module_install_resp__pack
++ (const Sr__ModuleInstallResp *message,
++ uint8_t *out);
++size_t sr__module_install_resp__pack_to_buffer
++ (const Sr__ModuleInstallResp *message,
++ ProtobufCBuffer *buffer);
++Sr__ModuleInstallResp *
++ sr__module_install_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__module_install_resp__free_unpacked
++ (Sr__ModuleInstallResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__FeatureEnableReq methods */
++void sr__feature_enable_req__init
++ (Sr__FeatureEnableReq *message);
++size_t sr__feature_enable_req__get_packed_size
++ (const Sr__FeatureEnableReq *message);
++size_t sr__feature_enable_req__pack
++ (const Sr__FeatureEnableReq *message,
++ uint8_t *out);
++size_t sr__feature_enable_req__pack_to_buffer
++ (const Sr__FeatureEnableReq *message,
++ ProtobufCBuffer *buffer);
++Sr__FeatureEnableReq *
++ sr__feature_enable_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__feature_enable_req__free_unpacked
++ (Sr__FeatureEnableReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__FeatureEnableResp methods */
++void sr__feature_enable_resp__init
++ (Sr__FeatureEnableResp *message);
++size_t sr__feature_enable_resp__get_packed_size
++ (const Sr__FeatureEnableResp *message);
++size_t sr__feature_enable_resp__pack
++ (const Sr__FeatureEnableResp *message,
++ uint8_t *out);
++size_t sr__feature_enable_resp__pack_to_buffer
++ (const Sr__FeatureEnableResp *message,
++ ProtobufCBuffer *buffer);
++Sr__FeatureEnableResp *
++ sr__feature_enable_resp__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__feature_enable_resp__free_unpacked
++ (Sr__FeatureEnableResp *message,
++ ProtobufCAllocator *allocator);
++/* Sr__UnsubscribeDestinationReq methods */
++void sr__unsubscribe_destination_req__init
++ (Sr__UnsubscribeDestinationReq *message);
++size_t sr__unsubscribe_destination_req__get_packed_size
++ (const Sr__UnsubscribeDestinationReq *message);
++size_t sr__unsubscribe_destination_req__pack
++ (const Sr__UnsubscribeDestinationReq *message,
++ uint8_t *out);
++size_t sr__unsubscribe_destination_req__pack_to_buffer
++ (const Sr__UnsubscribeDestinationReq *message,
++ ProtobufCBuffer *buffer);
++Sr__UnsubscribeDestinationReq *
++ sr__unsubscribe_destination_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__unsubscribe_destination_req__free_unpacked
++ (Sr__UnsubscribeDestinationReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__CommitTimeoutReq methods */
++void sr__commit_timeout_req__init
++ (Sr__CommitTimeoutReq *message);
++size_t sr__commit_timeout_req__get_packed_size
++ (const Sr__CommitTimeoutReq *message);
++size_t sr__commit_timeout_req__pack
++ (const Sr__CommitTimeoutReq *message,
++ uint8_t *out);
++size_t sr__commit_timeout_req__pack_to_buffer
++ (const Sr__CommitTimeoutReq *message,
++ ProtobufCBuffer *buffer);
++Sr__CommitTimeoutReq *
++ sr__commit_timeout_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__commit_timeout_req__free_unpacked
++ (Sr__CommitTimeoutReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__OperDataTimeoutReq methods */
++void sr__oper_data_timeout_req__init
++ (Sr__OperDataTimeoutReq *message);
++size_t sr__oper_data_timeout_req__get_packed_size
++ (const Sr__OperDataTimeoutReq *message);
++size_t sr__oper_data_timeout_req__pack
++ (const Sr__OperDataTimeoutReq *message,
++ uint8_t *out);
++size_t sr__oper_data_timeout_req__pack_to_buffer
++ (const Sr__OperDataTimeoutReq *message,
++ ProtobufCBuffer *buffer);
++Sr__OperDataTimeoutReq *
++ sr__oper_data_timeout_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__oper_data_timeout_req__free_unpacked
++ (Sr__OperDataTimeoutReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__InternalStateDataReq methods */
++void sr__internal_state_data_req__init
++ (Sr__InternalStateDataReq *message);
++size_t sr__internal_state_data_req__get_packed_size
++ (const Sr__InternalStateDataReq *message);
++size_t sr__internal_state_data_req__pack
++ (const Sr__InternalStateDataReq *message,
++ uint8_t *out);
++size_t sr__internal_state_data_req__pack_to_buffer
++ (const Sr__InternalStateDataReq *message,
++ ProtobufCBuffer *buffer);
++Sr__InternalStateDataReq *
++ sr__internal_state_data_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__internal_state_data_req__free_unpacked
++ (Sr__InternalStateDataReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__NotifStoreCleanupReq methods */
++void sr__notif_store_cleanup_req__init
++ (Sr__NotifStoreCleanupReq *message);
++size_t sr__notif_store_cleanup_req__get_packed_size
++ (const Sr__NotifStoreCleanupReq *message);
++size_t sr__notif_store_cleanup_req__pack
++ (const Sr__NotifStoreCleanupReq *message,
++ uint8_t *out);
++size_t sr__notif_store_cleanup_req__pack_to_buffer
++ (const Sr__NotifStoreCleanupReq *message,
++ ProtobufCBuffer *buffer);
++Sr__NotifStoreCleanupReq *
++ sr__notif_store_cleanup_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__notif_store_cleanup_req__free_unpacked
++ (Sr__NotifStoreCleanupReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__DelayedMsgReq methods */
++void sr__delayed_msg_req__init
++ (Sr__DelayedMsgReq *message);
++size_t sr__delayed_msg_req__get_packed_size
++ (const Sr__DelayedMsgReq *message);
++size_t sr__delayed_msg_req__pack
++ (const Sr__DelayedMsgReq *message,
++ uint8_t *out);
++size_t sr__delayed_msg_req__pack_to_buffer
++ (const Sr__DelayedMsgReq *message,
++ ProtobufCBuffer *buffer);
++Sr__DelayedMsgReq *
++ sr__delayed_msg_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__delayed_msg_req__free_unpacked
++ (Sr__DelayedMsgReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__NacmReloadReq methods */
++void sr__nacm_reload_req__init
++ (Sr__NacmReloadReq *message);
++size_t sr__nacm_reload_req__get_packed_size
++ (const Sr__NacmReloadReq *message);
++size_t sr__nacm_reload_req__pack
++ (const Sr__NacmReloadReq *message,
++ uint8_t *out);
++size_t sr__nacm_reload_req__pack_to_buffer
++ (const Sr__NacmReloadReq *message,
++ ProtobufCBuffer *buffer);
++Sr__NacmReloadReq *
++ sr__nacm_reload_req__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__nacm_reload_req__free_unpacked
++ (Sr__NacmReloadReq *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Request methods */
++void sr__request__init
++ (Sr__Request *message);
++size_t sr__request__get_packed_size
++ (const Sr__Request *message);
++size_t sr__request__pack
++ (const Sr__Request *message,
++ uint8_t *out);
++size_t sr__request__pack_to_buffer
++ (const Sr__Request *message,
++ ProtobufCBuffer *buffer);
++Sr__Request *
++ sr__request__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__request__free_unpacked
++ (Sr__Request *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Response methods */
++void sr__response__init
++ (Sr__Response *message);
++size_t sr__response__get_packed_size
++ (const Sr__Response *message);
++size_t sr__response__pack
++ (const Sr__Response *message,
++ uint8_t *out);
++size_t sr__response__pack_to_buffer
++ (const Sr__Response *message,
++ ProtobufCBuffer *buffer);
++Sr__Response *
++ sr__response__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__response__free_unpacked
++ (Sr__Response *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Notification methods */
++void sr__notification__init
++ (Sr__Notification *message);
++size_t sr__notification__get_packed_size
++ (const Sr__Notification *message);
++size_t sr__notification__pack
++ (const Sr__Notification *message,
++ uint8_t *out);
++size_t sr__notification__pack_to_buffer
++ (const Sr__Notification *message,
++ ProtobufCBuffer *buffer);
++Sr__Notification *
++ sr__notification__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__notification__free_unpacked
++ (Sr__Notification *message,
++ ProtobufCAllocator *allocator);
++/* Sr__NotificationAck methods */
++void sr__notification_ack__init
++ (Sr__NotificationAck *message);
++size_t sr__notification_ack__get_packed_size
++ (const Sr__NotificationAck *message);
++size_t sr__notification_ack__pack
++ (const Sr__NotificationAck *message,
++ uint8_t *out);
++size_t sr__notification_ack__pack_to_buffer
++ (const Sr__NotificationAck *message,
++ ProtobufCBuffer *buffer);
++Sr__NotificationAck *
++ sr__notification_ack__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__notification_ack__free_unpacked
++ (Sr__NotificationAck *message,
++ ProtobufCAllocator *allocator);
++/* Sr__InternalRequest methods */
++void sr__internal_request__init
++ (Sr__InternalRequest *message);
++size_t sr__internal_request__get_packed_size
++ (const Sr__InternalRequest *message);
++size_t sr__internal_request__pack
++ (const Sr__InternalRequest *message,
++ uint8_t *out);
++size_t sr__internal_request__pack_to_buffer
++ (const Sr__InternalRequest *message,
++ ProtobufCBuffer *buffer);
++Sr__InternalRequest *
++ sr__internal_request__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__internal_request__free_unpacked
++ (Sr__InternalRequest *message,
++ ProtobufCAllocator *allocator);
++/* Sr__Msg methods */
++void sr__msg__init
++ (Sr__Msg *message);
++size_t sr__msg__get_packed_size
++ (const Sr__Msg *message);
++size_t sr__msg__pack
++ (const Sr__Msg *message,
++ uint8_t *out);
++size_t sr__msg__pack_to_buffer
++ (const Sr__Msg *message,
++ ProtobufCBuffer *buffer);
++Sr__Msg *
++ sr__msg__unpack
++ (ProtobufCAllocator *allocator,
++ size_t len,
++ const uint8_t *data);
++void sr__msg__free_unpacked
++ (Sr__Msg *message,
++ ProtobufCAllocator *allocator);
++/* --- per-message closures --- */
++
++typedef void (*Sr__Value_Closure)
++ (const Sr__Value *message,
++ void *closure_data);
++typedef void (*Sr__Node_Closure)
++ (const Sr__Node *message,
++ void *closure_data);
++typedef void (*Sr__Error_Closure)
++ (const Sr__Error *message,
++ void *closure_data);
++typedef void (*Sr__SessionStartReq_Closure)
++ (const Sr__SessionStartReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionStartResp_Closure)
++ (const Sr__SessionStartResp *message,
++ void *closure_data);
++typedef void (*Sr__SessionStopReq_Closure)
++ (const Sr__SessionStopReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionStopResp_Closure)
++ (const Sr__SessionStopResp *message,
++ void *closure_data);
++typedef void (*Sr__SessionRefreshReq_Closure)
++ (const Sr__SessionRefreshReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionRefreshResp_Closure)
++ (const Sr__SessionRefreshResp *message,
++ void *closure_data);
++typedef void (*Sr__SessionCheckReq_Closure)
++ (const Sr__SessionCheckReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionCheckResp_Closure)
++ (const Sr__SessionCheckResp *message,
++ void *closure_data);
++typedef void (*Sr__SessionSwitchDsReq_Closure)
++ (const Sr__SessionSwitchDsReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionSwitchDsResp_Closure)
++ (const Sr__SessionSwitchDsResp *message,
++ void *closure_data);
++typedef void (*Sr__SessionSetOptsReq_Closure)
++ (const Sr__SessionSetOptsReq *message,
++ void *closure_data);
++typedef void (*Sr__SessionSetOptsResp_Closure)
++ (const Sr__SessionSetOptsResp *message,
++ void *closure_data);
++typedef void (*Sr__VersionVerifyReq_Closure)
++ (const Sr__VersionVerifyReq *message,
++ void *closure_data);
++typedef void (*Sr__VersionVerifyResp_Closure)
++ (const Sr__VersionVerifyResp *message,
++ void *closure_data);
++typedef void (*Sr__SchemaRevision_Closure)
++ (const Sr__SchemaRevision *message,
++ void *closure_data);
++typedef void (*Sr__SchemaSubmodule_Closure)
++ (const Sr__SchemaSubmodule *message,
++ void *closure_data);
++typedef void (*Sr__Schema_Closure)
++ (const Sr__Schema *message,
++ void *closure_data);
++typedef void (*Sr__ListSchemasReq_Closure)
++ (const Sr__ListSchemasReq *message,
++ void *closure_data);
++typedef void (*Sr__ListSchemasResp_Closure)
++ (const Sr__ListSchemasResp *message,
++ void *closure_data);
++typedef void (*Sr__GetSchemaReq_Closure)
++ (const Sr__GetSchemaReq *message,
++ void *closure_data);
++typedef void (*Sr__GetSchemaResp_Closure)
++ (const Sr__GetSchemaResp *message,
++ void *closure_data);
++typedef void (*Sr__GetItemReq_Closure)
++ (const Sr__GetItemReq *message,
++ void *closure_data);
++typedef void (*Sr__GetItemResp_Closure)
++ (const Sr__GetItemResp *message,
++ void *closure_data);
++typedef void (*Sr__GetItemsReq_Closure)
++ (const Sr__GetItemsReq *message,
++ void *closure_data);
++typedef void (*Sr__GetItemsResp_Closure)
++ (const Sr__GetItemsResp *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreeReq_Closure)
++ (const Sr__GetSubtreeReq *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreeResp_Closure)
++ (const Sr__GetSubtreeResp *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreesReq_Closure)
++ (const Sr__GetSubtreesReq *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreesResp_Closure)
++ (const Sr__GetSubtreesResp *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreeChunkReq_Closure)
++ (const Sr__GetSubtreeChunkReq *message,
++ void *closure_data);
++typedef void (*Sr__GetSubtreeChunkResp_Closure)
++ (const Sr__GetSubtreeChunkResp *message,
++ void *closure_data);
++typedef void (*Sr__SetItemReq_Closure)
++ (const Sr__SetItemReq *message,
++ void *closure_data);
++typedef void (*Sr__SetItemResp_Closure)
++ (const Sr__SetItemResp *message,
++ void *closure_data);
++typedef void (*Sr__SetItemStrReq_Closure)
++ (const Sr__SetItemStrReq *message,
++ void *closure_data);
++typedef void (*Sr__SetItemStrResp_Closure)
++ (const Sr__SetItemStrResp *message,
++ void *closure_data);
++typedef void (*Sr__DeleteItemReq_Closure)
++ (const Sr__DeleteItemReq *message,
++ void *closure_data);
++typedef void (*Sr__DeleteItemResp_Closure)
++ (const Sr__DeleteItemResp *message,
++ void *closure_data);
++typedef void (*Sr__MoveItemReq_Closure)
++ (const Sr__MoveItemReq *message,
++ void *closure_data);
++typedef void (*Sr__MoveItemResp_Closure)
++ (const Sr__MoveItemResp *message,
++ void *closure_data);
++typedef void (*Sr__ValidateReq_Closure)
++ (const Sr__ValidateReq *message,
++ void *closure_data);
++typedef void (*Sr__ValidateResp_Closure)
++ (const Sr__ValidateResp *message,
++ void *closure_data);
++typedef void (*Sr__CommitReq_Closure)
++ (const Sr__CommitReq *message,
++ void *closure_data);
++typedef void (*Sr__CommitResp_Closure)
++ (const Sr__CommitResp *message,
++ void *closure_data);
++typedef void (*Sr__DiscardChangesReq_Closure)
++ (const Sr__DiscardChangesReq *message,
++ void *closure_data);
++typedef void (*Sr__DiscardChangesResp_Closure)
++ (const Sr__DiscardChangesResp *message,
++ void *closure_data);
++typedef void (*Sr__CopyConfigReq_Closure)
++ (const Sr__CopyConfigReq *message,
++ void *closure_data);
++typedef void (*Sr__CopyConfigResp_Closure)
++ (const Sr__CopyConfigResp *message,
++ void *closure_data);
++typedef void (*Sr__LockReq_Closure)
++ (const Sr__LockReq *message,
++ void *closure_data);
++typedef void (*Sr__LockResp_Closure)
++ (const Sr__LockResp *message,
++ void *closure_data);
++typedef void (*Sr__UnlockReq_Closure)
++ (const Sr__UnlockReq *message,
++ void *closure_data);
++typedef void (*Sr__UnlockResp_Closure)
++ (const Sr__UnlockResp *message,
++ void *closure_data);
++typedef void (*Sr__SubscribeReq_Closure)
++ (const Sr__SubscribeReq *message,
++ void *closure_data);
++typedef void (*Sr__SubscribeResp_Closure)
++ (const Sr__SubscribeResp *message,
++ void *closure_data);
++typedef void (*Sr__UnsubscribeReq_Closure)
++ (const Sr__UnsubscribeReq *message,
++ void *closure_data);
++typedef void (*Sr__UnsubscribeResp_Closure)
++ (const Sr__UnsubscribeResp *message,
++ void *closure_data);
++typedef void (*Sr__CheckEnabledRunningReq_Closure)
++ (const Sr__CheckEnabledRunningReq *message,
++ void *closure_data);
++typedef void (*Sr__CheckEnabledRunningResp_Closure)
++ (const Sr__CheckEnabledRunningResp *message,
++ void *closure_data);
++typedef void (*Sr__ModuleInstallNotification_Closure)
++ (const Sr__ModuleInstallNotification *message,
++ void *closure_data);
++typedef void (*Sr__FeatureEnableNotification_Closure)
++ (const Sr__FeatureEnableNotification *message,
++ void *closure_data);
++typedef void (*Sr__ModuleChangeNotification_Closure)
++ (const Sr__ModuleChangeNotification *message,
++ void *closure_data);
++typedef void (*Sr__SubtreeChangeNotification_Closure)
++ (const Sr__SubtreeChangeNotification *message,
++ void *closure_data);
++typedef void (*Sr__Change_Closure)
++ (const Sr__Change *message,
++ void *closure_data);
++typedef void (*Sr__GetChangesReq_Closure)
++ (const Sr__GetChangesReq *message,
++ void *closure_data);
++typedef void (*Sr__GetChangesResp_Closure)
++ (const Sr__GetChangesResp *message,
++ void *closure_data);
++typedef void (*Sr__CheckExecPermReq_Closure)
++ (const Sr__CheckExecPermReq *message,
++ void *closure_data);
++typedef void (*Sr__CheckExecPermResp_Closure)
++ (const Sr__CheckExecPermResp *message,
++ void *closure_data);
++typedef void (*Sr__RPCReq_Closure)
++ (const Sr__RPCReq *message,
++ void *closure_data);
++typedef void (*Sr__RPCResp_Closure)
++ (const Sr__RPCResp *message,
++ void *closure_data);
++typedef void (*Sr__EventNotifReq_Closure)
++ (const Sr__EventNotifReq *message,
++ void *closure_data);
++typedef void (*Sr__EventNotifResp_Closure)
++ (const Sr__EventNotifResp *message,
++ void *closure_data);
++typedef void (*Sr__EventNotifReplayReq_Closure)
++ (const Sr__EventNotifReplayReq *message,
++ void *closure_data);
++typedef void (*Sr__EventNotifReplayResp_Closure)
++ (const Sr__EventNotifReplayResp *message,
++ void *closure_data);
++typedef void (*Sr__DataProvideReq_Closure)
++ (const Sr__DataProvideReq *message,
++ void *closure_data);
++typedef void (*Sr__DataProvideResp_Closure)
++ (const Sr__DataProvideResp *message,
++ void *closure_data);
++typedef void (*Sr__ModuleInstallReq_Closure)
++ (const Sr__ModuleInstallReq *message,
++ void *closure_data);
++typedef void (*Sr__ModuleInstallResp_Closure)
++ (const Sr__ModuleInstallResp *message,
++ void *closure_data);
++typedef void (*Sr__FeatureEnableReq_Closure)
++ (const Sr__FeatureEnableReq *message,
++ void *closure_data);
++typedef void (*Sr__FeatureEnableResp_Closure)
++ (const Sr__FeatureEnableResp *message,
++ void *closure_data);
++typedef void (*Sr__UnsubscribeDestinationReq_Closure)
++ (const Sr__UnsubscribeDestinationReq *message,
++ void *closure_data);
++typedef void (*Sr__CommitTimeoutReq_Closure)
++ (const Sr__CommitTimeoutReq *message,
++ void *closure_data);
++typedef void (*Sr__OperDataTimeoutReq_Closure)
++ (const Sr__OperDataTimeoutReq *message,
++ void *closure_data);
++typedef void (*Sr__InternalStateDataReq_Closure)
++ (const Sr__InternalStateDataReq *message,
++ void *closure_data);
++typedef void (*Sr__NotifStoreCleanupReq_Closure)
++ (const Sr__NotifStoreCleanupReq *message,
++ void *closure_data);
++typedef void (*Sr__DelayedMsgReq_Closure)
++ (const Sr__DelayedMsgReq *message,
++ void *closure_data);
++typedef void (*Sr__NacmReloadReq_Closure)
++ (const Sr__NacmReloadReq *message,
++ void *closure_data);
++typedef void (*Sr__Request_Closure)
++ (const Sr__Request *message,
++ void *closure_data);
++typedef void (*Sr__Response_Closure)
++ (const Sr__Response *message,
++ void *closure_data);
++typedef void (*Sr__Notification_Closure)
++ (const Sr__Notification *message,
++ void *closure_data);
++typedef void (*Sr__NotificationAck_Closure)
++ (const Sr__NotificationAck *message,
++ void *closure_data);
++typedef void (*Sr__InternalRequest_Closure)
++ (const Sr__InternalRequest *message,
++ void *closure_data);
++typedef void (*Sr__Msg_Closure)
++ (const Sr__Msg *message,
++ void *closure_data);
++
++/* --- services --- */
++
++
++/* --- descriptors --- */
++
++extern const ProtobufCEnumDescriptor sr__api_variant__descriptor;
++extern const ProtobufCEnumDescriptor sr__data_store__descriptor;
++extern const ProtobufCEnumDescriptor sr__session_flags__descriptor;
++extern const ProtobufCEnumDescriptor sr__edit_flags__descriptor;
++extern const ProtobufCEnumDescriptor sr__subscription_type__descriptor;
++extern const ProtobufCEnumDescriptor sr__notification_event__descriptor;
++extern const ProtobufCEnumDescriptor sr__module_state__descriptor;
++extern const ProtobufCEnumDescriptor sr__change_operation__descriptor;
++extern const ProtobufCEnumDescriptor sr__operation__descriptor;
++extern const ProtobufCMessageDescriptor sr__value__descriptor;
++extern const ProtobufCEnumDescriptor sr__value__types__descriptor;
++extern const ProtobufCMessageDescriptor sr__node__descriptor;
++extern const ProtobufCMessageDescriptor sr__error__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_start_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_start_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_stop_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_stop_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_refresh_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_refresh_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_check_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_check_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_switch_ds_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_switch_ds_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_set_opts_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__session_set_opts_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__version_verify_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__version_verify_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__schema_revision__descriptor;
++extern const ProtobufCMessageDescriptor sr__schema_submodule__descriptor;
++extern const ProtobufCMessageDescriptor sr__schema__descriptor;
++extern const ProtobufCMessageDescriptor sr__list_schemas_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__list_schemas_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_schema_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_schema_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_item_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_item_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_items_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_items_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtree_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtree_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtrees_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtrees_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtree_chunk_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_subtree_chunk_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__set_item_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__set_item_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__set_item_str_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__set_item_str_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__delete_item_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__delete_item_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__move_item_req__descriptor;
++extern const ProtobufCEnumDescriptor sr__move_item_req__move_position__descriptor;
++extern const ProtobufCMessageDescriptor sr__move_item_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__validate_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__validate_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__commit_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__commit_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__discard_changes_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__discard_changes_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__copy_config_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__copy_config_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__lock_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__lock_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__unlock_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__unlock_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__subscribe_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__subscribe_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__unsubscribe_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__unsubscribe_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__check_enabled_running_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__check_enabled_running_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__module_install_notification__descriptor;
++extern const ProtobufCMessageDescriptor sr__feature_enable_notification__descriptor;
++extern const ProtobufCMessageDescriptor sr__module_change_notification__descriptor;
++extern const ProtobufCMessageDescriptor sr__subtree_change_notification__descriptor;
++extern const ProtobufCMessageDescriptor sr__change__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_changes_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__get_changes_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__check_exec_perm_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__check_exec_perm_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__rpcreq__descriptor;
++extern const ProtobufCMessageDescriptor sr__rpcresp__descriptor;
++extern const ProtobufCMessageDescriptor sr__event_notif_req__descriptor;
++extern const ProtobufCEnumDescriptor sr__event_notif_req__notif_type__descriptor;
++extern const ProtobufCEnumDescriptor sr__event_notif_req__notif_flags__descriptor;
++extern const ProtobufCMessageDescriptor sr__event_notif_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__event_notif_replay_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__event_notif_replay_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__data_provide_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__data_provide_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__module_install_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__module_install_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__feature_enable_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__feature_enable_resp__descriptor;
++extern const ProtobufCMessageDescriptor sr__unsubscribe_destination_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__commit_timeout_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__oper_data_timeout_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__internal_state_data_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__notif_store_cleanup_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__delayed_msg_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__nacm_reload_req__descriptor;
++extern const ProtobufCMessageDescriptor sr__request__descriptor;
++extern const ProtobufCMessageDescriptor sr__response__descriptor;
++extern const ProtobufCMessageDescriptor sr__notification__descriptor;
++extern const ProtobufCMessageDescriptor sr__notification_ack__descriptor;
++extern const ProtobufCMessageDescriptor sr__internal_request__descriptor;
++extern const ProtobufCMessageDescriptor sr__msg__descriptor;
++extern const ProtobufCEnumDescriptor sr__msg__msg_type__descriptor;
++
++PROTOBUF_C__END_DECLS
++
++
++#endif /* PROTOBUF_C_sysrepo_2eproto__INCLUDED */
+++ /dev/null
-Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/CMakeLists.txt
-===================================================================
---- sysrepo-7aa2f18d234267403147df92c0005c871f0aa840.orig/src/CMakeLists.txt
-+++ sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/CMakeLists.txt
-@@ -21,14 +21,6 @@ set(GENERATED_PROTO_H "${COMMON_BIN_DIR}
- set(GENERATED_PROTO_C "${COMMON_BIN_DIR}/${PROTO_NAME}.pb-c.c")
-
- get_filename_component(ABS_PATH ${PROTO_FILE} PATH)
--add_custom_command(
-- OUTPUT "${GENERATED_PROTO_C}"
-- "${GENERATED_PROTO_H}"
-- COMMAND ${PROTOBUFC_PROTOC_EXECUTABLE}
-- ARGS --c_out ${COMMON_BIN_DIR} -I ${ABS_PATH} ${PROTO_FILE}
-- DEPENDS ${PROTO_FILE}
-- COMMENT "Running C protocol buffer compiler on ${PROTO_FILE}"
-- VERBATIM )
-
- configure_file("${COMMON_DIR}/sr_constants.h.in" "${COMMON_BIN_DIR}/sr_constants.h" ESCAPE_QUOTES @ONLY)
-
-Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.c
-===================================================================
---- /dev/null
-+++ sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.c
-@@ -0,0 +1,10537 @@
-+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
-+/* Generated from: sysrepo.proto */
-+
-+/* Do not generate deprecated warnings for self */
-+#ifndef PROTOBUF_C__NO_DEPRECATED
-+#define PROTOBUF_C__NO_DEPRECATED
-+#endif
-+
-+#include "sysrepo.pb-c.h"
-+void sr__value__init
-+ (Sr__Value *message)
-+{
-+ static Sr__Value init_value = SR__VALUE__INIT;
-+ *message = init_value;
-+}
-+size_t sr__value__get_packed_size
-+ (const Sr__Value *message)
-+{
-+ assert(message->base.descriptor == &sr__value__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__value__pack
-+ (const Sr__Value *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__value__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__value__pack_to_buffer
-+ (const Sr__Value *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__value__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Value *
-+ sr__value__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Value *)
-+ protobuf_c_message_unpack (&sr__value__descriptor,
-+ allocator, len, data);
-+}
-+void sr__value__free_unpacked
-+ (Sr__Value *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__value__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__node__init
-+ (Sr__Node *message)
-+{
-+ static Sr__Node init_value = SR__NODE__INIT;
-+ *message = init_value;
-+}
-+size_t sr__node__get_packed_size
-+ (const Sr__Node *message)
-+{
-+ assert(message->base.descriptor == &sr__node__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__node__pack
-+ (const Sr__Node *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__node__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__node__pack_to_buffer
-+ (const Sr__Node *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__node__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Node *
-+ sr__node__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Node *)
-+ protobuf_c_message_unpack (&sr__node__descriptor,
-+ allocator, len, data);
-+}
-+void sr__node__free_unpacked
-+ (Sr__Node *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__node__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__error__init
-+ (Sr__Error *message)
-+{
-+ static Sr__Error init_value = SR__ERROR__INIT;
-+ *message = init_value;
-+}
-+size_t sr__error__get_packed_size
-+ (const Sr__Error *message)
-+{
-+ assert(message->base.descriptor == &sr__error__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__error__pack
-+ (const Sr__Error *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__error__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__error__pack_to_buffer
-+ (const Sr__Error *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__error__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Error *
-+ sr__error__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Error *)
-+ protobuf_c_message_unpack (&sr__error__descriptor,
-+ allocator, len, data);
-+}
-+void sr__error__free_unpacked
-+ (Sr__Error *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__error__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_start_req__init
-+ (Sr__SessionStartReq *message)
-+{
-+ static Sr__SessionStartReq init_value = SR__SESSION_START_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_start_req__get_packed_size
-+ (const Sr__SessionStartReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_start_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_start_req__pack
-+ (const Sr__SessionStartReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_start_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_start_req__pack_to_buffer
-+ (const Sr__SessionStartReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_start_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionStartReq *
-+ sr__session_start_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionStartReq *)
-+ protobuf_c_message_unpack (&sr__session_start_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_start_req__free_unpacked
-+ (Sr__SessionStartReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_start_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_start_resp__init
-+ (Sr__SessionStartResp *message)
-+{
-+ static Sr__SessionStartResp init_value = SR__SESSION_START_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_start_resp__get_packed_size
-+ (const Sr__SessionStartResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_start_resp__pack
-+ (const Sr__SessionStartResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_start_resp__pack_to_buffer
-+ (const Sr__SessionStartResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionStartResp *
-+ sr__session_start_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionStartResp *)
-+ protobuf_c_message_unpack (&sr__session_start_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_start_resp__free_unpacked
-+ (Sr__SessionStartResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_start_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_stop_req__init
-+ (Sr__SessionStopReq *message)
-+{
-+ static Sr__SessionStopReq init_value = SR__SESSION_STOP_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_stop_req__get_packed_size
-+ (const Sr__SessionStopReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_stop_req__pack
-+ (const Sr__SessionStopReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_stop_req__pack_to_buffer
-+ (const Sr__SessionStopReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionStopReq *
-+ sr__session_stop_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionStopReq *)
-+ protobuf_c_message_unpack (&sr__session_stop_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_stop_req__free_unpacked
-+ (Sr__SessionStopReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_stop_resp__init
-+ (Sr__SessionStopResp *message)
-+{
-+ static Sr__SessionStopResp init_value = SR__SESSION_STOP_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_stop_resp__get_packed_size
-+ (const Sr__SessionStopResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_stop_resp__pack
-+ (const Sr__SessionStopResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_stop_resp__pack_to_buffer
-+ (const Sr__SessionStopResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionStopResp *
-+ sr__session_stop_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionStopResp *)
-+ protobuf_c_message_unpack (&sr__session_stop_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_stop_resp__free_unpacked
-+ (Sr__SessionStopResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_stop_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_refresh_req__init
-+ (Sr__SessionRefreshReq *message)
-+{
-+ static Sr__SessionRefreshReq init_value = SR__SESSION_REFRESH_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_refresh_req__get_packed_size
-+ (const Sr__SessionRefreshReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_refresh_req__pack
-+ (const Sr__SessionRefreshReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_refresh_req__pack_to_buffer
-+ (const Sr__SessionRefreshReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionRefreshReq *
-+ sr__session_refresh_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionRefreshReq *)
-+ protobuf_c_message_unpack (&sr__session_refresh_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_refresh_req__free_unpacked
-+ (Sr__SessionRefreshReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_refresh_resp__init
-+ (Sr__SessionRefreshResp *message)
-+{
-+ static Sr__SessionRefreshResp init_value = SR__SESSION_REFRESH_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_refresh_resp__get_packed_size
-+ (const Sr__SessionRefreshResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_refresh_resp__pack
-+ (const Sr__SessionRefreshResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_refresh_resp__pack_to_buffer
-+ (const Sr__SessionRefreshResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionRefreshResp *
-+ sr__session_refresh_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionRefreshResp *)
-+ protobuf_c_message_unpack (&sr__session_refresh_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_refresh_resp__free_unpacked
-+ (Sr__SessionRefreshResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_refresh_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_check_req__init
-+ (Sr__SessionCheckReq *message)
-+{
-+ static Sr__SessionCheckReq init_value = SR__SESSION_CHECK_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_check_req__get_packed_size
-+ (const Sr__SessionCheckReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_check_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_check_req__pack
-+ (const Sr__SessionCheckReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_check_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_check_req__pack_to_buffer
-+ (const Sr__SessionCheckReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_check_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionCheckReq *
-+ sr__session_check_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionCheckReq *)
-+ protobuf_c_message_unpack (&sr__session_check_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_check_req__free_unpacked
-+ (Sr__SessionCheckReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_check_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_check_resp__init
-+ (Sr__SessionCheckResp *message)
-+{
-+ static Sr__SessionCheckResp init_value = SR__SESSION_CHECK_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_check_resp__get_packed_size
-+ (const Sr__SessionCheckResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_check_resp__pack
-+ (const Sr__SessionCheckResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_check_resp__pack_to_buffer
-+ (const Sr__SessionCheckResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionCheckResp *
-+ sr__session_check_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionCheckResp *)
-+ protobuf_c_message_unpack (&sr__session_check_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_check_resp__free_unpacked
-+ (Sr__SessionCheckResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_check_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_switch_ds_req__init
-+ (Sr__SessionSwitchDsReq *message)
-+{
-+ static Sr__SessionSwitchDsReq init_value = SR__SESSION_SWITCH_DS_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_switch_ds_req__get_packed_size
-+ (const Sr__SessionSwitchDsReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_switch_ds_req__pack
-+ (const Sr__SessionSwitchDsReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_switch_ds_req__pack_to_buffer
-+ (const Sr__SessionSwitchDsReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionSwitchDsReq *
-+ sr__session_switch_ds_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionSwitchDsReq *)
-+ protobuf_c_message_unpack (&sr__session_switch_ds_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_switch_ds_req__free_unpacked
-+ (Sr__SessionSwitchDsReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_switch_ds_resp__init
-+ (Sr__SessionSwitchDsResp *message)
-+{
-+ static Sr__SessionSwitchDsResp init_value = SR__SESSION_SWITCH_DS_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_switch_ds_resp__get_packed_size
-+ (const Sr__SessionSwitchDsResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_switch_ds_resp__pack
-+ (const Sr__SessionSwitchDsResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_switch_ds_resp__pack_to_buffer
-+ (const Sr__SessionSwitchDsResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionSwitchDsResp *
-+ sr__session_switch_ds_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionSwitchDsResp *)
-+ protobuf_c_message_unpack (&sr__session_switch_ds_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_switch_ds_resp__free_unpacked
-+ (Sr__SessionSwitchDsResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_switch_ds_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_set_opts_req__init
-+ (Sr__SessionSetOptsReq *message)
-+{
-+ static Sr__SessionSetOptsReq init_value = SR__SESSION_SET_OPTS_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_set_opts_req__get_packed_size
-+ (const Sr__SessionSetOptsReq *message)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_set_opts_req__pack
-+ (const Sr__SessionSetOptsReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_set_opts_req__pack_to_buffer
-+ (const Sr__SessionSetOptsReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionSetOptsReq *
-+ sr__session_set_opts_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionSetOptsReq *)
-+ protobuf_c_message_unpack (&sr__session_set_opts_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_set_opts_req__free_unpacked
-+ (Sr__SessionSetOptsReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__session_set_opts_resp__init
-+ (Sr__SessionSetOptsResp *message)
-+{
-+ static Sr__SessionSetOptsResp init_value = SR__SESSION_SET_OPTS_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__session_set_opts_resp__get_packed_size
-+ (const Sr__SessionSetOptsResp *message)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__session_set_opts_resp__pack
-+ (const Sr__SessionSetOptsResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__session_set_opts_resp__pack_to_buffer
-+ (const Sr__SessionSetOptsResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SessionSetOptsResp *
-+ sr__session_set_opts_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SessionSetOptsResp *)
-+ protobuf_c_message_unpack (&sr__session_set_opts_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__session_set_opts_resp__free_unpacked
-+ (Sr__SessionSetOptsResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__session_set_opts_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__version_verify_req__init
-+ (Sr__VersionVerifyReq *message)
-+{
-+ static Sr__VersionVerifyReq init_value = SR__VERSION_VERIFY_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__version_verify_req__get_packed_size
-+ (const Sr__VersionVerifyReq *message)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__version_verify_req__pack
-+ (const Sr__VersionVerifyReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__version_verify_req__pack_to_buffer
-+ (const Sr__VersionVerifyReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__VersionVerifyReq *
-+ sr__version_verify_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__VersionVerifyReq *)
-+ protobuf_c_message_unpack (&sr__version_verify_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__version_verify_req__free_unpacked
-+ (Sr__VersionVerifyReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__version_verify_resp__init
-+ (Sr__VersionVerifyResp *message)
-+{
-+ static Sr__VersionVerifyResp init_value = SR__VERSION_VERIFY_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__version_verify_resp__get_packed_size
-+ (const Sr__VersionVerifyResp *message)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__version_verify_resp__pack
-+ (const Sr__VersionVerifyResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__version_verify_resp__pack_to_buffer
-+ (const Sr__VersionVerifyResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__VersionVerifyResp *
-+ sr__version_verify_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__VersionVerifyResp *)
-+ protobuf_c_message_unpack (&sr__version_verify_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__version_verify_resp__free_unpacked
-+ (Sr__VersionVerifyResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__version_verify_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__schema_revision__init
-+ (Sr__SchemaRevision *message)
-+{
-+ static Sr__SchemaRevision init_value = SR__SCHEMA_REVISION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__schema_revision__get_packed_size
-+ (const Sr__SchemaRevision *message)
-+{
-+ assert(message->base.descriptor == &sr__schema_revision__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__schema_revision__pack
-+ (const Sr__SchemaRevision *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__schema_revision__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__schema_revision__pack_to_buffer
-+ (const Sr__SchemaRevision *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__schema_revision__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SchemaRevision *
-+ sr__schema_revision__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SchemaRevision *)
-+ protobuf_c_message_unpack (&sr__schema_revision__descriptor,
-+ allocator, len, data);
-+}
-+void sr__schema_revision__free_unpacked
-+ (Sr__SchemaRevision *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__schema_revision__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__schema_submodule__init
-+ (Sr__SchemaSubmodule *message)
-+{
-+ static Sr__SchemaSubmodule init_value = SR__SCHEMA_SUBMODULE__INIT;
-+ *message = init_value;
-+}
-+size_t sr__schema_submodule__get_packed_size
-+ (const Sr__SchemaSubmodule *message)
-+{
-+ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__schema_submodule__pack
-+ (const Sr__SchemaSubmodule *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__schema_submodule__pack_to_buffer
-+ (const Sr__SchemaSubmodule *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SchemaSubmodule *
-+ sr__schema_submodule__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SchemaSubmodule *)
-+ protobuf_c_message_unpack (&sr__schema_submodule__descriptor,
-+ allocator, len, data);
-+}
-+void sr__schema_submodule__free_unpacked
-+ (Sr__SchemaSubmodule *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__schema_submodule__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__schema__init
-+ (Sr__Schema *message)
-+{
-+ static Sr__Schema init_value = SR__SCHEMA__INIT;
-+ *message = init_value;
-+}
-+size_t sr__schema__get_packed_size
-+ (const Sr__Schema *message)
-+{
-+ assert(message->base.descriptor == &sr__schema__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__schema__pack
-+ (const Sr__Schema *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__schema__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__schema__pack_to_buffer
-+ (const Sr__Schema *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__schema__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Schema *
-+ sr__schema__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Schema *)
-+ protobuf_c_message_unpack (&sr__schema__descriptor,
-+ allocator, len, data);
-+}
-+void sr__schema__free_unpacked
-+ (Sr__Schema *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__schema__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__list_schemas_req__init
-+ (Sr__ListSchemasReq *message)
-+{
-+ static Sr__ListSchemasReq init_value = SR__LIST_SCHEMAS_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__list_schemas_req__get_packed_size
-+ (const Sr__ListSchemasReq *message)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__list_schemas_req__pack
-+ (const Sr__ListSchemasReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__list_schemas_req__pack_to_buffer
-+ (const Sr__ListSchemasReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ListSchemasReq *
-+ sr__list_schemas_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ListSchemasReq *)
-+ protobuf_c_message_unpack (&sr__list_schemas_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__list_schemas_req__free_unpacked
-+ (Sr__ListSchemasReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__list_schemas_resp__init
-+ (Sr__ListSchemasResp *message)
-+{
-+ static Sr__ListSchemasResp init_value = SR__LIST_SCHEMAS_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__list_schemas_resp__get_packed_size
-+ (const Sr__ListSchemasResp *message)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__list_schemas_resp__pack
-+ (const Sr__ListSchemasResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__list_schemas_resp__pack_to_buffer
-+ (const Sr__ListSchemasResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ListSchemasResp *
-+ sr__list_schemas_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ListSchemasResp *)
-+ protobuf_c_message_unpack (&sr__list_schemas_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__list_schemas_resp__free_unpacked
-+ (Sr__ListSchemasResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__list_schemas_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_schema_req__init
-+ (Sr__GetSchemaReq *message)
-+{
-+ static Sr__GetSchemaReq init_value = SR__GET_SCHEMA_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_schema_req__get_packed_size
-+ (const Sr__GetSchemaReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_schema_req__pack
-+ (const Sr__GetSchemaReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_schema_req__pack_to_buffer
-+ (const Sr__GetSchemaReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSchemaReq *
-+ sr__get_schema_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSchemaReq *)
-+ protobuf_c_message_unpack (&sr__get_schema_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_schema_req__free_unpacked
-+ (Sr__GetSchemaReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_schema_resp__init
-+ (Sr__GetSchemaResp *message)
-+{
-+ static Sr__GetSchemaResp init_value = SR__GET_SCHEMA_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_schema_resp__get_packed_size
-+ (const Sr__GetSchemaResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_schema_resp__pack
-+ (const Sr__GetSchemaResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_schema_resp__pack_to_buffer
-+ (const Sr__GetSchemaResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSchemaResp *
-+ sr__get_schema_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSchemaResp *)
-+ protobuf_c_message_unpack (&sr__get_schema_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_schema_resp__free_unpacked
-+ (Sr__GetSchemaResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_schema_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_item_req__init
-+ (Sr__GetItemReq *message)
-+{
-+ static Sr__GetItemReq init_value = SR__GET_ITEM_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_item_req__get_packed_size
-+ (const Sr__GetItemReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_item_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_item_req__pack
-+ (const Sr__GetItemReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_item_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_item_req__pack_to_buffer
-+ (const Sr__GetItemReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_item_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetItemReq *
-+ sr__get_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetItemReq *)
-+ protobuf_c_message_unpack (&sr__get_item_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_item_req__free_unpacked
-+ (Sr__GetItemReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_item_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_item_resp__init
-+ (Sr__GetItemResp *message)
-+{
-+ static Sr__GetItemResp init_value = SR__GET_ITEM_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_item_resp__get_packed_size
-+ (const Sr__GetItemResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_item_resp__pack
-+ (const Sr__GetItemResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_item_resp__pack_to_buffer
-+ (const Sr__GetItemResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetItemResp *
-+ sr__get_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetItemResp *)
-+ protobuf_c_message_unpack (&sr__get_item_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_item_resp__free_unpacked
-+ (Sr__GetItemResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_item_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_items_req__init
-+ (Sr__GetItemsReq *message)
-+{
-+ static Sr__GetItemsReq init_value = SR__GET_ITEMS_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_items_req__get_packed_size
-+ (const Sr__GetItemsReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_items_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_items_req__pack
-+ (const Sr__GetItemsReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_items_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_items_req__pack_to_buffer
-+ (const Sr__GetItemsReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_items_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetItemsReq *
-+ sr__get_items_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetItemsReq *)
-+ protobuf_c_message_unpack (&sr__get_items_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_items_req__free_unpacked
-+ (Sr__GetItemsReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_items_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_items_resp__init
-+ (Sr__GetItemsResp *message)
-+{
-+ static Sr__GetItemsResp init_value = SR__GET_ITEMS_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_items_resp__get_packed_size
-+ (const Sr__GetItemsResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_items_resp__pack
-+ (const Sr__GetItemsResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_items_resp__pack_to_buffer
-+ (const Sr__GetItemsResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetItemsResp *
-+ sr__get_items_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetItemsResp *)
-+ protobuf_c_message_unpack (&sr__get_items_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_items_resp__free_unpacked
-+ (Sr__GetItemsResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_items_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtree_req__init
-+ (Sr__GetSubtreeReq *message)
-+{
-+ static Sr__GetSubtreeReq init_value = SR__GET_SUBTREE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtree_req__get_packed_size
-+ (const Sr__GetSubtreeReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtree_req__pack
-+ (const Sr__GetSubtreeReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtree_req__pack_to_buffer
-+ (const Sr__GetSubtreeReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreeReq *
-+ sr__get_subtree_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreeReq *)
-+ protobuf_c_message_unpack (&sr__get_subtree_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtree_req__free_unpacked
-+ (Sr__GetSubtreeReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtree_resp__init
-+ (Sr__GetSubtreeResp *message)
-+{
-+ static Sr__GetSubtreeResp init_value = SR__GET_SUBTREE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtree_resp__get_packed_size
-+ (const Sr__GetSubtreeResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtree_resp__pack
-+ (const Sr__GetSubtreeResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtree_resp__pack_to_buffer
-+ (const Sr__GetSubtreeResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreeResp *
-+ sr__get_subtree_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreeResp *)
-+ protobuf_c_message_unpack (&sr__get_subtree_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtree_resp__free_unpacked
-+ (Sr__GetSubtreeResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtrees_req__init
-+ (Sr__GetSubtreesReq *message)
-+{
-+ static Sr__GetSubtreesReq init_value = SR__GET_SUBTREES_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtrees_req__get_packed_size
-+ (const Sr__GetSubtreesReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtrees_req__pack
-+ (const Sr__GetSubtreesReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtrees_req__pack_to_buffer
-+ (const Sr__GetSubtreesReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreesReq *
-+ sr__get_subtrees_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreesReq *)
-+ protobuf_c_message_unpack (&sr__get_subtrees_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtrees_req__free_unpacked
-+ (Sr__GetSubtreesReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtrees_resp__init
-+ (Sr__GetSubtreesResp *message)
-+{
-+ static Sr__GetSubtreesResp init_value = SR__GET_SUBTREES_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtrees_resp__get_packed_size
-+ (const Sr__GetSubtreesResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtrees_resp__pack
-+ (const Sr__GetSubtreesResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtrees_resp__pack_to_buffer
-+ (const Sr__GetSubtreesResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreesResp *
-+ sr__get_subtrees_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreesResp *)
-+ protobuf_c_message_unpack (&sr__get_subtrees_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtrees_resp__free_unpacked
-+ (Sr__GetSubtreesResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtrees_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtree_chunk_req__init
-+ (Sr__GetSubtreeChunkReq *message)
-+{
-+ static Sr__GetSubtreeChunkReq init_value = SR__GET_SUBTREE_CHUNK_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtree_chunk_req__get_packed_size
-+ (const Sr__GetSubtreeChunkReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtree_chunk_req__pack
-+ (const Sr__GetSubtreeChunkReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtree_chunk_req__pack_to_buffer
-+ (const Sr__GetSubtreeChunkReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreeChunkReq *
-+ sr__get_subtree_chunk_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreeChunkReq *)
-+ protobuf_c_message_unpack (&sr__get_subtree_chunk_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtree_chunk_req__free_unpacked
-+ (Sr__GetSubtreeChunkReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_subtree_chunk_resp__init
-+ (Sr__GetSubtreeChunkResp *message)
-+{
-+ static Sr__GetSubtreeChunkResp init_value = SR__GET_SUBTREE_CHUNK_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_subtree_chunk_resp__get_packed_size
-+ (const Sr__GetSubtreeChunkResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_subtree_chunk_resp__pack
-+ (const Sr__GetSubtreeChunkResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_subtree_chunk_resp__pack_to_buffer
-+ (const Sr__GetSubtreeChunkResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetSubtreeChunkResp *
-+ sr__get_subtree_chunk_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetSubtreeChunkResp *)
-+ protobuf_c_message_unpack (&sr__get_subtree_chunk_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_subtree_chunk_resp__free_unpacked
-+ (Sr__GetSubtreeChunkResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_subtree_chunk_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__set_item_req__init
-+ (Sr__SetItemReq *message)
-+{
-+ static Sr__SetItemReq init_value = SR__SET_ITEM_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__set_item_req__get_packed_size
-+ (const Sr__SetItemReq *message)
-+{
-+ assert(message->base.descriptor == &sr__set_item_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__set_item_req__pack
-+ (const Sr__SetItemReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__set_item_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__set_item_req__pack_to_buffer
-+ (const Sr__SetItemReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__set_item_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SetItemReq *
-+ sr__set_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SetItemReq *)
-+ protobuf_c_message_unpack (&sr__set_item_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__set_item_req__free_unpacked
-+ (Sr__SetItemReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__set_item_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__set_item_resp__init
-+ (Sr__SetItemResp *message)
-+{
-+ static Sr__SetItemResp init_value = SR__SET_ITEM_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__set_item_resp__get_packed_size
-+ (const Sr__SetItemResp *message)
-+{
-+ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__set_item_resp__pack
-+ (const Sr__SetItemResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__set_item_resp__pack_to_buffer
-+ (const Sr__SetItemResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SetItemResp *
-+ sr__set_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SetItemResp *)
-+ protobuf_c_message_unpack (&sr__set_item_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__set_item_resp__free_unpacked
-+ (Sr__SetItemResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__set_item_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__set_item_str_req__init
-+ (Sr__SetItemStrReq *message)
-+{
-+ static Sr__SetItemStrReq init_value = SR__SET_ITEM_STR_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__set_item_str_req__get_packed_size
-+ (const Sr__SetItemStrReq *message)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__set_item_str_req__pack
-+ (const Sr__SetItemStrReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__set_item_str_req__pack_to_buffer
-+ (const Sr__SetItemStrReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SetItemStrReq *
-+ sr__set_item_str_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SetItemStrReq *)
-+ protobuf_c_message_unpack (&sr__set_item_str_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__set_item_str_req__free_unpacked
-+ (Sr__SetItemStrReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__set_item_str_resp__init
-+ (Sr__SetItemStrResp *message)
-+{
-+ static Sr__SetItemStrResp init_value = SR__SET_ITEM_STR_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__set_item_str_resp__get_packed_size
-+ (const Sr__SetItemStrResp *message)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__set_item_str_resp__pack
-+ (const Sr__SetItemStrResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__set_item_str_resp__pack_to_buffer
-+ (const Sr__SetItemStrResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SetItemStrResp *
-+ sr__set_item_str_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SetItemStrResp *)
-+ protobuf_c_message_unpack (&sr__set_item_str_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__set_item_str_resp__free_unpacked
-+ (Sr__SetItemStrResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__set_item_str_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__delete_item_req__init
-+ (Sr__DeleteItemReq *message)
-+{
-+ static Sr__DeleteItemReq init_value = SR__DELETE_ITEM_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__delete_item_req__get_packed_size
-+ (const Sr__DeleteItemReq *message)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__delete_item_req__pack
-+ (const Sr__DeleteItemReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__delete_item_req__pack_to_buffer
-+ (const Sr__DeleteItemReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DeleteItemReq *
-+ sr__delete_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DeleteItemReq *)
-+ protobuf_c_message_unpack (&sr__delete_item_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__delete_item_req__free_unpacked
-+ (Sr__DeleteItemReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__delete_item_resp__init
-+ (Sr__DeleteItemResp *message)
-+{
-+ static Sr__DeleteItemResp init_value = SR__DELETE_ITEM_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__delete_item_resp__get_packed_size
-+ (const Sr__DeleteItemResp *message)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__delete_item_resp__pack
-+ (const Sr__DeleteItemResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__delete_item_resp__pack_to_buffer
-+ (const Sr__DeleteItemResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DeleteItemResp *
-+ sr__delete_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DeleteItemResp *)
-+ protobuf_c_message_unpack (&sr__delete_item_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__delete_item_resp__free_unpacked
-+ (Sr__DeleteItemResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__delete_item_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__move_item_req__init
-+ (Sr__MoveItemReq *message)
-+{
-+ static Sr__MoveItemReq init_value = SR__MOVE_ITEM_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__move_item_req__get_packed_size
-+ (const Sr__MoveItemReq *message)
-+{
-+ assert(message->base.descriptor == &sr__move_item_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__move_item_req__pack
-+ (const Sr__MoveItemReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__move_item_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__move_item_req__pack_to_buffer
-+ (const Sr__MoveItemReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__move_item_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__MoveItemReq *
-+ sr__move_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__MoveItemReq *)
-+ protobuf_c_message_unpack (&sr__move_item_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__move_item_req__free_unpacked
-+ (Sr__MoveItemReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__move_item_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__move_item_resp__init
-+ (Sr__MoveItemResp *message)
-+{
-+ static Sr__MoveItemResp init_value = SR__MOVE_ITEM_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__move_item_resp__get_packed_size
-+ (const Sr__MoveItemResp *message)
-+{
-+ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__move_item_resp__pack
-+ (const Sr__MoveItemResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__move_item_resp__pack_to_buffer
-+ (const Sr__MoveItemResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__MoveItemResp *
-+ sr__move_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__MoveItemResp *)
-+ protobuf_c_message_unpack (&sr__move_item_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__move_item_resp__free_unpacked
-+ (Sr__MoveItemResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__move_item_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__validate_req__init
-+ (Sr__ValidateReq *message)
-+{
-+ static Sr__ValidateReq init_value = SR__VALIDATE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__validate_req__get_packed_size
-+ (const Sr__ValidateReq *message)
-+{
-+ assert(message->base.descriptor == &sr__validate_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__validate_req__pack
-+ (const Sr__ValidateReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__validate_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__validate_req__pack_to_buffer
-+ (const Sr__ValidateReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__validate_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ValidateReq *
-+ sr__validate_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ValidateReq *)
-+ protobuf_c_message_unpack (&sr__validate_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__validate_req__free_unpacked
-+ (Sr__ValidateReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__validate_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__validate_resp__init
-+ (Sr__ValidateResp *message)
-+{
-+ static Sr__ValidateResp init_value = SR__VALIDATE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__validate_resp__get_packed_size
-+ (const Sr__ValidateResp *message)
-+{
-+ assert(message->base.descriptor == &sr__validate_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__validate_resp__pack
-+ (const Sr__ValidateResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__validate_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__validate_resp__pack_to_buffer
-+ (const Sr__ValidateResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__validate_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ValidateResp *
-+ sr__validate_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ValidateResp *)
-+ protobuf_c_message_unpack (&sr__validate_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__validate_resp__free_unpacked
-+ (Sr__ValidateResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__validate_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__commit_req__init
-+ (Sr__CommitReq *message)
-+{
-+ static Sr__CommitReq init_value = SR__COMMIT_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__commit_req__get_packed_size
-+ (const Sr__CommitReq *message)
-+{
-+ assert(message->base.descriptor == &sr__commit_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__commit_req__pack
-+ (const Sr__CommitReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__commit_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__commit_req__pack_to_buffer
-+ (const Sr__CommitReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__commit_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CommitReq *
-+ sr__commit_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CommitReq *)
-+ protobuf_c_message_unpack (&sr__commit_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__commit_req__free_unpacked
-+ (Sr__CommitReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__commit_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__commit_resp__init
-+ (Sr__CommitResp *message)
-+{
-+ static Sr__CommitResp init_value = SR__COMMIT_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__commit_resp__get_packed_size
-+ (const Sr__CommitResp *message)
-+{
-+ assert(message->base.descriptor == &sr__commit_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__commit_resp__pack
-+ (const Sr__CommitResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__commit_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__commit_resp__pack_to_buffer
-+ (const Sr__CommitResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__commit_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CommitResp *
-+ sr__commit_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CommitResp *)
-+ protobuf_c_message_unpack (&sr__commit_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__commit_resp__free_unpacked
-+ (Sr__CommitResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__commit_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__discard_changes_req__init
-+ (Sr__DiscardChangesReq *message)
-+{
-+ static Sr__DiscardChangesReq init_value = SR__DISCARD_CHANGES_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__discard_changes_req__get_packed_size
-+ (const Sr__DiscardChangesReq *message)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__discard_changes_req__pack
-+ (const Sr__DiscardChangesReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__discard_changes_req__pack_to_buffer
-+ (const Sr__DiscardChangesReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DiscardChangesReq *
-+ sr__discard_changes_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DiscardChangesReq *)
-+ protobuf_c_message_unpack (&sr__discard_changes_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__discard_changes_req__free_unpacked
-+ (Sr__DiscardChangesReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__discard_changes_resp__init
-+ (Sr__DiscardChangesResp *message)
-+{
-+ static Sr__DiscardChangesResp init_value = SR__DISCARD_CHANGES_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__discard_changes_resp__get_packed_size
-+ (const Sr__DiscardChangesResp *message)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__discard_changes_resp__pack
-+ (const Sr__DiscardChangesResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__discard_changes_resp__pack_to_buffer
-+ (const Sr__DiscardChangesResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DiscardChangesResp *
-+ sr__discard_changes_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DiscardChangesResp *)
-+ protobuf_c_message_unpack (&sr__discard_changes_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__discard_changes_resp__free_unpacked
-+ (Sr__DiscardChangesResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__discard_changes_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__copy_config_req__init
-+ (Sr__CopyConfigReq *message)
-+{
-+ static Sr__CopyConfigReq init_value = SR__COPY_CONFIG_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__copy_config_req__get_packed_size
-+ (const Sr__CopyConfigReq *message)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__copy_config_req__pack
-+ (const Sr__CopyConfigReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__copy_config_req__pack_to_buffer
-+ (const Sr__CopyConfigReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CopyConfigReq *
-+ sr__copy_config_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CopyConfigReq *)
-+ protobuf_c_message_unpack (&sr__copy_config_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__copy_config_req__free_unpacked
-+ (Sr__CopyConfigReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__copy_config_resp__init
-+ (Sr__CopyConfigResp *message)
-+{
-+ static Sr__CopyConfigResp init_value = SR__COPY_CONFIG_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__copy_config_resp__get_packed_size
-+ (const Sr__CopyConfigResp *message)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__copy_config_resp__pack
-+ (const Sr__CopyConfigResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__copy_config_resp__pack_to_buffer
-+ (const Sr__CopyConfigResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CopyConfigResp *
-+ sr__copy_config_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CopyConfigResp *)
-+ protobuf_c_message_unpack (&sr__copy_config_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__copy_config_resp__free_unpacked
-+ (Sr__CopyConfigResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__copy_config_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__lock_req__init
-+ (Sr__LockReq *message)
-+{
-+ static Sr__LockReq init_value = SR__LOCK_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__lock_req__get_packed_size
-+ (const Sr__LockReq *message)
-+{
-+ assert(message->base.descriptor == &sr__lock_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__lock_req__pack
-+ (const Sr__LockReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__lock_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__lock_req__pack_to_buffer
-+ (const Sr__LockReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__lock_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__LockReq *
-+ sr__lock_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__LockReq *)
-+ protobuf_c_message_unpack (&sr__lock_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__lock_req__free_unpacked
-+ (Sr__LockReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__lock_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__lock_resp__init
-+ (Sr__LockResp *message)
-+{
-+ static Sr__LockResp init_value = SR__LOCK_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__lock_resp__get_packed_size
-+ (const Sr__LockResp *message)
-+{
-+ assert(message->base.descriptor == &sr__lock_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__lock_resp__pack
-+ (const Sr__LockResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__lock_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__lock_resp__pack_to_buffer
-+ (const Sr__LockResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__lock_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__LockResp *
-+ sr__lock_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__LockResp *)
-+ protobuf_c_message_unpack (&sr__lock_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__lock_resp__free_unpacked
-+ (Sr__LockResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__lock_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__unlock_req__init
-+ (Sr__UnlockReq *message)
-+{
-+ static Sr__UnlockReq init_value = SR__UNLOCK_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__unlock_req__get_packed_size
-+ (const Sr__UnlockReq *message)
-+{
-+ assert(message->base.descriptor == &sr__unlock_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__unlock_req__pack
-+ (const Sr__UnlockReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__unlock_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__unlock_req__pack_to_buffer
-+ (const Sr__UnlockReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__unlock_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__UnlockReq *
-+ sr__unlock_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__UnlockReq *)
-+ protobuf_c_message_unpack (&sr__unlock_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__unlock_req__free_unpacked
-+ (Sr__UnlockReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__unlock_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__unlock_resp__init
-+ (Sr__UnlockResp *message)
-+{
-+ static Sr__UnlockResp init_value = SR__UNLOCK_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__unlock_resp__get_packed_size
-+ (const Sr__UnlockResp *message)
-+{
-+ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__unlock_resp__pack
-+ (const Sr__UnlockResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__unlock_resp__pack_to_buffer
-+ (const Sr__UnlockResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__UnlockResp *
-+ sr__unlock_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__UnlockResp *)
-+ protobuf_c_message_unpack (&sr__unlock_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__unlock_resp__free_unpacked
-+ (Sr__UnlockResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__unlock_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__subscribe_req__init
-+ (Sr__SubscribeReq *message)
-+{
-+ static Sr__SubscribeReq init_value = SR__SUBSCRIBE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__subscribe_req__get_packed_size
-+ (const Sr__SubscribeReq *message)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__subscribe_req__pack
-+ (const Sr__SubscribeReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__subscribe_req__pack_to_buffer
-+ (const Sr__SubscribeReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SubscribeReq *
-+ sr__subscribe_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SubscribeReq *)
-+ protobuf_c_message_unpack (&sr__subscribe_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__subscribe_req__free_unpacked
-+ (Sr__SubscribeReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__subscribe_resp__init
-+ (Sr__SubscribeResp *message)
-+{
-+ static Sr__SubscribeResp init_value = SR__SUBSCRIBE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__subscribe_resp__get_packed_size
-+ (const Sr__SubscribeResp *message)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__subscribe_resp__pack
-+ (const Sr__SubscribeResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__subscribe_resp__pack_to_buffer
-+ (const Sr__SubscribeResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SubscribeResp *
-+ sr__subscribe_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SubscribeResp *)
-+ protobuf_c_message_unpack (&sr__subscribe_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__subscribe_resp__free_unpacked
-+ (Sr__SubscribeResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__subscribe_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__unsubscribe_req__init
-+ (Sr__UnsubscribeReq *message)
-+{
-+ static Sr__UnsubscribeReq init_value = SR__UNSUBSCRIBE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__unsubscribe_req__get_packed_size
-+ (const Sr__UnsubscribeReq *message)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__unsubscribe_req__pack
-+ (const Sr__UnsubscribeReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__unsubscribe_req__pack_to_buffer
-+ (const Sr__UnsubscribeReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__UnsubscribeReq *
-+ sr__unsubscribe_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__UnsubscribeReq *)
-+ protobuf_c_message_unpack (&sr__unsubscribe_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__unsubscribe_req__free_unpacked
-+ (Sr__UnsubscribeReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__unsubscribe_resp__init
-+ (Sr__UnsubscribeResp *message)
-+{
-+ static Sr__UnsubscribeResp init_value = SR__UNSUBSCRIBE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__unsubscribe_resp__get_packed_size
-+ (const Sr__UnsubscribeResp *message)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__unsubscribe_resp__pack
-+ (const Sr__UnsubscribeResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__unsubscribe_resp__pack_to_buffer
-+ (const Sr__UnsubscribeResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__UnsubscribeResp *
-+ sr__unsubscribe_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__UnsubscribeResp *)
-+ protobuf_c_message_unpack (&sr__unsubscribe_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__unsubscribe_resp__free_unpacked
-+ (Sr__UnsubscribeResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__check_enabled_running_req__init
-+ (Sr__CheckEnabledRunningReq *message)
-+{
-+ static Sr__CheckEnabledRunningReq init_value = SR__CHECK_ENABLED_RUNNING_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__check_enabled_running_req__get_packed_size
-+ (const Sr__CheckEnabledRunningReq *message)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__check_enabled_running_req__pack
-+ (const Sr__CheckEnabledRunningReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__check_enabled_running_req__pack_to_buffer
-+ (const Sr__CheckEnabledRunningReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CheckEnabledRunningReq *
-+ sr__check_enabled_running_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CheckEnabledRunningReq *)
-+ protobuf_c_message_unpack (&sr__check_enabled_running_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__check_enabled_running_req__free_unpacked
-+ (Sr__CheckEnabledRunningReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__check_enabled_running_resp__init
-+ (Sr__CheckEnabledRunningResp *message)
-+{
-+ static Sr__CheckEnabledRunningResp init_value = SR__CHECK_ENABLED_RUNNING_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__check_enabled_running_resp__get_packed_size
-+ (const Sr__CheckEnabledRunningResp *message)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__check_enabled_running_resp__pack
-+ (const Sr__CheckEnabledRunningResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__check_enabled_running_resp__pack_to_buffer
-+ (const Sr__CheckEnabledRunningResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CheckEnabledRunningResp *
-+ sr__check_enabled_running_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CheckEnabledRunningResp *)
-+ protobuf_c_message_unpack (&sr__check_enabled_running_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__check_enabled_running_resp__free_unpacked
-+ (Sr__CheckEnabledRunningResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__check_enabled_running_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__module_install_notification__init
-+ (Sr__ModuleInstallNotification *message)
-+{
-+ static Sr__ModuleInstallNotification init_value = SR__MODULE_INSTALL_NOTIFICATION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__module_install_notification__get_packed_size
-+ (const Sr__ModuleInstallNotification *message)
-+{
-+ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__module_install_notification__pack
-+ (const Sr__ModuleInstallNotification *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__module_install_notification__pack_to_buffer
-+ (const Sr__ModuleInstallNotification *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ModuleInstallNotification *
-+ sr__module_install_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ModuleInstallNotification *)
-+ protobuf_c_message_unpack (&sr__module_install_notification__descriptor,
-+ allocator, len, data);
-+}
-+void sr__module_install_notification__free_unpacked
-+ (Sr__ModuleInstallNotification *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__module_install_notification__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__feature_enable_notification__init
-+ (Sr__FeatureEnableNotification *message)
-+{
-+ static Sr__FeatureEnableNotification init_value = SR__FEATURE_ENABLE_NOTIFICATION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__feature_enable_notification__get_packed_size
-+ (const Sr__FeatureEnableNotification *message)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__feature_enable_notification__pack
-+ (const Sr__FeatureEnableNotification *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__feature_enable_notification__pack_to_buffer
-+ (const Sr__FeatureEnableNotification *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__FeatureEnableNotification *
-+ sr__feature_enable_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__FeatureEnableNotification *)
-+ protobuf_c_message_unpack (&sr__feature_enable_notification__descriptor,
-+ allocator, len, data);
-+}
-+void sr__feature_enable_notification__free_unpacked
-+ (Sr__FeatureEnableNotification *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_notification__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__module_change_notification__init
-+ (Sr__ModuleChangeNotification *message)
-+{
-+ static Sr__ModuleChangeNotification init_value = SR__MODULE_CHANGE_NOTIFICATION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__module_change_notification__get_packed_size
-+ (const Sr__ModuleChangeNotification *message)
-+{
-+ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__module_change_notification__pack
-+ (const Sr__ModuleChangeNotification *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__module_change_notification__pack_to_buffer
-+ (const Sr__ModuleChangeNotification *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ModuleChangeNotification *
-+ sr__module_change_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ModuleChangeNotification *)
-+ protobuf_c_message_unpack (&sr__module_change_notification__descriptor,
-+ allocator, len, data);
-+}
-+void sr__module_change_notification__free_unpacked
-+ (Sr__ModuleChangeNotification *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__module_change_notification__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__subtree_change_notification__init
-+ (Sr__SubtreeChangeNotification *message)
-+{
-+ static Sr__SubtreeChangeNotification init_value = SR__SUBTREE_CHANGE_NOTIFICATION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__subtree_change_notification__get_packed_size
-+ (const Sr__SubtreeChangeNotification *message)
-+{
-+ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__subtree_change_notification__pack
-+ (const Sr__SubtreeChangeNotification *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__subtree_change_notification__pack_to_buffer
-+ (const Sr__SubtreeChangeNotification *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__SubtreeChangeNotification *
-+ sr__subtree_change_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__SubtreeChangeNotification *)
-+ protobuf_c_message_unpack (&sr__subtree_change_notification__descriptor,
-+ allocator, len, data);
-+}
-+void sr__subtree_change_notification__free_unpacked
-+ (Sr__SubtreeChangeNotification *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__subtree_change_notification__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__change__init
-+ (Sr__Change *message)
-+{
-+ static Sr__Change init_value = SR__CHANGE__INIT;
-+ *message = init_value;
-+}
-+size_t sr__change__get_packed_size
-+ (const Sr__Change *message)
-+{
-+ assert(message->base.descriptor == &sr__change__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__change__pack
-+ (const Sr__Change *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__change__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__change__pack_to_buffer
-+ (const Sr__Change *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__change__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Change *
-+ sr__change__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Change *)
-+ protobuf_c_message_unpack (&sr__change__descriptor,
-+ allocator, len, data);
-+}
-+void sr__change__free_unpacked
-+ (Sr__Change *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__change__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_changes_req__init
-+ (Sr__GetChangesReq *message)
-+{
-+ static Sr__GetChangesReq init_value = SR__GET_CHANGES_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_changes_req__get_packed_size
-+ (const Sr__GetChangesReq *message)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_changes_req__pack
-+ (const Sr__GetChangesReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_changes_req__pack_to_buffer
-+ (const Sr__GetChangesReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetChangesReq *
-+ sr__get_changes_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetChangesReq *)
-+ protobuf_c_message_unpack (&sr__get_changes_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_changes_req__free_unpacked
-+ (Sr__GetChangesReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__get_changes_resp__init
-+ (Sr__GetChangesResp *message)
-+{
-+ static Sr__GetChangesResp init_value = SR__GET_CHANGES_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__get_changes_resp__get_packed_size
-+ (const Sr__GetChangesResp *message)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__get_changes_resp__pack
-+ (const Sr__GetChangesResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__get_changes_resp__pack_to_buffer
-+ (const Sr__GetChangesResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__GetChangesResp *
-+ sr__get_changes_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__GetChangesResp *)
-+ protobuf_c_message_unpack (&sr__get_changes_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__get_changes_resp__free_unpacked
-+ (Sr__GetChangesResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__get_changes_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__check_exec_perm_req__init
-+ (Sr__CheckExecPermReq *message)
-+{
-+ static Sr__CheckExecPermReq init_value = SR__CHECK_EXEC_PERM_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__check_exec_perm_req__get_packed_size
-+ (const Sr__CheckExecPermReq *message)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__check_exec_perm_req__pack
-+ (const Sr__CheckExecPermReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__check_exec_perm_req__pack_to_buffer
-+ (const Sr__CheckExecPermReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CheckExecPermReq *
-+ sr__check_exec_perm_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CheckExecPermReq *)
-+ protobuf_c_message_unpack (&sr__check_exec_perm_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__check_exec_perm_req__free_unpacked
-+ (Sr__CheckExecPermReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__check_exec_perm_resp__init
-+ (Sr__CheckExecPermResp *message)
-+{
-+ static Sr__CheckExecPermResp init_value = SR__CHECK_EXEC_PERM_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__check_exec_perm_resp__get_packed_size
-+ (const Sr__CheckExecPermResp *message)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__check_exec_perm_resp__pack
-+ (const Sr__CheckExecPermResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__check_exec_perm_resp__pack_to_buffer
-+ (const Sr__CheckExecPermResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CheckExecPermResp *
-+ sr__check_exec_perm_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CheckExecPermResp *)
-+ protobuf_c_message_unpack (&sr__check_exec_perm_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__check_exec_perm_resp__free_unpacked
-+ (Sr__CheckExecPermResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__check_exec_perm_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__rpcreq__init
-+ (Sr__RPCReq *message)
-+{
-+ static Sr__RPCReq init_value = SR__RPCREQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__rpcreq__get_packed_size
-+ (const Sr__RPCReq *message)
-+{
-+ assert(message->base.descriptor == &sr__rpcreq__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__rpcreq__pack
-+ (const Sr__RPCReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__rpcreq__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__rpcreq__pack_to_buffer
-+ (const Sr__RPCReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__rpcreq__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__RPCReq *
-+ sr__rpcreq__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__RPCReq *)
-+ protobuf_c_message_unpack (&sr__rpcreq__descriptor,
-+ allocator, len, data);
-+}
-+void sr__rpcreq__free_unpacked
-+ (Sr__RPCReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__rpcreq__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__rpcresp__init
-+ (Sr__RPCResp *message)
-+{
-+ static Sr__RPCResp init_value = SR__RPCRESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__rpcresp__get_packed_size
-+ (const Sr__RPCResp *message)
-+{
-+ assert(message->base.descriptor == &sr__rpcresp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__rpcresp__pack
-+ (const Sr__RPCResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__rpcresp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__rpcresp__pack_to_buffer
-+ (const Sr__RPCResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__rpcresp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__RPCResp *
-+ sr__rpcresp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__RPCResp *)
-+ protobuf_c_message_unpack (&sr__rpcresp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__rpcresp__free_unpacked
-+ (Sr__RPCResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__rpcresp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__event_notif_req__init
-+ (Sr__EventNotifReq *message)
-+{
-+ static Sr__EventNotifReq init_value = SR__EVENT_NOTIF_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__event_notif_req__get_packed_size
-+ (const Sr__EventNotifReq *message)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__event_notif_req__pack
-+ (const Sr__EventNotifReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__event_notif_req__pack_to_buffer
-+ (const Sr__EventNotifReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__EventNotifReq *
-+ sr__event_notif_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__EventNotifReq *)
-+ protobuf_c_message_unpack (&sr__event_notif_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__event_notif_req__free_unpacked
-+ (Sr__EventNotifReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__event_notif_resp__init
-+ (Sr__EventNotifResp *message)
-+{
-+ static Sr__EventNotifResp init_value = SR__EVENT_NOTIF_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__event_notif_resp__get_packed_size
-+ (const Sr__EventNotifResp *message)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__event_notif_resp__pack
-+ (const Sr__EventNotifResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__event_notif_resp__pack_to_buffer
-+ (const Sr__EventNotifResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__EventNotifResp *
-+ sr__event_notif_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__EventNotifResp *)
-+ protobuf_c_message_unpack (&sr__event_notif_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__event_notif_resp__free_unpacked
-+ (Sr__EventNotifResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__event_notif_replay_req__init
-+ (Sr__EventNotifReplayReq *message)
-+{
-+ static Sr__EventNotifReplayReq init_value = SR__EVENT_NOTIF_REPLAY_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__event_notif_replay_req__get_packed_size
-+ (const Sr__EventNotifReplayReq *message)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__event_notif_replay_req__pack
-+ (const Sr__EventNotifReplayReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__event_notif_replay_req__pack_to_buffer
-+ (const Sr__EventNotifReplayReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__EventNotifReplayReq *
-+ sr__event_notif_replay_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__EventNotifReplayReq *)
-+ protobuf_c_message_unpack (&sr__event_notif_replay_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__event_notif_replay_req__free_unpacked
-+ (Sr__EventNotifReplayReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__event_notif_replay_resp__init
-+ (Sr__EventNotifReplayResp *message)
-+{
-+ static Sr__EventNotifReplayResp init_value = SR__EVENT_NOTIF_REPLAY_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__event_notif_replay_resp__get_packed_size
-+ (const Sr__EventNotifReplayResp *message)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__event_notif_replay_resp__pack
-+ (const Sr__EventNotifReplayResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__event_notif_replay_resp__pack_to_buffer
-+ (const Sr__EventNotifReplayResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__EventNotifReplayResp *
-+ sr__event_notif_replay_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__EventNotifReplayResp *)
-+ protobuf_c_message_unpack (&sr__event_notif_replay_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__event_notif_replay_resp__free_unpacked
-+ (Sr__EventNotifReplayResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__event_notif_replay_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__data_provide_req__init
-+ (Sr__DataProvideReq *message)
-+{
-+ static Sr__DataProvideReq init_value = SR__DATA_PROVIDE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__data_provide_req__get_packed_size
-+ (const Sr__DataProvideReq *message)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__data_provide_req__pack
-+ (const Sr__DataProvideReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__data_provide_req__pack_to_buffer
-+ (const Sr__DataProvideReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DataProvideReq *
-+ sr__data_provide_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DataProvideReq *)
-+ protobuf_c_message_unpack (&sr__data_provide_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__data_provide_req__free_unpacked
-+ (Sr__DataProvideReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__data_provide_resp__init
-+ (Sr__DataProvideResp *message)
-+{
-+ static Sr__DataProvideResp init_value = SR__DATA_PROVIDE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__data_provide_resp__get_packed_size
-+ (const Sr__DataProvideResp *message)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__data_provide_resp__pack
-+ (const Sr__DataProvideResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__data_provide_resp__pack_to_buffer
-+ (const Sr__DataProvideResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DataProvideResp *
-+ sr__data_provide_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DataProvideResp *)
-+ protobuf_c_message_unpack (&sr__data_provide_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__data_provide_resp__free_unpacked
-+ (Sr__DataProvideResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__data_provide_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__module_install_req__init
-+ (Sr__ModuleInstallReq *message)
-+{
-+ static Sr__ModuleInstallReq init_value = SR__MODULE_INSTALL_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__module_install_req__get_packed_size
-+ (const Sr__ModuleInstallReq *message)
-+{
-+ assert(message->base.descriptor == &sr__module_install_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__module_install_req__pack
-+ (const Sr__ModuleInstallReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__module_install_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__module_install_req__pack_to_buffer
-+ (const Sr__ModuleInstallReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__module_install_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ModuleInstallReq *
-+ sr__module_install_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ModuleInstallReq *)
-+ protobuf_c_message_unpack (&sr__module_install_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__module_install_req__free_unpacked
-+ (Sr__ModuleInstallReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__module_install_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__module_install_resp__init
-+ (Sr__ModuleInstallResp *message)
-+{
-+ static Sr__ModuleInstallResp init_value = SR__MODULE_INSTALL_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__module_install_resp__get_packed_size
-+ (const Sr__ModuleInstallResp *message)
-+{
-+ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__module_install_resp__pack
-+ (const Sr__ModuleInstallResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__module_install_resp__pack_to_buffer
-+ (const Sr__ModuleInstallResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__ModuleInstallResp *
-+ sr__module_install_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__ModuleInstallResp *)
-+ protobuf_c_message_unpack (&sr__module_install_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__module_install_resp__free_unpacked
-+ (Sr__ModuleInstallResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__module_install_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__feature_enable_req__init
-+ (Sr__FeatureEnableReq *message)
-+{
-+ static Sr__FeatureEnableReq init_value = SR__FEATURE_ENABLE_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__feature_enable_req__get_packed_size
-+ (const Sr__FeatureEnableReq *message)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__feature_enable_req__pack
-+ (const Sr__FeatureEnableReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__feature_enable_req__pack_to_buffer
-+ (const Sr__FeatureEnableReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__FeatureEnableReq *
-+ sr__feature_enable_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__FeatureEnableReq *)
-+ protobuf_c_message_unpack (&sr__feature_enable_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__feature_enable_req__free_unpacked
-+ (Sr__FeatureEnableReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__feature_enable_resp__init
-+ (Sr__FeatureEnableResp *message)
-+{
-+ static Sr__FeatureEnableResp init_value = SR__FEATURE_ENABLE_RESP__INIT;
-+ *message = init_value;
-+}
-+size_t sr__feature_enable_resp__get_packed_size
-+ (const Sr__FeatureEnableResp *message)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__feature_enable_resp__pack
-+ (const Sr__FeatureEnableResp *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__feature_enable_resp__pack_to_buffer
-+ (const Sr__FeatureEnableResp *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__FeatureEnableResp *
-+ sr__feature_enable_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__FeatureEnableResp *)
-+ protobuf_c_message_unpack (&sr__feature_enable_resp__descriptor,
-+ allocator, len, data);
-+}
-+void sr__feature_enable_resp__free_unpacked
-+ (Sr__FeatureEnableResp *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__feature_enable_resp__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__unsubscribe_destination_req__init
-+ (Sr__UnsubscribeDestinationReq *message)
-+{
-+ static Sr__UnsubscribeDestinationReq init_value = SR__UNSUBSCRIBE_DESTINATION_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__unsubscribe_destination_req__get_packed_size
-+ (const Sr__UnsubscribeDestinationReq *message)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__unsubscribe_destination_req__pack
-+ (const Sr__UnsubscribeDestinationReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__unsubscribe_destination_req__pack_to_buffer
-+ (const Sr__UnsubscribeDestinationReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__UnsubscribeDestinationReq *
-+ sr__unsubscribe_destination_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__UnsubscribeDestinationReq *)
-+ protobuf_c_message_unpack (&sr__unsubscribe_destination_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__unsubscribe_destination_req__free_unpacked
-+ (Sr__UnsubscribeDestinationReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__unsubscribe_destination_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__commit_timeout_req__init
-+ (Sr__CommitTimeoutReq *message)
-+{
-+ static Sr__CommitTimeoutReq init_value = SR__COMMIT_TIMEOUT_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__commit_timeout_req__get_packed_size
-+ (const Sr__CommitTimeoutReq *message)
-+{
-+ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__commit_timeout_req__pack
-+ (const Sr__CommitTimeoutReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__commit_timeout_req__pack_to_buffer
-+ (const Sr__CommitTimeoutReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__CommitTimeoutReq *
-+ sr__commit_timeout_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__CommitTimeoutReq *)
-+ protobuf_c_message_unpack (&sr__commit_timeout_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__commit_timeout_req__free_unpacked
-+ (Sr__CommitTimeoutReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__commit_timeout_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__oper_data_timeout_req__init
-+ (Sr__OperDataTimeoutReq *message)
-+{
-+ static Sr__OperDataTimeoutReq init_value = SR__OPER_DATA_TIMEOUT_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__oper_data_timeout_req__get_packed_size
-+ (const Sr__OperDataTimeoutReq *message)
-+{
-+ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__oper_data_timeout_req__pack
-+ (const Sr__OperDataTimeoutReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__oper_data_timeout_req__pack_to_buffer
-+ (const Sr__OperDataTimeoutReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__OperDataTimeoutReq *
-+ sr__oper_data_timeout_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__OperDataTimeoutReq *)
-+ protobuf_c_message_unpack (&sr__oper_data_timeout_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__oper_data_timeout_req__free_unpacked
-+ (Sr__OperDataTimeoutReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__oper_data_timeout_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__internal_state_data_req__init
-+ (Sr__InternalStateDataReq *message)
-+{
-+ static Sr__InternalStateDataReq init_value = SR__INTERNAL_STATE_DATA_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__internal_state_data_req__get_packed_size
-+ (const Sr__InternalStateDataReq *message)
-+{
-+ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__internal_state_data_req__pack
-+ (const Sr__InternalStateDataReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__internal_state_data_req__pack_to_buffer
-+ (const Sr__InternalStateDataReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__InternalStateDataReq *
-+ sr__internal_state_data_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__InternalStateDataReq *)
-+ protobuf_c_message_unpack (&sr__internal_state_data_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__internal_state_data_req__free_unpacked
-+ (Sr__InternalStateDataReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__internal_state_data_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__notif_store_cleanup_req__init
-+ (Sr__NotifStoreCleanupReq *message)
-+{
-+ static Sr__NotifStoreCleanupReq init_value = SR__NOTIF_STORE_CLEANUP_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__notif_store_cleanup_req__get_packed_size
-+ (const Sr__NotifStoreCleanupReq *message)
-+{
-+ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__notif_store_cleanup_req__pack
-+ (const Sr__NotifStoreCleanupReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__notif_store_cleanup_req__pack_to_buffer
-+ (const Sr__NotifStoreCleanupReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__NotifStoreCleanupReq *
-+ sr__notif_store_cleanup_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__NotifStoreCleanupReq *)
-+ protobuf_c_message_unpack (&sr__notif_store_cleanup_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__notif_store_cleanup_req__free_unpacked
-+ (Sr__NotifStoreCleanupReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__notif_store_cleanup_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__delayed_msg_req__init
-+ (Sr__DelayedMsgReq *message)
-+{
-+ static Sr__DelayedMsgReq init_value = SR__DELAYED_MSG_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__delayed_msg_req__get_packed_size
-+ (const Sr__DelayedMsgReq *message)
-+{
-+ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__delayed_msg_req__pack
-+ (const Sr__DelayedMsgReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__delayed_msg_req__pack_to_buffer
-+ (const Sr__DelayedMsgReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__DelayedMsgReq *
-+ sr__delayed_msg_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__DelayedMsgReq *)
-+ protobuf_c_message_unpack (&sr__delayed_msg_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__delayed_msg_req__free_unpacked
-+ (Sr__DelayedMsgReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__delayed_msg_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__nacm_reload_req__init
-+ (Sr__NacmReloadReq *message)
-+{
-+ static Sr__NacmReloadReq init_value = SR__NACM_RELOAD_REQ__INIT;
-+ *message = init_value;
-+}
-+size_t sr__nacm_reload_req__get_packed_size
-+ (const Sr__NacmReloadReq *message)
-+{
-+ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__nacm_reload_req__pack
-+ (const Sr__NacmReloadReq *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__nacm_reload_req__pack_to_buffer
-+ (const Sr__NacmReloadReq *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__NacmReloadReq *
-+ sr__nacm_reload_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__NacmReloadReq *)
-+ protobuf_c_message_unpack (&sr__nacm_reload_req__descriptor,
-+ allocator, len, data);
-+}
-+void sr__nacm_reload_req__free_unpacked
-+ (Sr__NacmReloadReq *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__nacm_reload_req__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__request__init
-+ (Sr__Request *message)
-+{
-+ static Sr__Request init_value = SR__REQUEST__INIT;
-+ *message = init_value;
-+}
-+size_t sr__request__get_packed_size
-+ (const Sr__Request *message)
-+{
-+ assert(message->base.descriptor == &sr__request__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__request__pack
-+ (const Sr__Request *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__request__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__request__pack_to_buffer
-+ (const Sr__Request *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__request__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Request *
-+ sr__request__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Request *)
-+ protobuf_c_message_unpack (&sr__request__descriptor,
-+ allocator, len, data);
-+}
-+void sr__request__free_unpacked
-+ (Sr__Request *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__request__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__response__init
-+ (Sr__Response *message)
-+{
-+ static Sr__Response init_value = SR__RESPONSE__INIT;
-+ *message = init_value;
-+}
-+size_t sr__response__get_packed_size
-+ (const Sr__Response *message)
-+{
-+ assert(message->base.descriptor == &sr__response__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__response__pack
-+ (const Sr__Response *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__response__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__response__pack_to_buffer
-+ (const Sr__Response *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__response__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Response *
-+ sr__response__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Response *)
-+ protobuf_c_message_unpack (&sr__response__descriptor,
-+ allocator, len, data);
-+}
-+void sr__response__free_unpacked
-+ (Sr__Response *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__response__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__notification__init
-+ (Sr__Notification *message)
-+{
-+ static Sr__Notification init_value = SR__NOTIFICATION__INIT;
-+ *message = init_value;
-+}
-+size_t sr__notification__get_packed_size
-+ (const Sr__Notification *message)
-+{
-+ assert(message->base.descriptor == &sr__notification__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__notification__pack
-+ (const Sr__Notification *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__notification__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__notification__pack_to_buffer
-+ (const Sr__Notification *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__notification__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Notification *
-+ sr__notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Notification *)
-+ protobuf_c_message_unpack (&sr__notification__descriptor,
-+ allocator, len, data);
-+}
-+void sr__notification__free_unpacked
-+ (Sr__Notification *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__notification__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__notification_ack__init
-+ (Sr__NotificationAck *message)
-+{
-+ static Sr__NotificationAck init_value = SR__NOTIFICATION_ACK__INIT;
-+ *message = init_value;
-+}
-+size_t sr__notification_ack__get_packed_size
-+ (const Sr__NotificationAck *message)
-+{
-+ assert(message->base.descriptor == &sr__notification_ack__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__notification_ack__pack
-+ (const Sr__NotificationAck *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__notification_ack__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__notification_ack__pack_to_buffer
-+ (const Sr__NotificationAck *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__notification_ack__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__NotificationAck *
-+ sr__notification_ack__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__NotificationAck *)
-+ protobuf_c_message_unpack (&sr__notification_ack__descriptor,
-+ allocator, len, data);
-+}
-+void sr__notification_ack__free_unpacked
-+ (Sr__NotificationAck *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__notification_ack__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__internal_request__init
-+ (Sr__InternalRequest *message)
-+{
-+ static Sr__InternalRequest init_value = SR__INTERNAL_REQUEST__INIT;
-+ *message = init_value;
-+}
-+size_t sr__internal_request__get_packed_size
-+ (const Sr__InternalRequest *message)
-+{
-+ assert(message->base.descriptor == &sr__internal_request__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__internal_request__pack
-+ (const Sr__InternalRequest *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__internal_request__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__internal_request__pack_to_buffer
-+ (const Sr__InternalRequest *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__internal_request__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__InternalRequest *
-+ sr__internal_request__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__InternalRequest *)
-+ protobuf_c_message_unpack (&sr__internal_request__descriptor,
-+ allocator, len, data);
-+}
-+void sr__internal_request__free_unpacked
-+ (Sr__InternalRequest *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__internal_request__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+void sr__msg__init
-+ (Sr__Msg *message)
-+{
-+ static Sr__Msg init_value = SR__MSG__INIT;
-+ *message = init_value;
-+}
-+size_t sr__msg__get_packed_size
-+ (const Sr__Msg *message)
-+{
-+ assert(message->base.descriptor == &sr__msg__descriptor);
-+ return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
-+}
-+size_t sr__msg__pack
-+ (const Sr__Msg *message,
-+ uint8_t *out)
-+{
-+ assert(message->base.descriptor == &sr__msg__descriptor);
-+ return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
-+}
-+size_t sr__msg__pack_to_buffer
-+ (const Sr__Msg *message,
-+ ProtobufCBuffer *buffer)
-+{
-+ assert(message->base.descriptor == &sr__msg__descriptor);
-+ return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
-+}
-+Sr__Msg *
-+ sr__msg__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data)
-+{
-+ return (Sr__Msg *)
-+ protobuf_c_message_unpack (&sr__msg__descriptor,
-+ allocator, len, data);
-+}
-+void sr__msg__free_unpacked
-+ (Sr__Msg *message,
-+ ProtobufCAllocator *allocator)
-+{
-+ assert(message->base.descriptor == &sr__msg__descriptor);
-+ protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
-+}
-+static const ProtobufCEnumValue sr__value__types__enum_values_by_number[22] =
-+{
-+ { "LIST", "SR__VALUE__TYPES__LIST", 1 },
-+ { "CONTAINER", "SR__VALUE__TYPES__CONTAINER", 2 },
-+ { "CONTAINER_PRESENCE", "SR__VALUE__TYPES__CONTAINER_PRESENCE", 3 },
-+ { "LEAF_EMPTY", "SR__VALUE__TYPES__LEAF_EMPTY", 4 },
-+ { "BINARY", "SR__VALUE__TYPES__BINARY", 10 },
-+ { "BITS", "SR__VALUE__TYPES__BITS", 11 },
-+ { "BOOL", "SR__VALUE__TYPES__BOOL", 12 },
-+ { "DECIMAL64", "SR__VALUE__TYPES__DECIMAL64", 13 },
-+ { "ENUM", "SR__VALUE__TYPES__ENUM", 14 },
-+ { "IDENTITYREF", "SR__VALUE__TYPES__IDENTITYREF", 15 },
-+ { "INSTANCEID", "SR__VALUE__TYPES__INSTANCEID", 16 },
-+ { "INT8", "SR__VALUE__TYPES__INT8", 17 },
-+ { "INT16", "SR__VALUE__TYPES__INT16", 18 },
-+ { "INT32", "SR__VALUE__TYPES__INT32", 19 },
-+ { "INT64", "SR__VALUE__TYPES__INT64", 20 },
-+ { "STRING", "SR__VALUE__TYPES__STRING", 21 },
-+ { "UINT8", "SR__VALUE__TYPES__UINT8", 22 },
-+ { "UINT16", "SR__VALUE__TYPES__UINT16", 23 },
-+ { "UINT32", "SR__VALUE__TYPES__UINT32", 24 },
-+ { "UINT64", "SR__VALUE__TYPES__UINT64", 25 },
-+ { "ANYXML", "SR__VALUE__TYPES__ANYXML", 26 },
-+ { "ANYDATA", "SR__VALUE__TYPES__ANYDATA", 27 },
-+};
-+static const ProtobufCIntRange sr__value__types__value_ranges[] = {
-+{1, 0},{10, 4},{0, 22}
-+};
-+static const ProtobufCEnumValueIndex sr__value__types__enum_values_by_name[22] =
-+{
-+ { "ANYDATA", 21 },
-+ { "ANYXML", 20 },
-+ { "BINARY", 4 },
-+ { "BITS", 5 },
-+ { "BOOL", 6 },
-+ { "CONTAINER", 1 },
-+ { "CONTAINER_PRESENCE", 2 },
-+ { "DECIMAL64", 7 },
-+ { "ENUM", 8 },
-+ { "IDENTITYREF", 9 },
-+ { "INSTANCEID", 10 },
-+ { "INT16", 12 },
-+ { "INT32", 13 },
-+ { "INT64", 14 },
-+ { "INT8", 11 },
-+ { "LEAF_EMPTY", 3 },
-+ { "LIST", 0 },
-+ { "STRING", 15 },
-+ { "UINT16", 17 },
-+ { "UINT32", 18 },
-+ { "UINT64", 19 },
-+ { "UINT8", 16 },
-+};
-+const ProtobufCEnumDescriptor sr__value__types__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.Value.Types",
-+ "Types",
-+ "Sr__Value__Types",
-+ "sr",
-+ 22,
-+ sr__value__types__enum_values_by_number,
-+ 22,
-+ sr__value__types__enum_values_by_name,
-+ 2,
-+ sr__value__types__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCFieldDescriptor sr__value__field_descriptors[21] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "type",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, type),
-+ &sr__value__types__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "dflt",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, dflt),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "binary_val",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, binary_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "bits_val",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, bits_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "bool_val",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_BOOL,
-+ offsetof(Sr__Value, has_bool_val),
-+ offsetof(Sr__Value, bool_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "decimal64_val",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_DOUBLE,
-+ offsetof(Sr__Value, has_decimal64_val),
-+ offsetof(Sr__Value, decimal64_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enum_val",
-+ 14,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, enum_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "identityref_val",
-+ 15,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, identityref_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "instanceid_val",
-+ 16,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, instanceid_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "int8_val",
-+ 17,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_INT32,
-+ offsetof(Sr__Value, has_int8_val),
-+ offsetof(Sr__Value, int8_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "int16_val",
-+ 18,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_INT32,
-+ offsetof(Sr__Value, has_int16_val),
-+ offsetof(Sr__Value, int16_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "int32_val",
-+ 19,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_INT32,
-+ offsetof(Sr__Value, has_int32_val),
-+ offsetof(Sr__Value, int32_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "int64_val",
-+ 20,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_INT64,
-+ offsetof(Sr__Value, has_int64_val),
-+ offsetof(Sr__Value, int64_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "string_val",
-+ 21,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, string_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "uint8_val",
-+ 22,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__Value, has_uint8_val),
-+ offsetof(Sr__Value, uint8_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "uint16_val",
-+ 23,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__Value, has_uint16_val),
-+ offsetof(Sr__Value, uint16_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "uint32_val",
-+ 24,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__Value, has_uint32_val),
-+ offsetof(Sr__Value, uint32_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "uint64_val",
-+ 25,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT64,
-+ offsetof(Sr__Value, has_uint64_val),
-+ offsetof(Sr__Value, uint64_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "anyxml_val",
-+ 26,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, anyxml_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "anydata_val",
-+ 27,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Value, anydata_val),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__value__field_indices_by_name[] = {
-+ 20, /* field[20] = anydata_val */
-+ 19, /* field[19] = anyxml_val */
-+ 3, /* field[3] = binary_val */
-+ 4, /* field[4] = bits_val */
-+ 5, /* field[5] = bool_val */
-+ 6, /* field[6] = decimal64_val */
-+ 2, /* field[2] = dflt */
-+ 7, /* field[7] = enum_val */
-+ 8, /* field[8] = identityref_val */
-+ 9, /* field[9] = instanceid_val */
-+ 11, /* field[11] = int16_val */
-+ 12, /* field[12] = int32_val */
-+ 13, /* field[13] = int64_val */
-+ 10, /* field[10] = int8_val */
-+ 14, /* field[14] = string_val */
-+ 1, /* field[1] = type */
-+ 16, /* field[16] = uint16_val */
-+ 17, /* field[17] = uint32_val */
-+ 18, /* field[18] = uint64_val */
-+ 15, /* field[15] = uint8_val */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__value__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 3 },
-+ { 0, 21 }
-+};
-+const ProtobufCMessageDescriptor sr__value__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Value",
-+ "Value",
-+ "Sr__Value",
-+ "sr",
-+ sizeof(Sr__Value),
-+ 21,
-+ sr__value__field_descriptors,
-+ sr__value__field_indices_by_name,
-+ 2, sr__value__number_ranges,
-+ (ProtobufCMessageInit) sr__value__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__node__field_descriptors[3] =
-+{
-+ {
-+ "value",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Node, value),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_name",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Node, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "children",
-+ 3,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__Node, n_children),
-+ offsetof(Sr__Node, children),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__node__field_indices_by_name[] = {
-+ 2, /* field[2] = children */
-+ 1, /* field[1] = module_name */
-+ 0, /* field[0] = value */
-+};
-+static const ProtobufCIntRange sr__node__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__node__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Node",
-+ "Node",
-+ "Sr__Node",
-+ "sr",
-+ sizeof(Sr__Node),
-+ 3,
-+ sr__node__field_descriptors,
-+ sr__node__field_indices_by_name,
-+ 1, sr__node__number_ranges,
-+ (ProtobufCMessageInit) sr__node__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__error__field_descriptors[2] =
-+{
-+ {
-+ "message",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Error, message),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Error, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__error__field_indices_by_name[] = {
-+ 0, /* field[0] = message */
-+ 1, /* field[1] = xpath */
-+};
-+static const ProtobufCIntRange sr__error__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__error__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Error",
-+ "Error",
-+ "Sr__Error",
-+ "sr",
-+ sizeof(Sr__Error),
-+ 2,
-+ sr__error__field_descriptors,
-+ sr__error__field_indices_by_name,
-+ 1, sr__error__number_ranges,
-+ (ProtobufCMessageInit) sr__error__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_start_req__field_descriptors[4] =
-+{
-+ {
-+ "datastore",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStartReq, datastore),
-+ &sr__data_store__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "user_name",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStartReq, user_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "options",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStartReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "commit_id",
-+ 4,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__SessionStartReq, has_commit_id),
-+ offsetof(Sr__SessionStartReq, commit_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_start_req__field_indices_by_name[] = {
-+ 3, /* field[3] = commit_id */
-+ 0, /* field[0] = datastore */
-+ 2, /* field[2] = options */
-+ 1, /* field[1] = user_name */
-+};
-+static const ProtobufCIntRange sr__session_start_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 4 }
-+};
-+const ProtobufCMessageDescriptor sr__session_start_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionStartReq",
-+ "SessionStartReq",
-+ "Sr__SessionStartReq",
-+ "sr",
-+ sizeof(Sr__SessionStartReq),
-+ 4,
-+ sr__session_start_req__field_descriptors,
-+ sr__session_start_req__field_indices_by_name,
-+ 1, sr__session_start_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_start_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_start_resp__field_descriptors[1] =
-+{
-+ {
-+ "session_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStartResp, session_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_start_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = session_id */
-+};
-+static const ProtobufCIntRange sr__session_start_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_start_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionStartResp",
-+ "SessionStartResp",
-+ "Sr__SessionStartResp",
-+ "sr",
-+ sizeof(Sr__SessionStartResp),
-+ 1,
-+ sr__session_start_resp__field_descriptors,
-+ sr__session_start_resp__field_indices_by_name,
-+ 1, sr__session_start_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_start_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_stop_req__field_descriptors[1] =
-+{
-+ {
-+ "session_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStopReq, session_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_stop_req__field_indices_by_name[] = {
-+ 0, /* field[0] = session_id */
-+};
-+static const ProtobufCIntRange sr__session_stop_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_stop_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionStopReq",
-+ "SessionStopReq",
-+ "Sr__SessionStopReq",
-+ "sr",
-+ sizeof(Sr__SessionStopReq),
-+ 1,
-+ sr__session_stop_req__field_descriptors,
-+ sr__session_stop_req__field_indices_by_name,
-+ 1, sr__session_stop_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_stop_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_stop_resp__field_descriptors[1] =
-+{
-+ {
-+ "session_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionStopResp, session_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_stop_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = session_id */
-+};
-+static const ProtobufCIntRange sr__session_stop_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_stop_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionStopResp",
-+ "SessionStopResp",
-+ "Sr__SessionStopResp",
-+ "sr",
-+ sizeof(Sr__SessionStopResp),
-+ 1,
-+ sr__session_stop_resp__field_descriptors,
-+ sr__session_stop_resp__field_indices_by_name,
-+ 1, sr__session_stop_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_stop_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__session_refresh_req__field_descriptors NULL
-+#define sr__session_refresh_req__field_indices_by_name NULL
-+#define sr__session_refresh_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__session_refresh_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionRefreshReq",
-+ "SessionRefreshReq",
-+ "Sr__SessionRefreshReq",
-+ "sr",
-+ sizeof(Sr__SessionRefreshReq),
-+ 0,
-+ sr__session_refresh_req__field_descriptors,
-+ sr__session_refresh_req__field_indices_by_name,
-+ 0, sr__session_refresh_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_refresh_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_refresh_resp__field_descriptors[1] =
-+{
-+ {
-+ "errors",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__SessionRefreshResp, n_errors),
-+ offsetof(Sr__SessionRefreshResp, errors),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_refresh_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = errors */
-+};
-+static const ProtobufCIntRange sr__session_refresh_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_refresh_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionRefreshResp",
-+ "SessionRefreshResp",
-+ "Sr__SessionRefreshResp",
-+ "sr",
-+ sizeof(Sr__SessionRefreshResp),
-+ 1,
-+ sr__session_refresh_resp__field_descriptors,
-+ sr__session_refresh_resp__field_indices_by_name,
-+ 1, sr__session_refresh_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_refresh_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__session_check_req__field_descriptors NULL
-+#define sr__session_check_req__field_indices_by_name NULL
-+#define sr__session_check_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__session_check_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionCheckReq",
-+ "SessionCheckReq",
-+ "Sr__SessionCheckReq",
-+ "sr",
-+ sizeof(Sr__SessionCheckReq),
-+ 0,
-+ sr__session_check_req__field_descriptors,
-+ sr__session_check_req__field_indices_by_name,
-+ 0, sr__session_check_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_check_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_check_resp__field_descriptors[1] =
-+{
-+ {
-+ "errors",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__SessionCheckResp, n_errors),
-+ offsetof(Sr__SessionCheckResp, errors),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_check_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = errors */
-+};
-+static const ProtobufCIntRange sr__session_check_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_check_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionCheckResp",
-+ "SessionCheckResp",
-+ "Sr__SessionCheckResp",
-+ "sr",
-+ sizeof(Sr__SessionCheckResp),
-+ 1,
-+ sr__session_check_resp__field_descriptors,
-+ sr__session_check_resp__field_indices_by_name,
-+ 1, sr__session_check_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_check_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_switch_ds_req__field_descriptors[1] =
-+{
-+ {
-+ "datastore",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionSwitchDsReq, datastore),
-+ &sr__data_store__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_switch_ds_req__field_indices_by_name[] = {
-+ 0, /* field[0] = datastore */
-+};
-+static const ProtobufCIntRange sr__session_switch_ds_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_switch_ds_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionSwitchDsReq",
-+ "SessionSwitchDsReq",
-+ "Sr__SessionSwitchDsReq",
-+ "sr",
-+ sizeof(Sr__SessionSwitchDsReq),
-+ 1,
-+ sr__session_switch_ds_req__field_descriptors,
-+ sr__session_switch_ds_req__field_indices_by_name,
-+ 1, sr__session_switch_ds_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_switch_ds_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__session_switch_ds_resp__field_descriptors NULL
-+#define sr__session_switch_ds_resp__field_indices_by_name NULL
-+#define sr__session_switch_ds_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__session_switch_ds_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionSwitchDsResp",
-+ "SessionSwitchDsResp",
-+ "Sr__SessionSwitchDsResp",
-+ "sr",
-+ sizeof(Sr__SessionSwitchDsResp),
-+ 0,
-+ sr__session_switch_ds_resp__field_descriptors,
-+ sr__session_switch_ds_resp__field_indices_by_name,
-+ 0, sr__session_switch_ds_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_switch_ds_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__session_set_opts_req__field_descriptors[1] =
-+{
-+ {
-+ "options",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SessionSetOptsReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__session_set_opts_req__field_indices_by_name[] = {
-+ 0, /* field[0] = options */
-+};
-+static const ProtobufCIntRange sr__session_set_opts_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__session_set_opts_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionSetOptsReq",
-+ "SessionSetOptsReq",
-+ "Sr__SessionSetOptsReq",
-+ "sr",
-+ sizeof(Sr__SessionSetOptsReq),
-+ 1,
-+ sr__session_set_opts_req__field_descriptors,
-+ sr__session_set_opts_req__field_indices_by_name,
-+ 1, sr__session_set_opts_req__number_ranges,
-+ (ProtobufCMessageInit) sr__session_set_opts_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__session_set_opts_resp__field_descriptors NULL
-+#define sr__session_set_opts_resp__field_indices_by_name NULL
-+#define sr__session_set_opts_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__session_set_opts_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SessionSetOptsResp",
-+ "SessionSetOptsResp",
-+ "Sr__SessionSetOptsResp",
-+ "sr",
-+ sizeof(Sr__SessionSetOptsResp),
-+ 0,
-+ sr__session_set_opts_resp__field_descriptors,
-+ sr__session_set_opts_resp__field_indices_by_name,
-+ 0, sr__session_set_opts_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__session_set_opts_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__version_verify_req__field_descriptors[1] =
-+{
-+ {
-+ "soname",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__VersionVerifyReq, soname),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__version_verify_req__field_indices_by_name[] = {
-+ 0, /* field[0] = soname */
-+};
-+static const ProtobufCIntRange sr__version_verify_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__version_verify_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.VersionVerifyReq",
-+ "VersionVerifyReq",
-+ "Sr__VersionVerifyReq",
-+ "sr",
-+ sizeof(Sr__VersionVerifyReq),
-+ 1,
-+ sr__version_verify_req__field_descriptors,
-+ sr__version_verify_req__field_indices_by_name,
-+ 1, sr__version_verify_req__number_ranges,
-+ (ProtobufCMessageInit) sr__version_verify_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__version_verify_resp__field_descriptors[1] =
-+{
-+ {
-+ "soname",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__VersionVerifyResp, soname),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__version_verify_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = soname */
-+};
-+static const ProtobufCIntRange sr__version_verify_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__version_verify_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.VersionVerifyResp",
-+ "VersionVerifyResp",
-+ "Sr__VersionVerifyResp",
-+ "sr",
-+ sizeof(Sr__VersionVerifyResp),
-+ 1,
-+ sr__version_verify_resp__field_descriptors,
-+ sr__version_verify_resp__field_indices_by_name,
-+ 1, sr__version_verify_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__version_verify_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__schema_revision__field_descriptors[3] =
-+{
-+ {
-+ "revision",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SchemaRevision, revision),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "file_path_yang",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SchemaRevision, file_path_yang),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "file_path_yin",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SchemaRevision, file_path_yin),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__schema_revision__field_indices_by_name[] = {
-+ 1, /* field[1] = file_path_yang */
-+ 2, /* field[2] = file_path_yin */
-+ 0, /* field[0] = revision */
-+};
-+static const ProtobufCIntRange sr__schema_revision__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__schema_revision__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SchemaRevision",
-+ "SchemaRevision",
-+ "Sr__SchemaRevision",
-+ "sr",
-+ sizeof(Sr__SchemaRevision),
-+ 3,
-+ sr__schema_revision__field_descriptors,
-+ sr__schema_revision__field_indices_by_name,
-+ 1, sr__schema_revision__number_ranges,
-+ (ProtobufCMessageInit) sr__schema_revision__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__schema_submodule__field_descriptors[2] =
-+{
-+ {
-+ "submodule_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SchemaSubmodule, submodule_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "revision",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SchemaSubmodule, revision),
-+ &sr__schema_revision__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__schema_submodule__field_indices_by_name[] = {
-+ 1, /* field[1] = revision */
-+ 0, /* field[0] = submodule_name */
-+};
-+static const ProtobufCIntRange sr__schema_submodule__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__schema_submodule__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SchemaSubmodule",
-+ "SchemaSubmodule",
-+ "Sr__SchemaSubmodule",
-+ "sr",
-+ sizeof(Sr__SchemaSubmodule),
-+ 2,
-+ sr__schema_submodule__field_descriptors,
-+ sr__schema_submodule__field_indices_by_name,
-+ 1, sr__schema_submodule__number_ranges,
-+ (ProtobufCMessageInit) sr__schema_submodule__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__schema__field_descriptors[8] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "ns",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, ns),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "prefix",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, prefix),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "installed",
-+ 4,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, installed),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "implemented",
-+ 5,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, implemented),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "revision",
-+ 6,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Schema, revision),
-+ &sr__schema_revision__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "submodules",
-+ 7,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__Schema, n_submodules),
-+ offsetof(Sr__Schema, submodules),
-+ &sr__schema_submodule__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enabled_features",
-+ 8,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_STRING,
-+ offsetof(Sr__Schema, n_enabled_features),
-+ offsetof(Sr__Schema, enabled_features),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__schema__field_indices_by_name[] = {
-+ 7, /* field[7] = enabled_features */
-+ 4, /* field[4] = implemented */
-+ 3, /* field[3] = installed */
-+ 0, /* field[0] = module_name */
-+ 1, /* field[1] = ns */
-+ 2, /* field[2] = prefix */
-+ 5, /* field[5] = revision */
-+ 6, /* field[6] = submodules */
-+};
-+static const ProtobufCIntRange sr__schema__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 8 }
-+};
-+const ProtobufCMessageDescriptor sr__schema__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Schema",
-+ "Schema",
-+ "Sr__Schema",
-+ "sr",
-+ sizeof(Sr__Schema),
-+ 8,
-+ sr__schema__field_descriptors,
-+ sr__schema__field_indices_by_name,
-+ 1, sr__schema__number_ranges,
-+ (ProtobufCMessageInit) sr__schema__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__list_schemas_req__field_descriptors NULL
-+#define sr__list_schemas_req__field_indices_by_name NULL
-+#define sr__list_schemas_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__list_schemas_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ListSchemasReq",
-+ "ListSchemasReq",
-+ "Sr__ListSchemasReq",
-+ "sr",
-+ sizeof(Sr__ListSchemasReq),
-+ 0,
-+ sr__list_schemas_req__field_descriptors,
-+ sr__list_schemas_req__field_indices_by_name,
-+ 0, sr__list_schemas_req__number_ranges,
-+ (ProtobufCMessageInit) sr__list_schemas_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__list_schemas_resp__field_descriptors[1] =
-+{
-+ {
-+ "schemas",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__ListSchemasResp, n_schemas),
-+ offsetof(Sr__ListSchemasResp, schemas),
-+ &sr__schema__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__list_schemas_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = schemas */
-+};
-+static const ProtobufCIntRange sr__list_schemas_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__list_schemas_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ListSchemasResp",
-+ "ListSchemasResp",
-+ "Sr__ListSchemasResp",
-+ "sr",
-+ sizeof(Sr__ListSchemasResp),
-+ 1,
-+ sr__list_schemas_resp__field_descriptors,
-+ sr__list_schemas_resp__field_indices_by_name,
-+ 1, sr__list_schemas_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__list_schemas_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_schema_req__field_descriptors[5] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "revision",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaReq, revision),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "submodule_name",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaReq, submodule_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "submodule_revision",
-+ 4,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaReq, submodule_revision),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "yang_format",
-+ 5,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaReq, yang_format),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_schema_req__field_indices_by_name[] = {
-+ 0, /* field[0] = module_name */
-+ 1, /* field[1] = revision */
-+ 2, /* field[2] = submodule_name */
-+ 3, /* field[3] = submodule_revision */
-+ 4, /* field[4] = yang_format */
-+};
-+static const ProtobufCIntRange sr__get_schema_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 5 }
-+};
-+const ProtobufCMessageDescriptor sr__get_schema_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSchemaReq",
-+ "GetSchemaReq",
-+ "Sr__GetSchemaReq",
-+ "sr",
-+ sizeof(Sr__GetSchemaReq),
-+ 5,
-+ sr__get_schema_req__field_descriptors,
-+ sr__get_schema_req__field_indices_by_name,
-+ 1, sr__get_schema_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_schema_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_schema_resp__field_descriptors[1] =
-+{
-+ {
-+ "schema_content",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSchemaResp, schema_content),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_schema_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = schema_content */
-+};
-+static const ProtobufCIntRange sr__get_schema_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_schema_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSchemaResp",
-+ "GetSchemaResp",
-+ "Sr__GetSchemaResp",
-+ "sr",
-+ sizeof(Sr__GetSchemaResp),
-+ 1,
-+ sr__get_schema_resp__field_descriptors,
-+ sr__get_schema_resp__field_indices_by_name,
-+ 1, sr__get_schema_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_schema_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_item_req__field_descriptors[1] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetItemReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_item_req__field_indices_by_name[] = {
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_item_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_item_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetItemReq",
-+ "GetItemReq",
-+ "Sr__GetItemReq",
-+ "sr",
-+ sizeof(Sr__GetItemReq),
-+ 1,
-+ sr__get_item_req__field_descriptors,
-+ sr__get_item_req__field_indices_by_name,
-+ 1, sr__get_item_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_item_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_item_resp__field_descriptors[1] =
-+{
-+ {
-+ "value",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetItemResp, value),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_item_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = value */
-+};
-+static const ProtobufCIntRange sr__get_item_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_item_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetItemResp",
-+ "GetItemResp",
-+ "Sr__GetItemResp",
-+ "sr",
-+ sizeof(Sr__GetItemResp),
-+ 1,
-+ sr__get_item_resp__field_descriptors,
-+ sr__get_item_resp__field_indices_by_name,
-+ 1, sr__get_item_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_item_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_items_req__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetItemsReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "limit",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__GetItemsReq, has_limit),
-+ offsetof(Sr__GetItemsReq, limit),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "offset",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__GetItemsReq, has_offset),
-+ offsetof(Sr__GetItemsReq, offset),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_items_req__field_indices_by_name[] = {
-+ 1, /* field[1] = limit */
-+ 2, /* field[2] = offset */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_items_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__get_items_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetItemsReq",
-+ "GetItemsReq",
-+ "Sr__GetItemsReq",
-+ "sr",
-+ sizeof(Sr__GetItemsReq),
-+ 3,
-+ sr__get_items_req__field_descriptors,
-+ sr__get_items_req__field_indices_by_name,
-+ 1, sr__get_items_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_items_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_items_resp__field_descriptors[1] =
-+{
-+ {
-+ "values",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__GetItemsResp, n_values),
-+ offsetof(Sr__GetItemsResp, values),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_items_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = values */
-+};
-+static const ProtobufCIntRange sr__get_items_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_items_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetItemsResp",
-+ "GetItemsResp",
-+ "Sr__GetItemsResp",
-+ "sr",
-+ sizeof(Sr__GetItemsResp),
-+ 1,
-+ sr__get_items_resp__field_descriptors,
-+ sr__get_items_resp__field_indices_by_name,
-+ 1, sr__get_items_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_items_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtree_req__field_descriptors[1] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtree_req__field_indices_by_name[] = {
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_subtree_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtree_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreeReq",
-+ "GetSubtreeReq",
-+ "Sr__GetSubtreeReq",
-+ "sr",
-+ sizeof(Sr__GetSubtreeReq),
-+ 1,
-+ sr__get_subtree_req__field_descriptors,
-+ sr__get_subtree_req__field_indices_by_name,
-+ 1, sr__get_subtree_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtree_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtree_resp__field_descriptors[1] =
-+{
-+ {
-+ "tree",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeResp, tree),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtree_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = tree */
-+};
-+static const ProtobufCIntRange sr__get_subtree_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtree_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreeResp",
-+ "GetSubtreeResp",
-+ "Sr__GetSubtreeResp",
-+ "sr",
-+ sizeof(Sr__GetSubtreeResp),
-+ 1,
-+ sr__get_subtree_resp__field_descriptors,
-+ sr__get_subtree_resp__field_indices_by_name,
-+ 1, sr__get_subtree_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtree_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtrees_req__field_descriptors[1] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreesReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtrees_req__field_indices_by_name[] = {
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_subtrees_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtrees_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreesReq",
-+ "GetSubtreesReq",
-+ "Sr__GetSubtreesReq",
-+ "sr",
-+ sizeof(Sr__GetSubtreesReq),
-+ 1,
-+ sr__get_subtrees_req__field_descriptors,
-+ sr__get_subtrees_req__field_indices_by_name,
-+ 1, sr__get_subtrees_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtrees_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtrees_resp__field_descriptors[1] =
-+{
-+ {
-+ "trees",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__GetSubtreesResp, n_trees),
-+ offsetof(Sr__GetSubtreesResp, trees),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtrees_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = trees */
-+};
-+static const ProtobufCIntRange sr__get_subtrees_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtrees_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreesResp",
-+ "GetSubtreesResp",
-+ "Sr__GetSubtreesResp",
-+ "sr",
-+ sizeof(Sr__GetSubtreesResp),
-+ 1,
-+ sr__get_subtrees_resp__field_descriptors,
-+ sr__get_subtrees_resp__field_indices_by_name,
-+ 1, sr__get_subtrees_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtrees_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtree_chunk_req__field_descriptors[6] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "single",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, single),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "slice_offset",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, slice_offset),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "slice_width",
-+ 4,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, slice_width),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "child_limit",
-+ 5,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, child_limit),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "depth_limit",
-+ 6,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetSubtreeChunkReq, depth_limit),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtree_chunk_req__field_indices_by_name[] = {
-+ 4, /* field[4] = child_limit */
-+ 5, /* field[5] = depth_limit */
-+ 1, /* field[1] = single */
-+ 2, /* field[2] = slice_offset */
-+ 3, /* field[3] = slice_width */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_subtree_chunk_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 6 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtree_chunk_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreeChunkReq",
-+ "GetSubtreeChunkReq",
-+ "Sr__GetSubtreeChunkReq",
-+ "sr",
-+ sizeof(Sr__GetSubtreeChunkReq),
-+ 6,
-+ sr__get_subtree_chunk_req__field_descriptors,
-+ sr__get_subtree_chunk_req__field_indices_by_name,
-+ 1, sr__get_subtree_chunk_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtree_chunk_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_subtree_chunk_resp__field_descriptors[2] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_STRING,
-+ offsetof(Sr__GetSubtreeChunkResp, n_xpath),
-+ offsetof(Sr__GetSubtreeChunkResp, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "chunk",
-+ 2,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__GetSubtreeChunkResp, n_chunk),
-+ offsetof(Sr__GetSubtreeChunkResp, chunk),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_subtree_chunk_resp__field_indices_by_name[] = {
-+ 1, /* field[1] = chunk */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_subtree_chunk_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__get_subtree_chunk_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetSubtreeChunkResp",
-+ "GetSubtreeChunkResp",
-+ "Sr__GetSubtreeChunkResp",
-+ "sr",
-+ sizeof(Sr__GetSubtreeChunkResp),
-+ 2,
-+ sr__get_subtree_chunk_resp__field_descriptors,
-+ sr__get_subtree_chunk_resp__field_indices_by_name,
-+ 1, sr__get_subtree_chunk_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_subtree_chunk_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__set_item_req__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "value",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemReq, value),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "options",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__set_item_req__field_indices_by_name[] = {
-+ 2, /* field[2] = options */
-+ 1, /* field[1] = value */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__set_item_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__set_item_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SetItemReq",
-+ "SetItemReq",
-+ "Sr__SetItemReq",
-+ "sr",
-+ sizeof(Sr__SetItemReq),
-+ 3,
-+ sr__set_item_req__field_descriptors,
-+ sr__set_item_req__field_indices_by_name,
-+ 1, sr__set_item_req__number_ranges,
-+ (ProtobufCMessageInit) sr__set_item_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__set_item_resp__field_descriptors NULL
-+#define sr__set_item_resp__field_indices_by_name NULL
-+#define sr__set_item_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__set_item_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SetItemResp",
-+ "SetItemResp",
-+ "Sr__SetItemResp",
-+ "sr",
-+ sizeof(Sr__SetItemResp),
-+ 0,
-+ sr__set_item_resp__field_descriptors,
-+ sr__set_item_resp__field_indices_by_name,
-+ 0, sr__set_item_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__set_item_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__set_item_str_req__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemStrReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "value",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemStrReq, value),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "options",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SetItemStrReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__set_item_str_req__field_indices_by_name[] = {
-+ 2, /* field[2] = options */
-+ 1, /* field[1] = value */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__set_item_str_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__set_item_str_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SetItemStrReq",
-+ "SetItemStrReq",
-+ "Sr__SetItemStrReq",
-+ "sr",
-+ sizeof(Sr__SetItemStrReq),
-+ 3,
-+ sr__set_item_str_req__field_descriptors,
-+ sr__set_item_str_req__field_indices_by_name,
-+ 1, sr__set_item_str_req__number_ranges,
-+ (ProtobufCMessageInit) sr__set_item_str_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__set_item_str_resp__field_descriptors NULL
-+#define sr__set_item_str_resp__field_indices_by_name NULL
-+#define sr__set_item_str_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__set_item_str_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SetItemStrResp",
-+ "SetItemStrResp",
-+ "Sr__SetItemStrResp",
-+ "sr",
-+ sizeof(Sr__SetItemStrResp),
-+ 0,
-+ sr__set_item_str_resp__field_descriptors,
-+ sr__set_item_str_resp__field_indices_by_name,
-+ 0, sr__set_item_str_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__set_item_str_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__delete_item_req__field_descriptors[2] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DeleteItemReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "options",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DeleteItemReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__delete_item_req__field_indices_by_name[] = {
-+ 1, /* field[1] = options */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__delete_item_req__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 3, 1 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__delete_item_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DeleteItemReq",
-+ "DeleteItemReq",
-+ "Sr__DeleteItemReq",
-+ "sr",
-+ sizeof(Sr__DeleteItemReq),
-+ 2,
-+ sr__delete_item_req__field_descriptors,
-+ sr__delete_item_req__field_indices_by_name,
-+ 2, sr__delete_item_req__number_ranges,
-+ (ProtobufCMessageInit) sr__delete_item_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__delete_item_resp__field_descriptors NULL
-+#define sr__delete_item_resp__field_indices_by_name NULL
-+#define sr__delete_item_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__delete_item_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DeleteItemResp",
-+ "DeleteItemResp",
-+ "Sr__DeleteItemResp",
-+ "sr",
-+ sizeof(Sr__DeleteItemResp),
-+ 0,
-+ sr__delete_item_resp__field_descriptors,
-+ sr__delete_item_resp__field_indices_by_name,
-+ 0, sr__delete_item_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__delete_item_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCEnumValue sr__move_item_req__move_position__enum_values_by_number[4] =
-+{
-+ { "BEFORE", "SR__MOVE_ITEM_REQ__MOVE_POSITION__BEFORE", 1 },
-+ { "AFTER", "SR__MOVE_ITEM_REQ__MOVE_POSITION__AFTER", 2 },
-+ { "FIRST", "SR__MOVE_ITEM_REQ__MOVE_POSITION__FIRST", 3 },
-+ { "LAST", "SR__MOVE_ITEM_REQ__MOVE_POSITION__LAST", 4 },
-+};
-+static const ProtobufCIntRange sr__move_item_req__move_position__value_ranges[] = {
-+{1, 0},{0, 4}
-+};
-+static const ProtobufCEnumValueIndex sr__move_item_req__move_position__enum_values_by_name[4] =
-+{
-+ { "AFTER", 1 },
-+ { "BEFORE", 0 },
-+ { "FIRST", 2 },
-+ { "LAST", 3 },
-+};
-+const ProtobufCEnumDescriptor sr__move_item_req__move_position__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.MoveItemReq.MovePosition",
-+ "MovePosition",
-+ "Sr__MoveItemReq__MovePosition",
-+ "sr",
-+ 4,
-+ sr__move_item_req__move_position__enum_values_by_number,
-+ 4,
-+ sr__move_item_req__move_position__enum_values_by_name,
-+ 1,
-+ sr__move_item_req__move_position__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCFieldDescriptor sr__move_item_req__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__MoveItemReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "position",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__MoveItemReq, position),
-+ &sr__move_item_req__move_position__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "relative_item",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__MoveItemReq, relative_item),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__move_item_req__field_indices_by_name[] = {
-+ 1, /* field[1] = position */
-+ 2, /* field[2] = relative_item */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__move_item_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__move_item_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.MoveItemReq",
-+ "MoveItemReq",
-+ "Sr__MoveItemReq",
-+ "sr",
-+ sizeof(Sr__MoveItemReq),
-+ 3,
-+ sr__move_item_req__field_descriptors,
-+ sr__move_item_req__field_indices_by_name,
-+ 1, sr__move_item_req__number_ranges,
-+ (ProtobufCMessageInit) sr__move_item_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__move_item_resp__field_descriptors NULL
-+#define sr__move_item_resp__field_indices_by_name NULL
-+#define sr__move_item_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__move_item_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.MoveItemResp",
-+ "MoveItemResp",
-+ "Sr__MoveItemResp",
-+ "sr",
-+ sizeof(Sr__MoveItemResp),
-+ 0,
-+ sr__move_item_resp__field_descriptors,
-+ sr__move_item_resp__field_indices_by_name,
-+ 0, sr__move_item_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__move_item_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__validate_req__field_descriptors NULL
-+#define sr__validate_req__field_indices_by_name NULL
-+#define sr__validate_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__validate_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ValidateReq",
-+ "ValidateReq",
-+ "Sr__ValidateReq",
-+ "sr",
-+ sizeof(Sr__ValidateReq),
-+ 0,
-+ sr__validate_req__field_descriptors,
-+ sr__validate_req__field_indices_by_name,
-+ 0, sr__validate_req__number_ranges,
-+ (ProtobufCMessageInit) sr__validate_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__validate_resp__field_descriptors[1] =
-+{
-+ {
-+ "errors",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__ValidateResp, n_errors),
-+ offsetof(Sr__ValidateResp, errors),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__validate_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = errors */
-+};
-+static const ProtobufCIntRange sr__validate_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__validate_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ValidateResp",
-+ "ValidateResp",
-+ "Sr__ValidateResp",
-+ "sr",
-+ sizeof(Sr__ValidateResp),
-+ 1,
-+ sr__validate_resp__field_descriptors,
-+ sr__validate_resp__field_indices_by_name,
-+ 1, sr__validate_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__validate_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__commit_req__field_descriptors NULL
-+#define sr__commit_req__field_indices_by_name NULL
-+#define sr__commit_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__commit_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CommitReq",
-+ "CommitReq",
-+ "Sr__CommitReq",
-+ "sr",
-+ sizeof(Sr__CommitReq),
-+ 0,
-+ sr__commit_req__field_descriptors,
-+ sr__commit_req__field_indices_by_name,
-+ 0, sr__commit_req__number_ranges,
-+ (ProtobufCMessageInit) sr__commit_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__commit_resp__field_descriptors[1] =
-+{
-+ {
-+ "errors",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__CommitResp, n_errors),
-+ offsetof(Sr__CommitResp, errors),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__commit_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = errors */
-+};
-+static const ProtobufCIntRange sr__commit_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__commit_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CommitResp",
-+ "CommitResp",
-+ "Sr__CommitResp",
-+ "sr",
-+ sizeof(Sr__CommitResp),
-+ 1,
-+ sr__commit_resp__field_descriptors,
-+ sr__commit_resp__field_indices_by_name,
-+ 1, sr__commit_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__commit_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__discard_changes_req__field_descriptors NULL
-+#define sr__discard_changes_req__field_indices_by_name NULL
-+#define sr__discard_changes_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__discard_changes_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DiscardChangesReq",
-+ "DiscardChangesReq",
-+ "Sr__DiscardChangesReq",
-+ "sr",
-+ sizeof(Sr__DiscardChangesReq),
-+ 0,
-+ sr__discard_changes_req__field_descriptors,
-+ sr__discard_changes_req__field_indices_by_name,
-+ 0, sr__discard_changes_req__number_ranges,
-+ (ProtobufCMessageInit) sr__discard_changes_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__discard_changes_resp__field_descriptors NULL
-+#define sr__discard_changes_resp__field_indices_by_name NULL
-+#define sr__discard_changes_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__discard_changes_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DiscardChangesResp",
-+ "DiscardChangesResp",
-+ "Sr__DiscardChangesResp",
-+ "sr",
-+ sizeof(Sr__DiscardChangesResp),
-+ 0,
-+ sr__discard_changes_resp__field_descriptors,
-+ sr__discard_changes_resp__field_indices_by_name,
-+ 0, sr__discard_changes_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__discard_changes_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__copy_config_req__field_descriptors[3] =
-+{
-+ {
-+ "src_datastore",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CopyConfigReq, src_datastore),
-+ &sr__data_store__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "dst_datastore",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CopyConfigReq, dst_datastore),
-+ &sr__data_store__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_name",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CopyConfigReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__copy_config_req__field_indices_by_name[] = {
-+ 1, /* field[1] = dst_datastore */
-+ 2, /* field[2] = module_name */
-+ 0, /* field[0] = src_datastore */
-+};
-+static const ProtobufCIntRange sr__copy_config_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__copy_config_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CopyConfigReq",
-+ "CopyConfigReq",
-+ "Sr__CopyConfigReq",
-+ "sr",
-+ sizeof(Sr__CopyConfigReq),
-+ 3,
-+ sr__copy_config_req__field_descriptors,
-+ sr__copy_config_req__field_indices_by_name,
-+ 1, sr__copy_config_req__number_ranges,
-+ (ProtobufCMessageInit) sr__copy_config_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__copy_config_resp__field_descriptors[1] =
-+{
-+ {
-+ "errors",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__CopyConfigResp, n_errors),
-+ offsetof(Sr__CopyConfigResp, errors),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__copy_config_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = errors */
-+};
-+static const ProtobufCIntRange sr__copy_config_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__copy_config_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CopyConfigResp",
-+ "CopyConfigResp",
-+ "Sr__CopyConfigResp",
-+ "sr",
-+ sizeof(Sr__CopyConfigResp),
-+ 1,
-+ sr__copy_config_resp__field_descriptors,
-+ sr__copy_config_resp__field_indices_by_name,
-+ 1, sr__copy_config_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__copy_config_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__lock_req__field_descriptors[1] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__LockReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__lock_req__field_indices_by_name[] = {
-+ 0, /* field[0] = module_name */
-+};
-+static const ProtobufCIntRange sr__lock_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__lock_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.LockReq",
-+ "LockReq",
-+ "Sr__LockReq",
-+ "sr",
-+ sizeof(Sr__LockReq),
-+ 1,
-+ sr__lock_req__field_descriptors,
-+ sr__lock_req__field_indices_by_name,
-+ 1, sr__lock_req__number_ranges,
-+ (ProtobufCMessageInit) sr__lock_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__lock_resp__field_descriptors NULL
-+#define sr__lock_resp__field_indices_by_name NULL
-+#define sr__lock_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__lock_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.LockResp",
-+ "LockResp",
-+ "Sr__LockResp",
-+ "sr",
-+ sizeof(Sr__LockResp),
-+ 0,
-+ sr__lock_resp__field_descriptors,
-+ sr__lock_resp__field_indices_by_name,
-+ 0, sr__lock_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__lock_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__unlock_req__field_descriptors[1] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnlockReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__unlock_req__field_indices_by_name[] = {
-+ 0, /* field[0] = module_name */
-+};
-+static const ProtobufCIntRange sr__unlock_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__unlock_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.UnlockReq",
-+ "UnlockReq",
-+ "Sr__UnlockReq",
-+ "sr",
-+ sizeof(Sr__UnlockReq),
-+ 1,
-+ sr__unlock_req__field_descriptors,
-+ sr__unlock_req__field_indices_by_name,
-+ 1, sr__unlock_req__number_ranges,
-+ (ProtobufCMessageInit) sr__unlock_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__unlock_resp__field_descriptors NULL
-+#define sr__unlock_resp__field_indices_by_name NULL
-+#define sr__unlock_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__unlock_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.UnlockResp",
-+ "UnlockResp",
-+ "Sr__UnlockResp",
-+ "sr",
-+ sizeof(Sr__UnlockResp),
-+ 0,
-+ sr__unlock_resp__field_descriptors,
-+ sr__unlock_resp__field_indices_by_name,
-+ 0, sr__unlock_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__unlock_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__subscribe_req__field_descriptors[10] =
-+{
-+ {
-+ "type",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, type),
-+ &sr__subscription_type__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "destination",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, destination),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_name",
-+ 4,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 5,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "notif_event",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_ENUM,
-+ offsetof(Sr__SubscribeReq, has_notif_event),
-+ offsetof(Sr__SubscribeReq, notif_event),
-+ &sr__notification_event__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "priority",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__SubscribeReq, has_priority),
-+ offsetof(Sr__SubscribeReq, priority),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enable_running",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_BOOL,
-+ offsetof(Sr__SubscribeReq, has_enable_running),
-+ offsetof(Sr__SubscribeReq, enable_running),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enable_event",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_BOOL,
-+ offsetof(Sr__SubscribeReq, has_enable_event),
-+ offsetof(Sr__SubscribeReq, enable_event),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "api_variant",
-+ 20,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubscribeReq, api_variant),
-+ &sr__api_variant__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__subscribe_req__field_indices_by_name[] = {
-+ 9, /* field[9] = api_variant */
-+ 1, /* field[1] = destination */
-+ 8, /* field[8] = enable_event */
-+ 7, /* field[7] = enable_running */
-+ 3, /* field[3] = module_name */
-+ 5, /* field[5] = notif_event */
-+ 6, /* field[6] = priority */
-+ 2, /* field[2] = subscription_id */
-+ 0, /* field[0] = type */
-+ 4, /* field[4] = xpath */
-+};
-+static const ProtobufCIntRange sr__subscribe_req__number_ranges[3 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 5 },
-+ { 20, 9 },
-+ { 0, 10 }
-+};
-+const ProtobufCMessageDescriptor sr__subscribe_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SubscribeReq",
-+ "SubscribeReq",
-+ "Sr__SubscribeReq",
-+ "sr",
-+ sizeof(Sr__SubscribeReq),
-+ 10,
-+ sr__subscribe_req__field_descriptors,
-+ sr__subscribe_req__field_indices_by_name,
-+ 3, sr__subscribe_req__number_ranges,
-+ (ProtobufCMessageInit) sr__subscribe_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__subscribe_resp__field_descriptors NULL
-+#define sr__subscribe_resp__field_indices_by_name NULL
-+#define sr__subscribe_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__subscribe_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SubscribeResp",
-+ "SubscribeResp",
-+ "Sr__SubscribeResp",
-+ "sr",
-+ sizeof(Sr__SubscribeResp),
-+ 0,
-+ sr__subscribe_resp__field_descriptors,
-+ sr__subscribe_resp__field_indices_by_name,
-+ 0, sr__subscribe_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__subscribe_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__unsubscribe_req__field_descriptors[4] =
-+{
-+ {
-+ "type",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnsubscribeReq, type),
-+ &sr__subscription_type__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "destination",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnsubscribeReq, destination),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnsubscribeReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_name",
-+ 4,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnsubscribeReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__unsubscribe_req__field_indices_by_name[] = {
-+ 1, /* field[1] = destination */
-+ 3, /* field[3] = module_name */
-+ 2, /* field[2] = subscription_id */
-+ 0, /* field[0] = type */
-+};
-+static const ProtobufCIntRange sr__unsubscribe_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 4 }
-+};
-+const ProtobufCMessageDescriptor sr__unsubscribe_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.UnsubscribeReq",
-+ "UnsubscribeReq",
-+ "Sr__UnsubscribeReq",
-+ "sr",
-+ sizeof(Sr__UnsubscribeReq),
-+ 4,
-+ sr__unsubscribe_req__field_descriptors,
-+ sr__unsubscribe_req__field_indices_by_name,
-+ 1, sr__unsubscribe_req__number_ranges,
-+ (ProtobufCMessageInit) sr__unsubscribe_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__unsubscribe_resp__field_descriptors NULL
-+#define sr__unsubscribe_resp__field_indices_by_name NULL
-+#define sr__unsubscribe_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__unsubscribe_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.UnsubscribeResp",
-+ "UnsubscribeResp",
-+ "Sr__UnsubscribeResp",
-+ "sr",
-+ sizeof(Sr__UnsubscribeResp),
-+ 0,
-+ sr__unsubscribe_resp__field_descriptors,
-+ sr__unsubscribe_resp__field_indices_by_name,
-+ 0, sr__unsubscribe_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__unsubscribe_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__check_enabled_running_req__field_descriptors[1] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CheckEnabledRunningReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__check_enabled_running_req__field_indices_by_name[] = {
-+ 0, /* field[0] = module_name */
-+};
-+static const ProtobufCIntRange sr__check_enabled_running_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__check_enabled_running_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CheckEnabledRunningReq",
-+ "CheckEnabledRunningReq",
-+ "Sr__CheckEnabledRunningReq",
-+ "sr",
-+ sizeof(Sr__CheckEnabledRunningReq),
-+ 1,
-+ sr__check_enabled_running_req__field_descriptors,
-+ sr__check_enabled_running_req__field_indices_by_name,
-+ 1, sr__check_enabled_running_req__number_ranges,
-+ (ProtobufCMessageInit) sr__check_enabled_running_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__check_enabled_running_resp__field_descriptors[1] =
-+{
-+ {
-+ "enabled",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CheckEnabledRunningResp, enabled),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__check_enabled_running_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = enabled */
-+};
-+static const ProtobufCIntRange sr__check_enabled_running_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__check_enabled_running_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CheckEnabledRunningResp",
-+ "CheckEnabledRunningResp",
-+ "Sr__CheckEnabledRunningResp",
-+ "sr",
-+ sizeof(Sr__CheckEnabledRunningResp),
-+ 1,
-+ sr__check_enabled_running_resp__field_descriptors,
-+ sr__check_enabled_running_resp__field_indices_by_name,
-+ 1, sr__check_enabled_running_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__check_enabled_running_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__module_install_notification__field_descriptors[3] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallNotification, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "revision",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallNotification, revision),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "state",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallNotification, state),
-+ &sr__module_state__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__module_install_notification__field_indices_by_name[] = {
-+ 0, /* field[0] = module_name */
-+ 1, /* field[1] = revision */
-+ 2, /* field[2] = state */
-+};
-+static const ProtobufCIntRange sr__module_install_notification__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__module_install_notification__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ModuleInstallNotification",
-+ "ModuleInstallNotification",
-+ "Sr__ModuleInstallNotification",
-+ "sr",
-+ sizeof(Sr__ModuleInstallNotification),
-+ 3,
-+ sr__module_install_notification__field_descriptors,
-+ sr__module_install_notification__field_indices_by_name,
-+ 1, sr__module_install_notification__number_ranges,
-+ (ProtobufCMessageInit) sr__module_install_notification__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__feature_enable_notification__field_descriptors[3] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableNotification, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "feature_name",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableNotification, feature_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enabled",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableNotification, enabled),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__feature_enable_notification__field_indices_by_name[] = {
-+ 2, /* field[2] = enabled */
-+ 1, /* field[1] = feature_name */
-+ 0, /* field[0] = module_name */
-+};
-+static const ProtobufCIntRange sr__feature_enable_notification__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__feature_enable_notification__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.FeatureEnableNotification",
-+ "FeatureEnableNotification",
-+ "Sr__FeatureEnableNotification",
-+ "sr",
-+ sizeof(Sr__FeatureEnableNotification),
-+ 3,
-+ sr__feature_enable_notification__field_descriptors,
-+ sr__feature_enable_notification__field_indices_by_name,
-+ 1, sr__feature_enable_notification__number_ranges,
-+ (ProtobufCMessageInit) sr__feature_enable_notification__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__module_change_notification__field_descriptors[2] =
-+{
-+ {
-+ "event",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleChangeNotification, event),
-+ &sr__notification_event__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_name",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleChangeNotification, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__module_change_notification__field_indices_by_name[] = {
-+ 0, /* field[0] = event */
-+ 1, /* field[1] = module_name */
-+};
-+static const ProtobufCIntRange sr__module_change_notification__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__module_change_notification__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ModuleChangeNotification",
-+ "ModuleChangeNotification",
-+ "Sr__ModuleChangeNotification",
-+ "sr",
-+ sizeof(Sr__ModuleChangeNotification),
-+ 2,
-+ sr__module_change_notification__field_descriptors,
-+ sr__module_change_notification__field_indices_by_name,
-+ 1, sr__module_change_notification__number_ranges,
-+ (ProtobufCMessageInit) sr__module_change_notification__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__subtree_change_notification__field_descriptors[2] =
-+{
-+ {
-+ "event",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubtreeChangeNotification, event),
-+ &sr__notification_event__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__SubtreeChangeNotification, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__subtree_change_notification__field_indices_by_name[] = {
-+ 0, /* field[0] = event */
-+ 1, /* field[1] = xpath */
-+};
-+static const ProtobufCIntRange sr__subtree_change_notification__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__subtree_change_notification__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.SubtreeChangeNotification",
-+ "SubtreeChangeNotification",
-+ "Sr__SubtreeChangeNotification",
-+ "sr",
-+ sizeof(Sr__SubtreeChangeNotification),
-+ 2,
-+ sr__subtree_change_notification__field_descriptors,
-+ sr__subtree_change_notification__field_indices_by_name,
-+ 1, sr__subtree_change_notification__number_ranges,
-+ (ProtobufCMessageInit) sr__subtree_change_notification__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__change__field_descriptors[3] =
-+{
-+ {
-+ "changeOperation",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Change, changeoperation),
-+ &sr__change_operation__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "new_value",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Change, new_value),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "old_value",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Change, old_value),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__change__field_indices_by_name[] = {
-+ 0, /* field[0] = changeOperation */
-+ 1, /* field[1] = new_value */
-+ 2, /* field[2] = old_value */
-+};
-+static const ProtobufCIntRange sr__change__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__change__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Change",
-+ "Change",
-+ "Sr__Change",
-+ "sr",
-+ sizeof(Sr__Change),
-+ 3,
-+ sr__change__field_descriptors,
-+ sr__change__field_indices_by_name,
-+ 1, sr__change__number_ranges,
-+ (ProtobufCMessageInit) sr__change__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_changes_req__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetChangesReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "limit",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetChangesReq, limit),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "offset",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__GetChangesReq, offset),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_changes_req__field_indices_by_name[] = {
-+ 1, /* field[1] = limit */
-+ 2, /* field[2] = offset */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__get_changes_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__get_changes_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetChangesReq",
-+ "GetChangesReq",
-+ "Sr__GetChangesReq",
-+ "sr",
-+ sizeof(Sr__GetChangesReq),
-+ 3,
-+ sr__get_changes_req__field_descriptors,
-+ sr__get_changes_req__field_indices_by_name,
-+ 1, sr__get_changes_req__number_ranges,
-+ (ProtobufCMessageInit) sr__get_changes_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__get_changes_resp__field_descriptors[1] =
-+{
-+ {
-+ "changes",
-+ 1,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__GetChangesResp, n_changes),
-+ offsetof(Sr__GetChangesResp, changes),
-+ &sr__change__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__get_changes_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = changes */
-+};
-+static const ProtobufCIntRange sr__get_changes_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__get_changes_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.GetChangesResp",
-+ "GetChangesResp",
-+ "Sr__GetChangesResp",
-+ "sr",
-+ sizeof(Sr__GetChangesResp),
-+ 1,
-+ sr__get_changes_resp__field_descriptors,
-+ sr__get_changes_resp__field_indices_by_name,
-+ 1, sr__get_changes_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__get_changes_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__check_exec_perm_req__field_descriptors[1] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CheckExecPermReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__check_exec_perm_req__field_indices_by_name[] = {
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__check_exec_perm_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__check_exec_perm_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CheckExecPermReq",
-+ "CheckExecPermReq",
-+ "Sr__CheckExecPermReq",
-+ "sr",
-+ sizeof(Sr__CheckExecPermReq),
-+ 1,
-+ sr__check_exec_perm_req__field_descriptors,
-+ sr__check_exec_perm_req__field_indices_by_name,
-+ 1, sr__check_exec_perm_req__number_ranges,
-+ (ProtobufCMessageInit) sr__check_exec_perm_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__check_exec_perm_resp__field_descriptors[1] =
-+{
-+ {
-+ "permitted",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CheckExecPermResp, permitted),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__check_exec_perm_resp__field_indices_by_name[] = {
-+ 0, /* field[0] = permitted */
-+};
-+static const ProtobufCIntRange sr__check_exec_perm_resp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__check_exec_perm_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CheckExecPermResp",
-+ "CheckExecPermResp",
-+ "Sr__CheckExecPermResp",
-+ "sr",
-+ sizeof(Sr__CheckExecPermResp),
-+ 1,
-+ sr__check_exec_perm_resp__field_descriptors,
-+ sr__check_exec_perm_resp__field_indices_by_name,
-+ 1, sr__check_exec_perm_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__check_exec_perm_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__rpcreq__field_descriptors[7] =
-+{
-+ {
-+ "action",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCReq, action),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "orig_api_variant",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCReq, orig_api_variant),
-+ &sr__api_variant__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "input",
-+ 4,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__RPCReq, n_input),
-+ offsetof(Sr__RPCReq, input),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "input_tree",
-+ 5,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__RPCReq, n_input_tree),
-+ offsetof(Sr__RPCReq, input_tree),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscriber_address",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCReq, subscriber_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__RPCReq, has_subscription_id),
-+ offsetof(Sr__RPCReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__rpcreq__field_indices_by_name[] = {
-+ 0, /* field[0] = action */
-+ 3, /* field[3] = input */
-+ 4, /* field[4] = input_tree */
-+ 2, /* field[2] = orig_api_variant */
-+ 5, /* field[5] = subscriber_address */
-+ 6, /* field[6] = subscription_id */
-+ 1, /* field[1] = xpath */
-+};
-+static const ProtobufCIntRange sr__rpcreq__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 5 },
-+ { 0, 7 }
-+};
-+const ProtobufCMessageDescriptor sr__rpcreq__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.RPCReq",
-+ "RPCReq",
-+ "Sr__RPCReq",
-+ "sr",
-+ sizeof(Sr__RPCReq),
-+ 7,
-+ sr__rpcreq__field_descriptors,
-+ sr__rpcreq__field_indices_by_name,
-+ 2, sr__rpcreq__number_ranges,
-+ (ProtobufCMessageInit) sr__rpcreq__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__rpcresp__field_descriptors[5] =
-+{
-+ {
-+ "action",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCResp, action),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCResp, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "orig_api_variant",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__RPCResp, orig_api_variant),
-+ &sr__api_variant__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "output",
-+ 4,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__RPCResp, n_output),
-+ offsetof(Sr__RPCResp, output),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "output_tree",
-+ 5,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__RPCResp, n_output_tree),
-+ offsetof(Sr__RPCResp, output_tree),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__rpcresp__field_indices_by_name[] = {
-+ 0, /* field[0] = action */
-+ 2, /* field[2] = orig_api_variant */
-+ 3, /* field[3] = output */
-+ 4, /* field[4] = output_tree */
-+ 1, /* field[1] = xpath */
-+};
-+static const ProtobufCIntRange sr__rpcresp__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 5 }
-+};
-+const ProtobufCMessageDescriptor sr__rpcresp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.RPCResp",
-+ "RPCResp",
-+ "Sr__RPCResp",
-+ "sr",
-+ sizeof(Sr__RPCResp),
-+ 5,
-+ sr__rpcresp__field_descriptors,
-+ sr__rpcresp__field_indices_by_name,
-+ 1, sr__rpcresp__number_ranges,
-+ (ProtobufCMessageInit) sr__rpcresp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCEnumValue sr__event_notif_req__notif_type__enum_values_by_number[4] =
-+{
-+ { "REALTIME", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REALTIME", 1 },
-+ { "REPLAY", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY", 2 },
-+ { "REPLAY_COMPLETE", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_COMPLETE", 3 },
-+ { "REPLAY_STOP", "SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_STOP", 4 },
-+};
-+static const ProtobufCIntRange sr__event_notif_req__notif_type__value_ranges[] = {
-+{1, 0},{0, 4}
-+};
-+static const ProtobufCEnumValueIndex sr__event_notif_req__notif_type__enum_values_by_name[4] =
-+{
-+ { "REALTIME", 0 },
-+ { "REPLAY", 1 },
-+ { "REPLAY_COMPLETE", 2 },
-+ { "REPLAY_STOP", 3 },
-+};
-+const ProtobufCEnumDescriptor sr__event_notif_req__notif_type__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifReq.NotifType",
-+ "NotifType",
-+ "Sr__EventNotifReq__NotifType",
-+ "sr",
-+ 4,
-+ sr__event_notif_req__notif_type__enum_values_by_number,
-+ 4,
-+ sr__event_notif_req__notif_type__enum_values_by_name,
-+ 1,
-+ sr__event_notif_req__notif_type__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__event_notif_req__notif_flags__enum_values_by_number[2] =
-+{
-+ { "DEFAULT", "SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__DEFAULT", 0 },
-+ { "EPHEMERAL", "SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__EPHEMERAL", 1 },
-+};
-+static const ProtobufCIntRange sr__event_notif_req__notif_flags__value_ranges[] = {
-+{0, 0},{0, 2}
-+};
-+static const ProtobufCEnumValueIndex sr__event_notif_req__notif_flags__enum_values_by_name[2] =
-+{
-+ { "DEFAULT", 0 },
-+ { "EPHEMERAL", 1 },
-+};
-+const ProtobufCEnumDescriptor sr__event_notif_req__notif_flags__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifReq.NotifFlags",
-+ "NotifFlags",
-+ "Sr__EventNotifReq__NotifFlags",
-+ "sr",
-+ 2,
-+ sr__event_notif_req__notif_flags__enum_values_by_number,
-+ 2,
-+ sr__event_notif_req__notif_flags__enum_values_by_name,
-+ 1,
-+ sr__event_notif_req__notif_flags__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCFieldDescriptor sr__event_notif_req__field_descriptors[9] =
-+{
-+ {
-+ "type",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, type),
-+ &sr__event_notif_req__notif_type__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "options",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, options),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "values",
-+ 4,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__EventNotifReq, n_values),
-+ offsetof(Sr__EventNotifReq, values),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "trees",
-+ 5,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__EventNotifReq, n_trees),
-+ offsetof(Sr__EventNotifReq, trees),
-+ &sr__node__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "timestamp",
-+ 6,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, timestamp),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscriber_address",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, subscriber_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__EventNotifReq, has_subscription_id),
-+ offsetof(Sr__EventNotifReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "do_not_send_reply",
-+ 20,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReq, do_not_send_reply),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__event_notif_req__field_indices_by_name[] = {
-+ 8, /* field[8] = do_not_send_reply */
-+ 1, /* field[1] = options */
-+ 6, /* field[6] = subscriber_address */
-+ 7, /* field[7] = subscription_id */
-+ 5, /* field[5] = timestamp */
-+ 4, /* field[4] = trees */
-+ 0, /* field[0] = type */
-+ 3, /* field[3] = values */
-+ 2, /* field[2] = xpath */
-+};
-+static const ProtobufCIntRange sr__event_notif_req__number_ranges[3 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 6 },
-+ { 20, 8 },
-+ { 0, 9 }
-+};
-+const ProtobufCMessageDescriptor sr__event_notif_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifReq",
-+ "EventNotifReq",
-+ "Sr__EventNotifReq",
-+ "sr",
-+ sizeof(Sr__EventNotifReq),
-+ 9,
-+ sr__event_notif_req__field_descriptors,
-+ sr__event_notif_req__field_indices_by_name,
-+ 3, sr__event_notif_req__number_ranges,
-+ (ProtobufCMessageInit) sr__event_notif_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__event_notif_resp__field_descriptors NULL
-+#define sr__event_notif_resp__field_indices_by_name NULL
-+#define sr__event_notif_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__event_notif_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifResp",
-+ "EventNotifResp",
-+ "Sr__EventNotifResp",
-+ "sr",
-+ sizeof(Sr__EventNotifResp),
-+ 0,
-+ sr__event_notif_resp__field_descriptors,
-+ sr__event_notif_resp__field_indices_by_name,
-+ 0, sr__event_notif_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__event_notif_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__event_notif_replay_req__field_descriptors[6] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "start_time",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, start_time),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "stop_time",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, stop_time),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscriber_address",
-+ 10,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, subscriber_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 11,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "api_variant",
-+ 12,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__EventNotifReplayReq, api_variant),
-+ &sr__api_variant__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__event_notif_replay_req__field_indices_by_name[] = {
-+ 5, /* field[5] = api_variant */
-+ 1, /* field[1] = start_time */
-+ 2, /* field[2] = stop_time */
-+ 3, /* field[3] = subscriber_address */
-+ 4, /* field[4] = subscription_id */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__event_notif_replay_req__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 3 },
-+ { 0, 6 }
-+};
-+const ProtobufCMessageDescriptor sr__event_notif_replay_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifReplayReq",
-+ "EventNotifReplayReq",
-+ "Sr__EventNotifReplayReq",
-+ "sr",
-+ sizeof(Sr__EventNotifReplayReq),
-+ 6,
-+ sr__event_notif_replay_req__field_descriptors,
-+ sr__event_notif_replay_req__field_indices_by_name,
-+ 2, sr__event_notif_replay_req__number_ranges,
-+ (ProtobufCMessageInit) sr__event_notif_replay_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__event_notif_replay_resp__field_descriptors NULL
-+#define sr__event_notif_replay_resp__field_indices_by_name NULL
-+#define sr__event_notif_replay_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__event_notif_replay_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.EventNotifReplayResp",
-+ "EventNotifReplayResp",
-+ "Sr__EventNotifReplayResp",
-+ "sr",
-+ sizeof(Sr__EventNotifReplayResp),
-+ 0,
-+ sr__event_notif_replay_resp__field_descriptors,
-+ sr__event_notif_replay_resp__field_indices_by_name,
-+ 0, sr__event_notif_replay_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__event_notif_replay_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__data_provide_req__field_descriptors[4] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscriber_address",
-+ 10,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideReq, subscriber_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 11,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideReq, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "request_id",
-+ 20,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideReq, request_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__data_provide_req__field_indices_by_name[] = {
-+ 3, /* field[3] = request_id */
-+ 1, /* field[1] = subscriber_address */
-+ 2, /* field[2] = subscription_id */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__data_provide_req__number_ranges[3 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 1 },
-+ { 20, 3 },
-+ { 0, 4 }
-+};
-+const ProtobufCMessageDescriptor sr__data_provide_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DataProvideReq",
-+ "DataProvideReq",
-+ "Sr__DataProvideReq",
-+ "sr",
-+ sizeof(Sr__DataProvideReq),
-+ 4,
-+ sr__data_provide_req__field_descriptors,
-+ sr__data_provide_req__field_indices_by_name,
-+ 3, sr__data_provide_req__number_ranges,
-+ (ProtobufCMessageInit) sr__data_provide_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__data_provide_resp__field_descriptors[3] =
-+{
-+ {
-+ "xpath",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideResp, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "values",
-+ 2,
-+ PROTOBUF_C_LABEL_REPEATED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ offsetof(Sr__DataProvideResp, n_values),
-+ offsetof(Sr__DataProvideResp, values),
-+ &sr__value__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "request_id",
-+ 10,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DataProvideResp, request_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__data_provide_resp__field_indices_by_name[] = {
-+ 2, /* field[2] = request_id */
-+ 1, /* field[1] = values */
-+ 0, /* field[0] = xpath */
-+};
-+static const ProtobufCIntRange sr__data_provide_resp__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 2 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__data_provide_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DataProvideResp",
-+ "DataProvideResp",
-+ "Sr__DataProvideResp",
-+ "sr",
-+ sizeof(Sr__DataProvideResp),
-+ 3,
-+ sr__data_provide_resp__field_descriptors,
-+ sr__data_provide_resp__field_indices_by_name,
-+ 2, sr__data_provide_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__data_provide_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__module_install_req__field_descriptors[4] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "revision",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallReq, revision),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "file_name",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallReq, file_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "installed",
-+ 4,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__ModuleInstallReq, installed),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__module_install_req__field_indices_by_name[] = {
-+ 2, /* field[2] = file_name */
-+ 3, /* field[3] = installed */
-+ 0, /* field[0] = module_name */
-+ 1, /* field[1] = revision */
-+};
-+static const ProtobufCIntRange sr__module_install_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 4 }
-+};
-+const ProtobufCMessageDescriptor sr__module_install_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ModuleInstallReq",
-+ "ModuleInstallReq",
-+ "Sr__ModuleInstallReq",
-+ "sr",
-+ sizeof(Sr__ModuleInstallReq),
-+ 4,
-+ sr__module_install_req__field_descriptors,
-+ sr__module_install_req__field_indices_by_name,
-+ 1, sr__module_install_req__number_ranges,
-+ (ProtobufCMessageInit) sr__module_install_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__module_install_resp__field_descriptors NULL
-+#define sr__module_install_resp__field_indices_by_name NULL
-+#define sr__module_install_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__module_install_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.ModuleInstallResp",
-+ "ModuleInstallResp",
-+ "Sr__ModuleInstallResp",
-+ "sr",
-+ sizeof(Sr__ModuleInstallResp),
-+ 0,
-+ sr__module_install_resp__field_descriptors,
-+ sr__module_install_resp__field_indices_by_name,
-+ 0, sr__module_install_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__module_install_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__feature_enable_req__field_descriptors[3] =
-+{
-+ {
-+ "module_name",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableReq, module_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "feature_name",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableReq, feature_name),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "enabled",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__FeatureEnableReq, enabled),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__feature_enable_req__field_indices_by_name[] = {
-+ 2, /* field[2] = enabled */
-+ 1, /* field[1] = feature_name */
-+ 0, /* field[0] = module_name */
-+};
-+static const ProtobufCIntRange sr__feature_enable_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 3 }
-+};
-+const ProtobufCMessageDescriptor sr__feature_enable_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.FeatureEnableReq",
-+ "FeatureEnableReq",
-+ "Sr__FeatureEnableReq",
-+ "sr",
-+ sizeof(Sr__FeatureEnableReq),
-+ 3,
-+ sr__feature_enable_req__field_descriptors,
-+ sr__feature_enable_req__field_indices_by_name,
-+ 1, sr__feature_enable_req__number_ranges,
-+ (ProtobufCMessageInit) sr__feature_enable_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__feature_enable_resp__field_descriptors NULL
-+#define sr__feature_enable_resp__field_indices_by_name NULL
-+#define sr__feature_enable_resp__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__feature_enable_resp__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.FeatureEnableResp",
-+ "FeatureEnableResp",
-+ "Sr__FeatureEnableResp",
-+ "sr",
-+ sizeof(Sr__FeatureEnableResp),
-+ 0,
-+ sr__feature_enable_resp__field_descriptors,
-+ sr__feature_enable_resp__field_indices_by_name,
-+ 0, sr__feature_enable_resp__number_ranges,
-+ (ProtobufCMessageInit) sr__feature_enable_resp__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__unsubscribe_destination_req__field_descriptors[1] =
-+{
-+ {
-+ "destination",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__UnsubscribeDestinationReq, destination),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__unsubscribe_destination_req__field_indices_by_name[] = {
-+ 0, /* field[0] = destination */
-+};
-+static const ProtobufCIntRange sr__unsubscribe_destination_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__unsubscribe_destination_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.UnsubscribeDestinationReq",
-+ "UnsubscribeDestinationReq",
-+ "Sr__UnsubscribeDestinationReq",
-+ "sr",
-+ sizeof(Sr__UnsubscribeDestinationReq),
-+ 1,
-+ sr__unsubscribe_destination_req__field_descriptors,
-+ sr__unsubscribe_destination_req__field_indices_by_name,
-+ 1, sr__unsubscribe_destination_req__number_ranges,
-+ (ProtobufCMessageInit) sr__unsubscribe_destination_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__commit_timeout_req__field_descriptors[2] =
-+{
-+ {
-+ "commit_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CommitTimeoutReq, commit_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "expired",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__CommitTimeoutReq, expired),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__commit_timeout_req__field_indices_by_name[] = {
-+ 0, /* field[0] = commit_id */
-+ 1, /* field[1] = expired */
-+};
-+static const ProtobufCIntRange sr__commit_timeout_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__commit_timeout_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.CommitTimeoutReq",
-+ "CommitTimeoutReq",
-+ "Sr__CommitTimeoutReq",
-+ "sr",
-+ sizeof(Sr__CommitTimeoutReq),
-+ 2,
-+ sr__commit_timeout_req__field_descriptors,
-+ sr__commit_timeout_req__field_indices_by_name,
-+ 1, sr__commit_timeout_req__number_ranges,
-+ (ProtobufCMessageInit) sr__commit_timeout_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__oper_data_timeout_req__field_descriptors[1] =
-+{
-+ {
-+ "request_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__OperDataTimeoutReq, request_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__oper_data_timeout_req__field_indices_by_name[] = {
-+ 0, /* field[0] = request_id */
-+};
-+static const ProtobufCIntRange sr__oper_data_timeout_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__oper_data_timeout_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.OperDataTimeoutReq",
-+ "OperDataTimeoutReq",
-+ "Sr__OperDataTimeoutReq",
-+ "sr",
-+ sizeof(Sr__OperDataTimeoutReq),
-+ 1,
-+ sr__oper_data_timeout_req__field_descriptors,
-+ sr__oper_data_timeout_req__field_indices_by_name,
-+ 1, sr__oper_data_timeout_req__number_ranges,
-+ (ProtobufCMessageInit) sr__oper_data_timeout_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__internal_state_data_req__field_descriptors[2] =
-+{
-+ {
-+ "request_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalStateDataReq, request_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "xpath",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalStateDataReq, xpath),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__internal_state_data_req__field_indices_by_name[] = {
-+ 0, /* field[0] = request_id */
-+ 1, /* field[1] = xpath */
-+};
-+static const ProtobufCIntRange sr__internal_state_data_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 2 }
-+};
-+const ProtobufCMessageDescriptor sr__internal_state_data_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.InternalStateDataReq",
-+ "InternalStateDataReq",
-+ "Sr__InternalStateDataReq",
-+ "sr",
-+ sizeof(Sr__InternalStateDataReq),
-+ 2,
-+ sr__internal_state_data_req__field_descriptors,
-+ sr__internal_state_data_req__field_indices_by_name,
-+ 1, sr__internal_state_data_req__number_ranges,
-+ (ProtobufCMessageInit) sr__internal_state_data_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__notif_store_cleanup_req__field_descriptors NULL
-+#define sr__notif_store_cleanup_req__field_indices_by_name NULL
-+#define sr__notif_store_cleanup_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__notif_store_cleanup_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.NotifStoreCleanupReq",
-+ "NotifStoreCleanupReq",
-+ "Sr__NotifStoreCleanupReq",
-+ "sr",
-+ sizeof(Sr__NotifStoreCleanupReq),
-+ 0,
-+ sr__notif_store_cleanup_req__field_descriptors,
-+ sr__notif_store_cleanup_req__field_indices_by_name,
-+ 0, sr__notif_store_cleanup_req__number_ranges,
-+ (ProtobufCMessageInit) sr__notif_store_cleanup_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__delayed_msg_req__field_descriptors[1] =
-+{
-+ {
-+ "message",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__DelayedMsgReq, message),
-+ &sr__msg__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__delayed_msg_req__field_indices_by_name[] = {
-+ 0, /* field[0] = message */
-+};
-+static const ProtobufCIntRange sr__delayed_msg_req__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 1 }
-+};
-+const ProtobufCMessageDescriptor sr__delayed_msg_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.DelayedMsgReq",
-+ "DelayedMsgReq",
-+ "Sr__DelayedMsgReq",
-+ "sr",
-+ sizeof(Sr__DelayedMsgReq),
-+ 1,
-+ sr__delayed_msg_req__field_descriptors,
-+ sr__delayed_msg_req__field_indices_by_name,
-+ 1, sr__delayed_msg_req__number_ranges,
-+ (ProtobufCMessageInit) sr__delayed_msg_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+#define sr__nacm_reload_req__field_descriptors NULL
-+#define sr__nacm_reload_req__field_indices_by_name NULL
-+#define sr__nacm_reload_req__number_ranges NULL
-+const ProtobufCMessageDescriptor sr__nacm_reload_req__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.NacmReloadReq",
-+ "NacmReloadReq",
-+ "Sr__NacmReloadReq",
-+ "sr",
-+ sizeof(Sr__NacmReloadReq),
-+ 0,
-+ sr__nacm_reload_req__field_descriptors,
-+ sr__nacm_reload_req__field_indices_by_name,
-+ 0, sr__nacm_reload_req__number_ranges,
-+ (ProtobufCMessageInit) sr__nacm_reload_req__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__request__field_descriptors[37] =
-+{
-+ {
-+ "_id",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, _id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "operation",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, operation),
-+ &sr__operation__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_start_req",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_start_req),
-+ &sr__session_start_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_stop_req",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_stop_req),
-+ &sr__session_stop_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_refresh_req",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_refresh_req),
-+ &sr__session_refresh_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_check_req",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_check_req),
-+ &sr__session_check_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_switch_ds_req",
-+ 14,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_switch_ds_req),
-+ &sr__session_switch_ds_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_set_opts_req",
-+ 15,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, session_set_opts_req),
-+ &sr__session_set_opts_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "version_verify_req",
-+ 16,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, version_verify_req),
-+ &sr__version_verify_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "list_schemas_req",
-+ 20,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, list_schemas_req),
-+ &sr__list_schemas_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_schema_req",
-+ 21,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_schema_req),
-+ &sr__get_schema_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_install_req",
-+ 22,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, module_install_req),
-+ &sr__module_install_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "feature_enable_req",
-+ 23,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, feature_enable_req),
-+ &sr__feature_enable_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_item_req",
-+ 30,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_item_req),
-+ &sr__get_item_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_items_req",
-+ 31,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_items_req),
-+ &sr__get_items_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtree_req",
-+ 32,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_subtree_req),
-+ &sr__get_subtree_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtrees_req",
-+ 33,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_subtrees_req),
-+ &sr__get_subtrees_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtree_chunk_req",
-+ 34,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_subtree_chunk_req),
-+ &sr__get_subtree_chunk_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "set_item_req",
-+ 40,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, set_item_req),
-+ &sr__set_item_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "delete_item_req",
-+ 41,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, delete_item_req),
-+ &sr__delete_item_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "move_item_req",
-+ 42,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, move_item_req),
-+ &sr__move_item_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "set_item_str_req",
-+ 43,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, set_item_str_req),
-+ &sr__set_item_str_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "validate_req",
-+ 50,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, validate_req),
-+ &sr__validate_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "commit_req",
-+ 51,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, commit_req),
-+ &sr__commit_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "discard_changes_req",
-+ 52,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, discard_changes_req),
-+ &sr__discard_changes_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "copy_config_req",
-+ 53,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, copy_config_req),
-+ &sr__copy_config_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "lock_req",
-+ 60,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, lock_req),
-+ &sr__lock_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "unlock_req",
-+ 61,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, unlock_req),
-+ &sr__unlock_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscribe_req",
-+ 70,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, subscribe_req),
-+ &sr__subscribe_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "unsubscribe_req",
-+ 71,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, unsubscribe_req),
-+ &sr__unsubscribe_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "check_enabled_running_req",
-+ 72,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, check_enabled_running_req),
-+ &sr__check_enabled_running_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_changes_req",
-+ 73,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, get_changes_req),
-+ &sr__get_changes_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "data_provide_req",
-+ 80,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, data_provide_req),
-+ &sr__data_provide_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "check_exec_perm_req",
-+ 81,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, check_exec_perm_req),
-+ &sr__check_exec_perm_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "rpc_req",
-+ 82,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, rpc_req),
-+ &sr__rpcreq__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "event_notif_req",
-+ 83,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, event_notif_req),
-+ &sr__event_notif_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "event_notif_replay_req",
-+ 84,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Request, event_notif_replay_req),
-+ &sr__event_notif_replay_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__request__field_indices_by_name[] = {
-+ 0, /* field[0] = _id */
-+ 30, /* field[30] = check_enabled_running_req */
-+ 33, /* field[33] = check_exec_perm_req */
-+ 23, /* field[23] = commit_req */
-+ 25, /* field[25] = copy_config_req */
-+ 32, /* field[32] = data_provide_req */
-+ 19, /* field[19] = delete_item_req */
-+ 24, /* field[24] = discard_changes_req */
-+ 36, /* field[36] = event_notif_replay_req */
-+ 35, /* field[35] = event_notif_req */
-+ 12, /* field[12] = feature_enable_req */
-+ 31, /* field[31] = get_changes_req */
-+ 13, /* field[13] = get_item_req */
-+ 14, /* field[14] = get_items_req */
-+ 10, /* field[10] = get_schema_req */
-+ 17, /* field[17] = get_subtree_chunk_req */
-+ 15, /* field[15] = get_subtree_req */
-+ 16, /* field[16] = get_subtrees_req */
-+ 9, /* field[9] = list_schemas_req */
-+ 26, /* field[26] = lock_req */
-+ 11, /* field[11] = module_install_req */
-+ 20, /* field[20] = move_item_req */
-+ 1, /* field[1] = operation */
-+ 34, /* field[34] = rpc_req */
-+ 5, /* field[5] = session_check_req */
-+ 4, /* field[4] = session_refresh_req */
-+ 7, /* field[7] = session_set_opts_req */
-+ 2, /* field[2] = session_start_req */
-+ 3, /* field[3] = session_stop_req */
-+ 6, /* field[6] = session_switch_ds_req */
-+ 18, /* field[18] = set_item_req */
-+ 21, /* field[21] = set_item_str_req */
-+ 28, /* field[28] = subscribe_req */
-+ 27, /* field[27] = unlock_req */
-+ 29, /* field[29] = unsubscribe_req */
-+ 22, /* field[22] = validate_req */
-+ 8, /* field[8] = version_verify_req */
-+};
-+static const ProtobufCIntRange sr__request__number_ranges[9 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 2 },
-+ { 20, 9 },
-+ { 30, 13 },
-+ { 40, 18 },
-+ { 50, 22 },
-+ { 60, 26 },
-+ { 70, 28 },
-+ { 80, 32 },
-+ { 0, 37 }
-+};
-+const ProtobufCMessageDescriptor sr__request__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Request",
-+ "Request",
-+ "Sr__Request",
-+ "sr",
-+ sizeof(Sr__Request),
-+ 37,
-+ sr__request__field_descriptors,
-+ sr__request__field_indices_by_name,
-+ 9, sr__request__number_ranges,
-+ (ProtobufCMessageInit) sr__request__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__response__field_descriptors[38] =
-+{
-+ {
-+ "operation",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, operation),
-+ &sr__operation__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "result",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, result),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "error",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, error),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_start_resp",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_start_resp),
-+ &sr__session_start_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_stop_resp",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_stop_resp),
-+ &sr__session_stop_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_refresh_resp",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_refresh_resp),
-+ &sr__session_refresh_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_check_resp",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_check_resp),
-+ &sr__session_check_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_switch_ds_resp",
-+ 14,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_switch_ds_resp),
-+ &sr__session_switch_ds_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_set_opts_resp",
-+ 15,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, session_set_opts_resp),
-+ &sr__session_set_opts_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "version_verify_resp",
-+ 16,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, version_verify_resp),
-+ &sr__version_verify_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "list_schemas_resp",
-+ 20,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, list_schemas_resp),
-+ &sr__list_schemas_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_schema_resp",
-+ 21,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_schema_resp),
-+ &sr__get_schema_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_install_resp",
-+ 22,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, module_install_resp),
-+ &sr__module_install_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "feature_enable_resp",
-+ 23,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, feature_enable_resp),
-+ &sr__feature_enable_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_item_resp",
-+ 30,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_item_resp),
-+ &sr__get_item_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_items_resp",
-+ 31,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_items_resp),
-+ &sr__get_items_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtree_resp",
-+ 32,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_subtree_resp),
-+ &sr__get_subtree_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtrees_resp",
-+ 33,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_subtrees_resp),
-+ &sr__get_subtrees_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_subtree_chunk_resp",
-+ 34,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_subtree_chunk_resp),
-+ &sr__get_subtree_chunk_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "set_item_resp",
-+ 40,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, set_item_resp),
-+ &sr__set_item_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "delete_item_resp",
-+ 41,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, delete_item_resp),
-+ &sr__delete_item_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "move_item_resp",
-+ 42,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, move_item_resp),
-+ &sr__move_item_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "set_item_str_resp",
-+ 43,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, set_item_str_resp),
-+ &sr__set_item_str_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "validate_resp",
-+ 50,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, validate_resp),
-+ &sr__validate_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "commit_resp",
-+ 51,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, commit_resp),
-+ &sr__commit_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "discard_changes_resp",
-+ 52,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, discard_changes_resp),
-+ &sr__discard_changes_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "copy_config_resp",
-+ 53,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, copy_config_resp),
-+ &sr__copy_config_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "lock_resp",
-+ 60,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, lock_resp),
-+ &sr__lock_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "unlock_resp",
-+ 61,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, unlock_resp),
-+ &sr__unlock_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscribe_resp",
-+ 70,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, subscribe_resp),
-+ &sr__subscribe_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "unsubscribe_resp",
-+ 71,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, unsubscribe_resp),
-+ &sr__unsubscribe_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "check_enabled_running_resp",
-+ 72,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, check_enabled_running_resp),
-+ &sr__check_enabled_running_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "get_changes_resp",
-+ 73,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, get_changes_resp),
-+ &sr__get_changes_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "data_provide_resp",
-+ 80,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, data_provide_resp),
-+ &sr__data_provide_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "check_exec_perm_resp",
-+ 81,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, check_exec_perm_resp),
-+ &sr__check_exec_perm_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "rpc_resp",
-+ 82,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, rpc_resp),
-+ &sr__rpcresp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "event_notif_resp",
-+ 83,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, event_notif_resp),
-+ &sr__event_notif_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "event_notif_replay_resp",
-+ 84,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Response, event_notif_replay_resp),
-+ &sr__event_notif_replay_resp__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__response__field_indices_by_name[] = {
-+ 31, /* field[31] = check_enabled_running_resp */
-+ 34, /* field[34] = check_exec_perm_resp */
-+ 24, /* field[24] = commit_resp */
-+ 26, /* field[26] = copy_config_resp */
-+ 33, /* field[33] = data_provide_resp */
-+ 20, /* field[20] = delete_item_resp */
-+ 25, /* field[25] = discard_changes_resp */
-+ 2, /* field[2] = error */
-+ 37, /* field[37] = event_notif_replay_resp */
-+ 36, /* field[36] = event_notif_resp */
-+ 13, /* field[13] = feature_enable_resp */
-+ 32, /* field[32] = get_changes_resp */
-+ 14, /* field[14] = get_item_resp */
-+ 15, /* field[15] = get_items_resp */
-+ 11, /* field[11] = get_schema_resp */
-+ 18, /* field[18] = get_subtree_chunk_resp */
-+ 16, /* field[16] = get_subtree_resp */
-+ 17, /* field[17] = get_subtrees_resp */
-+ 10, /* field[10] = list_schemas_resp */
-+ 27, /* field[27] = lock_resp */
-+ 12, /* field[12] = module_install_resp */
-+ 21, /* field[21] = move_item_resp */
-+ 0, /* field[0] = operation */
-+ 1, /* field[1] = result */
-+ 35, /* field[35] = rpc_resp */
-+ 6, /* field[6] = session_check_resp */
-+ 5, /* field[5] = session_refresh_resp */
-+ 8, /* field[8] = session_set_opts_resp */
-+ 3, /* field[3] = session_start_resp */
-+ 4, /* field[4] = session_stop_resp */
-+ 7, /* field[7] = session_switch_ds_resp */
-+ 19, /* field[19] = set_item_resp */
-+ 22, /* field[22] = set_item_str_resp */
-+ 29, /* field[29] = subscribe_resp */
-+ 28, /* field[28] = unlock_resp */
-+ 30, /* field[30] = unsubscribe_resp */
-+ 23, /* field[23] = validate_resp */
-+ 9, /* field[9] = version_verify_resp */
-+};
-+static const ProtobufCIntRange sr__response__number_ranges[9 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 3 },
-+ { 20, 10 },
-+ { 30, 14 },
-+ { 40, 19 },
-+ { 50, 23 },
-+ { 60, 27 },
-+ { 70, 29 },
-+ { 80, 33 },
-+ { 0, 38 }
-+};
-+const ProtobufCMessageDescriptor sr__response__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Response",
-+ "Response",
-+ "Sr__Response",
-+ "sr",
-+ sizeof(Sr__Response),
-+ 38,
-+ sr__response__field_descriptors,
-+ sr__response__field_indices_by_name,
-+ 9, sr__response__number_ranges,
-+ (ProtobufCMessageInit) sr__response__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__notification__field_descriptors[10] =
-+{
-+ {
-+ "type",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, type),
-+ &sr__subscription_type__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "destination_address",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, destination_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "source_address",
-+ 3,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_STRING,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, source_address),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "source_pid",
-+ 4,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, source_pid),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subscription_id",
-+ 5,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, subscription_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "commit_id",
-+ 6,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__Notification, has_commit_id),
-+ offsetof(Sr__Notification, commit_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_install_notif",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, module_install_notif),
-+ &sr__module_install_notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "feature_enable_notif",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, feature_enable_notif),
-+ &sr__feature_enable_notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "module_change_notif",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, module_change_notif),
-+ &sr__module_change_notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "subtree_change_notif",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Notification, subtree_change_notif),
-+ &sr__subtree_change_notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__notification__field_indices_by_name[] = {
-+ 5, /* field[5] = commit_id */
-+ 1, /* field[1] = destination_address */
-+ 7, /* field[7] = feature_enable_notif */
-+ 8, /* field[8] = module_change_notif */
-+ 6, /* field[6] = module_install_notif */
-+ 2, /* field[2] = source_address */
-+ 3, /* field[3] = source_pid */
-+ 4, /* field[4] = subscription_id */
-+ 9, /* field[9] = subtree_change_notif */
-+ 0, /* field[0] = type */
-+};
-+static const ProtobufCIntRange sr__notification__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 6 },
-+ { 0, 10 }
-+};
-+const ProtobufCMessageDescriptor sr__notification__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Notification",
-+ "Notification",
-+ "Sr__Notification",
-+ "sr",
-+ sizeof(Sr__Notification),
-+ 10,
-+ sr__notification__field_descriptors,
-+ sr__notification__field_indices_by_name,
-+ 2, sr__notification__number_ranges,
-+ (ProtobufCMessageInit) sr__notification__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__notification_ack__field_descriptors[4] =
-+{
-+ {
-+ "notif",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__NotificationAck, notif),
-+ &sr__notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "result",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__NotificationAck, result),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "error",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__NotificationAck, error),
-+ &sr__error__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "do_not_send_abort",
-+ 4,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_BOOL,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__NotificationAck, do_not_send_abort),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__notification_ack__field_indices_by_name[] = {
-+ 3, /* field[3] = do_not_send_abort */
-+ 2, /* field[2] = error */
-+ 0, /* field[0] = notif */
-+ 1, /* field[1] = result */
-+};
-+static const ProtobufCIntRange sr__notification_ack__number_ranges[1 + 1] =
-+{
-+ { 1, 0 },
-+ { 0, 4 }
-+};
-+const ProtobufCMessageDescriptor sr__notification_ack__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.NotificationAck",
-+ "NotificationAck",
-+ "Sr__NotificationAck",
-+ "sr",
-+ sizeof(Sr__NotificationAck),
-+ 4,
-+ sr__notification_ack__field_descriptors,
-+ sr__notification_ack__field_indices_by_name,
-+ 1, sr__notification_ack__number_ranges,
-+ (ProtobufCMessageInit) sr__notification_ack__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCFieldDescriptor sr__internal_request__field_descriptors[9] =
-+{
-+ {
-+ "operation",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, operation),
-+ &sr__operation__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "postpone_timeout",
-+ 2,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_UINT32,
-+ offsetof(Sr__InternalRequest, has_postpone_timeout),
-+ offsetof(Sr__InternalRequest, postpone_timeout),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "unsubscribe_dst_req",
-+ 10,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, unsubscribe_dst_req),
-+ &sr__unsubscribe_destination_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "commit_timeout_req",
-+ 11,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, commit_timeout_req),
-+ &sr__commit_timeout_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "oper_data_timeout_req",
-+ 12,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, oper_data_timeout_req),
-+ &sr__oper_data_timeout_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "internal_state_data_req",
-+ 13,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, internal_state_data_req),
-+ &sr__internal_state_data_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "notif_store_cleanup_req",
-+ 14,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, notif_store_cleanup_req),
-+ &sr__notif_store_cleanup_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "delayed_msg_req",
-+ 15,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, delayed_msg_req),
-+ &sr__delayed_msg_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "nacm_reload_req",
-+ 16,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__InternalRequest, nacm_reload_req),
-+ &sr__nacm_reload_req__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__internal_request__field_indices_by_name[] = {
-+ 3, /* field[3] = commit_timeout_req */
-+ 7, /* field[7] = delayed_msg_req */
-+ 5, /* field[5] = internal_state_data_req */
-+ 8, /* field[8] = nacm_reload_req */
-+ 6, /* field[6] = notif_store_cleanup_req */
-+ 4, /* field[4] = oper_data_timeout_req */
-+ 0, /* field[0] = operation */
-+ 1, /* field[1] = postpone_timeout */
-+ 2, /* field[2] = unsubscribe_dst_req */
-+};
-+static const ProtobufCIntRange sr__internal_request__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 10, 2 },
-+ { 0, 9 }
-+};
-+const ProtobufCMessageDescriptor sr__internal_request__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.InternalRequest",
-+ "InternalRequest",
-+ "Sr__InternalRequest",
-+ "sr",
-+ sizeof(Sr__InternalRequest),
-+ 9,
-+ sr__internal_request__field_descriptors,
-+ sr__internal_request__field_indices_by_name,
-+ 2, sr__internal_request__number_ranges,
-+ (ProtobufCMessageInit) sr__internal_request__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCEnumValue sr__msg__msg_type__enum_values_by_number[5] =
-+{
-+ { "REQUEST", "SR__MSG__MSG_TYPE__REQUEST", 1 },
-+ { "RESPONSE", "SR__MSG__MSG_TYPE__RESPONSE", 2 },
-+ { "NOTIFICATION", "SR__MSG__MSG_TYPE__NOTIFICATION", 3 },
-+ { "NOTIFICATION_ACK", "SR__MSG__MSG_TYPE__NOTIFICATION_ACK", 4 },
-+ { "INTERNAL_REQUEST", "SR__MSG__MSG_TYPE__INTERNAL_REQUEST", 5 },
-+};
-+static const ProtobufCIntRange sr__msg__msg_type__value_ranges[] = {
-+{1, 0},{0, 5}
-+};
-+static const ProtobufCEnumValueIndex sr__msg__msg_type__enum_values_by_name[5] =
-+{
-+ { "INTERNAL_REQUEST", 4 },
-+ { "NOTIFICATION", 2 },
-+ { "NOTIFICATION_ACK", 3 },
-+ { "REQUEST", 0 },
-+ { "RESPONSE", 1 },
-+};
-+const ProtobufCEnumDescriptor sr__msg__msg_type__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.Msg.MsgType",
-+ "MsgType",
-+ "Sr__Msg__MsgType",
-+ "sr",
-+ 5,
-+ sr__msg__msg_type__enum_values_by_number,
-+ 5,
-+ sr__msg__msg_type__enum_values_by_name,
-+ 1,
-+ sr__msg__msg_type__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCFieldDescriptor sr__msg__field_descriptors[8] =
-+{
-+ {
-+ "type",
-+ 1,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_ENUM,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, type),
-+ &sr__msg__msg_type__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "session_id",
-+ 2,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT32,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, session_id),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "request",
-+ 3,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, request),
-+ &sr__request__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "response",
-+ 4,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, response),
-+ &sr__response__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "notification",
-+ 5,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, notification),
-+ &sr__notification__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "notification_ack",
-+ 6,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, notification_ack),
-+ &sr__notification_ack__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "internal_request",
-+ 7,
-+ PROTOBUF_C_LABEL_OPTIONAL,
-+ PROTOBUF_C_TYPE_MESSAGE,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, internal_request),
-+ &sr__internal_request__descriptor,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+ {
-+ "_sysrepo_mem_ctx",
-+ 20,
-+ PROTOBUF_C_LABEL_REQUIRED,
-+ PROTOBUF_C_TYPE_UINT64,
-+ 0, /* quantifier_offset */
-+ offsetof(Sr__Msg, _sysrepo_mem_ctx),
-+ NULL,
-+ NULL,
-+ 0, /* flags */
-+ 0,NULL,NULL /* reserved1,reserved2, etc */
-+ },
-+};
-+static const unsigned sr__msg__field_indices_by_name[] = {
-+ 7, /* field[7] = _sysrepo_mem_ctx */
-+ 6, /* field[6] = internal_request */
-+ 4, /* field[4] = notification */
-+ 5, /* field[5] = notification_ack */
-+ 2, /* field[2] = request */
-+ 3, /* field[3] = response */
-+ 1, /* field[1] = session_id */
-+ 0, /* field[0] = type */
-+};
-+static const ProtobufCIntRange sr__msg__number_ranges[2 + 1] =
-+{
-+ { 1, 0 },
-+ { 20, 7 },
-+ { 0, 8 }
-+};
-+const ProtobufCMessageDescriptor sr__msg__descriptor =
-+{
-+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
-+ "sr.Msg",
-+ "Msg",
-+ "Sr__Msg",
-+ "sr",
-+ sizeof(Sr__Msg),
-+ 8,
-+ sr__msg__field_descriptors,
-+ sr__msg__field_indices_by_name,
-+ 2, sr__msg__number_ranges,
-+ (ProtobufCMessageInit) sr__msg__init,
-+ NULL,NULL,NULL /* reserved[123] */
-+};
-+static const ProtobufCEnumValue sr__api_variant__enum_values_by_number[2] =
-+{
-+ { "VALUES", "SR__API_VARIANT__VALUES", 1 },
-+ { "TREES", "SR__API_VARIANT__TREES", 2 },
-+};
-+static const ProtobufCIntRange sr__api_variant__value_ranges[] = {
-+{1, 0},{0, 2}
-+};
-+static const ProtobufCEnumValueIndex sr__api_variant__enum_values_by_name[2] =
-+{
-+ { "TREES", 1 },
-+ { "VALUES", 0 },
-+};
-+const ProtobufCEnumDescriptor sr__api_variant__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.ApiVariant",
-+ "ApiVariant",
-+ "Sr__ApiVariant",
-+ "sr",
-+ 2,
-+ sr__api_variant__enum_values_by_number,
-+ 2,
-+ sr__api_variant__enum_values_by_name,
-+ 1,
-+ sr__api_variant__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__data_store__enum_values_by_number[3] =
-+{
-+ { "STARTUP", "SR__DATA_STORE__STARTUP", 1 },
-+ { "RUNNING", "SR__DATA_STORE__RUNNING", 2 },
-+ { "CANDIDATE", "SR__DATA_STORE__CANDIDATE", 3 },
-+};
-+static const ProtobufCIntRange sr__data_store__value_ranges[] = {
-+{1, 0},{0, 3}
-+};
-+static const ProtobufCEnumValueIndex sr__data_store__enum_values_by_name[3] =
-+{
-+ { "CANDIDATE", 2 },
-+ { "RUNNING", 1 },
-+ { "STARTUP", 0 },
-+};
-+const ProtobufCEnumDescriptor sr__data_store__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.DataStore",
-+ "DataStore",
-+ "Sr__DataStore",
-+ "sr",
-+ 3,
-+ sr__data_store__enum_values_by_number,
-+ 3,
-+ sr__data_store__enum_values_by_name,
-+ 1,
-+ sr__data_store__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__session_flags__enum_values_by_number[4] =
-+{
-+ { "SESS_DEFAULT", "SR__SESSION_FLAGS__SESS_DEFAULT", 0 },
-+ { "SESS_CONFIG_ONLY", "SR__SESSION_FLAGS__SESS_CONFIG_ONLY", 1 },
-+ { "SESS_ENABLE_NACM", "SR__SESSION_FLAGS__SESS_ENABLE_NACM", 2 },
-+ { "SESS_NOTIFICATION", "SR__SESSION_FLAGS__SESS_NOTIFICATION", 1024 },
-+};
-+static const ProtobufCIntRange sr__session_flags__value_ranges[] = {
-+{0, 0},{1024, 3},{0, 4}
-+};
-+static const ProtobufCEnumValueIndex sr__session_flags__enum_values_by_name[4] =
-+{
-+ { "SESS_CONFIG_ONLY", 1 },
-+ { "SESS_DEFAULT", 0 },
-+ { "SESS_ENABLE_NACM", 2 },
-+ { "SESS_NOTIFICATION", 3 },
-+};
-+const ProtobufCEnumDescriptor sr__session_flags__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.SessionFlags",
-+ "SessionFlags",
-+ "Sr__SessionFlags",
-+ "sr",
-+ 4,
-+ sr__session_flags__enum_values_by_number,
-+ 4,
-+ sr__session_flags__enum_values_by_name,
-+ 2,
-+ sr__session_flags__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__edit_flags__enum_values_by_number[3] =
-+{
-+ { "EDIT_DEFAULT", "SR__EDIT_FLAGS__EDIT_DEFAULT", 0 },
-+ { "EDIT_NON_RECURSIVE", "SR__EDIT_FLAGS__EDIT_NON_RECURSIVE", 1 },
-+ { "EDIT_STRICT", "SR__EDIT_FLAGS__EDIT_STRICT", 2 },
-+};
-+static const ProtobufCIntRange sr__edit_flags__value_ranges[] = {
-+{0, 0},{0, 3}
-+};
-+static const ProtobufCEnumValueIndex sr__edit_flags__enum_values_by_name[3] =
-+{
-+ { "EDIT_DEFAULT", 0 },
-+ { "EDIT_NON_RECURSIVE", 1 },
-+ { "EDIT_STRICT", 2 },
-+};
-+const ProtobufCEnumDescriptor sr__edit_flags__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.EditFlags",
-+ "EditFlags",
-+ "Sr__EditFlags",
-+ "sr",
-+ 3,
-+ sr__edit_flags__enum_values_by_number,
-+ 3,
-+ sr__edit_flags__enum_values_by_name,
-+ 1,
-+ sr__edit_flags__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__subscription_type__enum_values_by_number[10] =
-+{
-+ { "MODULE_INSTALL_SUBS", "SR__SUBSCRIPTION_TYPE__MODULE_INSTALL_SUBS", 1 },
-+ { "FEATURE_ENABLE_SUBS", "SR__SUBSCRIPTION_TYPE__FEATURE_ENABLE_SUBS", 2 },
-+ { "MODULE_CHANGE_SUBS", "SR__SUBSCRIPTION_TYPE__MODULE_CHANGE_SUBS", 10 },
-+ { "SUBTREE_CHANGE_SUBS", "SR__SUBSCRIPTION_TYPE__SUBTREE_CHANGE_SUBS", 11 },
-+ { "DP_GET_ITEMS_SUBS", "SR__SUBSCRIPTION_TYPE__DP_GET_ITEMS_SUBS", 20 },
-+ { "RPC_SUBS", "SR__SUBSCRIPTION_TYPE__RPC_SUBS", 30 },
-+ { "ACTION_SUBS", "SR__SUBSCRIPTION_TYPE__ACTION_SUBS", 31 },
-+ { "EVENT_NOTIF_SUBS", "SR__SUBSCRIPTION_TYPE__EVENT_NOTIF_SUBS", 40 },
-+ { "HELLO_SUBS", "SR__SUBSCRIPTION_TYPE__HELLO_SUBS", 50 },
-+ { "COMMIT_END_SUBS", "SR__SUBSCRIPTION_TYPE__COMMIT_END_SUBS", 51 },
-+};
-+static const ProtobufCIntRange sr__subscription_type__value_ranges[] = {
-+{1, 0},{10, 2},{20, 4},{30, 5},{40, 7},{50, 8},{0, 10}
-+};
-+static const ProtobufCEnumValueIndex sr__subscription_type__enum_values_by_name[10] =
-+{
-+ { "ACTION_SUBS", 6 },
-+ { "COMMIT_END_SUBS", 9 },
-+ { "DP_GET_ITEMS_SUBS", 4 },
-+ { "EVENT_NOTIF_SUBS", 7 },
-+ { "FEATURE_ENABLE_SUBS", 1 },
-+ { "HELLO_SUBS", 8 },
-+ { "MODULE_CHANGE_SUBS", 2 },
-+ { "MODULE_INSTALL_SUBS", 0 },
-+ { "RPC_SUBS", 5 },
-+ { "SUBTREE_CHANGE_SUBS", 3 },
-+};
-+const ProtobufCEnumDescriptor sr__subscription_type__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.SubscriptionType",
-+ "SubscriptionType",
-+ "Sr__SubscriptionType",
-+ "sr",
-+ 10,
-+ sr__subscription_type__enum_values_by_number,
-+ 10,
-+ sr__subscription_type__enum_values_by_name,
-+ 6,
-+ sr__subscription_type__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__notification_event__enum_values_by_number[4] =
-+{
-+ { "VERIFY_EV", "SR__NOTIFICATION_EVENT__VERIFY_EV", 1 },
-+ { "APPLY_EV", "SR__NOTIFICATION_EVENT__APPLY_EV", 2 },
-+ { "ABORT_EV", "SR__NOTIFICATION_EVENT__ABORT_EV", 3 },
-+ { "ENABLED_EV", "SR__NOTIFICATION_EVENT__ENABLED_EV", 4 },
-+};
-+static const ProtobufCIntRange sr__notification_event__value_ranges[] = {
-+{1, 0},{0, 4}
-+};
-+static const ProtobufCEnumValueIndex sr__notification_event__enum_values_by_name[4] =
-+{
-+ { "ABORT_EV", 2 },
-+ { "APPLY_EV", 1 },
-+ { "ENABLED_EV", 3 },
-+ { "VERIFY_EV", 0 },
-+};
-+const ProtobufCEnumDescriptor sr__notification_event__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.NotificationEvent",
-+ "NotificationEvent",
-+ "Sr__NotificationEvent",
-+ "sr",
-+ 4,
-+ sr__notification_event__enum_values_by_number,
-+ 4,
-+ sr__notification_event__enum_values_by_name,
-+ 1,
-+ sr__notification_event__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__module_state__enum_values_by_number[3] =
-+{
-+ { "UNINSTALLED", "SR__MODULE_STATE__UNINSTALLED", 1 },
-+ { "IMPORTED", "SR__MODULE_STATE__IMPORTED", 2 },
-+ { "IMPLEMENTED", "SR__MODULE_STATE__IMPLEMENTED", 3 },
-+};
-+static const ProtobufCIntRange sr__module_state__value_ranges[] = {
-+{1, 0},{0, 3}
-+};
-+static const ProtobufCEnumValueIndex sr__module_state__enum_values_by_name[3] =
-+{
-+ { "IMPLEMENTED", 2 },
-+ { "IMPORTED", 1 },
-+ { "UNINSTALLED", 0 },
-+};
-+const ProtobufCEnumDescriptor sr__module_state__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.ModuleState",
-+ "ModuleState",
-+ "Sr__ModuleState",
-+ "sr",
-+ 3,
-+ sr__module_state__enum_values_by_number,
-+ 3,
-+ sr__module_state__enum_values_by_name,
-+ 1,
-+ sr__module_state__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__change_operation__enum_values_by_number[4] =
-+{
-+ { "CREATED", "SR__CHANGE_OPERATION__CREATED", 1 },
-+ { "MODIFIED", "SR__CHANGE_OPERATION__MODIFIED", 2 },
-+ { "DELETED", "SR__CHANGE_OPERATION__DELETED", 3 },
-+ { "MOVED", "SR__CHANGE_OPERATION__MOVED", 4 },
-+};
-+static const ProtobufCIntRange sr__change_operation__value_ranges[] = {
-+{1, 0},{0, 4}
-+};
-+static const ProtobufCEnumValueIndex sr__change_operation__enum_values_by_name[4] =
-+{
-+ { "CREATED", 0 },
-+ { "DELETED", 2 },
-+ { "MODIFIED", 1 },
-+ { "MOVED", 3 },
-+};
-+const ProtobufCEnumDescriptor sr__change_operation__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.ChangeOperation",
-+ "ChangeOperation",
-+ "Sr__ChangeOperation",
-+ "sr",
-+ 4,
-+ sr__change_operation__enum_values_by_number,
-+ 4,
-+ sr__change_operation__enum_values_by_name,
-+ 1,
-+ sr__change_operation__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-+static const ProtobufCEnumValue sr__operation__enum_values_by_number[43] =
-+{
-+ { "SESSION_START", "SR__OPERATION__SESSION_START", 10 },
-+ { "SESSION_STOP", "SR__OPERATION__SESSION_STOP", 11 },
-+ { "SESSION_REFRESH", "SR__OPERATION__SESSION_REFRESH", 12 },
-+ { "SESSION_CHECK", "SR__OPERATION__SESSION_CHECK", 13 },
-+ { "SESSION_SWITCH_DS", "SR__OPERATION__SESSION_SWITCH_DS", 14 },
-+ { "SESSION_SET_OPTS", "SR__OPERATION__SESSION_SET_OPTS", 15 },
-+ { "VERSION_VERIFY", "SR__OPERATION__VERSION_VERIFY", 16 },
-+ { "LIST_SCHEMAS", "SR__OPERATION__LIST_SCHEMAS", 20 },
-+ { "GET_SCHEMA", "SR__OPERATION__GET_SCHEMA", 21 },
-+ { "MODULE_INSTALL", "SR__OPERATION__MODULE_INSTALL", 22 },
-+ { "FEATURE_ENABLE", "SR__OPERATION__FEATURE_ENABLE", 23 },
-+ { "GET_ITEM", "SR__OPERATION__GET_ITEM", 30 },
-+ { "GET_ITEMS", "SR__OPERATION__GET_ITEMS", 31 },
-+ { "GET_SUBTREE", "SR__OPERATION__GET_SUBTREE", 32 },
-+ { "GET_SUBTREES", "SR__OPERATION__GET_SUBTREES", 33 },
-+ { "GET_SUBTREE_CHUNK", "SR__OPERATION__GET_SUBTREE_CHUNK", 34 },
-+ { "SET_ITEM", "SR__OPERATION__SET_ITEM", 40 },
-+ { "DELETE_ITEM", "SR__OPERATION__DELETE_ITEM", 41 },
-+ { "MOVE_ITEM", "SR__OPERATION__MOVE_ITEM", 42 },
-+ { "SET_ITEM_STR", "SR__OPERATION__SET_ITEM_STR", 43 },
-+ { "VALIDATE", "SR__OPERATION__VALIDATE", 50 },
-+ { "COMMIT", "SR__OPERATION__COMMIT", 51 },
-+ { "DISCARD_CHANGES", "SR__OPERATION__DISCARD_CHANGES", 52 },
-+ { "COPY_CONFIG", "SR__OPERATION__COPY_CONFIG", 53 },
-+ { "LOCK", "SR__OPERATION__LOCK", 60 },
-+ { "UNLOCK", "SR__OPERATION__UNLOCK", 61 },
-+ { "SUBSCRIBE", "SR__OPERATION__SUBSCRIBE", 70 },
-+ { "UNSUBSCRIBE", "SR__OPERATION__UNSUBSCRIBE", 71 },
-+ { "CHECK_ENABLED_RUNNING", "SR__OPERATION__CHECK_ENABLED_RUNNING", 72 },
-+ { "GET_CHANGES", "SR__OPERATION__GET_CHANGES", 73 },
-+ { "DATA_PROVIDE", "SR__OPERATION__DATA_PROVIDE", 80 },
-+ { "CHECK_EXEC_PERMISSION", "SR__OPERATION__CHECK_EXEC_PERMISSION", 81 },
-+ { "RPC", "SR__OPERATION__RPC", 82 },
-+ { "ACTION", "SR__OPERATION__ACTION", 83 },
-+ { "EVENT_NOTIF", "SR__OPERATION__EVENT_NOTIF", 84 },
-+ { "EVENT_NOTIF_REPLAY", "SR__OPERATION__EVENT_NOTIF_REPLAY", 85 },
-+ { "UNSUBSCRIBE_DESTINATION", "SR__OPERATION__UNSUBSCRIBE_DESTINATION", 101 },
-+ { "COMMIT_TIMEOUT", "SR__OPERATION__COMMIT_TIMEOUT", 102 },
-+ { "OPER_DATA_TIMEOUT", "SR__OPERATION__OPER_DATA_TIMEOUT", 103 },
-+ { "INTERNAL_STATE_DATA", "SR__OPERATION__INTERNAL_STATE_DATA", 104 },
-+ { "NOTIF_STORE_CLEANUP", "SR__OPERATION__NOTIF_STORE_CLEANUP", 105 },
-+ { "DELAYED_MSG", "SR__OPERATION__DELAYED_MSG", 106 },
-+ { "NACM_RELOAD", "SR__OPERATION__NACM_RELOAD", 107 },
-+};
-+static const ProtobufCIntRange sr__operation__value_ranges[] = {
-+{10, 0},{20, 7},{30, 11},{40, 16},{50, 20},{60, 24},{70, 26},{80, 30},{101, 36},{0, 43}
-+};
-+static const ProtobufCEnumValueIndex sr__operation__enum_values_by_name[43] =
-+{
-+ { "ACTION", 33 },
-+ { "CHECK_ENABLED_RUNNING", 28 },
-+ { "CHECK_EXEC_PERMISSION", 31 },
-+ { "COMMIT", 21 },
-+ { "COMMIT_TIMEOUT", 37 },
-+ { "COPY_CONFIG", 23 },
-+ { "DATA_PROVIDE", 30 },
-+ { "DELAYED_MSG", 41 },
-+ { "DELETE_ITEM", 17 },
-+ { "DISCARD_CHANGES", 22 },
-+ { "EVENT_NOTIF", 34 },
-+ { "EVENT_NOTIF_REPLAY", 35 },
-+ { "FEATURE_ENABLE", 10 },
-+ { "GET_CHANGES", 29 },
-+ { "GET_ITEM", 11 },
-+ { "GET_ITEMS", 12 },
-+ { "GET_SCHEMA", 8 },
-+ { "GET_SUBTREE", 13 },
-+ { "GET_SUBTREES", 14 },
-+ { "GET_SUBTREE_CHUNK", 15 },
-+ { "INTERNAL_STATE_DATA", 39 },
-+ { "LIST_SCHEMAS", 7 },
-+ { "LOCK", 24 },
-+ { "MODULE_INSTALL", 9 },
-+ { "MOVE_ITEM", 18 },
-+ { "NACM_RELOAD", 42 },
-+ { "NOTIF_STORE_CLEANUP", 40 },
-+ { "OPER_DATA_TIMEOUT", 38 },
-+ { "RPC", 32 },
-+ { "SESSION_CHECK", 3 },
-+ { "SESSION_REFRESH", 2 },
-+ { "SESSION_SET_OPTS", 5 },
-+ { "SESSION_START", 0 },
-+ { "SESSION_STOP", 1 },
-+ { "SESSION_SWITCH_DS", 4 },
-+ { "SET_ITEM", 16 },
-+ { "SET_ITEM_STR", 19 },
-+ { "SUBSCRIBE", 26 },
-+ { "UNLOCK", 25 },
-+ { "UNSUBSCRIBE", 27 },
-+ { "UNSUBSCRIBE_DESTINATION", 36 },
-+ { "VALIDATE", 20 },
-+ { "VERSION_VERIFY", 6 },
-+};
-+const ProtobufCEnumDescriptor sr__operation__descriptor =
-+{
-+ PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
-+ "sr.Operation",
-+ "Operation",
-+ "Sr__Operation",
-+ "sr",
-+ 43,
-+ sr__operation__enum_values_by_number,
-+ 43,
-+ sr__operation__enum_values_by_name,
-+ 9,
-+ sr__operation__value_ranges,
-+ NULL,NULL,NULL,NULL /* reserved[1234] */
-+};
-Index: sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.h
-===================================================================
---- /dev/null
-+++ sysrepo-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sysrepo.pb-c.h
-@@ -0,0 +1,4238 @@
-+/* Generated by the protocol buffer compiler. DO NOT EDIT! */
-+/* Generated from: sysrepo.proto */
-+
-+#ifndef PROTOBUF_C_sysrepo_2eproto__INCLUDED
-+#define PROTOBUF_C_sysrepo_2eproto__INCLUDED
-+
-+#include <protobuf-c/protobuf-c.h>
-+
-+PROTOBUF_C__BEGIN_DECLS
-+
-+#if PROTOBUF_C_VERSION_NUMBER < 1000000
-+# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
-+#elif 1002001 < PROTOBUF_C_MIN_COMPILER_VERSION
-+# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
-+#endif
-+
-+
-+typedef struct _Sr__Value Sr__Value;
-+typedef struct _Sr__Node Sr__Node;
-+typedef struct _Sr__Error Sr__Error;
-+typedef struct _Sr__SessionStartReq Sr__SessionStartReq;
-+typedef struct _Sr__SessionStartResp Sr__SessionStartResp;
-+typedef struct _Sr__SessionStopReq Sr__SessionStopReq;
-+typedef struct _Sr__SessionStopResp Sr__SessionStopResp;
-+typedef struct _Sr__SessionRefreshReq Sr__SessionRefreshReq;
-+typedef struct _Sr__SessionRefreshResp Sr__SessionRefreshResp;
-+typedef struct _Sr__SessionCheckReq Sr__SessionCheckReq;
-+typedef struct _Sr__SessionCheckResp Sr__SessionCheckResp;
-+typedef struct _Sr__SessionSwitchDsReq Sr__SessionSwitchDsReq;
-+typedef struct _Sr__SessionSwitchDsResp Sr__SessionSwitchDsResp;
-+typedef struct _Sr__SessionSetOptsReq Sr__SessionSetOptsReq;
-+typedef struct _Sr__SessionSetOptsResp Sr__SessionSetOptsResp;
-+typedef struct _Sr__VersionVerifyReq Sr__VersionVerifyReq;
-+typedef struct _Sr__VersionVerifyResp Sr__VersionVerifyResp;
-+typedef struct _Sr__SchemaRevision Sr__SchemaRevision;
-+typedef struct _Sr__SchemaSubmodule Sr__SchemaSubmodule;
-+typedef struct _Sr__Schema Sr__Schema;
-+typedef struct _Sr__ListSchemasReq Sr__ListSchemasReq;
-+typedef struct _Sr__ListSchemasResp Sr__ListSchemasResp;
-+typedef struct _Sr__GetSchemaReq Sr__GetSchemaReq;
-+typedef struct _Sr__GetSchemaResp Sr__GetSchemaResp;
-+typedef struct _Sr__GetItemReq Sr__GetItemReq;
-+typedef struct _Sr__GetItemResp Sr__GetItemResp;
-+typedef struct _Sr__GetItemsReq Sr__GetItemsReq;
-+typedef struct _Sr__GetItemsResp Sr__GetItemsResp;
-+typedef struct _Sr__GetSubtreeReq Sr__GetSubtreeReq;
-+typedef struct _Sr__GetSubtreeResp Sr__GetSubtreeResp;
-+typedef struct _Sr__GetSubtreesReq Sr__GetSubtreesReq;
-+typedef struct _Sr__GetSubtreesResp Sr__GetSubtreesResp;
-+typedef struct _Sr__GetSubtreeChunkReq Sr__GetSubtreeChunkReq;
-+typedef struct _Sr__GetSubtreeChunkResp Sr__GetSubtreeChunkResp;
-+typedef struct _Sr__SetItemReq Sr__SetItemReq;
-+typedef struct _Sr__SetItemResp Sr__SetItemResp;
-+typedef struct _Sr__SetItemStrReq Sr__SetItemStrReq;
-+typedef struct _Sr__SetItemStrResp Sr__SetItemStrResp;
-+typedef struct _Sr__DeleteItemReq Sr__DeleteItemReq;
-+typedef struct _Sr__DeleteItemResp Sr__DeleteItemResp;
-+typedef struct _Sr__MoveItemReq Sr__MoveItemReq;
-+typedef struct _Sr__MoveItemResp Sr__MoveItemResp;
-+typedef struct _Sr__ValidateReq Sr__ValidateReq;
-+typedef struct _Sr__ValidateResp Sr__ValidateResp;
-+typedef struct _Sr__CommitReq Sr__CommitReq;
-+typedef struct _Sr__CommitResp Sr__CommitResp;
-+typedef struct _Sr__DiscardChangesReq Sr__DiscardChangesReq;
-+typedef struct _Sr__DiscardChangesResp Sr__DiscardChangesResp;
-+typedef struct _Sr__CopyConfigReq Sr__CopyConfigReq;
-+typedef struct _Sr__CopyConfigResp Sr__CopyConfigResp;
-+typedef struct _Sr__LockReq Sr__LockReq;
-+typedef struct _Sr__LockResp Sr__LockResp;
-+typedef struct _Sr__UnlockReq Sr__UnlockReq;
-+typedef struct _Sr__UnlockResp Sr__UnlockResp;
-+typedef struct _Sr__SubscribeReq Sr__SubscribeReq;
-+typedef struct _Sr__SubscribeResp Sr__SubscribeResp;
-+typedef struct _Sr__UnsubscribeReq Sr__UnsubscribeReq;
-+typedef struct _Sr__UnsubscribeResp Sr__UnsubscribeResp;
-+typedef struct _Sr__CheckEnabledRunningReq Sr__CheckEnabledRunningReq;
-+typedef struct _Sr__CheckEnabledRunningResp Sr__CheckEnabledRunningResp;
-+typedef struct _Sr__ModuleInstallNotification Sr__ModuleInstallNotification;
-+typedef struct _Sr__FeatureEnableNotification Sr__FeatureEnableNotification;
-+typedef struct _Sr__ModuleChangeNotification Sr__ModuleChangeNotification;
-+typedef struct _Sr__SubtreeChangeNotification Sr__SubtreeChangeNotification;
-+typedef struct _Sr__Change Sr__Change;
-+typedef struct _Sr__GetChangesReq Sr__GetChangesReq;
-+typedef struct _Sr__GetChangesResp Sr__GetChangesResp;
-+typedef struct _Sr__CheckExecPermReq Sr__CheckExecPermReq;
-+typedef struct _Sr__CheckExecPermResp Sr__CheckExecPermResp;
-+typedef struct _Sr__RPCReq Sr__RPCReq;
-+typedef struct _Sr__RPCResp Sr__RPCResp;
-+typedef struct _Sr__EventNotifReq Sr__EventNotifReq;
-+typedef struct _Sr__EventNotifResp Sr__EventNotifResp;
-+typedef struct _Sr__EventNotifReplayReq Sr__EventNotifReplayReq;
-+typedef struct _Sr__EventNotifReplayResp Sr__EventNotifReplayResp;
-+typedef struct _Sr__DataProvideReq Sr__DataProvideReq;
-+typedef struct _Sr__DataProvideResp Sr__DataProvideResp;
-+typedef struct _Sr__ModuleInstallReq Sr__ModuleInstallReq;
-+typedef struct _Sr__ModuleInstallResp Sr__ModuleInstallResp;
-+typedef struct _Sr__FeatureEnableReq Sr__FeatureEnableReq;
-+typedef struct _Sr__FeatureEnableResp Sr__FeatureEnableResp;
-+typedef struct _Sr__UnsubscribeDestinationReq Sr__UnsubscribeDestinationReq;
-+typedef struct _Sr__CommitTimeoutReq Sr__CommitTimeoutReq;
-+typedef struct _Sr__OperDataTimeoutReq Sr__OperDataTimeoutReq;
-+typedef struct _Sr__InternalStateDataReq Sr__InternalStateDataReq;
-+typedef struct _Sr__NotifStoreCleanupReq Sr__NotifStoreCleanupReq;
-+typedef struct _Sr__DelayedMsgReq Sr__DelayedMsgReq;
-+typedef struct _Sr__NacmReloadReq Sr__NacmReloadReq;
-+typedef struct _Sr__Request Sr__Request;
-+typedef struct _Sr__Response Sr__Response;
-+typedef struct _Sr__Notification Sr__Notification;
-+typedef struct _Sr__NotificationAck Sr__NotificationAck;
-+typedef struct _Sr__InternalRequest Sr__InternalRequest;
-+typedef struct _Sr__Msg Sr__Msg;
-+
-+
-+/* --- enums --- */
-+
-+typedef enum _Sr__Value__Types {
-+ SR__VALUE__TYPES__LIST = 1,
-+ SR__VALUE__TYPES__CONTAINER = 2,
-+ SR__VALUE__TYPES__CONTAINER_PRESENCE = 3,
-+ SR__VALUE__TYPES__LEAF_EMPTY = 4,
-+ SR__VALUE__TYPES__BINARY = 10,
-+ SR__VALUE__TYPES__BITS = 11,
-+ SR__VALUE__TYPES__BOOL = 12,
-+ SR__VALUE__TYPES__DECIMAL64 = 13,
-+ SR__VALUE__TYPES__ENUM = 14,
-+ SR__VALUE__TYPES__IDENTITYREF = 15,
-+ SR__VALUE__TYPES__INSTANCEID = 16,
-+ SR__VALUE__TYPES__INT8 = 17,
-+ SR__VALUE__TYPES__INT16 = 18,
-+ SR__VALUE__TYPES__INT32 = 19,
-+ SR__VALUE__TYPES__INT64 = 20,
-+ SR__VALUE__TYPES__STRING = 21,
-+ SR__VALUE__TYPES__UINT8 = 22,
-+ SR__VALUE__TYPES__UINT16 = 23,
-+ SR__VALUE__TYPES__UINT32 = 24,
-+ SR__VALUE__TYPES__UINT64 = 25,
-+ SR__VALUE__TYPES__ANYXML = 26,
-+ SR__VALUE__TYPES__ANYDATA = 27
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__VALUE__TYPES)
-+} Sr__Value__Types;
-+typedef enum _Sr__MoveItemReq__MovePosition {
-+ SR__MOVE_ITEM_REQ__MOVE_POSITION__BEFORE = 1,
-+ SR__MOVE_ITEM_REQ__MOVE_POSITION__AFTER = 2,
-+ SR__MOVE_ITEM_REQ__MOVE_POSITION__FIRST = 3,
-+ SR__MOVE_ITEM_REQ__MOVE_POSITION__LAST = 4
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MOVE_ITEM_REQ__MOVE_POSITION)
-+} Sr__MoveItemReq__MovePosition;
-+/*
-+ **
-+ * @brief Type of the event notification.
-+ */
-+typedef enum _Sr__EventNotifReq__NotifType {
-+ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REALTIME = 1,
-+ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY = 2,
-+ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_COMPLETE = 3,
-+ SR__EVENT_NOTIF_REQ__NOTIF_TYPE__REPLAY_STOP = 4
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EVENT_NOTIF_REQ__NOTIF_TYPE)
-+} Sr__EventNotifReq__NotifType;
-+/*
-+ **
-+ * @brief Flags used to override default session handling.
-+ */
-+typedef enum _Sr__EventNotifReq__NotifFlags {
-+ /*
-+ **< Notification will be handled normally.
-+ */
-+ SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__DEFAULT = 0,
-+ /*
-+ **< Notification will not be stored in the notification store.
-+ */
-+ SR__EVENT_NOTIF_REQ__NOTIF_FLAGS__EPHEMERAL = 1
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EVENT_NOTIF_REQ__NOTIF_FLAGS)
-+} Sr__EventNotifReq__NotifFlags;
-+/*
-+ **
-+ * @brief Type of the message.
-+ */
-+typedef enum _Sr__Msg__MsgType {
-+ /*
-+ **< The message is a request.
-+ */
-+ SR__MSG__MSG_TYPE__REQUEST = 1,
-+ /*
-+ **< The message is a response to the request.
-+ */
-+ SR__MSG__MSG_TYPE__RESPONSE = 2,
-+ /*
-+ **< The message is a notification.
-+ */
-+ SR__MSG__MSG_TYPE__NOTIFICATION = 3,
-+ /*
-+ **< The message is a notification acknowledgment.
-+ */
-+ SR__MSG__MSG_TYPE__NOTIFICATION_ACK = 4,
-+ /*
-+ **< The message is an internal request, should not be used from the public API.
-+ */
-+ SR__MSG__MSG_TYPE__INTERNAL_REQUEST = 5
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MSG__MSG_TYPE)
-+} Sr__Msg__MsgType;
-+/*
-+ **
-+ * @brief Variant of the API. Currently only values (sr_val_t) vs. trees (sr_node_t).
-+ */
-+typedef enum _Sr__ApiVariant {
-+ SR__API_VARIANT__VALUES = 1,
-+ SR__API_VARIANT__TREES = 2
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__API_VARIANT)
-+} Sr__ApiVariant;
-+/*
-+ **
-+ * @brief Datastore on which the configuration session will operate.
-+ */
-+typedef enum _Sr__DataStore {
-+ SR__DATA_STORE__STARTUP = 1,
-+ SR__DATA_STORE__RUNNING = 2,
-+ SR__DATA_STORE__CANDIDATE = 3
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__DATA_STORE)
-+} Sr__DataStore;
-+/*
-+ **
-+ * @brief Flags used to override default session handling.
-+ */
-+typedef enum _Sr__SessionFlags {
-+ /*
-+ **< Default (normal) session behavior.
-+ */
-+ SR__SESSION_FLAGS__SESS_DEFAULT = 0,
-+ /*
-+ **< Session will process only configuration data (e.g. sysrepo won't
-+ *return any state data by ::sr_get_items / ::sr_get_items_iter calls).
-+ */
-+ SR__SESSION_FLAGS__SESS_CONFIG_ONLY = 1,
-+ /*
-+ **< Enable NETCONF access control for this session.
-+ */
-+ SR__SESSION_FLAGS__SESS_ENABLE_NACM = 2,
-+ /*
-+ **< Notification session (internal type of session).
-+ */
-+ SR__SESSION_FLAGS__SESS_NOTIFICATION = 1024
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__SESSION_FLAGS)
-+} Sr__SessionFlags;
-+/*
-+ **
-+ * @brief Flags used to override default behavior of data manipulation calls.
-+ */
-+typedef enum _Sr__EditFlags {
-+ /*
-+ **< Default behavior - recursive and non-strict.
-+ */
-+ SR__EDIT_FLAGS__EDIT_DEFAULT = 0,
-+ /*
-+ **< Non-recursive behavior:
-+ *by ::SetItemReq, all preceding nodes (parents) of the identified element must exist,
-+ *by ::DeleteItemReq xpath must not identify an non-empty list or non-empty container.
-+ */
-+ SR__EDIT_FLAGS__EDIT_NON_RECURSIVE = 1,
-+ /*
-+ **< Strict behavior:
-+ *by ::SetItemReq the identified element must not exist (similar to netconf create operation),
-+ *by ::DeleteItemReq the identified element must exist (similar to netconf delete operation).
-+ */
-+ SR__EDIT_FLAGS__EDIT_STRICT = 2
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__EDIT_FLAGS)
-+} Sr__EditFlags;
-+typedef enum _Sr__SubscriptionType {
-+ SR__SUBSCRIPTION_TYPE__MODULE_INSTALL_SUBS = 1,
-+ SR__SUBSCRIPTION_TYPE__FEATURE_ENABLE_SUBS = 2,
-+ SR__SUBSCRIPTION_TYPE__MODULE_CHANGE_SUBS = 10,
-+ SR__SUBSCRIPTION_TYPE__SUBTREE_CHANGE_SUBS = 11,
-+ SR__SUBSCRIPTION_TYPE__DP_GET_ITEMS_SUBS = 20,
-+ SR__SUBSCRIPTION_TYPE__RPC_SUBS = 30,
-+ SR__SUBSCRIPTION_TYPE__ACTION_SUBS = 31,
-+ SR__SUBSCRIPTION_TYPE__EVENT_NOTIF_SUBS = 40,
-+ /*
-+ **< Used only internally to test for inactive notification subscriptions.
-+ */
-+ SR__SUBSCRIPTION_TYPE__HELLO_SUBS = 50,
-+ /*
-+ **< Used only internally to notify about the end of the commit process.
-+ */
-+ SR__SUBSCRIPTION_TYPE__COMMIT_END_SUBS = 51
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__SUBSCRIPTION_TYPE)
-+} Sr__SubscriptionType;
-+typedef enum _Sr__NotificationEvent {
-+ SR__NOTIFICATION_EVENT__VERIFY_EV = 1,
-+ SR__NOTIFICATION_EVENT__APPLY_EV = 2,
-+ SR__NOTIFICATION_EVENT__ABORT_EV = 3,
-+ SR__NOTIFICATION_EVENT__ENABLED_EV = 4
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__NOTIFICATION_EVENT)
-+} Sr__NotificationEvent;
-+typedef enum _Sr__ModuleState {
-+ SR__MODULE_STATE__UNINSTALLED = 1,
-+ SR__MODULE_STATE__IMPORTED = 2,
-+ SR__MODULE_STATE__IMPLEMENTED = 3
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__MODULE_STATE)
-+} Sr__ModuleState;
-+typedef enum _Sr__ChangeOperation {
-+ SR__CHANGE_OPERATION__CREATED = 1,
-+ SR__CHANGE_OPERATION__MODIFIED = 2,
-+ SR__CHANGE_OPERATION__DELETED = 3,
-+ SR__CHANGE_OPERATION__MOVED = 4
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__CHANGE_OPERATION)
-+} Sr__ChangeOperation;
-+/*
-+ **
-+ * @brief Requested operation.
-+ */
-+typedef enum _Sr__Operation {
-+ SR__OPERATION__SESSION_START = 10,
-+ SR__OPERATION__SESSION_STOP = 11,
-+ SR__OPERATION__SESSION_REFRESH = 12,
-+ SR__OPERATION__SESSION_CHECK = 13,
-+ SR__OPERATION__SESSION_SWITCH_DS = 14,
-+ SR__OPERATION__SESSION_SET_OPTS = 15,
-+ SR__OPERATION__VERSION_VERIFY = 16,
-+ SR__OPERATION__LIST_SCHEMAS = 20,
-+ SR__OPERATION__GET_SCHEMA = 21,
-+ SR__OPERATION__MODULE_INSTALL = 22,
-+ SR__OPERATION__FEATURE_ENABLE = 23,
-+ SR__OPERATION__GET_ITEM = 30,
-+ SR__OPERATION__GET_ITEMS = 31,
-+ SR__OPERATION__GET_SUBTREE = 32,
-+ SR__OPERATION__GET_SUBTREES = 33,
-+ SR__OPERATION__GET_SUBTREE_CHUNK = 34,
-+ SR__OPERATION__SET_ITEM = 40,
-+ SR__OPERATION__DELETE_ITEM = 41,
-+ SR__OPERATION__MOVE_ITEM = 42,
-+ SR__OPERATION__SET_ITEM_STR = 43,
-+ SR__OPERATION__VALIDATE = 50,
-+ SR__OPERATION__COMMIT = 51,
-+ SR__OPERATION__DISCARD_CHANGES = 52,
-+ SR__OPERATION__COPY_CONFIG = 53,
-+ SR__OPERATION__LOCK = 60,
-+ SR__OPERATION__UNLOCK = 61,
-+ SR__OPERATION__SUBSCRIBE = 70,
-+ SR__OPERATION__UNSUBSCRIBE = 71,
-+ SR__OPERATION__CHECK_ENABLED_RUNNING = 72,
-+ SR__OPERATION__GET_CHANGES = 73,
-+ SR__OPERATION__DATA_PROVIDE = 80,
-+ SR__OPERATION__CHECK_EXEC_PERMISSION = 81,
-+ SR__OPERATION__RPC = 82,
-+ SR__OPERATION__ACTION = 83,
-+ SR__OPERATION__EVENT_NOTIF = 84,
-+ SR__OPERATION__EVENT_NOTIF_REPLAY = 85,
-+ SR__OPERATION__UNSUBSCRIBE_DESTINATION = 101,
-+ SR__OPERATION__COMMIT_TIMEOUT = 102,
-+ SR__OPERATION__OPER_DATA_TIMEOUT = 103,
-+ SR__OPERATION__INTERNAL_STATE_DATA = 104,
-+ SR__OPERATION__NOTIF_STORE_CLEANUP = 105,
-+ SR__OPERATION__DELAYED_MSG = 106,
-+ SR__OPERATION__NACM_RELOAD = 107
-+ PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(SR__OPERATION)
-+} Sr__Operation;
-+
-+/* --- messages --- */
-+
-+/*
-+ **
-+ * @brief Value of an item stored (or to be stored) in the datastore.
-+ * Can be mapped to sr_val_t data structure from sysrepo library API.
-+ */
-+struct _Sr__Value
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ Sr__Value__Types type;
-+ protobuf_c_boolean dflt;
-+ char *binary_val;
-+ char *bits_val;
-+ protobuf_c_boolean has_bool_val;
-+ protobuf_c_boolean bool_val;
-+ protobuf_c_boolean has_decimal64_val;
-+ double decimal64_val;
-+ char *enum_val;
-+ char *identityref_val;
-+ char *instanceid_val;
-+ protobuf_c_boolean has_int8_val;
-+ int32_t int8_val;
-+ protobuf_c_boolean has_int16_val;
-+ int32_t int16_val;
-+ protobuf_c_boolean has_int32_val;
-+ int32_t int32_val;
-+ protobuf_c_boolean has_int64_val;
-+ int64_t int64_val;
-+ char *string_val;
-+ protobuf_c_boolean has_uint8_val;
-+ uint32_t uint8_val;
-+ protobuf_c_boolean has_uint16_val;
-+ uint32_t uint16_val;
-+ protobuf_c_boolean has_uint32_val;
-+ uint32_t uint32_val;
-+ protobuf_c_boolean has_uint64_val;
-+ uint64_t uint64_val;
-+ char *anyxml_val;
-+ char *anydata_val;
-+};
-+#define SR__VALUE__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__value__descriptor) \
-+ , NULL, 0, 0, NULL, NULL, 0,0, 0,0, NULL, NULL, NULL, 0,0, 0,0, 0,0, 0,0, NULL, 0,0, 0,0, 0,0, 0,0, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Item stored (or to be stored) in the datastore represented as a tree node
-+ * reflecting module schema. Can be mapped to sr_node_t data structure from sysrepo library API.
-+ */
-+struct _Sr__Node
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Value of the node; member *xpath* is used to store node's name.
-+ */
-+ Sr__Value *value;
-+ /*
-+ **< Name of the module that defines scheme of this node.
-+ */
-+ char *module_name;
-+ /*
-+ **< Direct descendands of this node.
-+ */
-+ size_t n_children;
-+ Sr__Node **children;
-+};
-+#define SR__NODE__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__node__descriptor) \
-+ , NULL, NULL, 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Error message retuned from the Sysrepo Engine.
-+ */
-+struct _Sr__Error
-+{
-+ ProtobufCMessage base;
-+ char *message;
-+ char *xpath;
-+};
-+#define SR__ERROR__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__error__descriptor) \
-+ , NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Request for starting a session. Sent by sr_session_start API call.
-+ */
-+struct _Sr__SessionStartReq
-+{
-+ ProtobufCMessage base;
-+ Sr__DataStore datastore;
-+ char *user_name;
-+ /*
-+ **< Bitwise OR of SessionFlags.
-+ */
-+ uint32_t options;
-+ /*
-+ **< Applicable if SESS_NOTIFICATION was specified.
-+ */
-+ protobuf_c_boolean has_commit_id;
-+ uint32_t commit_id;
-+};
-+#define SR__SESSION_START_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_start_req__descriptor) \
-+ , 0, NULL, 0, 0,0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to session_start request.
-+ */
-+struct _Sr__SessionStartResp
-+{
-+ ProtobufCMessage base;
-+ uint32_t session_id;
-+};
-+#define SR__SESSION_START_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_start_resp__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Request for stopping the session. Sent by sr_session_stop API call.
-+ */
-+struct _Sr__SessionStopReq
-+{
-+ ProtobufCMessage base;
-+ uint32_t session_id;
-+};
-+#define SR__SESSION_STOP_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_stop_req__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to session_stop request.
-+ */
-+struct _Sr__SessionStopResp
-+{
-+ ProtobufCMessage base;
-+ uint32_t session_id;
-+};
-+#define SR__SESSION_STOP_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_stop_resp__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Refreshes configuration data cached within the session.
-+ * Sent by sr_session_refresh API call.
-+ */
-+struct _Sr__SessionRefreshReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SESSION_REFRESH_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_refresh_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_session_refresh request.
-+ */
-+struct _Sr__SessionRefreshResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_errors;
-+ Sr__Error **errors;
-+};
-+#define SR__SESSION_REFRESH_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_refresh_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Checks aliveness and validity of the session & connection tied to it.
-+ * Sent by sr_session_check API call.
-+ */
-+struct _Sr__SessionCheckReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SESSION_CHECK_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_check_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_session_check request.
-+ */
-+struct _Sr__SessionCheckResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_errors;
-+ Sr__Error **errors;
-+};
-+#define SR__SESSION_CHECK_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_check_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Changes the datastore to which the session is tied to.
-+ */
-+struct _Sr__SessionSwitchDsReq
-+{
-+ ProtobufCMessage base;
-+ Sr__DataStore datastore;
-+};
-+#define SR__SESSION_SWITCH_DS_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_switch_ds_req__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_session_switch_ds request.
-+ */
-+struct _Sr__SessionSwitchDsResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SESSION_SWITCH_DS_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_switch_ds_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Request for modification of session options.
-+ */
-+struct _Sr__SessionSetOptsReq
-+{
-+ ProtobufCMessage base;
-+ uint32_t options;
-+};
-+#define SR__SESSION_SET_OPTS_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_set_opts_req__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_session_set_options.
-+ */
-+struct _Sr__SessionSetOptsResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SESSION_SET_OPTS_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__session_set_opts_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Request to verify version compatibility.
-+ */
-+struct _Sr__VersionVerifyReq
-+{
-+ ProtobufCMessage base;
-+ char *soname;
-+};
-+#define SR__VERSION_VERIFY_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__version_verify_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to version verification.
-+ */
-+struct _Sr__VersionVerifyResp
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< server-side SONAME version in case of versions incompatibility.
-+ */
-+ char *soname;
-+};
-+#define SR__VERSION_VERIFY_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__version_verify_resp__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Schema revision details.
-+ */
-+struct _Sr__SchemaRevision
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Latest revision date of the module.
-+ */
-+ char *revision;
-+ /*
-+ **< Absolute path to file where the schema is stored (YANG format).
-+ */
-+ char *file_path_yang;
-+ /*
-+ **< Absolute path to file where the schema is stored (.yin format).
-+ */
-+ char *file_path_yin;
-+};
-+#define SR__SCHEMA_REVISION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__schema_revision__descriptor) \
-+ , NULL, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Schema submodule information.
-+ */
-+struct _Sr__SchemaSubmodule
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Submodule name
-+ */
-+ char *submodule_name;
-+ /*
-+ **< Revision of the submodule
-+ */
-+ Sr__SchemaRevision *revision;
-+};
-+#define SR__SCHEMA_SUBMODULE__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__schema_submodule__descriptor) \
-+ , NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Information about a schema installed in sysrepo datastore.
-+ */
-+struct _Sr__Schema
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Name of the module.
-+ */
-+ char *module_name;
-+ /*
-+ **< Namespace of the module.
-+ */
-+ char *ns;
-+ /*
-+ **< Prefix of he module.
-+ */
-+ char *prefix;
-+ /*
-+ **< TRUE only for explicitly installed modules (those are always implemented).
-+ */
-+ protobuf_c_boolean installed;
-+ /*
-+ **< TRUE for implemented modules (do not have to be installed if they have augments,
-+ *deviations or are targets for leafrefs of other implemented modules).
-+ */
-+ protobuf_c_boolean implemented;
-+ /*
-+ **< Revision of the module
-+ */
-+ Sr__SchemaRevision *revision;
-+ /*
-+ **< Submodules
-+ */
-+ size_t n_submodules;
-+ Sr__SchemaSubmodule **submodules;
-+ /*
-+ **< Features enabled for the module
-+ */
-+ size_t n_enabled_features;
-+ char **enabled_features;
-+};
-+#define SR__SCHEMA__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__schema__descriptor) \
-+ , NULL, NULL, NULL, 0, 0, NULL, 0,NULL, 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves an array of schemas installed in the sysrepo datastore.
-+ * Sent by sr_list_schemas API call.
-+ */
-+struct _Sr__ListSchemasReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__LIST_SCHEMAS_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__list_schemas_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_list_schemas request.
-+ */
-+struct _Sr__ListSchemasResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_schemas;
-+ Sr__Schema **schemas;
-+};
-+#define SR__LIST_SCHEMAS_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__list_schemas_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves the content of specified schema file.
-+ * Sent by sr_get_schema API call.
-+ */
-+struct _Sr__GetSchemaReq
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+ char *revision;
-+ char *submodule_name;
-+ char *submodule_revision;
-+ protobuf_c_boolean yang_format;
-+};
-+#define SR__GET_SCHEMA_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_schema_req__descriptor) \
-+ , NULL, NULL, NULL, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_get_schema request.
-+ */
-+struct _Sr__GetSchemaResp
-+{
-+ ProtobufCMessage base;
-+ char *schema_content;
-+};
-+#define SR__GET_SCHEMA_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_schema_resp__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves a single data element stored under provided path.
-+ * Sent by sr_get_item API call.
-+ */
-+struct _Sr__GetItemReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+};
-+#define SR__GET_ITEM_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_item_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to get_item request.
-+ */
-+struct _Sr__GetItemResp
-+{
-+ ProtobufCMessage base;
-+ Sr__Value *value;
-+};
-+#define SR__GET_ITEM_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_item_resp__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves an array of data elements stored under provided path.
-+ * Sent by sr_get_items and sr_get_items_iter API calls.
-+ */
-+struct _Sr__GetItemsReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ /*
-+ * The options below are applicable only for sr_get_items_iter
-+ * (not set by sr_get_items).
-+ */
-+ protobuf_c_boolean has_limit;
-+ uint32_t limit;
-+ protobuf_c_boolean has_offset;
-+ uint32_t offset;
-+};
-+#define SR__GET_ITEMS_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_items_req__descriptor) \
-+ , NULL, 0,0, 0,0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to get_items / sr_get_items_iter request.
-+ */
-+struct _Sr__GetItemsResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_values;
-+ Sr__Value **values;
-+};
-+#define SR__GET_ITEMS_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_items_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves a single subtree whose root is stored under provided path.
-+ * Sent by sr_get_subtree API call.
-+ */
-+struct _Sr__GetSubtreeReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+};
-+#define SR__GET_SUBTREE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_get_subtree request.
-+ */
-+struct _Sr__GetSubtreeResp
-+{
-+ ProtobufCMessage base;
-+ Sr__Node *tree;
-+};
-+#define SR__GET_SUBTREE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_resp__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves an array of subtrees whose root nodes match provided path.
-+ * Sent by sr_get_subtrees API call.
-+ */
-+struct _Sr__GetSubtreesReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+};
-+#define SR__GET_SUBTREES_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtrees_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_get_subtrees request.
-+ */
-+struct _Sr__GetSubtreesResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_trees;
-+ Sr__Node **trees;
-+};
-+#define SR__GET_SUBTREES_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtrees_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves a chunk of a single or multiple subtrees.
-+ * A subtree chunk is also a tree, where the root node is the node referenced by XPath,
-+ * the next level consists of its children skipping the first "slice_offset" nodes and including
-+ * at most "slice_limit" nodes, while the remaining (depth_limit-2) levels always start with
-+ * the first child (slice_offset is ignored) and include at most "child_limit" nodes.
-+ * The chunk consists of at most "depth_limit" levels.
-+ * @note Order of child nodes depends on the libyang implementation.
-+ */
-+struct _Sr__GetSubtreeChunkReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ protobuf_c_boolean single;
-+ uint32_t slice_offset;
-+ uint32_t slice_width;
-+ uint32_t child_limit;
-+ uint32_t depth_limit;
-+};
-+#define SR__GET_SUBTREE_CHUNK_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_chunk_req__descriptor) \
-+ , NULL, 0, 0, 0, 0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_get_subtree_chunk request.
-+ */
-+struct _Sr__GetSubtreeChunkResp
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< JSON node-id of the root node for each subtree chunk
-+ */
-+ size_t n_xpath;
-+ char **xpath;
-+ /*
-+ **< first chunk may carry mutliple trees
-+ */
-+ size_t n_chunk;
-+ Sr__Node **chunk;
-+};
-+#define SR__GET_SUBTREE_CHUNK_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_subtree_chunk_resp__descriptor) \
-+ , 0,NULL, 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Sets the value of the leaf, leaf-list or presence container.
-+ * Sent by sr_set_item API call.
-+ */
-+struct _Sr__SetItemReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ Sr__Value *value;
-+ /*
-+ **< Bitwise OR of EditFlags
-+ */
-+ uint32_t options;
-+};
-+#define SR__SET_ITEM_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_req__descriptor) \
-+ , NULL, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_set_item request.
-+ */
-+struct _Sr__SetItemResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SET_ITEM_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Sets the value of the leaf, leaf-list or presence container.
-+ * The value is transferred as string.
-+ * Sent by sr_set_item_str API call.
-+ */
-+struct _Sr__SetItemStrReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ char *value;
-+ /*
-+ **< Bitwise OR of EditFlags
-+ */
-+ uint32_t options;
-+};
-+#define SR__SET_ITEM_STR_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_str_req__descriptor) \
-+ , NULL, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_set_item_str request.
-+ */
-+struct _Sr__SetItemStrResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SET_ITEM_STR_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__set_item_str_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Deletes the nodes under the specified xpath.
-+ * Sent by sr_delete_item API call.
-+ */
-+struct _Sr__DeleteItemReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ /*
-+ **< Bitwise OR of EditFlags
-+ */
-+ uint32_t options;
-+};
-+#define SR__DELETE_ITEM_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__delete_item_req__descriptor) \
-+ , NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_delete_item request.
-+ */
-+struct _Sr__DeleteItemResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__DELETE_ITEM_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__delete_item_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Move the instance of an ordered list in specified direction.
-+ * Sent by sr_move_item API call.
-+ */
-+struct _Sr__MoveItemReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ Sr__MoveItemReq__MovePosition position;
-+ char *relative_item;
-+};
-+#define SR__MOVE_ITEM_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__move_item_req__descriptor) \
-+ , NULL, 0, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_move_item request.
-+ */
-+struct _Sr__MoveItemResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__MOVE_ITEM_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__move_item_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Perform the validation of changes made in current session, but do not
-+ * commit nor discard them. Sent by sr_validate API call.
-+ */
-+struct _Sr__ValidateReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__VALIDATE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__validate_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_validate request.
-+ */
-+struct _Sr__ValidateResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_errors;
-+ Sr__Error **errors;
-+};
-+#define SR__VALIDATE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__validate_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Apply changes made in current session.
-+ * Sent by sr_commit API call.
-+ */
-+struct _Sr__CommitReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__COMMIT_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_commit request.
-+ */
-+struct _Sr__CommitResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_errors;
-+ Sr__Error **errors;
-+};
-+#define SR__COMMIT_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Discard non-committed changes made in current session.
-+ * Sent by sr_discard_changes API call.
-+ */
-+struct _Sr__DiscardChangesReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__DISCARD_CHANGES_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__discard_changes_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_discard_changes request.
-+ */
-+struct _Sr__DiscardChangesResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__DISCARD_CHANGES_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__discard_changes_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Replaces an entire configuration datastore with the contents of
-+ * another complete configuration datastore. Sent by sr_copy_config request.
-+ */
-+struct _Sr__CopyConfigReq
-+{
-+ ProtobufCMessage base;
-+ Sr__DataStore src_datastore;
-+ Sr__DataStore dst_datastore;
-+ /*
-+ **< If not specified, the operation is performed on all
-+ *modules that are currently active in the source datastore
-+ */
-+ char *module_name;
-+};
-+#define SR__COPY_CONFIG_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__copy_config_req__descriptor) \
-+ , 0, 0, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_copy_config request.
-+ */
-+struct _Sr__CopyConfigResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_errors;
-+ Sr__Error **errors;
-+};
-+#define SR__COPY_CONFIG_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__copy_config_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Locks specified data model or the datastore which the session is tied to.
-+ * Sent by sr_lock_datastore and sr_lock_model API calls.
-+ */
-+struct _Sr__LockReq
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< If module name is not set, LockReq locks whole datastore.
-+ */
-+ char *module_name;
-+};
-+#define SR__LOCK_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__lock_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_lock_datastore or sr_lock_model request.
-+ */
-+struct _Sr__LockResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__LOCK_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__lock_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Unlocks specified data model or the datastore which the session is tied to.
-+ * Sent by sr_unlock_datastore and sr_unlock_model API calls.
-+ */
-+struct _Sr__UnlockReq
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< If module name is not set, UnlockReq unlocks whole datastore.
-+ */
-+ char *module_name;
-+};
-+#define SR__UNLOCK_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__unlock_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_lock_datastore or sr_lock_model request.
-+ */
-+struct _Sr__UnlockResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__UNLOCK_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__unlock_resp__descriptor) \
-+ }
-+
-+
-+struct _Sr__SubscribeReq
-+{
-+ ProtobufCMessage base;
-+ Sr__SubscriptionType type;
-+ char *destination;
-+ uint32_t subscription_id;
-+ char *module_name;
-+ char *xpath;
-+ protobuf_c_boolean has_notif_event;
-+ Sr__NotificationEvent notif_event;
-+ protobuf_c_boolean has_priority;
-+ uint32_t priority;
-+ protobuf_c_boolean has_enable_running;
-+ protobuf_c_boolean enable_running;
-+ protobuf_c_boolean has_enable_event;
-+ protobuf_c_boolean enable_event;
-+ Sr__ApiVariant api_variant;
-+};
-+#define SR__SUBSCRIBE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__subscribe_req__descriptor) \
-+ , 0, NULL, 0, NULL, NULL, 0,0, 0,0, 0,0, 0,0, 0 }
-+
-+
-+struct _Sr__SubscribeResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__SUBSCRIBE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__subscribe_resp__descriptor) \
-+ }
-+
-+
-+struct _Sr__UnsubscribeReq
-+{
-+ ProtobufCMessage base;
-+ Sr__SubscriptionType type;
-+ char *destination;
-+ uint32_t subscription_id;
-+ char *module_name;
-+};
-+#define SR__UNSUBSCRIBE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_req__descriptor) \
-+ , 0, NULL, 0, NULL }
-+
-+
-+struct _Sr__UnsubscribeResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__UNSUBSCRIBE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Checks whether the module has any enabled subtree.
-+ * Sent by sr_check_enabled_running.
-+ */
-+struct _Sr__CheckEnabledRunningReq
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+};
-+#define SR__CHECK_ENABLED_RUNNING_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__check_enabled_running_req__descriptor) \
-+ , NULL }
-+
-+
-+struct _Sr__CheckEnabledRunningResp
-+{
-+ ProtobufCMessage base;
-+ protobuf_c_boolean enabled;
-+};
-+#define SR__CHECK_ENABLED_RUNNING_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__check_enabled_running_resp__descriptor) \
-+ , 0 }
-+
-+
-+struct _Sr__ModuleInstallNotification
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+ char *revision;
-+ Sr__ModuleState state;
-+};
-+#define SR__MODULE_INSTALL_NOTIFICATION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_notification__descriptor) \
-+ , NULL, NULL, 0 }
-+
-+
-+struct _Sr__FeatureEnableNotification
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+ char *feature_name;
-+ protobuf_c_boolean enabled;
-+};
-+#define SR__FEATURE_ENABLE_NOTIFICATION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_notification__descriptor) \
-+ , NULL, NULL, 0 }
-+
-+
-+struct _Sr__ModuleChangeNotification
-+{
-+ ProtobufCMessage base;
-+ Sr__NotificationEvent event;
-+ char *module_name;
-+};
-+#define SR__MODULE_CHANGE_NOTIFICATION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__module_change_notification__descriptor) \
-+ , 0, NULL }
-+
-+
-+struct _Sr__SubtreeChangeNotification
-+{
-+ ProtobufCMessage base;
-+ Sr__NotificationEvent event;
-+ char *xpath;
-+};
-+#define SR__SUBTREE_CHANGE_NOTIFICATION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__subtree_change_notification__descriptor) \
-+ , 0, NULL }
-+
-+
-+struct _Sr__Change
-+{
-+ ProtobufCMessage base;
-+ Sr__ChangeOperation changeoperation;
-+ Sr__Value *new_value;
-+ Sr__Value *old_value;
-+};
-+#define SR__CHANGE__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__change__descriptor) \
-+ , 0, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Retrieves an array of changes made under provided path.
-+ * Sent by sr_get_changes_iter or sr_get_change_next API calls.
-+ */
-+struct _Sr__GetChangesReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ uint32_t limit;
-+ uint32_t offset;
-+};
-+#define SR__GET_CHANGES_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_changes_req__descriptor) \
-+ , NULL, 0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to get_changes request.
-+ */
-+struct _Sr__GetChangesResp
-+{
-+ ProtobufCMessage base;
-+ size_t n_changes;
-+ Sr__Change **changes;
-+};
-+#define SR__GET_CHANGES_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__get_changes_resp__descriptor) \
-+ , 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Sends a request to check if the owner of this session is authorized to invoke
-+ * the protocol operation referenced by the xpath.
-+ * Sent by sr_check_exec_permission.
-+ */
-+struct _Sr__CheckExecPermReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+};
-+#define SR__CHECK_EXEC_PERM_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__check_exec_perm_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_check_exec_permission request.
-+ */
-+struct _Sr__CheckExecPermResp
-+{
-+ ProtobufCMessage base;
-+ protobuf_c_boolean permitted;
-+};
-+#define SR__CHECK_EXEC_PERM_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__check_exec_perm_resp__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Sends a RPC / action request into the datastore, will be delivered to the RPC subscriber.
-+ * Sent by sr_rpc_send / sr_rpc_send_tree and sr_action_send / sr_action_send_tree API calls.
-+ */
-+struct _Sr__RPCReq
-+{
-+ ProtobufCMessage base;
-+ protobuf_c_boolean action;
-+ char *xpath;
-+ /*
-+ **< which API variant was used to send RPC req.
-+ */
-+ Sr__ApiVariant orig_api_variant;
-+ size_t n_input;
-+ Sr__Value **input;
-+ size_t n_input_tree;
-+ Sr__Node **input_tree;
-+ char *subscriber_address;
-+ protobuf_c_boolean has_subscription_id;
-+ uint32_t subscription_id;
-+};
-+#define SR__RPCREQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__rpcreq__descriptor) \
-+ , 0, NULL, 0, 0,NULL, 0,NULL, NULL, 0,0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_rpc_send / sr_rpc_send_tree or sr_action_send / sr_action_send_tree request.
-+ */
-+struct _Sr__RPCResp
-+{
-+ ProtobufCMessage base;
-+ protobuf_c_boolean action;
-+ char *xpath;
-+ /*
-+ **< which API variant was used to send RPC req.
-+ */
-+ Sr__ApiVariant orig_api_variant;
-+ size_t n_output;
-+ Sr__Value **output;
-+ size_t n_output_tree;
-+ Sr__Node **output_tree;
-+};
-+#define SR__RPCRESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__rpcresp__descriptor) \
-+ , 0, NULL, 0, 0,NULL, 0,NULL }
-+
-+
-+/*
-+ **
-+ * @brief Sends an event notification into the datastore, will be delivered to all notification subscribers.
-+ * Sent by sr_event_notif_send API call.
-+ */
-+struct _Sr__EventNotifReq
-+{
-+ ProtobufCMessage base;
-+ Sr__EventNotifReq__NotifType type;
-+ /*
-+ **< Bitwise OR of NotifFlags.
-+ */
-+ uint32_t options;
-+ char *xpath;
-+ size_t n_values;
-+ Sr__Value **values;
-+ size_t n_trees;
-+ Sr__Node **trees;
-+ uint64_t timestamp;
-+ char *subscriber_address;
-+ protobuf_c_boolean has_subscription_id;
-+ uint32_t subscription_id;
-+ protobuf_c_boolean do_not_send_reply;
-+};
-+#define SR__EVENT_NOTIF_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_req__descriptor) \
-+ , 0, 0, NULL, 0,NULL, 0,NULL, 0, NULL, 0,0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_event_notif_send request.
-+ */
-+struct _Sr__EventNotifResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__EVENT_NOTIF_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Sends a request to replay event notifications stored in the datastore.
-+ * Sent by sr_event_notif_replay API call.
-+ */
-+struct _Sr__EventNotifReplayReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ uint64_t start_time;
-+ uint64_t stop_time;
-+ char *subscriber_address;
-+ uint32_t subscription_id;
-+ Sr__ApiVariant api_variant;
-+};
-+#define SR__EVENT_NOTIF_REPLAY_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_replay_req__descriptor) \
-+ , NULL, 0, 0, NULL, 0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_event_notif_replay request.
-+ */
-+struct _Sr__EventNotifReplayResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__EVENT_NOTIF_REPLAY_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__event_notif_replay_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Requests operational data under given path form an operational data
-+ * provider.
-+ */
-+struct _Sr__DataProvideReq
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ char *subscriber_address;
-+ uint32_t subscription_id;
-+ uint64_t request_id;
-+};
-+#define SR__DATA_PROVIDE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__data_provide_req__descriptor) \
-+ , NULL, NULL, 0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to a request of operational data under given path form an
-+ * operational data provider.
-+ */
-+struct _Sr__DataProvideResp
-+{
-+ ProtobufCMessage base;
-+ char *xpath;
-+ size_t n_values;
-+ Sr__Value **values;
-+ uint64_t request_id;
-+};
-+#define SR__DATA_PROVIDE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__data_provide_resp__descriptor) \
-+ , NULL, 0,NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Requests installation / uinstallation of specified YANG model.
-+ * Sent by sr_module_install internal API calls.
-+ */
-+struct _Sr__ModuleInstallReq
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+ char *revision;
-+ char *file_name;
-+ protobuf_c_boolean installed;
-+};
-+#define SR__MODULE_INSTALL_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_req__descriptor) \
-+ , NULL, NULL, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_module_install request.
-+ */
-+struct _Sr__ModuleInstallResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__MODULE_INSTALL_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__module_install_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Requests enabling / disabling of specified YANG feature within the
-+ * YANG model. Sent by sr_feature_enable internal API calls.
-+ */
-+struct _Sr__FeatureEnableReq
-+{
-+ ProtobufCMessage base;
-+ char *module_name;
-+ char *feature_name;
-+ protobuf_c_boolean enabled;
-+};
-+#define SR__FEATURE_ENABLE_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_req__descriptor) \
-+ , NULL, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Response to sr_feature_enable request.
-+ */
-+struct _Sr__FeatureEnableResp
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__FEATURE_ENABLE_RESP__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__feature_enable_resp__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Internal request to unsubscribe all subscriptions of a subscriber on given destination address.
-+ */
-+struct _Sr__UnsubscribeDestinationReq
-+{
-+ ProtobufCMessage base;
-+ char *destination;
-+};
-+#define SR__UNSUBSCRIBE_DESTINATION_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__unsubscribe_destination_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Internal request to timeout a commit, if it hasn't been terminated yet.
-+ */
-+struct _Sr__CommitTimeoutReq
-+{
-+ ProtobufCMessage base;
-+ uint32_t commit_id;
-+ protobuf_c_boolean expired;
-+};
-+#define SR__COMMIT_TIMEOUT_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__commit_timeout_req__descriptor) \
-+ , 0, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Internal request to timeout a request for operational data, if it hasn't been terminated yet.
-+ */
-+struct _Sr__OperDataTimeoutReq
-+{
-+ ProtobufCMessage base;
-+ uint64_t request_id;
-+};
-+#define SR__OPER_DATA_TIMEOUT_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__oper_data_timeout_req__descriptor) \
-+ , 0 }
-+
-+
-+/*
-+ **
-+ * @brief Internal request for internal state data (state data provided by Sysrepo Engine itself).
-+ */
-+struct _Sr__InternalStateDataReq
-+{
-+ ProtobufCMessage base;
-+ uint64_t request_id;
-+ char *xpath;
-+};
-+#define SR__INTERNAL_STATE_DATA_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__internal_state_data_req__descriptor) \
-+ , 0, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Internal request to cleanup aged notifications in the Notification Store.
-+ */
-+struct _Sr__NotifStoreCleanupReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__NOTIF_STORE_CLEANUP_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__notif_store_cleanup_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Message to be delivered to the client after some timeout.
-+ */
-+struct _Sr__DelayedMsgReq
-+{
-+ ProtobufCMessage base;
-+ Sr__Msg *message;
-+};
-+#define SR__DELAYED_MSG_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__delayed_msg_req__descriptor) \
-+ , NULL }
-+
-+
-+/*
-+ **
-+ * @brief Internal request to reload NACM configuration from the running datastore.
-+ */
-+struct _Sr__NacmReloadReq
-+{
-+ ProtobufCMessage base;
-+};
-+#define SR__NACM_RELOAD_REQ__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__nacm_reload_req__descriptor) \
-+ }
-+
-+
-+/*
-+ **
-+ * @brief Request for an operation.
-+ */
-+struct _Sr__Request
-+{
-+ ProtobufCMessage base;
-+ /*
-+ * Request ID used internally by sysrepo
-+ */
-+ uint64_t _id;
-+ Sr__Operation operation;
-+ Sr__SessionStartReq *session_start_req;
-+ Sr__SessionStopReq *session_stop_req;
-+ Sr__SessionRefreshReq *session_refresh_req;
-+ Sr__SessionCheckReq *session_check_req;
-+ Sr__SessionSwitchDsReq *session_switch_ds_req;
-+ Sr__SessionSetOptsReq *session_set_opts_req;
-+ Sr__VersionVerifyReq *version_verify_req;
-+ Sr__ListSchemasReq *list_schemas_req;
-+ Sr__GetSchemaReq *get_schema_req;
-+ Sr__ModuleInstallReq *module_install_req;
-+ Sr__FeatureEnableReq *feature_enable_req;
-+ Sr__GetItemReq *get_item_req;
-+ Sr__GetItemsReq *get_items_req;
-+ Sr__GetSubtreeReq *get_subtree_req;
-+ Sr__GetSubtreesReq *get_subtrees_req;
-+ Sr__GetSubtreeChunkReq *get_subtree_chunk_req;
-+ Sr__SetItemReq *set_item_req;
-+ Sr__DeleteItemReq *delete_item_req;
-+ Sr__MoveItemReq *move_item_req;
-+ Sr__SetItemStrReq *set_item_str_req;
-+ Sr__ValidateReq *validate_req;
-+ Sr__CommitReq *commit_req;
-+ Sr__DiscardChangesReq *discard_changes_req;
-+ Sr__CopyConfigReq *copy_config_req;
-+ Sr__LockReq *lock_req;
-+ Sr__UnlockReq *unlock_req;
-+ Sr__SubscribeReq *subscribe_req;
-+ Sr__UnsubscribeReq *unsubscribe_req;
-+ Sr__CheckEnabledRunningReq *check_enabled_running_req;
-+ Sr__GetChangesReq *get_changes_req;
-+ Sr__DataProvideReq *data_provide_req;
-+ Sr__CheckExecPermReq *check_exec_perm_req;
-+ Sr__RPCReq *rpc_req;
-+ Sr__EventNotifReq *event_notif_req;
-+ Sr__EventNotifReplayReq *event_notif_replay_req;
-+};
-+#define SR__REQUEST__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__request__descriptor) \
-+ , 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Response to the received request.
-+ */
-+struct _Sr__Response
-+{
-+ ProtobufCMessage base;
-+ Sr__Operation operation;
-+ /*
-+ **< Result of the operation. 0 on success, non-zero values map to sr_error_t enum in sysrepo.h.
-+ */
-+ uint32_t result;
-+ /*
-+ **< Additional error information.
-+ */
-+ Sr__Error *error;
-+ Sr__SessionStartResp *session_start_resp;
-+ Sr__SessionStopResp *session_stop_resp;
-+ Sr__SessionRefreshResp *session_refresh_resp;
-+ Sr__SessionCheckResp *session_check_resp;
-+ Sr__SessionSwitchDsResp *session_switch_ds_resp;
-+ Sr__SessionSetOptsResp *session_set_opts_resp;
-+ Sr__VersionVerifyResp *version_verify_resp;
-+ Sr__ListSchemasResp *list_schemas_resp;
-+ Sr__GetSchemaResp *get_schema_resp;
-+ Sr__ModuleInstallResp *module_install_resp;
-+ Sr__FeatureEnableResp *feature_enable_resp;
-+ Sr__GetItemResp *get_item_resp;
-+ Sr__GetItemsResp *get_items_resp;
-+ Sr__GetSubtreeResp *get_subtree_resp;
-+ Sr__GetSubtreesResp *get_subtrees_resp;
-+ Sr__GetSubtreeChunkResp *get_subtree_chunk_resp;
-+ Sr__SetItemResp *set_item_resp;
-+ Sr__DeleteItemResp *delete_item_resp;
-+ Sr__MoveItemResp *move_item_resp;
-+ Sr__SetItemStrResp *set_item_str_resp;
-+ Sr__ValidateResp *validate_resp;
-+ Sr__CommitResp *commit_resp;
-+ Sr__DiscardChangesResp *discard_changes_resp;
-+ Sr__CopyConfigResp *copy_config_resp;
-+ Sr__LockResp *lock_resp;
-+ Sr__UnlockResp *unlock_resp;
-+ Sr__SubscribeResp *subscribe_resp;
-+ Sr__UnsubscribeResp *unsubscribe_resp;
-+ Sr__CheckEnabledRunningResp *check_enabled_running_resp;
-+ Sr__GetChangesResp *get_changes_resp;
-+ Sr__DataProvideResp *data_provide_resp;
-+ Sr__CheckExecPermResp *check_exec_perm_resp;
-+ Sr__RPCResp *rpc_resp;
-+ Sr__EventNotifResp *event_notif_resp;
-+ Sr__EventNotifReplayResp *event_notif_replay_resp;
-+};
-+#define SR__RESPONSE__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__response__descriptor) \
-+ , 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Notification about an event that occurred in the datastore.
-+ */
-+struct _Sr__Notification
-+{
-+ ProtobufCMessage base;
-+ Sr__SubscriptionType type;
-+ char *destination_address;
-+ char *source_address;
-+ uint32_t source_pid;
-+ uint32_t subscription_id;
-+ protobuf_c_boolean has_commit_id;
-+ uint32_t commit_id;
-+ Sr__ModuleInstallNotification *module_install_notif;
-+ Sr__FeatureEnableNotification *feature_enable_notif;
-+ Sr__ModuleChangeNotification *module_change_notif;
-+ Sr__SubtreeChangeNotification *subtree_change_notif;
-+};
-+#define SR__NOTIFICATION__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__notification__descriptor) \
-+ , 0, NULL, NULL, 0, 0, 0,0, NULL, NULL, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Notification Acknowledgment.
-+ */
-+struct _Sr__NotificationAck
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Original notification.
-+ */
-+ Sr__Notification *notif;
-+ /*
-+ **< Result of the notification (success / error code).
-+ */
-+ uint32_t result;
-+ /*
-+ **< Additional error information.
-+ */
-+ Sr__Error *error;
-+ /*
-+ **< If the result is error and this flag is set to true abort notification
-+ * will not be delivered to this subscriber
-+ * (Subscriber doesn't want notification about changes that he refused).
-+ */
-+ protobuf_c_boolean do_not_send_abort;
-+};
-+#define SR__NOTIFICATION_ACK__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__notification_ack__descriptor) \
-+ , NULL, 0, NULL, 0 }
-+
-+
-+/*
-+ **
-+ * @brief Internal request sent by sysrepo. Should not be used from the public API.
-+ */
-+struct _Sr__InternalRequest
-+{
-+ ProtobufCMessage base;
-+ Sr__Operation operation;
-+ protobuf_c_boolean has_postpone_timeout;
-+ uint32_t postpone_timeout;
-+ Sr__UnsubscribeDestinationReq *unsubscribe_dst_req;
-+ Sr__CommitTimeoutReq *commit_timeout_req;
-+ Sr__OperDataTimeoutReq *oper_data_timeout_req;
-+ Sr__InternalStateDataReq *internal_state_data_req;
-+ Sr__NotifStoreCleanupReq *notif_store_cleanup_req;
-+ Sr__DelayedMsgReq *delayed_msg_req;
-+ Sr__NacmReloadReq *nacm_reload_req;
-+};
-+#define SR__INTERNAL_REQUEST__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__internal_request__descriptor) \
-+ , 0, 0,0, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
-+
-+
-+/*
-+ **
-+ * @brief Umbrella sysrepo message used for communication between sysrepo
-+ * engine and client library.
-+ */
-+struct _Sr__Msg
-+{
-+ ProtobufCMessage base;
-+ /*
-+ **< Indicates type of the message.
-+ */
-+ Sr__Msg__MsgType type;
-+ /*
-+ **< Session identifier. Can be 0 (value is ignored) for session_start and version_verify requests.
-+ */
-+ uint32_t session_id;
-+ /*
-+ **< Filled in in case of type == REQUEST.
-+ */
-+ Sr__Request *request;
-+ /*
-+ **< Filled in in case of type == RESPONSE.
-+ */
-+ Sr__Response *response;
-+ /*
-+ **< Filled in in case of type == NOTIFICATION.
-+ */
-+ Sr__Notification *notification;
-+ /*
-+ **< Filled in in case of type == NOTIFICATION_ACK
-+ */
-+ Sr__NotificationAck *notification_ack;
-+ /*
-+ **< Filled in in case of type == INTERNAL.
-+ */
-+ Sr__InternalRequest *internal_request;
-+ /*
-+ **< Not part of the protocol. Used internally by Sysrepo to store a pointer to memory context.
-+ */
-+ uint64_t _sysrepo_mem_ctx;
-+};
-+#define SR__MSG__INIT \
-+ { PROTOBUF_C_MESSAGE_INIT (&sr__msg__descriptor) \
-+ , 0, 0, NULL, NULL, NULL, NULL, NULL, 0 }
-+
-+
-+/* Sr__Value methods */
-+void sr__value__init
-+ (Sr__Value *message);
-+size_t sr__value__get_packed_size
-+ (const Sr__Value *message);
-+size_t sr__value__pack
-+ (const Sr__Value *message,
-+ uint8_t *out);
-+size_t sr__value__pack_to_buffer
-+ (const Sr__Value *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Value *
-+ sr__value__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__value__free_unpacked
-+ (Sr__Value *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Node methods */
-+void sr__node__init
-+ (Sr__Node *message);
-+size_t sr__node__get_packed_size
-+ (const Sr__Node *message);
-+size_t sr__node__pack
-+ (const Sr__Node *message,
-+ uint8_t *out);
-+size_t sr__node__pack_to_buffer
-+ (const Sr__Node *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Node *
-+ sr__node__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__node__free_unpacked
-+ (Sr__Node *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Error methods */
-+void sr__error__init
-+ (Sr__Error *message);
-+size_t sr__error__get_packed_size
-+ (const Sr__Error *message);
-+size_t sr__error__pack
-+ (const Sr__Error *message,
-+ uint8_t *out);
-+size_t sr__error__pack_to_buffer
-+ (const Sr__Error *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Error *
-+ sr__error__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__error__free_unpacked
-+ (Sr__Error *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionStartReq methods */
-+void sr__session_start_req__init
-+ (Sr__SessionStartReq *message);
-+size_t sr__session_start_req__get_packed_size
-+ (const Sr__SessionStartReq *message);
-+size_t sr__session_start_req__pack
-+ (const Sr__SessionStartReq *message,
-+ uint8_t *out);
-+size_t sr__session_start_req__pack_to_buffer
-+ (const Sr__SessionStartReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionStartReq *
-+ sr__session_start_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_start_req__free_unpacked
-+ (Sr__SessionStartReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionStartResp methods */
-+void sr__session_start_resp__init
-+ (Sr__SessionStartResp *message);
-+size_t sr__session_start_resp__get_packed_size
-+ (const Sr__SessionStartResp *message);
-+size_t sr__session_start_resp__pack
-+ (const Sr__SessionStartResp *message,
-+ uint8_t *out);
-+size_t sr__session_start_resp__pack_to_buffer
-+ (const Sr__SessionStartResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionStartResp *
-+ sr__session_start_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_start_resp__free_unpacked
-+ (Sr__SessionStartResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionStopReq methods */
-+void sr__session_stop_req__init
-+ (Sr__SessionStopReq *message);
-+size_t sr__session_stop_req__get_packed_size
-+ (const Sr__SessionStopReq *message);
-+size_t sr__session_stop_req__pack
-+ (const Sr__SessionStopReq *message,
-+ uint8_t *out);
-+size_t sr__session_stop_req__pack_to_buffer
-+ (const Sr__SessionStopReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionStopReq *
-+ sr__session_stop_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_stop_req__free_unpacked
-+ (Sr__SessionStopReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionStopResp methods */
-+void sr__session_stop_resp__init
-+ (Sr__SessionStopResp *message);
-+size_t sr__session_stop_resp__get_packed_size
-+ (const Sr__SessionStopResp *message);
-+size_t sr__session_stop_resp__pack
-+ (const Sr__SessionStopResp *message,
-+ uint8_t *out);
-+size_t sr__session_stop_resp__pack_to_buffer
-+ (const Sr__SessionStopResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionStopResp *
-+ sr__session_stop_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_stop_resp__free_unpacked
-+ (Sr__SessionStopResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionRefreshReq methods */
-+void sr__session_refresh_req__init
-+ (Sr__SessionRefreshReq *message);
-+size_t sr__session_refresh_req__get_packed_size
-+ (const Sr__SessionRefreshReq *message);
-+size_t sr__session_refresh_req__pack
-+ (const Sr__SessionRefreshReq *message,
-+ uint8_t *out);
-+size_t sr__session_refresh_req__pack_to_buffer
-+ (const Sr__SessionRefreshReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionRefreshReq *
-+ sr__session_refresh_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_refresh_req__free_unpacked
-+ (Sr__SessionRefreshReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionRefreshResp methods */
-+void sr__session_refresh_resp__init
-+ (Sr__SessionRefreshResp *message);
-+size_t sr__session_refresh_resp__get_packed_size
-+ (const Sr__SessionRefreshResp *message);
-+size_t sr__session_refresh_resp__pack
-+ (const Sr__SessionRefreshResp *message,
-+ uint8_t *out);
-+size_t sr__session_refresh_resp__pack_to_buffer
-+ (const Sr__SessionRefreshResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionRefreshResp *
-+ sr__session_refresh_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_refresh_resp__free_unpacked
-+ (Sr__SessionRefreshResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionCheckReq methods */
-+void sr__session_check_req__init
-+ (Sr__SessionCheckReq *message);
-+size_t sr__session_check_req__get_packed_size
-+ (const Sr__SessionCheckReq *message);
-+size_t sr__session_check_req__pack
-+ (const Sr__SessionCheckReq *message,
-+ uint8_t *out);
-+size_t sr__session_check_req__pack_to_buffer
-+ (const Sr__SessionCheckReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionCheckReq *
-+ sr__session_check_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_check_req__free_unpacked
-+ (Sr__SessionCheckReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionCheckResp methods */
-+void sr__session_check_resp__init
-+ (Sr__SessionCheckResp *message);
-+size_t sr__session_check_resp__get_packed_size
-+ (const Sr__SessionCheckResp *message);
-+size_t sr__session_check_resp__pack
-+ (const Sr__SessionCheckResp *message,
-+ uint8_t *out);
-+size_t sr__session_check_resp__pack_to_buffer
-+ (const Sr__SessionCheckResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionCheckResp *
-+ sr__session_check_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_check_resp__free_unpacked
-+ (Sr__SessionCheckResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionSwitchDsReq methods */
-+void sr__session_switch_ds_req__init
-+ (Sr__SessionSwitchDsReq *message);
-+size_t sr__session_switch_ds_req__get_packed_size
-+ (const Sr__SessionSwitchDsReq *message);
-+size_t sr__session_switch_ds_req__pack
-+ (const Sr__SessionSwitchDsReq *message,
-+ uint8_t *out);
-+size_t sr__session_switch_ds_req__pack_to_buffer
-+ (const Sr__SessionSwitchDsReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionSwitchDsReq *
-+ sr__session_switch_ds_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_switch_ds_req__free_unpacked
-+ (Sr__SessionSwitchDsReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionSwitchDsResp methods */
-+void sr__session_switch_ds_resp__init
-+ (Sr__SessionSwitchDsResp *message);
-+size_t sr__session_switch_ds_resp__get_packed_size
-+ (const Sr__SessionSwitchDsResp *message);
-+size_t sr__session_switch_ds_resp__pack
-+ (const Sr__SessionSwitchDsResp *message,
-+ uint8_t *out);
-+size_t sr__session_switch_ds_resp__pack_to_buffer
-+ (const Sr__SessionSwitchDsResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionSwitchDsResp *
-+ sr__session_switch_ds_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_switch_ds_resp__free_unpacked
-+ (Sr__SessionSwitchDsResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionSetOptsReq methods */
-+void sr__session_set_opts_req__init
-+ (Sr__SessionSetOptsReq *message);
-+size_t sr__session_set_opts_req__get_packed_size
-+ (const Sr__SessionSetOptsReq *message);
-+size_t sr__session_set_opts_req__pack
-+ (const Sr__SessionSetOptsReq *message,
-+ uint8_t *out);
-+size_t sr__session_set_opts_req__pack_to_buffer
-+ (const Sr__SessionSetOptsReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionSetOptsReq *
-+ sr__session_set_opts_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_set_opts_req__free_unpacked
-+ (Sr__SessionSetOptsReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SessionSetOptsResp methods */
-+void sr__session_set_opts_resp__init
-+ (Sr__SessionSetOptsResp *message);
-+size_t sr__session_set_opts_resp__get_packed_size
-+ (const Sr__SessionSetOptsResp *message);
-+size_t sr__session_set_opts_resp__pack
-+ (const Sr__SessionSetOptsResp *message,
-+ uint8_t *out);
-+size_t sr__session_set_opts_resp__pack_to_buffer
-+ (const Sr__SessionSetOptsResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SessionSetOptsResp *
-+ sr__session_set_opts_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__session_set_opts_resp__free_unpacked
-+ (Sr__SessionSetOptsResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__VersionVerifyReq methods */
-+void sr__version_verify_req__init
-+ (Sr__VersionVerifyReq *message);
-+size_t sr__version_verify_req__get_packed_size
-+ (const Sr__VersionVerifyReq *message);
-+size_t sr__version_verify_req__pack
-+ (const Sr__VersionVerifyReq *message,
-+ uint8_t *out);
-+size_t sr__version_verify_req__pack_to_buffer
-+ (const Sr__VersionVerifyReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__VersionVerifyReq *
-+ sr__version_verify_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__version_verify_req__free_unpacked
-+ (Sr__VersionVerifyReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__VersionVerifyResp methods */
-+void sr__version_verify_resp__init
-+ (Sr__VersionVerifyResp *message);
-+size_t sr__version_verify_resp__get_packed_size
-+ (const Sr__VersionVerifyResp *message);
-+size_t sr__version_verify_resp__pack
-+ (const Sr__VersionVerifyResp *message,
-+ uint8_t *out);
-+size_t sr__version_verify_resp__pack_to_buffer
-+ (const Sr__VersionVerifyResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__VersionVerifyResp *
-+ sr__version_verify_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__version_verify_resp__free_unpacked
-+ (Sr__VersionVerifyResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SchemaRevision methods */
-+void sr__schema_revision__init
-+ (Sr__SchemaRevision *message);
-+size_t sr__schema_revision__get_packed_size
-+ (const Sr__SchemaRevision *message);
-+size_t sr__schema_revision__pack
-+ (const Sr__SchemaRevision *message,
-+ uint8_t *out);
-+size_t sr__schema_revision__pack_to_buffer
-+ (const Sr__SchemaRevision *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SchemaRevision *
-+ sr__schema_revision__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__schema_revision__free_unpacked
-+ (Sr__SchemaRevision *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SchemaSubmodule methods */
-+void sr__schema_submodule__init
-+ (Sr__SchemaSubmodule *message);
-+size_t sr__schema_submodule__get_packed_size
-+ (const Sr__SchemaSubmodule *message);
-+size_t sr__schema_submodule__pack
-+ (const Sr__SchemaSubmodule *message,
-+ uint8_t *out);
-+size_t sr__schema_submodule__pack_to_buffer
-+ (const Sr__SchemaSubmodule *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SchemaSubmodule *
-+ sr__schema_submodule__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__schema_submodule__free_unpacked
-+ (Sr__SchemaSubmodule *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Schema methods */
-+void sr__schema__init
-+ (Sr__Schema *message);
-+size_t sr__schema__get_packed_size
-+ (const Sr__Schema *message);
-+size_t sr__schema__pack
-+ (const Sr__Schema *message,
-+ uint8_t *out);
-+size_t sr__schema__pack_to_buffer
-+ (const Sr__Schema *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Schema *
-+ sr__schema__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__schema__free_unpacked
-+ (Sr__Schema *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ListSchemasReq methods */
-+void sr__list_schemas_req__init
-+ (Sr__ListSchemasReq *message);
-+size_t sr__list_schemas_req__get_packed_size
-+ (const Sr__ListSchemasReq *message);
-+size_t sr__list_schemas_req__pack
-+ (const Sr__ListSchemasReq *message,
-+ uint8_t *out);
-+size_t sr__list_schemas_req__pack_to_buffer
-+ (const Sr__ListSchemasReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ListSchemasReq *
-+ sr__list_schemas_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__list_schemas_req__free_unpacked
-+ (Sr__ListSchemasReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ListSchemasResp methods */
-+void sr__list_schemas_resp__init
-+ (Sr__ListSchemasResp *message);
-+size_t sr__list_schemas_resp__get_packed_size
-+ (const Sr__ListSchemasResp *message);
-+size_t sr__list_schemas_resp__pack
-+ (const Sr__ListSchemasResp *message,
-+ uint8_t *out);
-+size_t sr__list_schemas_resp__pack_to_buffer
-+ (const Sr__ListSchemasResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ListSchemasResp *
-+ sr__list_schemas_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__list_schemas_resp__free_unpacked
-+ (Sr__ListSchemasResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSchemaReq methods */
-+void sr__get_schema_req__init
-+ (Sr__GetSchemaReq *message);
-+size_t sr__get_schema_req__get_packed_size
-+ (const Sr__GetSchemaReq *message);
-+size_t sr__get_schema_req__pack
-+ (const Sr__GetSchemaReq *message,
-+ uint8_t *out);
-+size_t sr__get_schema_req__pack_to_buffer
-+ (const Sr__GetSchemaReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSchemaReq *
-+ sr__get_schema_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_schema_req__free_unpacked
-+ (Sr__GetSchemaReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSchemaResp methods */
-+void sr__get_schema_resp__init
-+ (Sr__GetSchemaResp *message);
-+size_t sr__get_schema_resp__get_packed_size
-+ (const Sr__GetSchemaResp *message);
-+size_t sr__get_schema_resp__pack
-+ (const Sr__GetSchemaResp *message,
-+ uint8_t *out);
-+size_t sr__get_schema_resp__pack_to_buffer
-+ (const Sr__GetSchemaResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSchemaResp *
-+ sr__get_schema_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_schema_resp__free_unpacked
-+ (Sr__GetSchemaResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetItemReq methods */
-+void sr__get_item_req__init
-+ (Sr__GetItemReq *message);
-+size_t sr__get_item_req__get_packed_size
-+ (const Sr__GetItemReq *message);
-+size_t sr__get_item_req__pack
-+ (const Sr__GetItemReq *message,
-+ uint8_t *out);
-+size_t sr__get_item_req__pack_to_buffer
-+ (const Sr__GetItemReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetItemReq *
-+ sr__get_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_item_req__free_unpacked
-+ (Sr__GetItemReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetItemResp methods */
-+void sr__get_item_resp__init
-+ (Sr__GetItemResp *message);
-+size_t sr__get_item_resp__get_packed_size
-+ (const Sr__GetItemResp *message);
-+size_t sr__get_item_resp__pack
-+ (const Sr__GetItemResp *message,
-+ uint8_t *out);
-+size_t sr__get_item_resp__pack_to_buffer
-+ (const Sr__GetItemResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetItemResp *
-+ sr__get_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_item_resp__free_unpacked
-+ (Sr__GetItemResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetItemsReq methods */
-+void sr__get_items_req__init
-+ (Sr__GetItemsReq *message);
-+size_t sr__get_items_req__get_packed_size
-+ (const Sr__GetItemsReq *message);
-+size_t sr__get_items_req__pack
-+ (const Sr__GetItemsReq *message,
-+ uint8_t *out);
-+size_t sr__get_items_req__pack_to_buffer
-+ (const Sr__GetItemsReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetItemsReq *
-+ sr__get_items_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_items_req__free_unpacked
-+ (Sr__GetItemsReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetItemsResp methods */
-+void sr__get_items_resp__init
-+ (Sr__GetItemsResp *message);
-+size_t sr__get_items_resp__get_packed_size
-+ (const Sr__GetItemsResp *message);
-+size_t sr__get_items_resp__pack
-+ (const Sr__GetItemsResp *message,
-+ uint8_t *out);
-+size_t sr__get_items_resp__pack_to_buffer
-+ (const Sr__GetItemsResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetItemsResp *
-+ sr__get_items_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_items_resp__free_unpacked
-+ (Sr__GetItemsResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreeReq methods */
-+void sr__get_subtree_req__init
-+ (Sr__GetSubtreeReq *message);
-+size_t sr__get_subtree_req__get_packed_size
-+ (const Sr__GetSubtreeReq *message);
-+size_t sr__get_subtree_req__pack
-+ (const Sr__GetSubtreeReq *message,
-+ uint8_t *out);
-+size_t sr__get_subtree_req__pack_to_buffer
-+ (const Sr__GetSubtreeReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreeReq *
-+ sr__get_subtree_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtree_req__free_unpacked
-+ (Sr__GetSubtreeReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreeResp methods */
-+void sr__get_subtree_resp__init
-+ (Sr__GetSubtreeResp *message);
-+size_t sr__get_subtree_resp__get_packed_size
-+ (const Sr__GetSubtreeResp *message);
-+size_t sr__get_subtree_resp__pack
-+ (const Sr__GetSubtreeResp *message,
-+ uint8_t *out);
-+size_t sr__get_subtree_resp__pack_to_buffer
-+ (const Sr__GetSubtreeResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreeResp *
-+ sr__get_subtree_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtree_resp__free_unpacked
-+ (Sr__GetSubtreeResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreesReq methods */
-+void sr__get_subtrees_req__init
-+ (Sr__GetSubtreesReq *message);
-+size_t sr__get_subtrees_req__get_packed_size
-+ (const Sr__GetSubtreesReq *message);
-+size_t sr__get_subtrees_req__pack
-+ (const Sr__GetSubtreesReq *message,
-+ uint8_t *out);
-+size_t sr__get_subtrees_req__pack_to_buffer
-+ (const Sr__GetSubtreesReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreesReq *
-+ sr__get_subtrees_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtrees_req__free_unpacked
-+ (Sr__GetSubtreesReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreesResp methods */
-+void sr__get_subtrees_resp__init
-+ (Sr__GetSubtreesResp *message);
-+size_t sr__get_subtrees_resp__get_packed_size
-+ (const Sr__GetSubtreesResp *message);
-+size_t sr__get_subtrees_resp__pack
-+ (const Sr__GetSubtreesResp *message,
-+ uint8_t *out);
-+size_t sr__get_subtrees_resp__pack_to_buffer
-+ (const Sr__GetSubtreesResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreesResp *
-+ sr__get_subtrees_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtrees_resp__free_unpacked
-+ (Sr__GetSubtreesResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreeChunkReq methods */
-+void sr__get_subtree_chunk_req__init
-+ (Sr__GetSubtreeChunkReq *message);
-+size_t sr__get_subtree_chunk_req__get_packed_size
-+ (const Sr__GetSubtreeChunkReq *message);
-+size_t sr__get_subtree_chunk_req__pack
-+ (const Sr__GetSubtreeChunkReq *message,
-+ uint8_t *out);
-+size_t sr__get_subtree_chunk_req__pack_to_buffer
-+ (const Sr__GetSubtreeChunkReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreeChunkReq *
-+ sr__get_subtree_chunk_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtree_chunk_req__free_unpacked
-+ (Sr__GetSubtreeChunkReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetSubtreeChunkResp methods */
-+void sr__get_subtree_chunk_resp__init
-+ (Sr__GetSubtreeChunkResp *message);
-+size_t sr__get_subtree_chunk_resp__get_packed_size
-+ (const Sr__GetSubtreeChunkResp *message);
-+size_t sr__get_subtree_chunk_resp__pack
-+ (const Sr__GetSubtreeChunkResp *message,
-+ uint8_t *out);
-+size_t sr__get_subtree_chunk_resp__pack_to_buffer
-+ (const Sr__GetSubtreeChunkResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetSubtreeChunkResp *
-+ sr__get_subtree_chunk_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_subtree_chunk_resp__free_unpacked
-+ (Sr__GetSubtreeChunkResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SetItemReq methods */
-+void sr__set_item_req__init
-+ (Sr__SetItemReq *message);
-+size_t sr__set_item_req__get_packed_size
-+ (const Sr__SetItemReq *message);
-+size_t sr__set_item_req__pack
-+ (const Sr__SetItemReq *message,
-+ uint8_t *out);
-+size_t sr__set_item_req__pack_to_buffer
-+ (const Sr__SetItemReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SetItemReq *
-+ sr__set_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__set_item_req__free_unpacked
-+ (Sr__SetItemReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SetItemResp methods */
-+void sr__set_item_resp__init
-+ (Sr__SetItemResp *message);
-+size_t sr__set_item_resp__get_packed_size
-+ (const Sr__SetItemResp *message);
-+size_t sr__set_item_resp__pack
-+ (const Sr__SetItemResp *message,
-+ uint8_t *out);
-+size_t sr__set_item_resp__pack_to_buffer
-+ (const Sr__SetItemResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SetItemResp *
-+ sr__set_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__set_item_resp__free_unpacked
-+ (Sr__SetItemResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SetItemStrReq methods */
-+void sr__set_item_str_req__init
-+ (Sr__SetItemStrReq *message);
-+size_t sr__set_item_str_req__get_packed_size
-+ (const Sr__SetItemStrReq *message);
-+size_t sr__set_item_str_req__pack
-+ (const Sr__SetItemStrReq *message,
-+ uint8_t *out);
-+size_t sr__set_item_str_req__pack_to_buffer
-+ (const Sr__SetItemStrReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SetItemStrReq *
-+ sr__set_item_str_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__set_item_str_req__free_unpacked
-+ (Sr__SetItemStrReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SetItemStrResp methods */
-+void sr__set_item_str_resp__init
-+ (Sr__SetItemStrResp *message);
-+size_t sr__set_item_str_resp__get_packed_size
-+ (const Sr__SetItemStrResp *message);
-+size_t sr__set_item_str_resp__pack
-+ (const Sr__SetItemStrResp *message,
-+ uint8_t *out);
-+size_t sr__set_item_str_resp__pack_to_buffer
-+ (const Sr__SetItemStrResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SetItemStrResp *
-+ sr__set_item_str_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__set_item_str_resp__free_unpacked
-+ (Sr__SetItemStrResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DeleteItemReq methods */
-+void sr__delete_item_req__init
-+ (Sr__DeleteItemReq *message);
-+size_t sr__delete_item_req__get_packed_size
-+ (const Sr__DeleteItemReq *message);
-+size_t sr__delete_item_req__pack
-+ (const Sr__DeleteItemReq *message,
-+ uint8_t *out);
-+size_t sr__delete_item_req__pack_to_buffer
-+ (const Sr__DeleteItemReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DeleteItemReq *
-+ sr__delete_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__delete_item_req__free_unpacked
-+ (Sr__DeleteItemReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DeleteItemResp methods */
-+void sr__delete_item_resp__init
-+ (Sr__DeleteItemResp *message);
-+size_t sr__delete_item_resp__get_packed_size
-+ (const Sr__DeleteItemResp *message);
-+size_t sr__delete_item_resp__pack
-+ (const Sr__DeleteItemResp *message,
-+ uint8_t *out);
-+size_t sr__delete_item_resp__pack_to_buffer
-+ (const Sr__DeleteItemResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DeleteItemResp *
-+ sr__delete_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__delete_item_resp__free_unpacked
-+ (Sr__DeleteItemResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__MoveItemReq methods */
-+void sr__move_item_req__init
-+ (Sr__MoveItemReq *message);
-+size_t sr__move_item_req__get_packed_size
-+ (const Sr__MoveItemReq *message);
-+size_t sr__move_item_req__pack
-+ (const Sr__MoveItemReq *message,
-+ uint8_t *out);
-+size_t sr__move_item_req__pack_to_buffer
-+ (const Sr__MoveItemReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__MoveItemReq *
-+ sr__move_item_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__move_item_req__free_unpacked
-+ (Sr__MoveItemReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__MoveItemResp methods */
-+void sr__move_item_resp__init
-+ (Sr__MoveItemResp *message);
-+size_t sr__move_item_resp__get_packed_size
-+ (const Sr__MoveItemResp *message);
-+size_t sr__move_item_resp__pack
-+ (const Sr__MoveItemResp *message,
-+ uint8_t *out);
-+size_t sr__move_item_resp__pack_to_buffer
-+ (const Sr__MoveItemResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__MoveItemResp *
-+ sr__move_item_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__move_item_resp__free_unpacked
-+ (Sr__MoveItemResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ValidateReq methods */
-+void sr__validate_req__init
-+ (Sr__ValidateReq *message);
-+size_t sr__validate_req__get_packed_size
-+ (const Sr__ValidateReq *message);
-+size_t sr__validate_req__pack
-+ (const Sr__ValidateReq *message,
-+ uint8_t *out);
-+size_t sr__validate_req__pack_to_buffer
-+ (const Sr__ValidateReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ValidateReq *
-+ sr__validate_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__validate_req__free_unpacked
-+ (Sr__ValidateReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ValidateResp methods */
-+void sr__validate_resp__init
-+ (Sr__ValidateResp *message);
-+size_t sr__validate_resp__get_packed_size
-+ (const Sr__ValidateResp *message);
-+size_t sr__validate_resp__pack
-+ (const Sr__ValidateResp *message,
-+ uint8_t *out);
-+size_t sr__validate_resp__pack_to_buffer
-+ (const Sr__ValidateResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ValidateResp *
-+ sr__validate_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__validate_resp__free_unpacked
-+ (Sr__ValidateResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CommitReq methods */
-+void sr__commit_req__init
-+ (Sr__CommitReq *message);
-+size_t sr__commit_req__get_packed_size
-+ (const Sr__CommitReq *message);
-+size_t sr__commit_req__pack
-+ (const Sr__CommitReq *message,
-+ uint8_t *out);
-+size_t sr__commit_req__pack_to_buffer
-+ (const Sr__CommitReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CommitReq *
-+ sr__commit_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__commit_req__free_unpacked
-+ (Sr__CommitReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CommitResp methods */
-+void sr__commit_resp__init
-+ (Sr__CommitResp *message);
-+size_t sr__commit_resp__get_packed_size
-+ (const Sr__CommitResp *message);
-+size_t sr__commit_resp__pack
-+ (const Sr__CommitResp *message,
-+ uint8_t *out);
-+size_t sr__commit_resp__pack_to_buffer
-+ (const Sr__CommitResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CommitResp *
-+ sr__commit_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__commit_resp__free_unpacked
-+ (Sr__CommitResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DiscardChangesReq methods */
-+void sr__discard_changes_req__init
-+ (Sr__DiscardChangesReq *message);
-+size_t sr__discard_changes_req__get_packed_size
-+ (const Sr__DiscardChangesReq *message);
-+size_t sr__discard_changes_req__pack
-+ (const Sr__DiscardChangesReq *message,
-+ uint8_t *out);
-+size_t sr__discard_changes_req__pack_to_buffer
-+ (const Sr__DiscardChangesReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DiscardChangesReq *
-+ sr__discard_changes_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__discard_changes_req__free_unpacked
-+ (Sr__DiscardChangesReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DiscardChangesResp methods */
-+void sr__discard_changes_resp__init
-+ (Sr__DiscardChangesResp *message);
-+size_t sr__discard_changes_resp__get_packed_size
-+ (const Sr__DiscardChangesResp *message);
-+size_t sr__discard_changes_resp__pack
-+ (const Sr__DiscardChangesResp *message,
-+ uint8_t *out);
-+size_t sr__discard_changes_resp__pack_to_buffer
-+ (const Sr__DiscardChangesResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DiscardChangesResp *
-+ sr__discard_changes_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__discard_changes_resp__free_unpacked
-+ (Sr__DiscardChangesResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CopyConfigReq methods */
-+void sr__copy_config_req__init
-+ (Sr__CopyConfigReq *message);
-+size_t sr__copy_config_req__get_packed_size
-+ (const Sr__CopyConfigReq *message);
-+size_t sr__copy_config_req__pack
-+ (const Sr__CopyConfigReq *message,
-+ uint8_t *out);
-+size_t sr__copy_config_req__pack_to_buffer
-+ (const Sr__CopyConfigReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CopyConfigReq *
-+ sr__copy_config_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__copy_config_req__free_unpacked
-+ (Sr__CopyConfigReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CopyConfigResp methods */
-+void sr__copy_config_resp__init
-+ (Sr__CopyConfigResp *message);
-+size_t sr__copy_config_resp__get_packed_size
-+ (const Sr__CopyConfigResp *message);
-+size_t sr__copy_config_resp__pack
-+ (const Sr__CopyConfigResp *message,
-+ uint8_t *out);
-+size_t sr__copy_config_resp__pack_to_buffer
-+ (const Sr__CopyConfigResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CopyConfigResp *
-+ sr__copy_config_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__copy_config_resp__free_unpacked
-+ (Sr__CopyConfigResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__LockReq methods */
-+void sr__lock_req__init
-+ (Sr__LockReq *message);
-+size_t sr__lock_req__get_packed_size
-+ (const Sr__LockReq *message);
-+size_t sr__lock_req__pack
-+ (const Sr__LockReq *message,
-+ uint8_t *out);
-+size_t sr__lock_req__pack_to_buffer
-+ (const Sr__LockReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__LockReq *
-+ sr__lock_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__lock_req__free_unpacked
-+ (Sr__LockReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__LockResp methods */
-+void sr__lock_resp__init
-+ (Sr__LockResp *message);
-+size_t sr__lock_resp__get_packed_size
-+ (const Sr__LockResp *message);
-+size_t sr__lock_resp__pack
-+ (const Sr__LockResp *message,
-+ uint8_t *out);
-+size_t sr__lock_resp__pack_to_buffer
-+ (const Sr__LockResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__LockResp *
-+ sr__lock_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__lock_resp__free_unpacked
-+ (Sr__LockResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__UnlockReq methods */
-+void sr__unlock_req__init
-+ (Sr__UnlockReq *message);
-+size_t sr__unlock_req__get_packed_size
-+ (const Sr__UnlockReq *message);
-+size_t sr__unlock_req__pack
-+ (const Sr__UnlockReq *message,
-+ uint8_t *out);
-+size_t sr__unlock_req__pack_to_buffer
-+ (const Sr__UnlockReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__UnlockReq *
-+ sr__unlock_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__unlock_req__free_unpacked
-+ (Sr__UnlockReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__UnlockResp methods */
-+void sr__unlock_resp__init
-+ (Sr__UnlockResp *message);
-+size_t sr__unlock_resp__get_packed_size
-+ (const Sr__UnlockResp *message);
-+size_t sr__unlock_resp__pack
-+ (const Sr__UnlockResp *message,
-+ uint8_t *out);
-+size_t sr__unlock_resp__pack_to_buffer
-+ (const Sr__UnlockResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__UnlockResp *
-+ sr__unlock_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__unlock_resp__free_unpacked
-+ (Sr__UnlockResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SubscribeReq methods */
-+void sr__subscribe_req__init
-+ (Sr__SubscribeReq *message);
-+size_t sr__subscribe_req__get_packed_size
-+ (const Sr__SubscribeReq *message);
-+size_t sr__subscribe_req__pack
-+ (const Sr__SubscribeReq *message,
-+ uint8_t *out);
-+size_t sr__subscribe_req__pack_to_buffer
-+ (const Sr__SubscribeReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SubscribeReq *
-+ sr__subscribe_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__subscribe_req__free_unpacked
-+ (Sr__SubscribeReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SubscribeResp methods */
-+void sr__subscribe_resp__init
-+ (Sr__SubscribeResp *message);
-+size_t sr__subscribe_resp__get_packed_size
-+ (const Sr__SubscribeResp *message);
-+size_t sr__subscribe_resp__pack
-+ (const Sr__SubscribeResp *message,
-+ uint8_t *out);
-+size_t sr__subscribe_resp__pack_to_buffer
-+ (const Sr__SubscribeResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SubscribeResp *
-+ sr__subscribe_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__subscribe_resp__free_unpacked
-+ (Sr__SubscribeResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__UnsubscribeReq methods */
-+void sr__unsubscribe_req__init
-+ (Sr__UnsubscribeReq *message);
-+size_t sr__unsubscribe_req__get_packed_size
-+ (const Sr__UnsubscribeReq *message);
-+size_t sr__unsubscribe_req__pack
-+ (const Sr__UnsubscribeReq *message,
-+ uint8_t *out);
-+size_t sr__unsubscribe_req__pack_to_buffer
-+ (const Sr__UnsubscribeReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__UnsubscribeReq *
-+ sr__unsubscribe_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__unsubscribe_req__free_unpacked
-+ (Sr__UnsubscribeReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__UnsubscribeResp methods */
-+void sr__unsubscribe_resp__init
-+ (Sr__UnsubscribeResp *message);
-+size_t sr__unsubscribe_resp__get_packed_size
-+ (const Sr__UnsubscribeResp *message);
-+size_t sr__unsubscribe_resp__pack
-+ (const Sr__UnsubscribeResp *message,
-+ uint8_t *out);
-+size_t sr__unsubscribe_resp__pack_to_buffer
-+ (const Sr__UnsubscribeResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__UnsubscribeResp *
-+ sr__unsubscribe_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__unsubscribe_resp__free_unpacked
-+ (Sr__UnsubscribeResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CheckEnabledRunningReq methods */
-+void sr__check_enabled_running_req__init
-+ (Sr__CheckEnabledRunningReq *message);
-+size_t sr__check_enabled_running_req__get_packed_size
-+ (const Sr__CheckEnabledRunningReq *message);
-+size_t sr__check_enabled_running_req__pack
-+ (const Sr__CheckEnabledRunningReq *message,
-+ uint8_t *out);
-+size_t sr__check_enabled_running_req__pack_to_buffer
-+ (const Sr__CheckEnabledRunningReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CheckEnabledRunningReq *
-+ sr__check_enabled_running_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__check_enabled_running_req__free_unpacked
-+ (Sr__CheckEnabledRunningReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CheckEnabledRunningResp methods */
-+void sr__check_enabled_running_resp__init
-+ (Sr__CheckEnabledRunningResp *message);
-+size_t sr__check_enabled_running_resp__get_packed_size
-+ (const Sr__CheckEnabledRunningResp *message);
-+size_t sr__check_enabled_running_resp__pack
-+ (const Sr__CheckEnabledRunningResp *message,
-+ uint8_t *out);
-+size_t sr__check_enabled_running_resp__pack_to_buffer
-+ (const Sr__CheckEnabledRunningResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CheckEnabledRunningResp *
-+ sr__check_enabled_running_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__check_enabled_running_resp__free_unpacked
-+ (Sr__CheckEnabledRunningResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ModuleInstallNotification methods */
-+void sr__module_install_notification__init
-+ (Sr__ModuleInstallNotification *message);
-+size_t sr__module_install_notification__get_packed_size
-+ (const Sr__ModuleInstallNotification *message);
-+size_t sr__module_install_notification__pack
-+ (const Sr__ModuleInstallNotification *message,
-+ uint8_t *out);
-+size_t sr__module_install_notification__pack_to_buffer
-+ (const Sr__ModuleInstallNotification *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ModuleInstallNotification *
-+ sr__module_install_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__module_install_notification__free_unpacked
-+ (Sr__ModuleInstallNotification *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__FeatureEnableNotification methods */
-+void sr__feature_enable_notification__init
-+ (Sr__FeatureEnableNotification *message);
-+size_t sr__feature_enable_notification__get_packed_size
-+ (const Sr__FeatureEnableNotification *message);
-+size_t sr__feature_enable_notification__pack
-+ (const Sr__FeatureEnableNotification *message,
-+ uint8_t *out);
-+size_t sr__feature_enable_notification__pack_to_buffer
-+ (const Sr__FeatureEnableNotification *message,
-+ ProtobufCBuffer *buffer);
-+Sr__FeatureEnableNotification *
-+ sr__feature_enable_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__feature_enable_notification__free_unpacked
-+ (Sr__FeatureEnableNotification *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ModuleChangeNotification methods */
-+void sr__module_change_notification__init
-+ (Sr__ModuleChangeNotification *message);
-+size_t sr__module_change_notification__get_packed_size
-+ (const Sr__ModuleChangeNotification *message);
-+size_t sr__module_change_notification__pack
-+ (const Sr__ModuleChangeNotification *message,
-+ uint8_t *out);
-+size_t sr__module_change_notification__pack_to_buffer
-+ (const Sr__ModuleChangeNotification *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ModuleChangeNotification *
-+ sr__module_change_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__module_change_notification__free_unpacked
-+ (Sr__ModuleChangeNotification *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__SubtreeChangeNotification methods */
-+void sr__subtree_change_notification__init
-+ (Sr__SubtreeChangeNotification *message);
-+size_t sr__subtree_change_notification__get_packed_size
-+ (const Sr__SubtreeChangeNotification *message);
-+size_t sr__subtree_change_notification__pack
-+ (const Sr__SubtreeChangeNotification *message,
-+ uint8_t *out);
-+size_t sr__subtree_change_notification__pack_to_buffer
-+ (const Sr__SubtreeChangeNotification *message,
-+ ProtobufCBuffer *buffer);
-+Sr__SubtreeChangeNotification *
-+ sr__subtree_change_notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__subtree_change_notification__free_unpacked
-+ (Sr__SubtreeChangeNotification *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Change methods */
-+void sr__change__init
-+ (Sr__Change *message);
-+size_t sr__change__get_packed_size
-+ (const Sr__Change *message);
-+size_t sr__change__pack
-+ (const Sr__Change *message,
-+ uint8_t *out);
-+size_t sr__change__pack_to_buffer
-+ (const Sr__Change *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Change *
-+ sr__change__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__change__free_unpacked
-+ (Sr__Change *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetChangesReq methods */
-+void sr__get_changes_req__init
-+ (Sr__GetChangesReq *message);
-+size_t sr__get_changes_req__get_packed_size
-+ (const Sr__GetChangesReq *message);
-+size_t sr__get_changes_req__pack
-+ (const Sr__GetChangesReq *message,
-+ uint8_t *out);
-+size_t sr__get_changes_req__pack_to_buffer
-+ (const Sr__GetChangesReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetChangesReq *
-+ sr__get_changes_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_changes_req__free_unpacked
-+ (Sr__GetChangesReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__GetChangesResp methods */
-+void sr__get_changes_resp__init
-+ (Sr__GetChangesResp *message);
-+size_t sr__get_changes_resp__get_packed_size
-+ (const Sr__GetChangesResp *message);
-+size_t sr__get_changes_resp__pack
-+ (const Sr__GetChangesResp *message,
-+ uint8_t *out);
-+size_t sr__get_changes_resp__pack_to_buffer
-+ (const Sr__GetChangesResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__GetChangesResp *
-+ sr__get_changes_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__get_changes_resp__free_unpacked
-+ (Sr__GetChangesResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CheckExecPermReq methods */
-+void sr__check_exec_perm_req__init
-+ (Sr__CheckExecPermReq *message);
-+size_t sr__check_exec_perm_req__get_packed_size
-+ (const Sr__CheckExecPermReq *message);
-+size_t sr__check_exec_perm_req__pack
-+ (const Sr__CheckExecPermReq *message,
-+ uint8_t *out);
-+size_t sr__check_exec_perm_req__pack_to_buffer
-+ (const Sr__CheckExecPermReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CheckExecPermReq *
-+ sr__check_exec_perm_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__check_exec_perm_req__free_unpacked
-+ (Sr__CheckExecPermReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CheckExecPermResp methods */
-+void sr__check_exec_perm_resp__init
-+ (Sr__CheckExecPermResp *message);
-+size_t sr__check_exec_perm_resp__get_packed_size
-+ (const Sr__CheckExecPermResp *message);
-+size_t sr__check_exec_perm_resp__pack
-+ (const Sr__CheckExecPermResp *message,
-+ uint8_t *out);
-+size_t sr__check_exec_perm_resp__pack_to_buffer
-+ (const Sr__CheckExecPermResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CheckExecPermResp *
-+ sr__check_exec_perm_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__check_exec_perm_resp__free_unpacked
-+ (Sr__CheckExecPermResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__RPCReq methods */
-+void sr__rpcreq__init
-+ (Sr__RPCReq *message);
-+size_t sr__rpcreq__get_packed_size
-+ (const Sr__RPCReq *message);
-+size_t sr__rpcreq__pack
-+ (const Sr__RPCReq *message,
-+ uint8_t *out);
-+size_t sr__rpcreq__pack_to_buffer
-+ (const Sr__RPCReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__RPCReq *
-+ sr__rpcreq__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__rpcreq__free_unpacked
-+ (Sr__RPCReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__RPCResp methods */
-+void sr__rpcresp__init
-+ (Sr__RPCResp *message);
-+size_t sr__rpcresp__get_packed_size
-+ (const Sr__RPCResp *message);
-+size_t sr__rpcresp__pack
-+ (const Sr__RPCResp *message,
-+ uint8_t *out);
-+size_t sr__rpcresp__pack_to_buffer
-+ (const Sr__RPCResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__RPCResp *
-+ sr__rpcresp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__rpcresp__free_unpacked
-+ (Sr__RPCResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__EventNotifReq methods */
-+void sr__event_notif_req__init
-+ (Sr__EventNotifReq *message);
-+size_t sr__event_notif_req__get_packed_size
-+ (const Sr__EventNotifReq *message);
-+size_t sr__event_notif_req__pack
-+ (const Sr__EventNotifReq *message,
-+ uint8_t *out);
-+size_t sr__event_notif_req__pack_to_buffer
-+ (const Sr__EventNotifReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__EventNotifReq *
-+ sr__event_notif_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__event_notif_req__free_unpacked
-+ (Sr__EventNotifReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__EventNotifResp methods */
-+void sr__event_notif_resp__init
-+ (Sr__EventNotifResp *message);
-+size_t sr__event_notif_resp__get_packed_size
-+ (const Sr__EventNotifResp *message);
-+size_t sr__event_notif_resp__pack
-+ (const Sr__EventNotifResp *message,
-+ uint8_t *out);
-+size_t sr__event_notif_resp__pack_to_buffer
-+ (const Sr__EventNotifResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__EventNotifResp *
-+ sr__event_notif_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__event_notif_resp__free_unpacked
-+ (Sr__EventNotifResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__EventNotifReplayReq methods */
-+void sr__event_notif_replay_req__init
-+ (Sr__EventNotifReplayReq *message);
-+size_t sr__event_notif_replay_req__get_packed_size
-+ (const Sr__EventNotifReplayReq *message);
-+size_t sr__event_notif_replay_req__pack
-+ (const Sr__EventNotifReplayReq *message,
-+ uint8_t *out);
-+size_t sr__event_notif_replay_req__pack_to_buffer
-+ (const Sr__EventNotifReplayReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__EventNotifReplayReq *
-+ sr__event_notif_replay_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__event_notif_replay_req__free_unpacked
-+ (Sr__EventNotifReplayReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__EventNotifReplayResp methods */
-+void sr__event_notif_replay_resp__init
-+ (Sr__EventNotifReplayResp *message);
-+size_t sr__event_notif_replay_resp__get_packed_size
-+ (const Sr__EventNotifReplayResp *message);
-+size_t sr__event_notif_replay_resp__pack
-+ (const Sr__EventNotifReplayResp *message,
-+ uint8_t *out);
-+size_t sr__event_notif_replay_resp__pack_to_buffer
-+ (const Sr__EventNotifReplayResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__EventNotifReplayResp *
-+ sr__event_notif_replay_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__event_notif_replay_resp__free_unpacked
-+ (Sr__EventNotifReplayResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DataProvideReq methods */
-+void sr__data_provide_req__init
-+ (Sr__DataProvideReq *message);
-+size_t sr__data_provide_req__get_packed_size
-+ (const Sr__DataProvideReq *message);
-+size_t sr__data_provide_req__pack
-+ (const Sr__DataProvideReq *message,
-+ uint8_t *out);
-+size_t sr__data_provide_req__pack_to_buffer
-+ (const Sr__DataProvideReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DataProvideReq *
-+ sr__data_provide_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__data_provide_req__free_unpacked
-+ (Sr__DataProvideReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DataProvideResp methods */
-+void sr__data_provide_resp__init
-+ (Sr__DataProvideResp *message);
-+size_t sr__data_provide_resp__get_packed_size
-+ (const Sr__DataProvideResp *message);
-+size_t sr__data_provide_resp__pack
-+ (const Sr__DataProvideResp *message,
-+ uint8_t *out);
-+size_t sr__data_provide_resp__pack_to_buffer
-+ (const Sr__DataProvideResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DataProvideResp *
-+ sr__data_provide_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__data_provide_resp__free_unpacked
-+ (Sr__DataProvideResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ModuleInstallReq methods */
-+void sr__module_install_req__init
-+ (Sr__ModuleInstallReq *message);
-+size_t sr__module_install_req__get_packed_size
-+ (const Sr__ModuleInstallReq *message);
-+size_t sr__module_install_req__pack
-+ (const Sr__ModuleInstallReq *message,
-+ uint8_t *out);
-+size_t sr__module_install_req__pack_to_buffer
-+ (const Sr__ModuleInstallReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ModuleInstallReq *
-+ sr__module_install_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__module_install_req__free_unpacked
-+ (Sr__ModuleInstallReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__ModuleInstallResp methods */
-+void sr__module_install_resp__init
-+ (Sr__ModuleInstallResp *message);
-+size_t sr__module_install_resp__get_packed_size
-+ (const Sr__ModuleInstallResp *message);
-+size_t sr__module_install_resp__pack
-+ (const Sr__ModuleInstallResp *message,
-+ uint8_t *out);
-+size_t sr__module_install_resp__pack_to_buffer
-+ (const Sr__ModuleInstallResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__ModuleInstallResp *
-+ sr__module_install_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__module_install_resp__free_unpacked
-+ (Sr__ModuleInstallResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__FeatureEnableReq methods */
-+void sr__feature_enable_req__init
-+ (Sr__FeatureEnableReq *message);
-+size_t sr__feature_enable_req__get_packed_size
-+ (const Sr__FeatureEnableReq *message);
-+size_t sr__feature_enable_req__pack
-+ (const Sr__FeatureEnableReq *message,
-+ uint8_t *out);
-+size_t sr__feature_enable_req__pack_to_buffer
-+ (const Sr__FeatureEnableReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__FeatureEnableReq *
-+ sr__feature_enable_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__feature_enable_req__free_unpacked
-+ (Sr__FeatureEnableReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__FeatureEnableResp methods */
-+void sr__feature_enable_resp__init
-+ (Sr__FeatureEnableResp *message);
-+size_t sr__feature_enable_resp__get_packed_size
-+ (const Sr__FeatureEnableResp *message);
-+size_t sr__feature_enable_resp__pack
-+ (const Sr__FeatureEnableResp *message,
-+ uint8_t *out);
-+size_t sr__feature_enable_resp__pack_to_buffer
-+ (const Sr__FeatureEnableResp *message,
-+ ProtobufCBuffer *buffer);
-+Sr__FeatureEnableResp *
-+ sr__feature_enable_resp__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__feature_enable_resp__free_unpacked
-+ (Sr__FeatureEnableResp *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__UnsubscribeDestinationReq methods */
-+void sr__unsubscribe_destination_req__init
-+ (Sr__UnsubscribeDestinationReq *message);
-+size_t sr__unsubscribe_destination_req__get_packed_size
-+ (const Sr__UnsubscribeDestinationReq *message);
-+size_t sr__unsubscribe_destination_req__pack
-+ (const Sr__UnsubscribeDestinationReq *message,
-+ uint8_t *out);
-+size_t sr__unsubscribe_destination_req__pack_to_buffer
-+ (const Sr__UnsubscribeDestinationReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__UnsubscribeDestinationReq *
-+ sr__unsubscribe_destination_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__unsubscribe_destination_req__free_unpacked
-+ (Sr__UnsubscribeDestinationReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__CommitTimeoutReq methods */
-+void sr__commit_timeout_req__init
-+ (Sr__CommitTimeoutReq *message);
-+size_t sr__commit_timeout_req__get_packed_size
-+ (const Sr__CommitTimeoutReq *message);
-+size_t sr__commit_timeout_req__pack
-+ (const Sr__CommitTimeoutReq *message,
-+ uint8_t *out);
-+size_t sr__commit_timeout_req__pack_to_buffer
-+ (const Sr__CommitTimeoutReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__CommitTimeoutReq *
-+ sr__commit_timeout_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__commit_timeout_req__free_unpacked
-+ (Sr__CommitTimeoutReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__OperDataTimeoutReq methods */
-+void sr__oper_data_timeout_req__init
-+ (Sr__OperDataTimeoutReq *message);
-+size_t sr__oper_data_timeout_req__get_packed_size
-+ (const Sr__OperDataTimeoutReq *message);
-+size_t sr__oper_data_timeout_req__pack
-+ (const Sr__OperDataTimeoutReq *message,
-+ uint8_t *out);
-+size_t sr__oper_data_timeout_req__pack_to_buffer
-+ (const Sr__OperDataTimeoutReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__OperDataTimeoutReq *
-+ sr__oper_data_timeout_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__oper_data_timeout_req__free_unpacked
-+ (Sr__OperDataTimeoutReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__InternalStateDataReq methods */
-+void sr__internal_state_data_req__init
-+ (Sr__InternalStateDataReq *message);
-+size_t sr__internal_state_data_req__get_packed_size
-+ (const Sr__InternalStateDataReq *message);
-+size_t sr__internal_state_data_req__pack
-+ (const Sr__InternalStateDataReq *message,
-+ uint8_t *out);
-+size_t sr__internal_state_data_req__pack_to_buffer
-+ (const Sr__InternalStateDataReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__InternalStateDataReq *
-+ sr__internal_state_data_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__internal_state_data_req__free_unpacked
-+ (Sr__InternalStateDataReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__NotifStoreCleanupReq methods */
-+void sr__notif_store_cleanup_req__init
-+ (Sr__NotifStoreCleanupReq *message);
-+size_t sr__notif_store_cleanup_req__get_packed_size
-+ (const Sr__NotifStoreCleanupReq *message);
-+size_t sr__notif_store_cleanup_req__pack
-+ (const Sr__NotifStoreCleanupReq *message,
-+ uint8_t *out);
-+size_t sr__notif_store_cleanup_req__pack_to_buffer
-+ (const Sr__NotifStoreCleanupReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__NotifStoreCleanupReq *
-+ sr__notif_store_cleanup_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__notif_store_cleanup_req__free_unpacked
-+ (Sr__NotifStoreCleanupReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__DelayedMsgReq methods */
-+void sr__delayed_msg_req__init
-+ (Sr__DelayedMsgReq *message);
-+size_t sr__delayed_msg_req__get_packed_size
-+ (const Sr__DelayedMsgReq *message);
-+size_t sr__delayed_msg_req__pack
-+ (const Sr__DelayedMsgReq *message,
-+ uint8_t *out);
-+size_t sr__delayed_msg_req__pack_to_buffer
-+ (const Sr__DelayedMsgReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__DelayedMsgReq *
-+ sr__delayed_msg_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__delayed_msg_req__free_unpacked
-+ (Sr__DelayedMsgReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__NacmReloadReq methods */
-+void sr__nacm_reload_req__init
-+ (Sr__NacmReloadReq *message);
-+size_t sr__nacm_reload_req__get_packed_size
-+ (const Sr__NacmReloadReq *message);
-+size_t sr__nacm_reload_req__pack
-+ (const Sr__NacmReloadReq *message,
-+ uint8_t *out);
-+size_t sr__nacm_reload_req__pack_to_buffer
-+ (const Sr__NacmReloadReq *message,
-+ ProtobufCBuffer *buffer);
-+Sr__NacmReloadReq *
-+ sr__nacm_reload_req__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__nacm_reload_req__free_unpacked
-+ (Sr__NacmReloadReq *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Request methods */
-+void sr__request__init
-+ (Sr__Request *message);
-+size_t sr__request__get_packed_size
-+ (const Sr__Request *message);
-+size_t sr__request__pack
-+ (const Sr__Request *message,
-+ uint8_t *out);
-+size_t sr__request__pack_to_buffer
-+ (const Sr__Request *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Request *
-+ sr__request__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__request__free_unpacked
-+ (Sr__Request *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Response methods */
-+void sr__response__init
-+ (Sr__Response *message);
-+size_t sr__response__get_packed_size
-+ (const Sr__Response *message);
-+size_t sr__response__pack
-+ (const Sr__Response *message,
-+ uint8_t *out);
-+size_t sr__response__pack_to_buffer
-+ (const Sr__Response *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Response *
-+ sr__response__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__response__free_unpacked
-+ (Sr__Response *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Notification methods */
-+void sr__notification__init
-+ (Sr__Notification *message);
-+size_t sr__notification__get_packed_size
-+ (const Sr__Notification *message);
-+size_t sr__notification__pack
-+ (const Sr__Notification *message,
-+ uint8_t *out);
-+size_t sr__notification__pack_to_buffer
-+ (const Sr__Notification *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Notification *
-+ sr__notification__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__notification__free_unpacked
-+ (Sr__Notification *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__NotificationAck methods */
-+void sr__notification_ack__init
-+ (Sr__NotificationAck *message);
-+size_t sr__notification_ack__get_packed_size
-+ (const Sr__NotificationAck *message);
-+size_t sr__notification_ack__pack
-+ (const Sr__NotificationAck *message,
-+ uint8_t *out);
-+size_t sr__notification_ack__pack_to_buffer
-+ (const Sr__NotificationAck *message,
-+ ProtobufCBuffer *buffer);
-+Sr__NotificationAck *
-+ sr__notification_ack__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__notification_ack__free_unpacked
-+ (Sr__NotificationAck *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__InternalRequest methods */
-+void sr__internal_request__init
-+ (Sr__InternalRequest *message);
-+size_t sr__internal_request__get_packed_size
-+ (const Sr__InternalRequest *message);
-+size_t sr__internal_request__pack
-+ (const Sr__InternalRequest *message,
-+ uint8_t *out);
-+size_t sr__internal_request__pack_to_buffer
-+ (const Sr__InternalRequest *message,
-+ ProtobufCBuffer *buffer);
-+Sr__InternalRequest *
-+ sr__internal_request__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__internal_request__free_unpacked
-+ (Sr__InternalRequest *message,
-+ ProtobufCAllocator *allocator);
-+/* Sr__Msg methods */
-+void sr__msg__init
-+ (Sr__Msg *message);
-+size_t sr__msg__get_packed_size
-+ (const Sr__Msg *message);
-+size_t sr__msg__pack
-+ (const Sr__Msg *message,
-+ uint8_t *out);
-+size_t sr__msg__pack_to_buffer
-+ (const Sr__Msg *message,
-+ ProtobufCBuffer *buffer);
-+Sr__Msg *
-+ sr__msg__unpack
-+ (ProtobufCAllocator *allocator,
-+ size_t len,
-+ const uint8_t *data);
-+void sr__msg__free_unpacked
-+ (Sr__Msg *message,
-+ ProtobufCAllocator *allocator);
-+/* --- per-message closures --- */
-+
-+typedef void (*Sr__Value_Closure)
-+ (const Sr__Value *message,
-+ void *closure_data);
-+typedef void (*Sr__Node_Closure)
-+ (const Sr__Node *message,
-+ void *closure_data);
-+typedef void (*Sr__Error_Closure)
-+ (const Sr__Error *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionStartReq_Closure)
-+ (const Sr__SessionStartReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionStartResp_Closure)
-+ (const Sr__SessionStartResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionStopReq_Closure)
-+ (const Sr__SessionStopReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionStopResp_Closure)
-+ (const Sr__SessionStopResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionRefreshReq_Closure)
-+ (const Sr__SessionRefreshReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionRefreshResp_Closure)
-+ (const Sr__SessionRefreshResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionCheckReq_Closure)
-+ (const Sr__SessionCheckReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionCheckResp_Closure)
-+ (const Sr__SessionCheckResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionSwitchDsReq_Closure)
-+ (const Sr__SessionSwitchDsReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionSwitchDsResp_Closure)
-+ (const Sr__SessionSwitchDsResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionSetOptsReq_Closure)
-+ (const Sr__SessionSetOptsReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SessionSetOptsResp_Closure)
-+ (const Sr__SessionSetOptsResp *message,
-+ void *closure_data);
-+typedef void (*Sr__VersionVerifyReq_Closure)
-+ (const Sr__VersionVerifyReq *message,
-+ void *closure_data);
-+typedef void (*Sr__VersionVerifyResp_Closure)
-+ (const Sr__VersionVerifyResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SchemaRevision_Closure)
-+ (const Sr__SchemaRevision *message,
-+ void *closure_data);
-+typedef void (*Sr__SchemaSubmodule_Closure)
-+ (const Sr__SchemaSubmodule *message,
-+ void *closure_data);
-+typedef void (*Sr__Schema_Closure)
-+ (const Sr__Schema *message,
-+ void *closure_data);
-+typedef void (*Sr__ListSchemasReq_Closure)
-+ (const Sr__ListSchemasReq *message,
-+ void *closure_data);
-+typedef void (*Sr__ListSchemasResp_Closure)
-+ (const Sr__ListSchemasResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSchemaReq_Closure)
-+ (const Sr__GetSchemaReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSchemaResp_Closure)
-+ (const Sr__GetSchemaResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetItemReq_Closure)
-+ (const Sr__GetItemReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetItemResp_Closure)
-+ (const Sr__GetItemResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetItemsReq_Closure)
-+ (const Sr__GetItemsReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetItemsResp_Closure)
-+ (const Sr__GetItemsResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreeReq_Closure)
-+ (const Sr__GetSubtreeReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreeResp_Closure)
-+ (const Sr__GetSubtreeResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreesReq_Closure)
-+ (const Sr__GetSubtreesReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreesResp_Closure)
-+ (const Sr__GetSubtreesResp *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreeChunkReq_Closure)
-+ (const Sr__GetSubtreeChunkReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetSubtreeChunkResp_Closure)
-+ (const Sr__GetSubtreeChunkResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SetItemReq_Closure)
-+ (const Sr__SetItemReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SetItemResp_Closure)
-+ (const Sr__SetItemResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SetItemStrReq_Closure)
-+ (const Sr__SetItemStrReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SetItemStrResp_Closure)
-+ (const Sr__SetItemStrResp *message,
-+ void *closure_data);
-+typedef void (*Sr__DeleteItemReq_Closure)
-+ (const Sr__DeleteItemReq *message,
-+ void *closure_data);
-+typedef void (*Sr__DeleteItemResp_Closure)
-+ (const Sr__DeleteItemResp *message,
-+ void *closure_data);
-+typedef void (*Sr__MoveItemReq_Closure)
-+ (const Sr__MoveItemReq *message,
-+ void *closure_data);
-+typedef void (*Sr__MoveItemResp_Closure)
-+ (const Sr__MoveItemResp *message,
-+ void *closure_data);
-+typedef void (*Sr__ValidateReq_Closure)
-+ (const Sr__ValidateReq *message,
-+ void *closure_data);
-+typedef void (*Sr__ValidateResp_Closure)
-+ (const Sr__ValidateResp *message,
-+ void *closure_data);
-+typedef void (*Sr__CommitReq_Closure)
-+ (const Sr__CommitReq *message,
-+ void *closure_data);
-+typedef void (*Sr__CommitResp_Closure)
-+ (const Sr__CommitResp *message,
-+ void *closure_data);
-+typedef void (*Sr__DiscardChangesReq_Closure)
-+ (const Sr__DiscardChangesReq *message,
-+ void *closure_data);
-+typedef void (*Sr__DiscardChangesResp_Closure)
-+ (const Sr__DiscardChangesResp *message,
-+ void *closure_data);
-+typedef void (*Sr__CopyConfigReq_Closure)
-+ (const Sr__CopyConfigReq *message,
-+ void *closure_data);
-+typedef void (*Sr__CopyConfigResp_Closure)
-+ (const Sr__CopyConfigResp *message,
-+ void *closure_data);
-+typedef void (*Sr__LockReq_Closure)
-+ (const Sr__LockReq *message,
-+ void *closure_data);
-+typedef void (*Sr__LockResp_Closure)
-+ (const Sr__LockResp *message,
-+ void *closure_data);
-+typedef void (*Sr__UnlockReq_Closure)
-+ (const Sr__UnlockReq *message,
-+ void *closure_data);
-+typedef void (*Sr__UnlockResp_Closure)
-+ (const Sr__UnlockResp *message,
-+ void *closure_data);
-+typedef void (*Sr__SubscribeReq_Closure)
-+ (const Sr__SubscribeReq *message,
-+ void *closure_data);
-+typedef void (*Sr__SubscribeResp_Closure)
-+ (const Sr__SubscribeResp *message,
-+ void *closure_data);
-+typedef void (*Sr__UnsubscribeReq_Closure)
-+ (const Sr__UnsubscribeReq *message,
-+ void *closure_data);
-+typedef void (*Sr__UnsubscribeResp_Closure)
-+ (const Sr__UnsubscribeResp *message,
-+ void *closure_data);
-+typedef void (*Sr__CheckEnabledRunningReq_Closure)
-+ (const Sr__CheckEnabledRunningReq *message,
-+ void *closure_data);
-+typedef void (*Sr__CheckEnabledRunningResp_Closure)
-+ (const Sr__CheckEnabledRunningResp *message,
-+ void *closure_data);
-+typedef void (*Sr__ModuleInstallNotification_Closure)
-+ (const Sr__ModuleInstallNotification *message,
-+ void *closure_data);
-+typedef void (*Sr__FeatureEnableNotification_Closure)
-+ (const Sr__FeatureEnableNotification *message,
-+ void *closure_data);
-+typedef void (*Sr__ModuleChangeNotification_Closure)
-+ (const Sr__ModuleChangeNotification *message,
-+ void *closure_data);
-+typedef void (*Sr__SubtreeChangeNotification_Closure)
-+ (const Sr__SubtreeChangeNotification *message,
-+ void *closure_data);
-+typedef void (*Sr__Change_Closure)
-+ (const Sr__Change *message,
-+ void *closure_data);
-+typedef void (*Sr__GetChangesReq_Closure)
-+ (const Sr__GetChangesReq *message,
-+ void *closure_data);
-+typedef void (*Sr__GetChangesResp_Closure)
-+ (const Sr__GetChangesResp *message,
-+ void *closure_data);
-+typedef void (*Sr__CheckExecPermReq_Closure)
-+ (const Sr__CheckExecPermReq *message,
-+ void *closure_data);
-+typedef void (*Sr__CheckExecPermResp_Closure)
-+ (const Sr__CheckExecPermResp *message,
-+ void *closure_data);
-+typedef void (*Sr__RPCReq_Closure)
-+ (const Sr__RPCReq *message,
-+ void *closure_data);
-+typedef void (*Sr__RPCResp_Closure)
-+ (const Sr__RPCResp *message,
-+ void *closure_data);
-+typedef void (*Sr__EventNotifReq_Closure)
-+ (const Sr__EventNotifReq *message,
-+ void *closure_data);
-+typedef void (*Sr__EventNotifResp_Closure)
-+ (const Sr__EventNotifResp *message,
-+ void *closure_data);
-+typedef void (*Sr__EventNotifReplayReq_Closure)
-+ (const Sr__EventNotifReplayReq *message,
-+ void *closure_data);
-+typedef void (*Sr__EventNotifReplayResp_Closure)
-+ (const Sr__EventNotifReplayResp *message,
-+ void *closure_data);
-+typedef void (*Sr__DataProvideReq_Closure)
-+ (const Sr__DataProvideReq *message,
-+ void *closure_data);
-+typedef void (*Sr__DataProvideResp_Closure)
-+ (const Sr__DataProvideResp *message,
-+ void *closure_data);
-+typedef void (*Sr__ModuleInstallReq_Closure)
-+ (const Sr__ModuleInstallReq *message,
-+ void *closure_data);
-+typedef void (*Sr__ModuleInstallResp_Closure)
-+ (const Sr__ModuleInstallResp *message,
-+ void *closure_data);
-+typedef void (*Sr__FeatureEnableReq_Closure)
-+ (const Sr__FeatureEnableReq *message,
-+ void *closure_data);
-+typedef void (*Sr__FeatureEnableResp_Closure)
-+ (const Sr__FeatureEnableResp *message,
-+ void *closure_data);
-+typedef void (*Sr__UnsubscribeDestinationReq_Closure)
-+ (const Sr__UnsubscribeDestinationReq *message,
-+ void *closure_data);
-+typedef void (*Sr__CommitTimeoutReq_Closure)
-+ (const Sr__CommitTimeoutReq *message,
-+ void *closure_data);
-+typedef void (*Sr__OperDataTimeoutReq_Closure)
-+ (const Sr__OperDataTimeoutReq *message,
-+ void *closure_data);
-+typedef void (*Sr__InternalStateDataReq_Closure)
-+ (const Sr__InternalStateDataReq *message,
-+ void *closure_data);
-+typedef void (*Sr__NotifStoreCleanupReq_Closure)
-+ (const Sr__NotifStoreCleanupReq *message,
-+ void *closure_data);
-+typedef void (*Sr__DelayedMsgReq_Closure)
-+ (const Sr__DelayedMsgReq *message,
-+ void *closure_data);
-+typedef void (*Sr__NacmReloadReq_Closure)
-+ (const Sr__NacmReloadReq *message,
-+ void *closure_data);
-+typedef void (*Sr__Request_Closure)
-+ (const Sr__Request *message,
-+ void *closure_data);
-+typedef void (*Sr__Response_Closure)
-+ (const Sr__Response *message,
-+ void *closure_data);
-+typedef void (*Sr__Notification_Closure)
-+ (const Sr__Notification *message,
-+ void *closure_data);
-+typedef void (*Sr__NotificationAck_Closure)
-+ (const Sr__NotificationAck *message,
-+ void *closure_data);
-+typedef void (*Sr__InternalRequest_Closure)
-+ (const Sr__InternalRequest *message,
-+ void *closure_data);
-+typedef void (*Sr__Msg_Closure)
-+ (const Sr__Msg *message,
-+ void *closure_data);
-+
-+/* --- services --- */
-+
-+
-+/* --- descriptors --- */
-+
-+extern const ProtobufCEnumDescriptor sr__api_variant__descriptor;
-+extern const ProtobufCEnumDescriptor sr__data_store__descriptor;
-+extern const ProtobufCEnumDescriptor sr__session_flags__descriptor;
-+extern const ProtobufCEnumDescriptor sr__edit_flags__descriptor;
-+extern const ProtobufCEnumDescriptor sr__subscription_type__descriptor;
-+extern const ProtobufCEnumDescriptor sr__notification_event__descriptor;
-+extern const ProtobufCEnumDescriptor sr__module_state__descriptor;
-+extern const ProtobufCEnumDescriptor sr__change_operation__descriptor;
-+extern const ProtobufCEnumDescriptor sr__operation__descriptor;
-+extern const ProtobufCMessageDescriptor sr__value__descriptor;
-+extern const ProtobufCEnumDescriptor sr__value__types__descriptor;
-+extern const ProtobufCMessageDescriptor sr__node__descriptor;
-+extern const ProtobufCMessageDescriptor sr__error__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_start_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_start_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_stop_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_stop_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_refresh_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_refresh_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_check_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_check_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_switch_ds_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_switch_ds_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_set_opts_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__session_set_opts_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__version_verify_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__version_verify_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__schema_revision__descriptor;
-+extern const ProtobufCMessageDescriptor sr__schema_submodule__descriptor;
-+extern const ProtobufCMessageDescriptor sr__schema__descriptor;
-+extern const ProtobufCMessageDescriptor sr__list_schemas_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__list_schemas_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_schema_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_schema_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_item_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_item_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_items_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_items_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtree_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtree_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtrees_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtrees_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtree_chunk_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_subtree_chunk_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__set_item_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__set_item_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__set_item_str_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__set_item_str_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__delete_item_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__delete_item_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__move_item_req__descriptor;
-+extern const ProtobufCEnumDescriptor sr__move_item_req__move_position__descriptor;
-+extern const ProtobufCMessageDescriptor sr__move_item_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__validate_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__validate_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__commit_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__commit_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__discard_changes_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__discard_changes_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__copy_config_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__copy_config_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__lock_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__lock_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__unlock_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__unlock_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__subscribe_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__subscribe_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__unsubscribe_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__unsubscribe_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__check_enabled_running_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__check_enabled_running_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__module_install_notification__descriptor;
-+extern const ProtobufCMessageDescriptor sr__feature_enable_notification__descriptor;
-+extern const ProtobufCMessageDescriptor sr__module_change_notification__descriptor;
-+extern const ProtobufCMessageDescriptor sr__subtree_change_notification__descriptor;
-+extern const ProtobufCMessageDescriptor sr__change__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_changes_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__get_changes_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__check_exec_perm_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__check_exec_perm_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__rpcreq__descriptor;
-+extern const ProtobufCMessageDescriptor sr__rpcresp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__event_notif_req__descriptor;
-+extern const ProtobufCEnumDescriptor sr__event_notif_req__notif_type__descriptor;
-+extern const ProtobufCEnumDescriptor sr__event_notif_req__notif_flags__descriptor;
-+extern const ProtobufCMessageDescriptor sr__event_notif_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__event_notif_replay_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__event_notif_replay_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__data_provide_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__data_provide_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__module_install_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__module_install_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__feature_enable_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__feature_enable_resp__descriptor;
-+extern const ProtobufCMessageDescriptor sr__unsubscribe_destination_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__commit_timeout_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__oper_data_timeout_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__internal_state_data_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__notif_store_cleanup_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__delayed_msg_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__nacm_reload_req__descriptor;
-+extern const ProtobufCMessageDescriptor sr__request__descriptor;
-+extern const ProtobufCMessageDescriptor sr__response__descriptor;
-+extern const ProtobufCMessageDescriptor sr__notification__descriptor;
-+extern const ProtobufCMessageDescriptor sr__notification_ack__descriptor;
-+extern const ProtobufCMessageDescriptor sr__internal_request__descriptor;
-+extern const ProtobufCMessageDescriptor sr__msg__descriptor;
-+extern const ProtobufCEnumDescriptor sr__msg__msg_type__descriptor;
-+
-+PROTOBUF_C__END_DECLS
-+
-+
-+#endif /* PROTOBUF_C_sysrepo_2eproto__INCLUDED */
-Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/CMakeLists.txt
+Index: sysrepo-0.7.5/CMakeLists.txt
===================================================================
---- sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf.orig/CMakeLists.txt
-+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/CMakeLists.txt
-@@ -280,7 +280,7 @@ install (FILES ${INTERNAL_YANGS} DESTINA
+--- sysrepo-0.7.5.orig/CMakeLists.txt
++++ sysrepo-0.7.5/CMakeLists.txt
+@@ -303,7 +303,7 @@ install (FILES ${INTERNAL_YANGS} DESTINA
# install NACM YANG module
if(ENABLE_NACM)
-- INSTALL_YANG("ietf-netconf-acm" "@2012-02-22" "644")
-+ # INSTALL_YANG("ietf-netconf-acm" "@2012-02-22" "644")
+- INSTALL_YANG("ietf-netconf-acm" "@2018-02-14" "644")
++ #INSTALL_YANG("ietf-netconf-acm" "@2018-02-14" "644")
endif(ENABLE_NACM)
find_package(PkgConfig QUIET)
-@@ -304,9 +304,9 @@ if(WITH_SYSTEMD)
+@@ -327,9 +327,9 @@ if(WITH_SYSTEMD)
FILES_MATCHING PATTERN "*.service")
endif()
-INSTALL_YANG("ietf-netconf-notifications" "" "666")
-INSTALL_YANG("nc-notifications" "" "666")
-INSTALL_YANG("notifications" "" "666")
-+# INSTALL_YANG("ietf-netconf-notifications" "" "666")
-+# INSTALL_YANG("nc-notifications" "" "666")
-+# INSTALL_YANG("notifications" "" "666")
++#INSTALL_YANG("ietf-netconf-notifications" "" "666")
++#INSTALL_YANG("nc-notifications" "" "666")
++#INSTALL_YANG("notifications" "" "666")
if(GEN_LANGUAGE_BINDINGS)
add_subdirectory(swig)
+++ /dev/null
-Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/inc/sysrepo.h
-===================================================================
---- sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf.orig/inc/sysrepo.h
-+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/inc/sysrepo.h
-@@ -51,6 +51,7 @@
- * @ref xp_page "XPath Addressing" is used for node identification in data-related calls.
- */
-
-+#include <time.h>
- #include <stdbool.h>
- #include <stdint.h>
- #include <stdlib.h>
-Index: sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/clientlib/client_library.c
+Index: sysrepo-0.7.5/src/clientlib/client_library.c
===================================================================
---- sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf.orig/src/clientlib/client_library.c
-+++ sysrepo-e4a5705a4c5293ba121048c71899b98243d99edf/src/clientlib/client_library.c
-@@ -405,14 +405,6 @@ sr_connect(const char *app_name, const s
- if (SR_ERR_OK != rc) {
+--- sysrepo-0.7.5.orig/src/clientlib/client_library.c
++++ sysrepo-0.7.5/src/clientlib/client_library.c
+@@ -396,13 +396,13 @@ sr_connect(const char *app_name, const s
if (opts & SR_CONN_DAEMON_REQUIRED) {
if ((opts & SR_CONN_DAEMON_START) && (0 == getuid())) {
-- /* sysrepo daemon start requested and process is running under root privileges */
+ /* sysrepo daemon start requested and process is running under root privileges */
- SR_LOG_DBG_MSG("Sysrepo daemon not detected, starting it.");
- ret = system("sysrepod");
- if (0 == ret) {
- } else {
- SR_LOG_WRN("Unable to start sysrepo daemon, error code=%d.", ret);
- }
++ //SR_LOG_DBG_MSG("Sysrepo daemon not detected, starting it.");
++ //ret = system("sysrepod");
++ //if (0 == ret) {
++ // SR_LOG_INF_MSG("Sysrepo daemon has been started.");
++ //} else {
++ // SR_LOG_WRN("Unable to start sysrepo daemon, error code=%d.", ret);
++ //}
/* retry to connect again in any case */
rc = cl_socket_connect(connection, SR_DAEMON_SOCKET);
CHECK_RC_LOG_GOTO(rc, cleanup, "Unable to connect to sysrepod: %s.", sr_strerror(rc));
include $(TOPDIR)/rules.mk
PKG_NAME:=tcpreplay
-PKG_VERSION:=4.2.5
+PKG_VERSION:=4.2.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/appneta/tcpreplay/releases/download/v$(PKG_VERSION)
-PKG_HASH:=941026be34e1db5101d3d22ebddd6fff76179a1ee81e273338f533ba4eca89d7
+PKG_HASH:=043756c532dab93e2be33a517ef46b1341f7239278a1045ae670041dd8a4531d
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=docs/LICENSE
PKG_NAME:=tgt
PKG_VERSION:=1.0.73
-PKG_REV:=013223dc886a03719ca02db52162056249d99448
-PKG_MIRROR_HASH:=649bd012ab0944644ff83cc2974e7a5c374d568e0f4328d9f8d352d4b59f73bb
-PKG_RELEASE:=1
-PKG_USE_MIPS16:=0
+PKG_RELEASE:=2
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/fujita/tgt.git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/fujita/tgt/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=2e3899a2235386a68df8cbf0eccb6a44e221a3e9e6bd9215c903c3fc9ed34bbf
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=GPL-2.0
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=tinc
-PKG_VERSION:=1.0.33
+PKG_VERSION:=1.0.35
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.tinc-vpn.org/packages
-PKG_HASH:=7f6f5dc6444bc651ac635c81f4745bcce581bbd1d45ed60cbdc4ee11bebb10f4
+PKG_HASH:=18c83b147cc3e2133a7ac2543eeb014d52070de01c7474287d3ccecc9b16895e
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=tor
-PKG_VERSION:=0.3.2.10
+PKG_VERSION:=0.3.4.8
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dist.torproject.org/ \
https://archive.torproject.org/tor-package-archive
-PKG_HASH:=60df77c31dcf94fdd686c8ca8c34f3b70243b33a7344ecc0b719d5ca2617cbee
-PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
+PKG_HASH:=826a4cb2c099a29c7cf91516ffffcfcb5aace7533b8853a8c8bddcfe2bfb1023
+PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de> \
+ Peter Wagner <tripolar@gmx.at>
PKG_LICENSE_FILES:=LICENSE
PKG_INSTALL:=1
## The port on which Tor will listen for local connections from Tor
## controller applications, as documented in control-spec.txt.
-@@ -227,3 +227,4 @@
+@@ -233,3 +233,4 @@
#%include /etc/torrc.d/
#%include /etc/torrc.custom
include $(TOPDIR)/rules.mk
PKG_NAME:=transmission
-PKG_VERSION:=2.93
-PKG_RELEASE:=6
+PKG_VERSION:=2.94
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
-PKG_HASH:=8815920e0a4499bcdadbbe89a4115092dab42ce5199f71ff9a926cfd12b9b90b
+PKG_HASH:=35442cc849f91f8df982c3d0d479d650c6ca19310a994eccdaa79a4af3916b7d
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
CATEGORY:=Network
TITLE:=BitTorrent client
URL:=http://www.transmissionbt.com
- DEPENDS:=+ca-bundle +libcurl +libevent2 +libminiupnpc +libnatpmp +libpthread +librt +zlib
+ DEPENDS:=+libcurl +libevent2 +libminiupnpc +libnatpmp +libpthread +librt +zlib
endef
define Package/transmission-daemon/Default
option config_dir '/tmp/transmission'
option config_overwrite '1'
option user 'transmission'
+ option group 'transmission'
option mem_percentage 50
option nice 10
+ option web_home ''
option alt_speed_down 50
option alt_speed_enabled false
option alt_speed_time_begin 540
option rpc_authentication_required false
option rpc_bind_address '0.0.0.0'
option rpc_enabled true
+ option rpc_host_whitelist '127.0.0.1,192.168.1.*'
option rpc_host_whitelist_enabled false
option rpc_password ''
option rpc_port 9091
option rpc_url '/transmission/'
option rpc_username ''
option rpc_whitelist '127.0.0.1,192.168.1.*'
- option rpc_whitelist_enabled true
+ option rpc_whitelist_enabled false
option scrape_paused_torrents_enabled true
option script_torrent_done_enabled false
option script_torrent_done_filename ''
local USE
local user
+ local group
local config_overwrite
local download_dir config_dir
local mem_percentage
local nice
local cmdline
+ local web_home
section_enabled "$section" || return 1
config_get config_dir "$cfg" 'config_dir' '/var/etc/transmission'
config_get user "$cfg" 'user'
+ config_get group "$cfg" 'group'
config_get download_dir "$cfg" 'download_dir' '/var/etc/transmission'
config_get mem_percentage "$cfg" 'mem_percentage' '50'
config_get config_overwrite "$cfg" config_overwrite 1
config_get nice "$cfg" nice 0
+ config_get web_home "$cfg" 'web_home'
local MEM=$(sed -ne 's!^MemTotal:[[:space:]]*\([0-9]*\) kB$!\1!p' /proc/meminfo)
if test "$MEM" -gt 1;then
mkdir -p $config_dir
chmod 0755 $config_dir
touch $config_file
- [ -z "$user" ] || chown -R "$user:$user" $config_dir
+ [ -z "$user" ] || chown -R "$user:$group" $config_dir
}
[ "$config_overwrite" == 0 ] || {
append_params_quotes "$cfg" \
blocklist_url bind_address_ipv4 bind_address_ipv6 download_dir incomplete_dir \
peer_congestion_algorithm peer_socket_tos rpc_bind_address rpc_password rpc_url \
- rpc_username rpc_whitelist script_torrent_done_filename watch_dir
+ rpc_username rpc_host_whitelist rpc_whitelist script_torrent_done_filename watch_dir
echo "\"invalid-key\": false" >> $config_file
echo "}" >> $config_file
cmdline="transmission-daemon -g $config_dir -f"
procd_open_instance
procd_set_param command $cmdline
- procd_set_param env CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
procd_set_param user $user
- procd_set_param group $user
+ procd_set_param group $group
procd_set_param nice $nice
procd_set_param respawn retry=60
logger -t transmission "Starting with $USE virt mem"
fi
+ if test -d "$web_home"; then
+ procd_set_param env TRANSMISSION_WEB_HOME="$web_home"
+ fi
+
procd_add_jail transmission log
procd_add_jail_mount $config_file
procd_add_jail_mount_rw $download_dir
+++ /dev/null
-From bad7f584eb11076ae37fd51cdb21842935c6ea57 Mon Sep 17 00:00:00 2001
-From: Mike Gelfand <mikedld@mikedld.com>
-Date: Wed, 26 Oct 2016 20:37:10 +0300
-Subject: [PATCH] Add support for mbedtls (formely polarssl)
-
----
- cmake/FindPolarSSL.cmake | 37 +++++++----
- configure.ac | 28 ++++----
- libtransmission/CMakeLists.txt | 4 ++
- libtransmission/Makefile.am | 3 +
- libtransmission/crypto-utils-polarssl.c | 112 +++++++++++++++++++-------------
- 5 files changed, 115 insertions(+), 69 deletions(-)
-
-diff --git a/cmake/FindPolarSSL.cmake b/cmake/FindPolarSSL.cmake
-index 0a958e0..e4e1ac6 100644
---- a/cmake/FindPolarSSL.cmake
-+++ b/cmake/FindPolarSSL.cmake
-@@ -8,21 +8,36 @@ if(POLARSSL_PREFER_STATIC_LIB)
- endif()
-
- if(UNIX)
-- find_package(PkgConfig QUIET)
-- pkg_check_modules(_POLARSSL QUIET polarssl)
-+ find_package(PkgConfig QUIET)
-+ pkg_check_modules(_MBEDTLS QUIET mbedtls)
- endif()
-
--find_path(POLARSSL_INCLUDE_DIR NAMES polarssl/version.h HINTS ${_POLARSSL_INCLUDEDIR})
--find_library(POLARSSL_LIBRARY NAMES polarssl HINTS ${_POLARSSL_LIBDIR})
-+find_path(MBEDTLS_INCLUDE_DIR NAMES mbedtls/version.h HINTS ${_MBEDTLS_INCLUDEDIR})
-+find_library(MBEDTLS_LIBRARY NAMES mbedtls HINTS ${_MBEDTLS_LIBDIR})
-+if(MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIBRARY)
-+ set(POLARSSL_INCLUDE_DIR ${MBEDTLS_INCLUDE_DIR})
-+ set(POLARSSL_LIBRARY ${MBEDTLS_LIBRARY})
-+ set(POLARSSL_VERSION ${_MBEDTLS_VERSION})
-+ set(POLARSSL_IS_MBEDTLS ON)
-+else()
-+ if(UNIX)
-+ pkg_check_modules(_POLARSSL QUIET polarssl)
-+ endif()
-+
-+ find_path(POLARSSL_INCLUDE_DIR NAMES polarssl/version.h HINTS ${_POLARSSL_INCLUDEDIR})
-+ find_library(POLARSSL_LIBRARY NAMES polarssl HINTS ${_POLARSSL_LIBDIR})
-+ set(POLARSSL_VERSION ${_POLARSSL_VERSION})
-+ set(POLARSSL_IS_MBEDTLS OFF)
-+endif()
-
--if(POLARSSL_INCLUDE_DIR)
-- if(_POLARSSL_VERSION)
-- set(POLARSSL_VERSION ${_POLARSSL_VERSION})
-+if(NOT POLARSSL_VERSION AND POLARSSL_INCLUDE_DIR)
-+ if(POLARSSL_IS_MBEDTLS)
-+ file(STRINGS "${POLARSSL_INCLUDE_DIR}/mbedtls/version.h" POLARSSL_VERSION_STR REGEX "^#define[\t ]+MBEDTLS_VERSION_STRING[\t ]+\"[^\"]+\"")
- else()
- file(STRINGS "${POLARSSL_INCLUDE_DIR}/polarssl/version.h" POLARSSL_VERSION_STR REGEX "^#define[\t ]+POLARSSL_VERSION_STRING[\t ]+\"[^\"]+\"")
-- if(POLARSSL_VERSION_STR MATCHES "\"([^\"]+)\"")
-- set(POLARSSL_VERSION "${CMAKE_MATCH_1}")
-- endif()
-+ endif()
-+ if(POLARSSL_VERSION_STR MATCHES "\"([^\"]+)\"")
-+ set(POLARSSL_VERSION "${CMAKE_MATCH_1}")
- endif()
- endif()
-
-@@ -39,7 +54,7 @@ find_package_handle_standard_args(PolarSSL
- POLARSSL_VERSION
- )
-
--mark_as_advanced(POLARSSL_INCLUDE_DIR POLARSSL_LIBRARY)
-+mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY POLARSSL_INCLUDE_DIR POLARSSL_LIBRARY)
-
- if(POLARSSL_PREFER_STATIC_LIB)
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${POLARSSL_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
-diff --git a/configure.ac b/configure.ac
-index aff673b..cb026df 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -149,23 +149,26 @@ AS_IF([test "x$want_crypto" = "xauto" -o "x$want_crypto" = "xcyassl"], [
- )
- ])
- AS_IF([test "x$want_crypto" = "xauto" -o "x$want_crypto" = "xpolarssl"], [
-- AC_CHECK_HEADER([polarssl/version.h],
-- [AC_EGREP_CPP([version_ok], [#include <polarssl/version.h>
-- #if defined (POLARSSL_VERSION_NUMBER) && POLARSSL_VERSION_NUMBER >= $POLARSSL_MINIMUM
-- version_ok
-- #endif],
-- [AC_CHECK_LIB([polarssl], [dhm_calc_secret],
-- [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS=""; CRYPTO_LIBS="-lpolarssl"],
-+ PKG_CHECK_MODULES(MBEDTLS, [mbedtls >= $POLARSSL_MINIMUM],
-+ [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS="$MBEDTLS_CFLAGS"; CRYPTO_LIBS="$MBEDTLS_LIBS"; POLARSSL_IS_MBEDTLS=yes],
-+ [AC_CHECK_HEADER([polarssl/version.h],
-+ [AC_EGREP_CPP([version_ok], [#include <polarssl/version.h>
-+ #if defined (POLARSSL_VERSION_NUMBER) && POLARSSL_VERSION_NUMBER >= $POLARSSL_MINIMUM
-+ version_ok
-+ #endif],
-+ [AC_CHECK_LIB([polarssl], [dhm_calc_secret],
-+ [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS=""; CRYPTO_LIBS="-lpolarssl"],
-+ [AS_IF([test "x$want_crypto" = "xpolarssl"],
-+ [AC_MSG_ERROR([PolarSSL support requested, but library not found.])]
-+ )]
-+ )],
- [AS_IF([test "x$want_crypto" = "xpolarssl"],
-- [AC_MSG_ERROR([PolarSSL support requested, but library not found.])]
-+ [AC_MSG_ERROR([PolarSSL support requested, but version not suitable.])]
- )]
- )],
- [AS_IF([test "x$want_crypto" = "xpolarssl"],
-- [AC_MSG_ERROR([PolarSSL support requested, but version not suitable.])]
-+ [AC_MSG_ERROR([PolarSSL support requested, but headers not found.])]
- )]
-- )],
-- [AS_IF([test "x$want_crypto" = "xpolarssl"],
-- [AC_MSG_ERROR([PolarSSL support requested, but headers not found.])]
- )]
- )
- ])
-@@ -180,6 +183,7 @@ AS_IF([test "x$CRYPTO_PKG" = "x"], [
- AM_CONDITIONAL([CRYPTO_USE_OPENSSL],[test "x$CRYPTO_PKG" = "xopenssl"])
- AM_CONDITIONAL([CRYPTO_USE_CYASSL],[test "x$CRYPTO_PKG" = "xcyassl"])
- AM_CONDITIONAL([CRYPTO_USE_POLARSSL],[test "x$CRYPTO_PKG" = "xpolarssl"])
-+AM_CONDITIONAL([POLARSSL_IS_MBEDTLS],[test "x$POLARSSL_IS_MBEDTLS" = "xyes"])
- AC_SUBST(CRYPTO_PKG)
- AC_SUBST(CRYPTO_CFLAGS)
- AC_SUBST(CRYPTO_LIBS)
-diff --git a/libtransmission/CMakeLists.txt b/libtransmission/CMakeLists.txt
-index 4865dee..b5230b9 100644
---- a/libtransmission/CMakeLists.txt
-+++ b/libtransmission/CMakeLists.txt
-@@ -194,6 +194,10 @@ if(USE_SYSTEM_B64)
- add_definitions(-DUSE_SYSTEM_B64)
- endif()
-
-+if(POLARSSL_IS_MBEDTLS)
-+ add_definitions(-DPOLARSSL_IS_MBEDTLS)
-+endif()
-+
- include_directories(
- ${PROJECT_SOURCE_DIR}
- ${PROJECT_BINARY_DIR}
-diff --git a/libtransmission/Makefile.am b/libtransmission/Makefile.am
-index f91769a..4d7e85a 100644
---- a/libtransmission/Makefile.am
-+++ b/libtransmission/Makefile.am
-@@ -102,6 +102,9 @@ libtransmission_a_SOURCES += crypto-utils-cyassl.c
- endif
- if CRYPTO_USE_POLARSSL
- libtransmission_a_SOURCES += crypto-utils-polarssl.c
-+if POLARSSL_IS_MBEDTLS
-+AM_CPPFLAGS += -DPOLARSSL_IS_MBEDTLS
-+endif
- endif
-
- noinst_HEADERS = \
-diff --git a/libtransmission/crypto-utils-polarssl.c b/libtransmission/crypto-utils-polarssl.c
-index 1c59a7f..e98c13d 100644
---- a/libtransmission/crypto-utils-polarssl.c
-+++ b/libtransmission/crypto-utils-polarssl.c
-@@ -1,5 +1,5 @@
- /*
-- * This file Copyright (C) 2014-2015 Mnemosyne LLC
-+ * This file Copyright (C) 2014-2016 Mnemosyne LLC
- *
- * It may be used under the GNU GPL versions 2 or 3
- * or any future license endorsed by Mnemosyne LLC.
-@@ -7,15 +7,25 @@
- * $Id$
- */
-
-+#if defined (POLARSSL_IS_MBEDTLS)
-+ #define API_HEADER(x) <mbedtls/x>
-+ #define API(x) mbedtls_##x
-+ #define API_VERSION_NUMBER MBEDTLS_VERSION_NUMBER
-+#else
-+ #define API_HEADER(x) <polarssl/x>
-+ #define API(x) x
-+ #define API_VERSION_NUMBER POLARSSL_VERSION_NUMBER
-+#endif
-+
- #include <assert.h>
-
--#include <polarssl/arc4.h>
--#include <polarssl/base64.h>
--#include <polarssl/ctr_drbg.h>
--#include <polarssl/dhm.h>
--#include <polarssl/error.h>
--#include <polarssl/sha1.h>
--#include <polarssl/version.h>
-+#include API_HEADER (arc4.h)
-+#include API_HEADER (base64.h)
-+#include API_HEADER (ctr_drbg.h)
-+#include API_HEADER (dhm.h)
-+#include API_HEADER (error.h)
-+#include API_HEADER (sha1.h)
-+#include API_HEADER (version.h)
-
- #include "transmission.h"
- #include "crypto-utils.h"
-@@ -41,7 +51,9 @@ log_polarssl_error (int error_code,
- {
- char error_message[256];
-
--#if POLARSSL_VERSION_NUMBER >= 0x01030000
-+#if defined (POLARSSL_IS_MBEDTLS)
-+ mbedtls_strerror (error_code, error_message, sizeof (error_message));
-+#elif API_VERSION_NUMBER >= 0x01030000
- polarssl_strerror (error_code, error_message, sizeof (error_message));
- #else
- error_strerror (error_code, error_message, sizeof (error_message));
-@@ -51,7 +63,7 @@ log_polarssl_error (int error_code,
- }
- }
-
--#define log_error(error_code) log_polarssl_error(error_code, __FILE__, __LINE__)
-+#define log_error(error_code) log_polarssl_error ((error_code), __FILE__, __LINE__)
-
- static bool
- check_polarssl_result (int result,
-@@ -83,15 +95,20 @@ my_rand (void * context UNUSED, unsigned char * buffer, size_t buffer_size)
- return 0;
- }
-
--static ctr_drbg_context *
-+static API (ctr_drbg_context) *
- get_rng (void)
- {
-- static ctr_drbg_context rng;
-+ static API (ctr_drbg_context) rng;
- static bool rng_initialized = false;
-
- if (!rng_initialized)
- {
-- if (!check_result (ctr_drbg_init (&rng, &my_rand, NULL, NULL, 0)))
-+#if API_VERSION_NUMBER >= 0x02000000
-+ API (ctr_drbg_init) (&rng);
-+ if (!check_result (API (ctr_drbg_seed) (&rng, &my_rand, NULL, NULL, 0)))
-+#else
-+ if (!check_result (API (ctr_drbg_init) (&rng, &my_rand, NULL, NULL, 0)))
-+#endif
- return NULL;
- rng_initialized = true;
- }
-@@ -117,13 +134,13 @@ get_rng_lock (void)
- tr_sha1_ctx_t
- tr_sha1_init (void)
- {
-- sha1_context * handle = tr_new0 (sha1_context, 1);
-+ API (sha1_context) * handle = tr_new0 (API (sha1_context), 1);
-
--#if POLARSSL_VERSION_NUMBER >= 0x01030800
-- sha1_init (handle);
-+#if API_VERSION_NUMBER >= 0x01030800
-+ API (sha1_init) (handle);
- #endif
-
-- sha1_starts (handle);
-+ API (sha1_starts) (handle);
- return handle;
- }
-
-@@ -139,7 +156,7 @@ tr_sha1_update (tr_sha1_ctx_t handle,
-
- assert (data != NULL);
-
-- sha1_update (handle, data, data_length);
-+ API (sha1_update) (handle, data, data_length);
- return true;
- }
-
-@@ -151,11 +168,11 @@ tr_sha1_final (tr_sha1_ctx_t handle,
- {
- assert (handle != NULL);
-
-- sha1_finish (handle, hash);
-+ API (sha1_finish) (handle, hash);
- }
-
--#if POLARSSL_VERSION_NUMBER >= 0x01030800
-- sha1_free (handle);
-+#if API_VERSION_NUMBER >= 0x01030800
-+ API (sha1_free) (handle);
- #endif
-
- tr_free (handle);
-@@ -169,10 +186,10 @@ tr_sha1_final (tr_sha1_ctx_t handle,
- tr_rc4_ctx_t
- tr_rc4_new (void)
- {
-- arc4_context * handle = tr_new0 (arc4_context, 1);
-+ API (arc4_context) * handle = tr_new0 (API (arc4_context), 1);
-
--#if POLARSSL_VERSION_NUMBER >= 0x01030800
-- arc4_init (handle);
-+#if API_VERSION_NUMBER >= 0x01030800
-+ API (arc4_init) (handle);
- #endif
-
- return handle;
-@@ -181,8 +198,8 @@ tr_rc4_new (void)
- void
- tr_rc4_free (tr_rc4_ctx_t handle)
- {
--#if POLARSSL_VERSION_NUMBER >= 0x01030800
-- arc4_free (handle);
-+#if API_VERSION_NUMBER >= 0x01030800
-+ API (arc4_free) (handle);
- #endif
-
- tr_free (handle);
-@@ -196,7 +213,7 @@ tr_rc4_set_key (tr_rc4_ctx_t handle,
- assert (handle != NULL);
- assert (key != NULL);
-
-- arc4_setup (handle, key, key_length);
-+ API (arc4_setup) (handle, key, key_length);
- }
-
- void
-@@ -213,7 +230,7 @@ tr_rc4_process (tr_rc4_ctx_t handle,
- assert (input != NULL);
- assert (output != NULL);
-
-- arc4_crypt (handle, length, input, output);
-+ API (arc4_crypt) (handle, length, input, output);
- }
-
- /***
-@@ -226,19 +243,19 @@ tr_dh_new (const uint8_t * prime_num,
- const uint8_t * generator_num,
- size_t generator_num_length)
- {
-- dhm_context * handle = tr_new0 (dhm_context, 1);
-+ API (dhm_context) * handle = tr_new0 (API (dhm_context), 1);
-
- assert (prime_num != NULL);
- assert (generator_num != NULL);
-
--#if POLARSSL_VERSION_NUMBER >= 0x01030800
-- dhm_init (handle);
-+#if API_VERSION_NUMBER >= 0x01030800
-+ API (dhm_init) (handle);
- #endif
-
-- if (!check_result (mpi_read_binary (&handle->P, prime_num, prime_num_length)) ||
-- !check_result (mpi_read_binary (&handle->G, generator_num, generator_num_length)))
-+ if (!check_result (API (mpi_read_binary) (&handle->P, prime_num, prime_num_length)) ||
-+ !check_result (API (mpi_read_binary) (&handle->G, generator_num, generator_num_length)))
- {
-- dhm_free (handle);
-+ API (dhm_free) (handle);
- return NULL;
- }
-
-@@ -253,7 +270,7 @@ tr_dh_free (tr_dh_ctx_t handle)
- if (handle == NULL)
- return;
-
-- dhm_free (handle);
-+ API (dhm_free) (handle);
- }
-
- bool
-@@ -262,7 +279,7 @@ tr_dh_make_key (tr_dh_ctx_t raw_handle,
- uint8_t * public_key,
- size_t * public_key_length)
- {
-- dhm_context * handle = raw_handle;
-+ API (dhm_context) * handle = raw_handle;
-
- assert (handle != NULL);
- assert (public_key != NULL);
-@@ -270,8 +287,8 @@ tr_dh_make_key (tr_dh_ctx_t raw_handle,
- if (public_key_length != NULL)
- *public_key_length = handle->len;
-
-- return check_result (dhm_make_public (handle, private_key_length, public_key,
-- handle->len, my_rand, NULL));
-+ return check_result (API (dhm_make_public) (handle, private_key_length, public_key,
-+ handle->len, my_rand, NULL));
- }
-
- tr_dh_secret_t
-@@ -279,26 +296,29 @@ tr_dh_agree (tr_dh_ctx_t raw_handle,
- const uint8_t * other_public_key,
- size_t other_public_key_length)
- {
-- dhm_context * handle = raw_handle;
-+ API (dhm_context) * handle = raw_handle;
- struct tr_dh_secret * ret;
- size_t secret_key_length;
-
- assert (handle != NULL);
- assert (other_public_key != NULL);
-
-- if (!check_result (dhm_read_public (handle, other_public_key,
-- other_public_key_length)))
-+ if (!check_result (API (dhm_read_public )(handle, other_public_key,
-+ other_public_key_length)))
- return NULL;
-
- ret = tr_dh_secret_new (handle->len);
-
- secret_key_length = handle->len;
-
--#if POLARSSL_VERSION_NUMBER >= 0x01030000
-- if (!check_result (dhm_calc_secret (handle, ret->key,
-- &secret_key_length, my_rand, NULL)))
-+#if API_VERSION_NUMBER >= 0x02000000
-+ if (!check_result (API (dhm_calc_secret) (handle, ret->key, secret_key_length,
-+ &secret_key_length, my_rand, NULL)))
-+#elif API_VERSION_NUMBER >= 0x01030000
-+ if (!check_result (API (dhm_calc_secret) (handle, ret->key,
-+ &secret_key_length, my_rand, NULL)))
- #else
-- if (!check_result (dhm_calc_secret (handle, ret->key, &secret_key_length)))
-+ if (!check_result (API (dhm_calc_secret) (handle, ret->key, &secret_key_length)))
- #endif
- {
- tr_dh_secret_free (ret);
-@@ -324,7 +344,7 @@ tr_rand_buffer (void * buffer,
- assert (buffer != NULL);
-
- tr_lockLock (rng_lock);
-- ret = check_result (ctr_drbg_random (get_rng (), buffer, length));
-+ ret = check_result (API (ctr_drbg_random) (get_rng (), buffer, length));
- tr_lockUnlock (rng_lock);
-
- return ret;
---
-2.7.4
-
--- /dev/null
+From d6655cca7db1b960456811b8206ce222700e010d Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Tue, 30 Jan 2018 13:19:58 -0800
+Subject: [PATCH] Remove compressed responses from web servers.
+
+While zlib is mandatory for transmission, it is not mandatory for curl.
+
+A libcurl that has been compiled with no support for zlib will return no data if compressed responses are set to on.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ libtransmission/web.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libtransmission/web.c b/libtransmission/web.c
+index c7f0627..db34976 100644
+--- a/libtransmission/web.c
++++ b/libtransmission/web.c
+@@ -180,7 +180,7 @@ createEasy (tr_session * s, struct tr_web * web, struct tr_web_task * task)
+ task->timeout_secs = getTimeoutFromURL (task);
+
+ curl_easy_setopt (e, CURLOPT_AUTOREFERER, 1L);
+- curl_easy_setopt (e, CURLOPT_ENCODING, "gzip;q=1.0, deflate, identity");
++ curl_easy_setopt (e, CURLOPT_ENCODING, "");
+ curl_easy_setopt (e, CURLOPT_FOLLOWLOCATION, 1L);
+ curl_easy_setopt (e, CURLOPT_MAXREDIRS, -1L);
+ curl_easy_setopt (e, CURLOPT_NOSIGNAL, 1L);
+--
+2.7.4
+
+++ /dev/null
-From 94fa0bba88740b9ab58c5805ddb24b05b2635f34 Mon Sep 17 00:00:00 2001
-From: Mike Gelfand <mikedld@mikedld.com>
-Date: Fri, 26 Jan 2018 08:31:16 +0300
-Subject: [PATCH] Fix FTCBFS due to AC_RUN_IFELSE (patch by Helmut Grohne)
-
-Fixes: #475
----
- configure.ac | 8 +++-----
- 1 file changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index cb026df..335f4a7 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -390,14 +390,12 @@ dnl Let's hope it's 1.7 or higher, since it provides
- dnl MINIUPNPC_API_VERSION and we won't have to figure
- dnl it out on our own
- if test "x$upnp_version" = "xunknown" ; then
-- AC_RUN_IFELSE(
-+ AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <stdlib.h>
- #include <miniupnpc/miniupnpc.h>],
-- [#ifdef MINIUPNPC_API_VERSION
-- return EXIT_SUCCESS;
-- #else
-- return EXIT_FAILURE;
-+ [#ifndef MINIUPNPC_API_VERSION
-+ #error MINIUPNPC_API_VERSION undefined
- #endif]
- )],
- [upnp_version=">= 1.7"]
---
-2.7.4
-
--- /dev/null
+From 405d768bfea661c418e2c75686a7bac95e4bb17b Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 1 Mar 2018 11:25:15 -0800
+Subject: [PATCH] fix web interface with Safari.
+
+Backport of bcfe147e6a41ce7774f569ede6179a7ed2c7f560
+---
+ web/javascript/common.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/web/javascript/common.js b/web/javascript/common.js
+index 7162d3f82..77bf96857 100644
+--- a/web/javascript/common.js
++++ b/web/javascript/common.js
+@@ -61,7 +61,7 @@ $(document).ready(function() {
+ // Fix min height for isMobileDevice when run in full screen mode from home screen
+ // so the footer appears in the right place
+ $('body div#torrent_container').css('min-height', '338px');
+- $("label[for=torrent_upload_url]").text("URL: ");
++ $("label[for=torrent_upload_url]").text = "URL: ";
+ } else {
+ // Fix for non-Safari-3 browsers: dark borders to replace shadows.
+ $('div.dialog_container div.dialog_window').css('border', '1px solid #777');
+--
+2.14.3
+
--- /dev/null
+From df03e037c69ebd74dd2db77d034b65980f0dc2d0 Mon Sep 17 00:00:00 2001
+From: Mike Gelfand <mikedld@mikedld.com>
+Date: Tue, 23 Jan 2018 21:20:30 +0300
+Subject: [PATCH] Fix memory leak in `tr_dhtInit` in failure condition
+
+Fixes: #482
+---
+ libtransmission/tr-dht.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/libtransmission/tr-dht.c b/libtransmission/tr-dht.c
+index 243429f64..df56542bc 100644
+--- a/libtransmission/tr-dht.c
++++ b/libtransmission/tr-dht.c
+@@ -333,8 +333,11 @@ tr_dhtInit (tr_session *ss)
+
+ return 1;
+
+- fail:
+- tr_logAddNamedDbg ("DHT", "DHT initialization failed (errno = %d)", errno);
++fail:
++ tr_free(nodes6);
++ tr_free(nodes);
++
++ tr_logAddNamedDbg("DHT", "DHT initialization failed (errno = %d)", errno);
+ session = NULL;
+ return -1;
+ }
+--
+2.17.0
+
+++ /dev/null
-From d6655cca7db1b960456811b8206ce222700e010d Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Tue, 30 Jan 2018 13:19:58 -0800
-Subject: [PATCH] Remove compressed responses from web servers.
-
-While zlib is mandatory for transmission, it is not mandatory for curl.
-
-A libcurl that has been compiled with no support for zlib will return no data if compressed responses are set to on.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- libtransmission/web.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libtransmission/web.c b/libtransmission/web.c
-index c7f0627..db34976 100644
---- a/libtransmission/web.c
-+++ b/libtransmission/web.c
-@@ -180,7 +180,7 @@ createEasy (tr_session * s, struct tr_web * web, struct tr_web_task * task)
- task->timeout_secs = getTimeoutFromURL (task);
-
- curl_easy_setopt (e, CURLOPT_AUTOREFERER, 1L);
-- curl_easy_setopt (e, CURLOPT_ENCODING, "gzip;q=1.0, deflate, identity");
-+ curl_easy_setopt (e, CURLOPT_ENCODING, "");
- curl_easy_setopt (e, CURLOPT_FOLLOWLOCATION, 1L);
- curl_easy_setopt (e, CURLOPT_MAXREDIRS, -1L);
- curl_easy_setopt (e, CURLOPT_NOSIGNAL, 1L);
---
-2.7.4
-
--- /dev/null
+From 4fa98f0b0b493ebbef616404dbc03ba5fe811997 Mon Sep 17 00:00:00 2001
+From: userwithuid <userwithuid@gmail.com>
+Date: Sun, 27 May 2018 12:47:15 -0700
+Subject: [PATCH] fix logic for setting the curl ca bundle file
+
+we do not want to delete the system default by setting this to NULL...
+---
+ libtransmission/web.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/libtransmission/web.c b/libtransmission/web.c
+index db349760b..997a151b5 100644
+--- a/libtransmission/web.c
++++ b/libtransmission/web.c
+@@ -191,7 +191,10 @@ createEasy (tr_session * s, struct tr_web * web, struct tr_web_task * task)
+ #endif
+ if (web->curl_ssl_verify)
+ {
+- curl_easy_setopt (e, CURLOPT_CAINFO, web->curl_ca_bundle);
++ if (web->curl_ca_bundle != NULL)
++ {
++ curl_easy_setopt (e, CURLOPT_CAINFO, web->curl_ca_bundle);
++ }
+ }
+ else
+ {
+--
+2.17.0
+
+++ /dev/null
-From 6de0a3d7a3cd0b2ca6d1b33b5d4d7f44908c1ac3 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Thu, 1 Mar 2018 11:21:43 -0800
-Subject: [PATCH] portcheck: Switch to HTTPS.
-
-Useful for OpenWrt.
----
- libtransmission/rpcimpl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libtransmission/rpcimpl.c b/libtransmission/rpcimpl.c
-index 46fd3192c..dcd96df59 100644
---- a/libtransmission/rpcimpl.c
-+++ b/libtransmission/rpcimpl.c
-@@ -1455,7 +1455,7 @@ portTest (tr_session * session,
- struct tr_rpc_idle_data * idle_data)
- {
- const int port = tr_sessionGetPeerPort (session);
-- char * url = tr_strdup_printf ("http://portcheck.transmissionbt.com/%d", port);
-+ char * url = tr_strdup_printf ("https://portcheck.transmissionbt.com/%d", port);
- tr_webRun (session, url, portTested, idle_data);
- tr_free (url);
- return NULL;
---
-2.14.3
-
+++ /dev/null
-From 405d768bfea661c418e2c75686a7bac95e4bb17b Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Thu, 1 Mar 2018 11:25:15 -0800
-Subject: [PATCH] fix web interface with Safari.
-
-Backport of bcfe147e6a41ce7774f569ede6179a7ed2c7f560
----
- web/javascript/common.js | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/web/javascript/common.js b/web/javascript/common.js
-index 7162d3f82..77bf96857 100644
---- a/web/javascript/common.js
-+++ b/web/javascript/common.js
-@@ -61,7 +61,7 @@ $(document).ready(function() {
- // Fix min height for isMobileDevice when run in full screen mode from home screen
- // so the footer appears in the right place
- $('body div#torrent_container').css('min-height', '338px');
-- $("label[for=torrent_upload_url]").text("URL: ");
-+ $("label[for=torrent_upload_url]").text = "URL: ";
- } else {
- // Fix for non-Safari-3 browsers: dark borders to replace shadows.
- $('div.dialog_container div.dialog_window').css('border', '1px solid #777');
---
-2.14.3
-
--- /dev/null
+From a2991e22434352a3114bf437674070a135b723fd Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sun, 27 May 2018 13:38:27 -0700
+Subject: [PATCH] portcheck: Switch to HTTPS
+
+Useful for testing TLS verification.
+---
+ libtransmission/rpcimpl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libtransmission/rpcimpl.c b/libtransmission/rpcimpl.c
+index 46fd3192c..dcd96df59 100644
+--- a/libtransmission/rpcimpl.c
++++ b/libtransmission/rpcimpl.c
+@@ -1455,7 +1455,7 @@ portTest (tr_session * session,
+ struct tr_rpc_idle_data * idle_data)
+ {
+ const int port = tr_sessionGetPeerPort (session);
+- char * url = tr_strdup_printf ("http://portcheck.transmissionbt.com/%d", port);
++ char * url = tr_strdup_printf ("https://portcheck.transmissionbt.com/%d", port);
+ tr_webRun (session, url, portTested, idle_data);
+ tr_free (url);
+ return NULL;
+--
+2.17.0
+
--- /dev/null
+From 81d584b9027b2b2ddd3209c1582c9ec73c26cc3e Mon Sep 17 00:00:00 2001
+From: Simon Wells <simonrwells@gmail.com>
+Date: Sun, 27 May 2018 13:44:41 -0700
+Subject: [PATCH] Change TR_CURL_SSL_VERIFY to TR_CURL_SSL_NO_VERIFY
+
+use secure by default and change the env var to match curl -k behaviour
+
+Closes: #179
+---
+ libtransmission/web.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libtransmission/web.c b/libtransmission/web.c
+index 997a151b5..ce41e342a 100644
+--- a/libtransmission/web.c
++++ b/libtransmission/web.c
+@@ -392,7 +392,7 @@ tr_webThreadFunc (void * vsession)
+ web->taskLock = tr_lockNew ();
+ web->tasks = NULL;
+ web->curl_verbose = tr_env_key_exists ("TR_CURL_VERBOSE");
+- web->curl_ssl_verify = tr_env_key_exists ("TR_CURL_SSL_VERIFY");
++ web->curl_ssl_verify = !tr_env_key_exists ("TR_CURL_SSL_NO_VERIFY");
+ web->curl_ca_bundle = tr_env_get_string ("CURL_CA_BUNDLE", NULL);
+ if (web->curl_ssl_verify)
+ {
+--
+2.17.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
-PKG_VERSION:=1.2.0
+PKG_VERSION:=1.2.4
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
* support all kinds of uplinks, incl. hidden and enterprise uplinks
* continuously checks the existing uplink connection (quality), e.g. for conditional uplink (dis-) connections
* captive portal detection with internet online check and a 'heartbeat' function to keep the uplink connection up & running
-* support of devices with multiple radios
+* support devices with multiple radios in any order
* procd init and hotplug support
* runtime information available via LuCI & via 'status' init command
* status & debug logging to syslog
* optional: the LuCI frontend shows the WiFi QR codes from all configured Access Points. It allows you to connect your Android or iOS devices to your router’s WiFi using the QR code
## Prerequisites
-* [OpenWrt](https://openwrt.org), tested with the stable release series (17.01.x) and with the latest OpenWrt snapshot
+* [OpenWrt](https://openwrt.org), tested with the stable release series (18.06.x) and with the latest OpenWrt snapshot
* iwinfo for wlan scanning, uclient-fetch for captive portal detection
* optional: qrencode 4.x for QR code support
* trm\_maxwait => how long (in seconds) should travelmate wait for a successful wlan interface reload action (int/default: '30', valid range: 20-40)
* trm\_maxretry => how many times should travelmate try to connect to an uplink (int/default: '3', valid range: 1-10)
* trm\_timeout => overall retry timeout in seconds (int/default: '60', valid range: 30-300)
- * trm\_radio => limit travelmate to a dedicated radio, e.g. 'radio0' (default: not set, use all radios)
+ * trm\_radio => limit travelmate to a single radio (e.g. 'radio1') or change the overall scanning order (e.g. 'radio1 radio2 radio0') (default: not set, use all radios 0-n)
* trm\_iface => main uplink / procd trigger network interface (default: trm_wwan)
* trm\_triggerdelay => additional trigger delay in seconds before travelmate processing begins (int/default: '2')
<pre><code>
~# /etc/init.d/travelmate status
::: travelmate runtime information
- + travelmate_status : connected (net ok/37)
- + travelmate_version : 1.2.0
- + station_id : blackhole/01:02:03:04:05:06
+ + travelmate_status : connected (net ok/78)
+ + travelmate_version : 1.2.3
+ + station_id : radio1/blackhole/01:02:03:04:05:06
+ station_interface : trm_wwan
- + station_radio : radio0
- + last_rundate : 04.04.2018 13:00:24
- + system : GL.iNet GL-AR750, OpenWrt SNAPSHOT r6588-16efb0c1c6
+ + faulty_stations :
+ + last_rundate : 07.09.2018 17:22:37
+ + system : TP-LINK RE450, OpenWrt SNAPSHOT r8018-42f158314e
</code></pre>
## Manual Setup
</code></pre>
## FAQ
-**Q:** What happen with misconfigured uplinks, e.g. due to outdated wlan passwords?
-**A:** Travelmate tries n times (default 3) to connect, then the respective uplink SSID will be marked / renamed to '_SSID_\_err' and travelmate no longer attends this uplink. In this case use the builtin wireless station manager to update your wireless credentials.
+**Q:** What happen with misconfigured, faulty uplinks, e.g. due to outdated wlan passwords?
+**A:** Travelmate tries n times (default 3) to connect, then the respective uplink will be marked as "faulty" in the JSON runtime file and hereafter ignored. To reset the JSON runtime file, simply restart travelmate.
**Q:** How to connect to hidden uplinks?
**A:** See 'example\_hidden' STA configuration above, option 'SSID' and 'BSSID' must be specified for successful connections.
+**Q:** Any recommendations regarding suitable DNS settings to easily connect to captive portals?
+**A:** Use a simple DNS forwarder like dnsmasq and disable the option 'rebind_protection'.
## Support
Please join the travelmate discussion in this [forum thread](https://forum.lede-project.org/t/travelmate-support-thread/5155) or contact me by [mail](mailto:dev@brenken.org)
boot()
{
- ubus -t 30 wait_for network.interface network.wireless 2>/dev/null
- rc_procd start_service
+ ubus -t 30 wait_for network.interface network.wireless 2>/dev/null
+ rc_procd start_service
}
start_service()
{
- if [ $("${trm_init}" enabled; printf "%u" ${?}) -eq 0 ]
- then
- procd_open_instance "travelmate"
- procd_set_param command "${trm_script}" "${@}"
- procd_set_param stdout 1
- procd_set_param stderr 1
- procd_close_instance
- fi
+ if [ $("${trm_init}" enabled; printf "%u" ${?}) -eq 0 ]
+ then
+ procd_open_instance "travelmate"
+ procd_set_param command "${trm_script}" "${@}"
+ procd_set_param pidfile "${trm_pidfile}"
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+ fi
}
reload_service()
{
- [ -s "${trm_pidfile}" ] && return 1
- "${trm_init}" restart
+ [ -s "${trm_pidfile}" ] && return 1
+ rc_procd start_service
}
stop_service()
{
- local rtfile="$(uci_get travelmate global trm_rtfile)"
-
- rtfile="${rtfile:-"/tmp/trm_runtime.json"}"
- > "${rtfile}"
- rc_procd start_service
+ rc_procd "${trm_script}" stop
}
status()
{
- local key keylist value rtfile="$(uci_get travelmate global trm_rtfile)"
+ local key keylist value rtfile="$(uci_get travelmate global trm_rtfile)"
- rtfile="${rtfile:-"/tmp/trm_runtime.json"}"
- if [ -s "${rtfile}" ]
- then
- printf "%s\n" "::: travelmate runtime information"
- json_load "$(cat "${rtfile}" 2>/dev/null)"
- json_select data
- json_get_keys keylist
- for key in ${keylist}
- do
- json_get_var value "${key}"
- printf " + %-18s : %s\n" "${key}" "${value}"
- done
- else
- printf "%s\n" "::: no travelmate runtime information available"
- fi
+ rtfile="${rtfile:-"/tmp/trm_runtime.json"}"
+ json_load_file "${rtfile}" >/dev/null 2>&1
+ json_select data >/dev/null 2>&1
+ if [ ${?} -eq 0 ]
+ then
+ printf "%s\n" "::: travelmate runtime information"
+ json_get_keys keylist
+ for key in ${keylist}
+ do
+ json_get_var value "${key}"
+ printf " + %-18s : %s\n" "${key}" "${value}"
+ done
+ else
+ printf "%s\n" "::: no travelmate runtime information available"
+ fi
}
service_triggers()
{
- local trigger="$(uci_get travelmate global trm_iface)"
- local delay="$(uci_get travelmate global trm_triggerdelay)"
+ local trigger="$(uci_get travelmate global trm_iface)"
+ local delay="$(uci_get travelmate global trm_triggerdelay)"
- PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
- procd_add_interface_trigger "interface.*.down" "${trigger}" "${trm_init}" reload
- procd_add_reload_trigger "travelmate"
+ PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
+ procd_add_interface_trigger "interface.*.down" "${trigger}" "${trm_init}" reload
+ procd_add_reload_trigger "travelmate"
}
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="1.2.0"
+trm_ver="1.2.4"
trm_sysver="unknown"
trm_enabled=0
trm_debug=0
#
f_envload()
{
- local sys_call sys_desc sys_model sys_ver
+ local sys_call sys_desc sys_model sys_ver
- # get system information
- #
- sys_call="$(ubus -S call system board 2>/dev/null)"
- if [ -n "${sys_call}" ]
- then
- sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')"
- sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')"
- sys_ver="$(cat /etc/turris-version 2>/dev/null)"
- if [ -n "${sys_ver}" ]
- then
- sys_desc="${sys_desc}/${sys_ver}"
- fi
- trm_sysver="${sys_model}, ${sys_desc}"
- fi
+ # get system information
+ #
+ sys_call="$(ubus -S call system board 2>/dev/null)"
+ if [ -n "${sys_call}" ]
+ then
+ sys_desc="$(printf '%s' "${sys_call}" | jsonfilter -e '@.release.description')"
+ sys_model="$(printf '%s' "${sys_call}" | jsonfilter -e '@.model')"
+ sys_ver="$(cat /etc/turris-version 2>/dev/null)"
+ if [ -n "${sys_ver}" ]
+ then
+ sys_desc="${sys_desc}/${sys_ver}"
+ fi
+ trm_sysver="${sys_model}, ${sys_desc}"
+ fi
- # (re-)initialize global list variables
- #
- trm_devlist=""
- trm_stalist=""
- trm_radiolist=""
+ # (re-)initialize global list variables
+ #
+ unset trm_devlist trm_stalist trm_radiolist
- # load config and check 'enabled' option
- #
- option_cb()
- {
- local option="${1}"
- local value="${2}"
- eval "${option}=\"${value}\""
- }
- config_load travelmate
+ # load config and check 'enabled' option
+ #
+ option_cb()
+ {
+ local option="${1}"
+ local value="${2}"
+ eval "${option}=\"${value}\""
+ }
+ config_load travelmate
- if [ ${trm_enabled} -ne 1 ]
- then
- f_log "info" "travelmate is currently disabled, please set 'trm_enabled' to '1' to use this service"
- config_load wireless
- config_foreach f_prep wifi-iface
- uci_commit wireless
- ubus call network reload
- exit 0
- fi
+ if [ ${trm_enabled} -ne 1 ]
+ then
+ f_log "info" "travelmate is currently disabled, please set 'trm_enabled' to '1' to use this service"
+ exit 0
+ fi
- # validate input ranges
- #
- if [ ${trm_minquality} -lt 20 ] || [ ${trm_minquality} -gt 80 ]
- then
- trm_minquality=35
- fi
- if [ ${trm_maxretry} -lt 1 ] || [ ${trm_maxretry} -gt 10 ]
- then
- trm_maxretry=3
- fi
- if [ ${trm_maxwait} -lt 20 ] || [ ${trm_maxwait} -gt 40 ] || [ ${trm_maxwait} -ge ${trm_timeout} ]
- then
- trm_maxwait=30
- fi
- if [ ${trm_timeout} -lt 30 ] || [ ${trm_timeout} -gt 300 ] || [ ${trm_timeout} -le ${trm_maxwait} ]
- then
- trm_timeout=60
- fi
+ # validate input ranges
+ #
+ if [ ${trm_minquality} -lt 20 ] || [ ${trm_minquality} -gt 80 ]
+ then
+ trm_minquality=35
+ fi
+ if [ ${trm_maxretry} -lt 1 ] || [ ${trm_maxretry} -gt 10 ]
+ then
+ trm_maxretry=3
+ fi
+ if [ ${trm_maxwait} -lt 20 ] || [ ${trm_maxwait} -gt 40 ] || [ ${trm_maxwait} -ge ${trm_timeout} ]
+ then
+ trm_maxwait=30
+ fi
+ if [ ${trm_timeout} -lt 30 ] || [ ${trm_timeout} -gt 300 ] || [ ${trm_timeout} -le ${trm_maxwait} ]
+ then
+ trm_timeout=60
+ fi
}
# gather radio information & bring down all STA interfaces
#
f_prep()
{
- local eap_rc=0 config="${1}"
- local mode="$(uci_get wireless "${config}" mode)"
- local network="$(uci_get wireless "${config}" network)"
- local radio="$(uci_get wireless "${config}" device)"
- local disabled="$(uci_get wireless "${config}" disabled)"
- local eaptype="$(uci_get wireless "${config}" eap_type)"
+ local eap_rc=0 config="${1}"
+ local mode="$(uci_get wireless "${config}" mode)"
+ local network="$(uci_get wireless "${config}" network)"
+ local radio="$(uci_get wireless "${config}" device)"
+ local disabled="$(uci_get wireless "${config}" disabled)"
+ local eaptype="$(uci_get wireless "${config}" eap_type)"
- if ([ -z "${trm_radio}" ] || [ "${trm_radio}" = "${radio}" ]) && \
- [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo " ${radio}")" ]
- then
- trm_radiolist="${trm_radiolist} ${radio}"
- fi
- if [ "${mode}" = "sta" ] && [ "${network}" = "${trm_iface}" ]
- then
- if [ -z "${disabled}" ] || [ "${disabled}" = "0" ]
- then
- uci_set wireless "${config}" disabled 1
- fi
- if [ -n "${eaptype}" ]
- then
- eap_rc="$("${trm_wpa}" -veap >/dev/null 2>&1; printf "%u" ${?})"
- fi
- if [ -z "${eaptype}" ] || [ ${eap_rc} -eq 0 ]
- then
- trm_stalist="${trm_stalist} ${config}_${radio}"
- fi
- fi
- f_log "debug" "f_prep ::: config: ${config}, mode: ${mode}, network: ${network}, eap_rc: ${eap_rc}, radio: ${radio}, trm_radio: ${trm_radio:-"-"}, disabled: ${disabled}"
+ if [ -z "${trm_radio}" ] && [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo " ${radio}")" ]
+ then
+ trm_radiolist="${trm_radiolist} ${radio}"
+ elif [ -n "${trm_radio}" ] && [ -z "${trm_radiolist}" ]
+ then
+ trm_radiolist="$(printf "%s" "${trm_radio}" | awk '{while(match(tolower($0),/radio[0-9]/)){ORS=" ";print substr(tolower($0),RSTART,RLENGTH);$0=substr($0,RSTART+RLENGTH)}}')"
+ fi
+ if [ "${mode}" = "sta" ] && [ "${network}" = "${trm_iface}" ]
+ then
+ if [ -z "${disabled}" ] || [ "${disabled}" = "0" ]
+ then
+ uci_set wireless "${config}" disabled 1
+ fi
+ if [ -n "${eaptype}" ]
+ then
+ eap_rc="$("${trm_wpa}" -veap >/dev/null 2>&1; printf "%u" ${?})"
+ fi
+ if [ -z "${eaptype}" ] || [ ${eap_rc} -eq 0 ]
+ then
+ trm_stalist="${trm_stalist} ${config}_${radio}"
+ fi
+ fi
+ f_log "debug" "f_prep ::: config: ${config}, mode: ${mode}, network: ${network}, eap_rc: ${eap_rc}, radio: ${radio}, trm_radio: ${trm_radio:-"-"}, disabled: ${disabled}"
}
# check interface status
#
f_check()
{
- local ifname radio dev_status config sta_essid sta_bssid result wait=1 mode="${1}" status="${2:-"false"}" IFS=" "
+ local IFS ifname radio dev_status config sta_essid sta_bssid result wait=1 mode="${1}" status="${2:-"false"}"
- trm_ifquality=0
- trm_ifstatus="false"
- if [ "${mode}" != "initial" ]
- then
- ubus call network reload
- fi
- while [ ${wait} -le ${trm_maxwait} ]
- do
- dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
- if [ -n "${dev_status}" ]
- then
- if [ "${mode}" = "dev" ]
- then
- if [ "${trm_ifstatus}" != "${status}" ]
- then
- trm_ifstatus="${status}"
- f_jsnup
- fi
- for radio in ${trm_radiolist}
- do
- result="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e "@.${radio}.up")"
- if [ "${result}" = "true" ] && [ -z "$(printf "%s" "${trm_devlist}" | grep -Fo " ${radio}")" ]
- then
- trm_devlist="${trm_devlist} ${radio}"
- fi
- done
- if [ "${trm_devlist}" = "${trm_radiolist}" ] || [ ${wait} -eq ${trm_maxwait} ]
- then
- ifname="${trm_devlist}"
- break
- else
- trm_devlist=""
- fi
- elif [ "${mode}" = "rev" ]
- then
- wait=$(( ${trm_maxwait} / 3 ))
- sleep ${wait}
- break
- else
- ifname="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
- if [ -n "${ifname}" ]
- then
- trm_ifquality="$(${trm_iwinfo} ${ifname} info 2>/dev/null | awk -F "[\/| ]" '/Link Quality:/{printf "%i\n", (100 / $NF * $(NF-1)) }')"
- if [ ${trm_ifquality} -ge ${trm_minquality} ]
- then
- trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
- elif [ "${mode}" = "initial" ] && [ ${trm_ifquality} -lt ${trm_minquality} ]
- then
- trm_ifstatus="${status}"
- sta_essid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.ssid')"
- sta_bssid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.bssid')"
- f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' is out of range (${trm_ifquality}/${trm_minquality}), uplink disconnected (${trm_sysver})"
- fi
- fi
- fi
- if [ "${mode}" = "initial" ] || [ "${trm_ifstatus}" = "true" ]
- then
- if ([ "${trm_ifstatus}" != "true" ] && [ "${trm_ifstatus}" != "${status}" ]) || [ ${trm_ifquality} -lt ${trm_minquality} ]
- then
- f_jsnup
- fi
- if [ "${mode}" = "initial" ] && [ "${trm_captive}" -eq 1 ] && [ "${trm_ifstatus}" = "true" ]
- then
- result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) --spider "${trm_captiveurl}" 2>&1 | awk '/^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')"
- if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ])
- then
- trm_connection="${result}/${trm_ifquality}"
- f_jsnup
- fi
- fi
- break
- fi
- fi
- wait=$(( wait + 1 ))
- sleep 1
- done
- f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, quality: ${trm_ifquality}, connection: ${trm_connection:-"-"}, wait: ${wait}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}"
+ trm_ifquality=0
+ trm_ifstatus="false"
+ if [ "${mode}" != "initial" ]
+ then
+ ubus call network reload
+ fi
+ while [ ${wait} -le ${trm_maxwait} ]
+ do
+ dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
+ if [ -n "${dev_status}" ]
+ then
+ if [ "${mode}" = "dev" ]
+ then
+ if [ "${trm_ifstatus}" != "${status}" ]
+ then
+ trm_ifstatus="${status}"
+ f_jsnup
+ fi
+ for radio in ${trm_radiolist}
+ do
+ result="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e "@.${radio}.up")"
+ if [ "${result}" = "true" ] && [ -z "$(printf "%s" "${trm_devlist}" | grep -Fo " ${radio}")" ]
+ then
+ trm_devlist="${trm_devlist} ${radio}"
+ fi
+ done
+ if [ "${trm_devlist}" = "${trm_radiolist}" ] || [ ${wait} -eq ${trm_maxwait} ]
+ then
+ ifname="${trm_devlist}"
+ break
+ else
+ unset trm_devlist
+ fi
+ elif [ "${mode}" = "rev" ]
+ then
+ wait=$(( ${trm_maxwait} / 3 ))
+ sleep ${wait}
+ break
+ else
+ ifname="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
+ if [ -n "${ifname}" ]
+ then
+ trm_ifquality="$(${trm_iwinfo} ${ifname} info 2>/dev/null | awk -F "[\/| ]" '/Link Quality:/{printf "%i\n", (100 / $NF * $(NF-1)) }')"
+ if [ ${trm_ifquality} -ge ${trm_minquality} ]
+ then
+ trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
+ elif [ "${mode}" = "initial" ] && [ ${trm_ifquality} -lt ${trm_minquality} ]
+ then
+ trm_ifstatus="${status}"
+ sta_essid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.ssid')"
+ sta_bssid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.bssid')"
+ f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' is out of range (${trm_ifquality}/${trm_minquality}), uplink disconnected (${trm_sysver})"
+ fi
+ fi
+ fi
+ if [ "${mode}" = "initial" ] || [ "${trm_ifstatus}" = "true" ]
+ then
+ if ([ "${trm_ifstatus}" != "true" ] && [ "${trm_ifstatus}" != "${status}" ]) || [ ${trm_ifquality} -lt ${trm_minquality} ]
+ then
+ f_jsnup
+ fi
+ if [ "${mode}" = "initial" ] && [ "${trm_captive}" -eq 1 ] && [ "${trm_ifstatus}" = "true" ]
+ then
+ result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) --spider "${trm_captiveurl}" 2>&1 | awk '/^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')"
+ if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ])
+ then
+ trm_connection="${result}/${trm_ifquality}"
+ f_jsnup
+ fi
+ fi
+ break
+ fi
+ fi
+ wait=$(( wait + 1 ))
+ sleep 1
+ done
+ f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, quality: ${trm_ifquality}, connection: ${trm_connection:-"-"}, wait: ${wait}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}"
}
# update runtime information
#
f_jsnup()
{
- local config sta_iface sta_radio sta_essid sta_bssid dev_status status="${trm_ifstatus}"
+ local config sta_iface sta_radio sta_essid sta_bssid dev_status status="${trm_ifstatus}" faulty_list faulty_station="${1}"
- if [ "${status}" = "true" ]
- then
- status="connected (${trm_connection:-"-"})"
- else
- trm_connection=""
- if [ "${status}" = "false" ]
- then
- status="not connected"
- fi
- fi
+ if [ "${status}" = "true" ]
+ then
+ status="connected (${trm_connection:-"-"})"
+ else
+ unset trm_connection
+ status="running / not connected"
+ fi
- dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
- if [ -n "${dev_status}" ]
- then
- config="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].section')"
- if [ -n "${config}" ]
- then
- sta_iface="$(uci_get wireless "${config}" network)"
- sta_radio="$(uci_get wireless "${config}" device)"
- sta_essid="$(uci_get wireless "${config}" ssid)"
- sta_bssid="$(uci_get wireless "${config}" bssid)"
- fi
- fi
+ dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
+ if [ -n "${dev_status}" ]
+ then
+ config="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].section')"
+ if [ -n "${config}" ]
+ then
+ sta_iface="$(uci_get wireless "${config}" network)"
+ sta_radio="$(uci_get wireless "${config}" device)"
+ sta_essid="$(uci_get wireless "${config}" ssid)"
+ sta_bssid="$(uci_get wireless "${config}" bssid)"
+ fi
+ fi
- json_init
- json_add_object "data"
- json_add_string "travelmate_status" "${status}"
- json_add_string "travelmate_version" "${trm_ver}"
- json_add_string "station_id" "${sta_essid:-"-"}/${sta_bssid:-"-"}"
- json_add_string "station_interface" "${sta_iface:-"-"}"
- json_add_string "station_radio" "${sta_radio:-"-"}"
- json_add_string "last_rundate" "$(/bin/date "+%d.%m.%Y %H:%M:%S")"
- json_add_string "system" "${trm_sysver}"
- json_close_object
- json_dump > "${trm_rtfile}"
- f_log "debug" "f_jsnup::: config: ${config:-"-"}, status: ${status:-"-"}, sta_iface: ${sta_iface:-"-"}, sta_radio: ${sta_radio:-"-"}, sta_essid: ${sta_essid:-"-"}, sta_bssid: ${sta_bssid:-"-"}"
+ json_get_var faulty_list "faulty_stations"
+ if [ -n "${faulty_station}" ]
+ then
+ if [ -z "$(printf "%s" "${faulty_list}" | grep -Fo "${faulty_station}")" ]
+ then
+ faulty_list="${faulty_list} ${faulty_station}"
+ fi
+ fi
+ json_add_string "travelmate_status" "${status}"
+ json_add_string "travelmate_version" "${trm_ver}"
+ json_add_string "station_id" "${sta_radio:-"-"}/${sta_essid:-"-"}/${sta_bssid:-"-"}"
+ json_add_string "station_interface" "${sta_iface:-"-"}"
+ json_add_string "faulty_stations" "${faulty_list}"
+ json_add_string "last_rundate" "$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+ json_add_string "system" "${trm_sysver}"
+ json_dump > "${trm_rtfile}"
+ f_log "debug" "f_jsnup::: config: ${config:-"-"}, status: ${status:-"-"}, sta_iface: ${sta_iface:-"-"}, sta_radio: ${sta_radio:-"-"}, sta_essid: ${sta_essid:-"-"}, sta_bssid: ${sta_bssid:-"-"}, faulty_list: ${faulty_list:-"-"}"
}
# write to syslog
#
f_log()
{
- local class="${1}"
- local log_msg="${2}"
+ local class="${1}"
+ local log_msg="${2}"
- if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${trm_debug} -eq 1 ])
- then
- logger -p "${class}" -t "travelmate-[${trm_ver}]" "${log_msg}"
- if [ "${class}" = "err" ]
- then
- trm_ifstatus="error"
- f_jsnup
- logger -p "${class}" -t "travelmate-[${trm_ver}]" "Please check 'https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md' (${trm_sysver})"
- exit 1
- fi
- fi
+ if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${trm_debug} -eq 1 ])
+ then
+ logger -p "${class}" -t "travelmate-${trm_ver}[${$}]" "${log_msg}"
+ if [ "${class}" = "err" ]
+ then
+ trm_ifstatus="error"
+ f_jsnup
+ logger -p "${class}" -t "travelmate-${trm_ver}[${$}]" "Please check 'https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md' (${trm_sysver})"
+ exit 1
+ fi
+ fi
}
# main function for connection handling
#
f_main()
{
- local cnt dev config scan scan_list scan_essid scan_bssid scan_quality sta sta_essid sta_bssid sta_radio sta_iface IFS=" "
+ local IFS cnt dev config scan scan_list scan_essid scan_bssid scan_quality sta sta_essid sta_bssid sta_radio sta_iface faulty_list
- f_check "initial"
- if [ "${trm_ifstatus}" != "true" ]
- then
- config_load wireless
- config_foreach f_prep wifi-iface
- uci_commit wireless
- f_check "dev" "running"
- f_log "debug" "f_main ::: iwinfo: ${trm_iwinfo}, dev_list: ${trm_devlist}, sta_list: ${trm_stalist:0:800}"
- for dev in ${trm_devlist}
- do
- if [ -z "$(printf "%s" "${trm_stalist}" | grep -Fo "_${dev}")" ]
- then
- continue
- fi
- cnt=1
- while [ ${trm_maxretry} -eq 0 ] || [ ${cnt} -le ${trm_maxretry} ]
- do
- scan_list="$(${trm_iwinfo} "${dev}" scan 2>/dev/null | awk 'BEGIN{FS="[/ ]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++)if(var2==""){var2=$i}else{var2=var2" "$i}}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | sort -rn | awk '{ORS=",";print $0}')"
- f_log "debug" "f_main ::: dev: ${dev}, scan_list: ${scan_list:0:800}, cnt: ${cnt}, max_cnt: ${trm_maxretry}"
- if [ -n "${scan_list}" ]
- then
- for sta in ${trm_stalist}
- do
- config="${sta%%_*}"
- sta_radio="${sta##*_}"
- sta_essid="$(uci_get wireless "${config}" ssid)"
- sta_bssid="$(uci_get wireless "${config}" bssid)"
- sta_iface="$(uci_get wireless "${config}" network)"
- IFS=","
- for scan in ${scan_list}
- do
- if [ -z "${scan_quality}" ]
- then
- scan_quality="${scan}"
- elif [ -z "${scan_bssid}" ]
- then
- scan_bssid="${scan}"
- elif [ -z "${scan_essid}" ]
- then
- scan_essid="${scan}"
- fi
- if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]
- then
- if [ ${scan_quality} -ge ${trm_minquality} ]
- then
- if (([ "${scan_essid}" = "\"${sta_essid}\"" ] && ([ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ])) || \
- ([ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ])) && [ "${dev}" = "${sta_radio}" ]
- then
- f_log "debug" "f_main ::: scan_quality: ${scan_quality}, scan_bssid: ${scan_bssid}, scan_essid: ${scan_essid}"
- uci_set wireless "${config}" disabled 0
- f_check "sta"
- if [ "${trm_ifstatus}" = "true" ]
- then
- uci_commit wireless
- f_log "info" "interface '${sta_iface}' on '${sta_radio}' connected to uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' (${trm_sysver})"
- return 0
- elif [ ${cnt} -eq ${trm_maxretry} ]
- then
- uci_set wireless "${config}" disabled 1
- if [ -n "${sta_essid}" ]
- then
- uci_set wireless "${config}" ssid "${sta_essid}_err"
- fi
- if [ -n "${sta_bssid}" ]
- then
- uci_set wireless "${config}" bssid "${sta_bssid}_err"
- fi
- uci_commit wireless
- f_log "info" "can't connect to uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}', uplink disabled (${trm_sysver})"
- f_check "rev"
- else
- uci -q revert wireless
- f_log "info" "can't connect to uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' (${trm_sysver})"
- f_check "rev"
- fi
- fi
- fi
- scan_quality=""
- scan_bssid=""
- scan_essid=""
- fi
- done
- IFS=" "
- done
- fi
- cnt=$(( cnt + 1 ))
- sleep $(( ${trm_maxwait} / 6 ))
- done
- done
- if [ ! -s "${trm_rtfile}" ]
- then
- trm_ifstatus="false"
- f_jsnup
- fi
- elif [ ! -s "${trm_rtfile}" ]
- then
- f_jsnup
- fi
+ f_check "initial"
+ if [ "${trm_ifstatus}" != "true" ]
+ then
+ config_load wireless
+ config_foreach f_prep wifi-iface
+ uci_commit wireless
+ f_check "dev" "running / not connected"
+ json_get_var faulty_list "faulty_stations"
+ f_log "debug" "f_main ::: iwinfo: ${trm_iwinfo}, dev_list: ${trm_devlist}, sta_list: ${trm_stalist:0:800}, faulty_list: ${faulty_list:-"-"}"
+ for dev in ${trm_devlist}
+ do
+ if [ -z "$(printf "%s" "${trm_stalist}" | grep -Fo "_${dev}")" ]
+ then
+ continue
+ fi
+ cnt=1
+ while [ ${cnt} -le ${trm_maxretry} ]
+ do
+ scan_list="$(${trm_iwinfo} "${dev}" scan 2>/dev/null | awk 'BEGIN{FS="[/ ]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++)if(var2==""){var2=$i}else{var2=var2" "$i}}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | sort -rn | awk '{ORS=",";print $0}')"
+ f_log "debug" "f_main ::: dev: ${dev}, scan_list: ${scan_list:0:800}, cnt: ${cnt}, max_cnt: ${trm_maxretry}"
+ if [ -n "${scan_list}" ]
+ then
+ for sta in ${trm_stalist}
+ do
+ config="${sta%%_*}"
+ sta_radio="${sta##*_}"
+ sta_essid="$(uci_get wireless "${config}" ssid)"
+ sta_bssid="$(uci_get wireless "${config}" bssid)"
+ sta_iface="$(uci_get wireless "${config}" network)"
+ json_get_var faulty_list "faulty_stations"
+ if [ -n "$(printf "%s" "${faulty_list}" | grep -Fo "${sta_radio}/${sta_essid}/${sta_bssid}")" ]
+ then
+ continue
+ fi
+ IFS=","
+ for scan in ${scan_list}
+ do
+ if [ -z "${scan_quality}" ]
+ then
+ scan_quality="${scan}"
+ elif [ -z "${scan_bssid}" ]
+ then
+ scan_bssid="${scan}"
+ elif [ -z "${scan_essid}" ]
+ then
+ scan_essid="${scan}"
+ fi
+ if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]
+ then
+ if [ ${scan_quality} -ge ${trm_minquality} ]
+ then
+ if (([ "${scan_essid}" = "\"${sta_essid}\"" ] && ([ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ])) || \
+ ([ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ])) && [ "${dev}" = "${sta_radio}" ]
+ then
+ f_log "debug" "f_main ::: scan_quality: ${scan_quality}, scan_bssid: ${scan_bssid}, scan_essid: ${scan_essid}"
+ uci_set wireless "${config}" disabled 0
+ f_check "sta"
+ if [ "${trm_ifstatus}" = "true" ]
+ then
+ uci_commit wireless
+ f_check "initial"
+ f_log "info" "connected to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
+ return 0
+ elif [ ${cnt} -eq ${trm_maxretry} ]
+ then
+ uci_set wireless "${config}" disabled 1
+ uci_commit wireless
+ faulty_station="${sta_radio}/${sta_essid}/${sta_bssid:-"-"}"
+ f_jsnup "${faulty_station}"
+ f_log "info" "can't connect to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}', uplink disabled (${trm_sysver})"
+ f_check "rev"
+ break
+ else
+ uci -q revert wireless
+ f_jsnup
+ f_log "info" "can't connect to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
+ f_check "rev"
+ break
+ fi
+ fi
+ fi
+ unset scan_quality scan_bssid scan_essid
+ fi
+ done
+ unset IFS scan_quality scan_bssid scan_essid
+ done
+ fi
+ cnt=$(( cnt + 1 ))
+ sleep $(( ${trm_maxwait} / 6 ))
+ done
+ done
+ fi
}
# source required system libraries
#
if [ -r "/lib/functions.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]
then
- . "/lib/functions.sh"
- . "/usr/share/libubox/jshn.sh"
+ . "/lib/functions.sh"
+ . "/usr/share/libubox/jshn.sh"
else
- f_log "err" "system libraries not found"
+ f_log "err" "system libraries not found"
+fi
+
+# initialize json runtime file
+#
+json_load_file "${trm_rtfile}" >/dev/null 2>&1
+json_select data >/dev/null 2>&1
+if [ ${?} -ne 0 ]
+then
+ > "${trm_rtfile}"
+ json_init
+ json_add_object "data"
fi
# control travelmate actions
#
while true
do
- if [ -z "${trm_action}" ]
- then
- > "${trm_pidfile}"
- sleep ${trm_timeout}
- else
- printf '%s' "${$}" > "${trm_pidfile}"
- trm_action=""
- fi
- f_envload
- f_main
+ if [ -z "${trm_action}" ]
+ then
+ sleep ${trm_timeout}
+ elif [ "${trm_action}" = "stop" ]
+ then
+ > "${trm_rtfile}"
+ f_log "info" "travelmate instance stopped ::: action: ${trm_action}, pid: $(cat ${trm_pidfile} 2>/dev/null)"
+ exit 0
+ else
+ f_log "info" "travelmate instance started ::: action: ${trm_action}, pid: ${$}"
+ unset trm_action
+ fi
+ f_envload
+ f_main
done
-
include $(TOPDIR)/rules.mk
PKG_NAME:=u2pnpd
-PKG_VERSION:=0.3
+PKG_VERSION:=0.4
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/mhei/u2pnpd/releases/download/v$(PKG_VERSION)
-PKG_HASH:=73010be7ec523e3c3a9849a9783026627ecb3bc18d8195a9bed450e98a055ac2
+PKG_HASH:=4f1c98655fd75ca5d760155490f5331656f39f96bc7ea5a7bf75311848df7e2a
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=uanytun
-PKG_VERSION:=0.3.5
-PKG_RELEASE:=2
+PKG_VERSION:=0.3.7
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.anytun.org/download/
-PKG_HASH:=8edeed2ce185cc1add8a53de9f9192dfa65a48b559cccae6393faf2a1cd6f093
+PKG_HASH:=076318c771c908386c4408dda0769171542da701785302903641ce23fd33a295
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Christian Pointner <equinox@spreadspace.org>
PKG_LICENSE:=GPL-3.0+
echo '#ifndef UANYTUN_version_h_INCLUDED' > version.h; \
echo '#define UANYTUN_version_h_INCLUDED' >> version.h; \
echo '' >> version.h; \
- echo '#define VERSION_STRING_0 "uanytun version '`cat $(PKG_BUILD_DIR)/version`'"' >> version.h; \
- echo '#define VERSION_STRING_1 "built on '`hostname`', '`date +"%d.%m.%Y %H:%M:%S %Z"`'"' >> version.h; \
+ echo '#define VERSION_STRING "uanytun version '`cat $(PKG_BUILD_DIR)/version`'"' >> version.h; \
echo '' >> version.h; \
echo '#endif' >> version.h \
)
VARIANT_MAKE_OPTS:=
ifeq ($(BUILD_VARIANT),gcrypt)
-VARIANT_CFLAGS+=-DUSE_GCRYPT
+VARIANT_CFLAGS+=-DUSE_GCRYPT -DCRYPTO_LIB_NAME=\\\"libgcrypt\\\"
VARIANT_LDFLAGS+=-lgpg-error -lgcrypt
endif
ifeq ($(BUILD_VARIANT),nettle)
-VARIANT_CFLAGS+=-DUSE_NETTLE
+VARIANT_CFLAGS+=-DUSE_NETTLE -DCRYPTO_LIB_NAME=\\\"Nettle\\\"
VARIANT_LDFLAGS+=-lnettle
endif
ifeq ($(BUILD_VARIANT),sslcrypt)
-VARIANT_CFLAGS+=-DUSE_SSL_CRYPTO
+VARIANT_CFLAGS+=-DUSE_SSL_CRYPTO -DCRYPTO_LIB_NAME=\\\"OpenSSL\\\"
VARIANT_LDFLAGS+=-lcrypto
endif
ifeq ($(BUILD_VARIANT),nocrypt)
-VARIANT_CFLAGS+=-DNO_CRYPT
+VARIANT_CFLAGS+=-DNO_CRYPT -DCRYPTO_LIB_NAME=\\\"none\\\"
VARIANT_MAKE_OPTS+=NO_CRYPT_OBJ=1
endif
+++ /dev/null
-Index: uanytun-0.3.5/src/options.c
-===================================================================
---- uanytun-0.3.5.orig/src/options.c
-+++ uanytun-0.3.5/src/options.c
-@@ -481,7 +481,6 @@ void options_print_usage()
- void options_print_version()
- {
- printf("%s\n", VERSION_STRING_0);
-- printf("%s\n", VERSION_STRING_1);
- }
-
- void options_print(options_t* opt)
include $(TOPDIR)/rules.mk
PKG_NAME:=ulogd
-PKG_VERSION:=2.0.5
-PKG_RELEASE:=2
+PKG_VERSION:=2.0.7
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/ulogd/ \
- ftp://ftp.be.netfilter.org/pub/netfilter/ulogd/ \
- ftp://ftp.de.netfilter.org/pub/netfilter/ulogd/ \
- ftp://ftp.no.netfilter.org/pub/netfilter/ulogd/
-PKG_HASH:=a221cb9f77347c0ca00d0937e27c1b90e3291a553cc62a4139b788e2e420e8c0
+PKG_SOURCE_URL:=https://netfilter.org/projects/ulogd/files/ \
+ ftp://ftp.netfilter.org/pub/ulogd/
+PKG_HASH:=990a05494d9c16029ba0a83f3b7294fc05c756546b8d60d1c1572dc25249a92b
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
endif
ifneq ($(DEVELOPER)$(SDK)$(CONFIG_PACKAGE_ulogd-mod-mysql),)
- CONFIGURE_ARGS += --with-mysql="$(STAGING_DIR)/usr"
+ CONFIGURE_ARGS += \
+ --with-mysql-inc=$(STAGING_DIR)/usr/include/mysql \
+ --with-mysql-lib=$(STAGING_DIR)/usr/lib/mysql
else
CONFIGURE_ARGS += --without-mysql
endif
+++ /dev/null
---- a/src/ulogd.c
-+++ b/src/ulogd.c
-@@ -83,7 +83,7 @@ static char *ulogd_logfile = NULL;
- static const char *ulogd_configfile = ULOGD_CONFIGFILE;
- static const char *ulogd_pidfile = NULL;
- static int ulogd_pidfile_fd = -1;
--static FILE syslog_dummy;
-+static int ulogd_use_syslog = 0;
-
- static int info_mode = 0;
-
-@@ -427,7 +427,7 @@ void __ulogd_log(int level, char *file,
- if (level < loglevel_ce.u.value)
- return;
-
-- if (logfile == &syslog_dummy) {
-+ if (ulogd_use_syslog) {
- /* FIXME: this omits the 'file' string */
- va_start(ap, format);
- vsyslog(ulogd2syslog_level(level), format, ap);
-@@ -950,7 +950,7 @@ static int logfile_open(const char *name
- logfile = stdout;
- } else if (!strcmp(name, "syslog")) {
- openlog("ulogd", LOG_PID, LOG_DAEMON);
-- logfile = &syslog_dummy;
-+ ulogd_use_syslog = 1;
- } else {
- logfile = fopen(ulogd_logfile, "a");
- if (!logfile) {
-@@ -1240,7 +1240,7 @@ static void sigterm_handler(int signal)
- unload_plugins();
- #endif
-
-- if (logfile != NULL && logfile != stdout && logfile != &syslog_dummy) {
-+ if (logfile != NULL && logfile != stdout) {
- fclose(logfile);
- logfile = NULL;
- }
-@@ -1262,7 +1262,7 @@ static void signal_handler(int signal)
- switch (signal) {
- case SIGHUP:
- /* reopen logfile */
-- if (logfile != stdout && logfile != &syslog_dummy) {
-+ if (logfile != NULL && logfile != stdout) {
- fclose(logfile);
- logfile = fopen(ulogd_logfile, "a");
- if (!logfile) {
---- a/filter/raw2packet/ulogd_raw2packet_BASE.c
-+++ b/filter/raw2packet/ulogd_raw2packet_BASE.c
-@@ -42,6 +42,7 @@
- #include <ulogd/ulogd.h>
- #include <ulogd/ipfix_protocol.h>
- #include <netinet/if_ether.h>
-+#include <linux/types.h>
- #include <string.h>
-
- enum input_keys {
+++ /dev/null
-From e0c75c9d20b76ff3d496a776ce43341c752914c3 Mon Sep 17 00:00:00 2001
-From: Eric Leblond <eric@regit.org>
-Date: Tue, 21 Mar 2017 21:49:46 +0100
-Subject: [PATCH] ulogd: use strncpy instead of memcpy
-
-On some architecture, ulogd is not starting due to a
-crash in memcpy. This patch switches to strncpy to
-avoid the problem.
-
-Reported-by: Alexandru Ardelean <ardeleanalex@gmail.com>
-Signed-off-by: Eric Leblond <eric@regit.org>
----
- src/ulogd.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/ulogd.c b/src/ulogd.c
-index 5b9a586..919a317 100644
---- a/src/ulogd.c
-+++ b/src/ulogd.c
-@@ -668,7 +668,7 @@ pluginstance_alloc_init(struct ulogd_plugin *pl, char *pi_id,
- INIT_LLIST_HEAD(&pi->plist);
- pi->plugin = pl;
- pi->stack = stack;
-- memcpy(pi->id, pi_id, sizeof(pi->id));
-+ strncpy(pi->id, pi_id, ULOGD_MAX_KEYLEN);
-
- ptr = (void *)pi + sizeof(*pi);
-
---
-2.7.4
-
include $(TOPDIR)/rules.mk
PKG_NAME:=umurmur
-PKG_VERSION:=0.2.16-20161126
+PKG_VERSION:=0.2.17
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/umurmur/umurmur.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=fac630135664fda26338d403041b6b6e558a2d6b
-PKG_MIRROR_HASH:=6773aebea9aea355a41425e946291bb47bc399f85483bd6532cf26dfc7c801e5
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/umurmur/umurmur/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=e77b7b6616768f4a1c07442afe49a772692f667b00c23cc85909d4dd0ce206d2
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_MAINTAINER:=Martin Johansson <martin@fatbob.nu>
--- /dev/null
+From 45a0a33aea1878c467c380562d6e38b3e4c713a9 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Fri, 8 Jun 2018 11:59:04 -0300
+Subject: [PATCH] Update openssl 1.1 deprecated API
+
+Allows building with openssl 1.1 compiled without deprecated API support.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+---
+ src/ssli_openssl.c | 27 ++++++++++++++++++++++++---
+ 1 file changed, 24 insertions(+), 3 deletions(-)
+
+diff --git a/src/ssli_openssl.c b/src/ssli_openssl.c
+index 8ff1bcf..4f7979c 100644
+--- a/src/ssli_openssl.c
++++ b/src/ssli_openssl.c
+@@ -42,6 +42,8 @@
+
+ #include <openssl/x509v3.h>
+ #include <openssl/ssl.h>
++#include <openssl/rsa.h>
++#include <openssl/bn.h>
+ #include <openssl/err.h>
+ #include <openssl/safestack.h>
+ static X509 *x509;
+@@ -159,6 +161,7 @@ static void SSL_initializeCert() {
+
+ char *crt = (char *)getStrConf(CERTIFICATE);
+ char *key = (char *)getStrConf(KEY);
++ BIGNUM *e = NULL;
+
+ if (context) {
+ bool_t did_load_cert = SSL_CTX_use_certificate_chain_file(context, crt);
+@@ -172,13 +175,24 @@ static void SSL_initializeCert() {
+
+ x509 = X509_new();
+ pkey = EVP_PKEY_new();
+- rsa = RSA_generate_key(4096,RSA_F4,NULL,NULL);
++ rsa = RSA_new();
++ e = BN_new();
++ if (x509 == NULL || pkey == NULL || rsa == NULL || e == NULL || !BN_set_word(e, RSA_F4) ||
++ !RSA_generate_key_ex (rsa, 4096, e, NULL)) {
++ Log_fatal("Failed to Generate RSA key.");
++ }
++ BN_free(e);
+ EVP_PKEY_assign_RSA(pkey, rsa);
+
+ X509_set_version(x509, 2);
+ ASN1_INTEGER_set(X509_get_serialNumber(x509),1);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ X509_gmtime_adj(X509_get_notBefore(x509),0);
+ X509_gmtime_adj(X509_get_notAfter(x509),60*60*24*365);
++#else
++ X509_gmtime_adj(X509_getm_notBefore(x509),0);
++ X509_gmtime_adj(X509_getm_notAfter(x509),60*60*24*365);
++#endif
+ X509_set_pubkey(x509, pkey);
+
+ X509_NAME *name=X509_get_subject_name(x509);
+@@ -214,9 +228,10 @@ void SSLi_init(void)
+ SSL *ssl;
+ int i, offset = 0, cipherstringlen = 0;
+ STACK_OF(SSL_CIPHER) *cipherlist = NULL, *cipherlist_new = NULL;
+- SSL_CIPHER *cipher;
++ const SSL_CIPHER *cipher;
+ char *cipherstring;
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
+ OpenSSL_add_all_algorithms();
+ SSL_load_error_strings();
+@@ -225,13 +240,17 @@ void SSLi_init(void)
+ context = SSL_CTX_new(SSLv23_server_method());
+ SSL_CTX_set_options(context, SSL_OP_NO_SSLv2);
+ SSL_CTX_set_options(context, SSL_OP_NO_SSLv3);
+- SSL_CTX_set_options(context, SSL_OP_CIPHER_SERVER_PREFERENCE);
++#else
++ context = SSL_CTX_new(TLS_server_method());
++ SSL_CTX_set_min_proto_version(context, TLS1_VERSION);
++#endif
+ if (context == NULL)
+ {
+ ERR_print_errors_fp(stderr);
+ abort();
+ }
+
++ SSL_CTX_set_options(context, SSL_OP_CIPHER_SERVER_PREFERENCE);
+ SSL_CTX_set_cipher_list(context, ciphers);
+
+ EC_KEY *ecdhkey = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
+@@ -290,7 +309,9 @@ void SSLi_init(void)
+ void SSLi_deinit(void)
+ {
+ SSL_CTX_free(context);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ EVP_cleanup();
++#endif
+ }
+
+ int SSLi_nonblockaccept(SSL_handle_t *ssl, bool_t *SSLready)
+--
+2.16.4
+
+++ /dev/null
---- a/src/ssl.h
-+++ b/src/ssl.h
-@@ -90,7 +90,7 @@ typedef ssl_context SSL_handle_t;
-
- #elif defined(USE_MBEDTLS)
- #include <mbedtls/ssl.h>
--#include <mbedtls/net.h>
-+#include <mbedtls/net_sockets.h>
- #include <mbedtls/version.h>
-
- #if defined(MBEDTLS_VERSION_MAJOR)
include $(TOPDIR)/rules.mk
PKG_NAME:=unbound
-PKG_VERSION:=1.7.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.8.1
+PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@hotmail.com>
+PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.unbound.net/downloads
-PKG_HASH:=94dd9071fb13d8ccd122a3ac67c4524a3324d0e771fc7a8a7c49af8abfb926a2
+PKG_HASH:=c362b3b9c35d1b8c1918da02cdd5528d729206c14c767add89ae95acae363c5d
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
SECTION:=net
CATEGORY:=Network
SUBMENU:=IP Addresses and Names
- USERID:=unbound=553:unbound=553
+ USERID:=unbound:unbound
TITLE+= (daemon)
DEPENDS+= +libunbound
endef
--disable-dsa \
--disable-gost \
--enable-allsymbols \
+ --enable-tfo-client \
+ --enable-tfo-server \
--with-libexpat="$(STAGING_DIR)/usr" \
--with-ssl="$(STAGING_DIR)/usr" \
- --with-pidfile=/var/run/unbound.pid \
- --with-user=unbound
+ --with-user=unbound \
+ --with-run-dir=/var/lib/unbound \
+ --with-conf-file=/var/lib/unbound/unbound.conf \
+ --with-pidfile=/var/run/unbound.pid
define Package/unbound/conffiles
/etc/config/unbound
$(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/unbound
$(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
+ $(PKG_INSTALL_DIR)/var/lib/unbound/unbound.conf \
$(1)/etc/unbound/unbound.conf
$(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key
$(INSTALL_DATA) ./files/unbound_ext.conf $(1)/etc/unbound/unbound_ext.conf
$(INSTALL_DATA) ./files/iptools.sh $(1)/usr/lib/unbound/iptools.sh
$(INSTALL_BIN) ./files/odhcpd.sh $(1)/usr/lib/unbound/odhcpd.sh
$(INSTALL_DATA) ./files/odhcpd.awk $(1)/usr/lib/unbound/odhcpd.awk
- $(INSTALL_DATA) ./files/rootzone.sh $(1)/usr/lib/unbound/rootzone.sh
+ $(INSTALL_DATA) ./files/stopping.sh $(1)/usr/lib/unbound/stopping.sh
$(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh
endef
[Unbound](https://www.unbound.net/) is a validating, recursive, and caching DNS resolver. The C implementation of Unbound is developed and maintained by [NLnet Labs](https://www.nlnetlabs.nl/). It is based on ideas and algorithms taken from a java prototype developed by Verisign labs, Nominet, Kirei and ep.net. Unbound is designed as a set of modular components, so that also DNSSEC (secure DNS) validation and stub-resolvers (that do not run as a server, but are linked into an application) are easily possible.
## Package Overview
-Unbound may be useful on consumer grade embedded hardware. It is _intended_ to be a recursive resolver only. [NLnet Labs NSD](https://www.nlnetlabs.nl/projects/nsd/) is _intended_ for the authoritative task. This is different than [ISC Bind](https://www.isc.org/downloads/bind/) and its inclusive functions. Unbound configuration effort and memory consumption may be easier to control. A consumer could have their own recursive resolver with 8/64 MB router, and remove potential issues from forwarding resolvers outside of their control.
+OpenWrt default build uses [dnsmasq](http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html) for DNS forwarding and DHCP. With a forward only resolver, dependence on the upstream recursors may be cause for concern. They are often provided by the ISP, and some users have switched to public DNS providers. Either way may result in problems due to performance, "snoop-vertising", hijacking (MiM), and other causes. Running a recursive resolver or resolver capable of TLS may be a solution.
+
+Unbound may be useful on consumer grade embedded hardware. It is fully DNSSEC and TLS capable. It is _intended_ to be a recursive resolver only. NLnet Labs [NSD](https://www.nlnetlabs.nl/projects/nsd/) is _intended_ for the authoritative task. This is different than [ISC Bind](https://www.isc.org/downloads/bind/) and its inclusive functions. Unbound configuration effort and memory consumption may be easier to control. A consumer could have their own recursive resolver with 8/64 MB router, and remove potential issues from forwarding resolvers outside of their control.
This package builds on Unbounds capabilities with OpenWrt UCI. Not every Unbound option is in UCI, but rather, UCI simplifies the combination of related options. Unbounds native options are bundled and balanced within a smaller set of choices. Options include resources, DNSSEC, access control, and some TTL tweaking. The UCI also provides an escape option and works at the raw "unbound.conf" level.
-## HOW TO Ad Blocking
-The UCI scripts will work with [net/adblock 2.3+](https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md), if it is installed and enabled. Its all detected and integrated automatically. In brief, the adblock scripts create distinct local-zone files that are simply included in the unbound conf file during UCI generation. If you don't want this, then disable adblock or reconfigure adblock to not send these files to Unbound.
+## HOW TO: Ad Blocking
+The UCI scripts will work with [net/adblock](https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md), if it is installed and enabled. Its all detected and integrated automatically. In brief, the adblock scripts create distinct local-zone files that are simply included in the unbound conf file during UCI generation. If you don't want this, then disable adblock or reconfigure adblock to not send these files to Unbound.
+
+A few tweaks may be needed to enhance the realiability and effectiveness. Ad Block option for delay time may need to be set for upto one minute (adb_triggerdelay), because of boot up race conditions with interfaces calling Unbound restarts. Also many smart devices (TV, microwave, or refigerator) will also use public DNS servers either as a bypass or for certain connections in general. If you wish to force exclusive DNS to your router, then you will need a firewall rule for example:
+
+**/etc/config/firewall**:
+```
+config rule
+ option name 'Block-Public-DNS'
+ option enabled '1'
+ option src 'lan'
+ option dest 'wan'
+ option dest_port '53 853 5353'
+ option proto 'tcpudp'
+ option family 'any'
+ option target 'REJECT'
+```
-## HOW TO Integrate with DHCP
+## HOW TO: Integrate with DHCP
Some UCI options and scripts help Unbound to work with DHCP servers to load the local DNS. The examples provided here are serial dnsmasq-unbound, parallel dnsmasq-unbound, and unbound scripted with odhcpd.
### Serial dnsmasq
-In this case, dnsmasq is not changed *much* with respect to the default OpenWrt/LEDE configuration. Here dnsmasq is forced to use the local Unbound instance as the lone upstream DNS server, instead of your ISP. This may be the easiest implementation, but performance degradation can occur in high volume networks. dnsmasq and Unbound effectively have the same information in memory, and all transfers are double handled.
+In this case, dnsmasq is not changed *much* with respect to the default [OpenWrt](https://openwrt.org/docs/guide-user/base-system/dns_configuration) configuration. Here dnsmasq is forced to use the local Unbound instance as the lone upstream DNS server, instead of your ISP. This may be the easiest implementation, but performance degradation can occur in high volume networks. Unbound and dnsmasq effectively have the same information in memory, and all transfers are double handled.
**/etc/config/unbound**:
-
```
config unbound
option add_local_fqdn '0'
```
**/etc/config/dhcp**:
-
```
config dnsmasq
option domain 'yourdomain'
In this case, Unbound serves your local network directly for all purposes. It will look over to dnsmasq for DHCP-DNS resolution. Unbound is generally accessible on port 53, and dnsmasq is only accessed at 127.0.0.1:1053 by Unbound. Although you can dig/drill/nslookup remotely with the proper directives.
**/etc/config/unbound**:
-
```
config unbound
option dhcp_link 'dnsmasq'
```
**/etc/config/dhcp**:
-
```
config dnsmasq
option domain 'yourdomain'
```
### Unbound and odhcpd
-You may ask, "can Unbound replace dnsmasq?" You can have DHCP-DNS records with Unbound and odhcpd only. The UCI scripts will allow Unbound to act like dnsmasq. When odhcpd configures each DHCP lease, it will call a script. The script provided with Unbound will read the lease file for DHCP-DNS records. The unbound-control application is required, because simply rewriting conf-files and restarting unbound is too much overhead.
+You may ask, "can Unbound replace dnsmasq?" You can have DHCP-DNS records with Unbound and [odhcpd](https://github.com/openwrt/odhcpd/blob/master/README) only. The UCI scripts will allow Unbound to act like dnsmasq. When odhcpd configures each DHCP lease, it will call a script. The script provided with Unbound will read the lease file for DHCP-DNS records. The unbound-control application is required, because simply rewriting conf-files and restarting unbound is too much overhead.
- Default OpenWrt has dnsmasq+odhcpd with `odhcpd-ipv6only` limited to DHCPv6.
- If you use dnsmasq+odhcpd together, then use dnsmasq serial or parallel methods above.
- You must install package `odhcpd` (full) to use odhcpd alone.
- Remember to uninstall (or disable) dnsmasq when you won't use it.
**/etc/config/unbound**:
-
```
config unbound
# name your router in DNS
```
**/etc/config/dhcp**:
-
```
config dhcp 'lan'
option dhcpv4 'server'
option leasetime '12h'
option ra 'server'
option ra_management '1'
- # odhcpd should issue ULA [fd00::/8] by default
...
config odhcpd 'odhcpd'
option leasetrigger '/usr/lib/unbound/odhcpd.sh'
```
-## HOW TO Manual Override
+## HOW TO: Manual Override
Yes, there is a UCI to disable the rest of Unbound UCI. However, OpenWrt or LEDE are targeted at embedded machines with flash ROM. The initialization scripts do a few things to protect flash ROM.
### Completely Manual (almost)
Keep the DNSKEY updated with your choice of flash activity. `root.key` maintenance for DNSKEY RFC5011 would be hard on flash. Unbound natively updates frequently. It also creates and destroys working files in the process. In `/var/lib/unbound` this is no problem, but it would be gone at the next reboot. If you have DNSSEC (validator) active, then you should consider the age UCI option. Choose how many days to copy from `/var/lib/unbound/root.key` (tmpfs) to `/etc/unbound/root.key` (flash).
**/etc/config/unbound**:
-
```
config unbound
option manual_conf '1'
### Hybrid Manual/UCI
You like the UCI. Yet, you need to add some difficult to standardize options, or just are not ready to make a UCI request yet. The files `/etc/unbound/unbound_srv.conf` and `/etc/unbound/unbound_ext.conf` will be copied to Unbounds chroot directory and included during auto generation.
-The former will be added to the end of the `server:` clause. The later will be added to the end of the file for extended `forward:` and `view:` clauses. You can also disable unbound-control in the UCI which only allows "localhost" connections unencrypted, and then add an encrypted remote `control:` clause.
+The file `unbound_srv.conf` will be added into the `server:` clause. The file `unbound_ext.conf` will be added to the end of all configuration. It is for extended `forward-zone:`, `stub-zone:`, `auth-zone:`, and `view:` clauses. You can also disable unbound-control in the UCI which only allows "localhost" connections unencrypted, and then add an encrypted remote `control:` clause.
+
+## HOW TO: Cache Zone Files
+Unbound has the ability to AXFR a whole zone from an authoritative server to prefetch the zone. This can speed up access to common zones. Some may have special bandwidth concerns for DNSSEC overhead. The following is a generic example. UCI defaults include the [root](https://www.internic.net/domain/) zone, but it is disabled as a ready to go example.
-## Complete List of UCI Options
**/etc/config/unbound**:
+```
+config zone
+ option enabled '1'
+ option fallback '1'
+ option url_dir 'https://asset-management.it.example.com/zones/'
+ option zone_type 'auth_zone'
+ list server 'ns1.it.example.com'
+ list server 'ns2.it.example.com'
+ list zone_name 'example.com'
+```
+## HOW TO: TLS Over DNS
+Unbound can use TLS as a client or server. UCI supports Unbound as a forwarding client with TLS. Servers are more complex and need manual configuration. This may be desired for privacy against stealth tracking. Some public DNS servers seem to advertise help in this quest. If your looking for a better understanding, then some information can be found at [Cloudflare](https://www.cloudflare.com/) DNS [1.1.1.1](https://1.1.1.1/). The following is a generic example. You can mix providers by using complete server specificaiton to override the zones common port and certificate domain index.
+
+**NOTICE:** Unbound requires openssl-1.1.0 to verify host certificates. OpenWrt at present is configured with openssl-1.0.2. Connections will be over TLS, but theoretically, certificates may not be from a trusted source. See report [Unbound #658](https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=658). When this is resolved, it will be recommended again to install `ca-bundle`, maintain it, and be sure to include the TLS certificate domain index with the host addresses.
+
+**/etc/config/unbound**:
+```
+config zone
+ option enabled '1'
+ # question: do you want to recurse when TLS fails or not?
+ option fallback '0'
+ option tls_index 'dns.example.net'
+ option tls_port '853'
+ option tls_upstream '1'
+ option zone_type 'forward_zone'
+ # these servers assume a common TLS port/index
+ list server '192.0.2.53'
+ list server '2001:db8::53'
+ # this alternate server is fully specified inline
+ list server '192.0.2.153@443#dns.alternate.example.org'
+ list zone_name '.'
+```
+
+## Complete List of UCI Options
+**/etc/config/unbound**:
```
config unbound
Currently only one instance is supported.
option domain_type 'static'
Unbound local-zone: <domain> <type>. This allows you to lock
- down or allow forwarding of your domain, your router host name
- without suffix, and leakage of RFC6762 "local."
+ down or allow forwarding of the local zone. Notable types:
+ static - typical single router setup much like OpenWrt dnsmasq default
+ refuse - to answer overtly with DNS code REFUSED
+ deny - to drop queries for the local zone
+ transparent - to use your manually added forward-zone: or stub-zone: clause
option edns_size '1280'
Bytes. Extended DNS is necessary for DNSSEC. However, it can run
into MTU issues. Use this size in bytes to manage drop outs.
- option extended_luci '0'
- Boolean. Extends a tab hierarchy in LuCI for advanced congfiguration.
-
option extended_stats '0'
Boolean. extended statistics are printed from unbound-control.
Keeping track of more statistics takes time.
option protocol 'mixed'
Unbound can limit its protocol used for recursive queries.
- Set 'ip4_only' to avoid issues if you do not have native IP6.
- Set 'ip6_prefer' to possibly improve performance as well as
- not consume NAT paths for the client computers.
- Do not use 'ip6_only' unless testing.
+ ip4_only - old fashioned IPv4 upstream and downstream
+ ip6_only - test environment only; could cauase problems
+ ip6_local - upstream IPv4 only and local network IPv4 and IPv6
+ ip6_prefer - both IPv4 and IPv6 but try IPv6 first
+ mixed - both IPv4 and IPv6
+ default - Unbound built-in defaults
option query_minimize '0'
Boolean. Enable a minor privacy option. Don't let each server know
3 - Plus DHCP-PD range passed down interfaces (not implemented)
option recursion 'passive'
- Unbound has numerous options for how it recurses. This UCI combines
- them into "passive," "aggressive," or Unbound's own "default."
- Passive is easy on resources, but slower until cache fills.
+ Unbound has many options for recrusion but UCI is bundled for simplicity.
+ passive - slower until cache fills but kind on CPU load
+ default - Unbound built-in defaults
+ aggressive - uses prefetching to handle more requests quickly
option resource 'small'
- Unbound has numerous options for resources. This UCI gives "tiny,"
- "small," "medium," and "large." Medium is most like the compiled
- defaults with a bit of balancing. Tiny is close to the published
- memory restricted configuration. Small 1/2 medium, and large 2x.
+ Unbound has many options for resources but UCI is bundled for simplicity.
+ tiny - similar to published memory restricted configuration
+ small - about half of medium
+ medium - similar to default, but fixed for consistency
+ default - Unbound built-in defaults
+ large - about double of medium
option root_age '9'
Days. >90 Disables. Age limit for Unbound root data like root
embedded devices don't have a real time power off clock. NTP needs
DNS to resolve servers. This works around the chicken-and-egg.
- list domain_forward 'mail.my-isp.com'
- Domain. Do not recurse, but rather forward the domains to given DNS
- servers found in resolve.conf.auto from WAN DHCP client. This may
- provide better access to mirror servers in 'your neigborhood.' This
- may be useful in keeping local organization lookups on local subnets.
+ option verbosity '1'
+ Level. Sets Unbounds logging intensity.
list domain_insecure 'ntp.somewhere.org'
Domain. Domains that you wish to skip DNSSEC. It is one way around NTP
chicken and egg. Your DHCP servered domains are automatically included.
- list rebind_interface 'lan'
- Interface (logical). Works with 'rebind_protection' options 2 and 3.
-
list trigger_interface 'lan' 'wan'
Interface (logical). This option is a work around for netifd/procd
interaction with WAN DHCPv6. Minor RA or DHCP changes in IP6 can
cause netifd to execute procd interface reload. Limit Unbound procd
triggers to LAN and WAN (IP4 only) to prevent restart @2-3 minutes.
+
+
+config zone
+ Create Unbounds forward-zone:, stub-zone:, or auth-zone: clauses
+
+ option enabled 1
+ Boolean. Enable the zone clause.
+
+ option fallback 1
+ Boolean. Permit normal recursion when the narrowly selected servers
+ in this zone are unresponsive or return empty responses. Disable, if
+ there are security concerns (forward only internal to organization).
+
+ option port 53
+ Port. Servers are contact on this port for plain DNS operations.
+
+ option resolv_conf 0
+ Boolean. Use "resolv.conf" as it was filled by the DHCP client. This
+ can be used to forward zones within your ISP (mail.example.net) or that
+ have co-located services (streamed-movies.example.com). Recursion may
+ not yield the most local result, but forwarding may instead.
+
+ option tls_index (n/a)
+ Domain. Name TLS certificates are signed for (dns.example.net). If this
+ option is ommitted, then Unbound will make the connection but not
+ validate it.
+
+ option tls_port 853
+ Port. Servers are contact on this port for DNS over TLS operations.
+
+ option tls_upstream 0
+ Boolean. Use TLS to contact the zone server.
+
+ option url_dir
+ String. http or https path, directory part only, to the zone file for
+ auth_zone type only. Files "${zone_name}.zone" are expect in this path.
+
+ option zone_type (n/a)
+ State. Required field or the clause is effectively disabled. Check
+ Unbound documentation for clarity (unbound-conf).
+ auth_zone - prefetch whole zones from authoritative server (ICANN)
+ forward_zone - forward queries in these domains to the listed servers
+ stub_zone - force recursion of these domains to the listed servers
+
+ list server (n/a)
+ IP. Every zone must have one server. Stub and forward require IP to
+ prevent chicken and egg (due to UCI simplicity). Authoritative prefetch
+ may use a server name.
+
+ list zone_name
+ Domain. Every zone must represent some part of the DNS tree. It can be
+ all of it "." or you internal organization domain "example.com." Within
+ each zone clause all zone names will be matched to all servers.
```
+## Replaced Options
+ config unbound / option prefetch_root
+ List the domains in a zone with type auth_zone and fill in the server
+ or url fields. Root zones are ready but disabled in default install UCI.
+
+ config unbound / list domain_forward
+ List the domains in a zone with type forward_zone and enable the
+ resolv_conf option.
+
+ config unbound / list rebind_interface
+ Enable rebind_protection at 2 and all DHCP interfaces are also
+ protected for IPV6 GLA (parallel to subnets in add_local_fqdn).
#
##############################################################################
-UNBOUND_LIBDIR=/usr/lib/unbound
-UNBOUND_VARDIR=/var/lib/unbound
+# where are we?
+UB_LIBDIR=/usr/lib/unbound
+UB_VARDIR=/var/lib/unbound
+UB_PIDFILE=/var/run/unbound.pid
-UNBOUND_PIDFILE=/var/run/unbound.pid
+# conf deconstructed
+UB_TOTAL_CONF=$UB_VARDIR/unbound.conf
+UB_CORE_CONF=$UB_VARDIR/server.conf.tmp
+UB_HOST_CONF=$UB_VARDIR/host.conf.tmp
+UB_DHCP_CONF=$UB_VARDIR/dhcp.conf
+UB_ZONE_CONF=$UB_VARDIR/zone.conf.tmp
+UB_CTRL_CONF=$UB_VARDIR/ctrl.conf.tmp
+UB_SRVMASQ_CONF=$UB_VARDIR/dnsmasq_srv.conf.tmp
+UB_EXTMASQ_CONF=$UB_VARDIR/dnsmasq_ext.conf.tmp
+UB_SRV_CONF=$UB_VARDIR/unbound_srv.conf
+UB_EXT_CONF=$UB_VARDIR/unbound_ext.conf
-UNBOUND_SRV_CONF=$UNBOUND_VARDIR/unbound_srv.conf
-UNBOUND_EXT_CONF=$UNBOUND_VARDIR/unbound_ext.conf
-UNBOUND_DHCP_CONF=$UNBOUND_VARDIR/unbound_dhcp.conf
-UNBOUND_CONFFILE=$UNBOUND_VARDIR/unbound.conf
+# TLS keys
+UB_TLS_KEY_FILE="TLS server UCI not implemented"
+UB_TLS_PEM_FILE="TLS server UCI not implemented"
+UB_TLS_FWD_FILE=$UB_VARDIR/ca-certificates.crt
+UB_TLS_ETC_FILE=/etc/ssl/certs/ca-certificates.crt
-UNBOUND_KEYFILE=$UNBOUND_VARDIR/root.key
-UNBOUND_HINTFILE=$UNBOUND_VARDIR/root.hints
-UNBOUND_TIMEFILE=$UNBOUND_VARDIR/hotplug.time
+# start files
+UB_RKEY_FILE=$UB_VARDIR/root.key
+UB_RHINT_FILE=$UB_VARDIR/root.hints
+UB_TIME_FILE=$UB_VARDIR/hotplug.time
+UB_SKIP_FILE=$UB_VARDIR/skip.time
-UNBOUND_CTLKEY_FILE=$UNBOUND_VARDIR/unbound_control.key
-UNBOUND_CTLPEM_FILE=$UNBOUND_VARDIR/unbound_control.pem
-UNBOUND_SRVKEY_FILE=$UNBOUND_VARDIR/unbound_server.key
-UNBOUND_SRVPEM_FILE=$UNBOUND_VARDIR/unbound_server.pem
+# control app keys
+UB_CTLKEY_FILE=$UB_VARDIR/unbound_control.key
+UB_CTLPEM_FILE=$UB_VARDIR/unbound_control.pem
+UB_SRVKEY_FILE=$UB_VARDIR/unbound_server.key
+UB_SRVPEM_FILE=$UB_VARDIR/unbound_server.pem
-##############################################################################
+# similar default SOA / NS RR as Unbound uses for private ARPA zones
+UB_XSER=$(( $( date +%s ) / 60 ))
+UB_XSOA="7200 IN SOA localhost. nobody.invalid. $UB_XSER 3600 1200 9600 300"
+UB_XNS="7200 IN NS localhost."
+UB_XTXT="7200 IN TXT \"comment=local intranet dns zone\""
+UB_MTXT="7200 IN TXT \"comment=masked internet dns zone\""
+UB_LTXT="7200 IN TXT \"comment=rfc6762 multicast dns zone\""
-UNBOUND_ANCHOR=/usr/sbin/unbound-anchor
-UNBOUND_CONTROL=/usr/sbin/unbound-control
-UNBOUND_CONTROL_CFG="$UNBOUND_CONTROL -c $UNBOUND_CONFFILE"
+# helper apps
+UB_ANCHOR=/usr/sbin/unbound-anchor
+UB_CONTROL=/usr/sbin/unbound-control
+UB_CONTROL_CFG="$UB_CONTROL -c $UB_TOTAL_CONF"
##############################################################################
#
##############################################################################
+DM_D_WAN_FQDN=0
+
+DM_LIST_KNOWN_ZONES="invalid"
+DM_LIST_TRN_ZONES=""
+DM_LIST_LOCAL_DATA=""
+DM_LIST_LOCAL_PTR=""
+DM_LIST_FWD_PORTS=""
+DM_LIST_FWD_ZONES=""
+
+##############################################################################
+
+create_local_zone() {
+ local target="$1"
+ local partial domain found
+
+ case $DM_LIST_TRN_ZONES in
+ *"${target}"*)
+ found=1
+ ;;
+
+ *)
+ case $target in
+ [A-Za-z0-9]*.[A-Za-z0-9]*)
+ found=0
+ ;;
+
+ *) # no dots
+ found=1
+ ;;
+ esac
+ esac
+
+
+ if [ $found -eq 0 ] ; then
+ # New Zone! Bundle local-zones: by first two name tiers "abcd.tld."
+ partial=$( echo "$target" | awk -F. '{ j=NF ; i=j-1; print $i"."$j }' )
+ DM_LIST_TRN_ZONES="$DM_LIST_TRN_ZONES $partial"
+ DM_LIST_KNOWN_ZONES="$DM_LIST_KNOWN_ZONES $partial"
+ fi
+}
+
+##############################################################################
+
+create_host_record() {
+ local cfg="$1"
+ local ip name debug_ip
+
+ # basefiles dhcp "domain" clause which means host A, AAAA, and PRT record
+ config_get ip "$cfg" ip
+ config_get name "$cfg" name
+
+
+ if [ -n "$name" -a -n "$ip" ] ; then
+ create_local_zone "$name"
+
+
+ case $ip in
+ fe[89ab][0-9a-f]:*|169.254.*)
+ debug_ip="$ip@$host"
+ ;;
+
+ [1-9a-f]*:*[0-9a-f])
+ DM_LIST_LOCAL_DATA="$DM_LIST_LOCAL_DATA $name.@@300@@IN@@AAAA@@$ip"
+ DM_LIST_LOCAL_PTR="$DM_LIST_LOCAL_PTR $ip@@300@@$name"
+ ;;
+
+ [1-9]*.*[0-9])
+ DM_LIST_LOCAL_DATA="$DM_LIST_LOCAL_DATA $name.@@300@@IN@@A@@$ip"
+ DM_LIST_LOCAL_PTR="$DM_LIST_LOCAL_PTR $ip@@300@@$name"
+ ;;
+ esac
+ fi
+}
+
+##############################################################################
+
+create_mx_record() {
+ local cfg="$1"
+ local domain relay pref record
+
+ # Insert a static MX record
+ config_get domain "$cfg" domain
+ config_get relay "$cfg" relay
+ config_get pref "$cfg" pref 10
+
+
+ if [ -n "$domain" -a -n "$relay" ] ; then
+ create_local_zone "$domain"
+ record="$domain.@@300@@IN@@MX@@$pref@@$relay."
+ DM_LIST_LOCAL_DATA="$DM_LIST_LOCAL_DATA $record"
+ fi
+}
+
+##############################################################################
+
+create_srv_record() {
+ local cfg="$1"
+ local srv target port class weight record
+
+ # Insert a static SRV record such as SIP server
+ config_get srv "$cfg" srv
+ config_get target "$cfg" target
+ config_get port "$cfg" port
+ config_get class "$cfg" class 10
+ config_get weight "$cfg" weight 10
+
+
+ if [ -n "$srv" -a -n "$target" -a -n "$port" ] ; then
+ create_local_zone "$srv"
+ record="$srv.@@300@@IN@@SRV@@$class@@$weight@@$port@@$target."
+ DM_LIST_LOCAL_DATA="$DM_LIST_LOCAL_DATA $record"
+ fi
+}
+
+##############################################################################
+
+create_cname_record() {
+ local cfg="$1"
+ local cname target record
+
+ # Insert static CNAME record
+ config_get cname "$cfg" cname
+ config_get target "$cfg" target
+
+
+ if [ -n "$cname" -a -n "$target" ] ; then
+ create_local_zone "$cname"
+ record="$cname.@@300@@IN@@CNAME@@$target."
+ DM_LIST_LOCAL_DATA="$DM_LIST_LOCAL_DATA $record"
+ fi
+}
+
+##############################################################################
+
dnsmasq_local_zone() {
local cfg="$1"
local fwd_port fwd_domain wan_fqdn
if [ -n "$wan_fqdn" ] ; then
- UNBOUND_D_WAN_FQDN=$wan_fqdn
+ DM_D_WAN_FQDN=$wan_fqdn
fi
+
if [ -n "$fwd_domain" -a -n "$fwd_port" -a ! "${fwd_port:-53}" -eq 53 ] ; then
# dnsmasq localhost listening ports (possible multiple instances)
- UNBOUND_N_FWD_PORTS="$UNBOUND_N_FWD_PORTS $fwd_port"
- UNBOUND_TXT_FWD_ZONE="$UNBOUND_TXT_FWD_ZONE $fwd_domain"
-
- {
- # This creates DOMAIN local privledges
- echo " private-domain: \"$fwd_domain\""
- echo " local-zone: \"$fwd_domain.\" transparent"
- echo " domain-insecure: \"$fwd_domain\""
- echo
- } >> $UNBOUND_CONFFILE
+ DM_LIST_FWD_PORTS="$DM_LIST_FWD_PORTS $fwd_port"
+ DM_LIST_FWD_ZONES="$DM_LIST_FWD_ZONES $fwd_domain"
fi
}
##############################################################################
dnsmasq_local_arpa() {
- local cfg="$1"
- local logint dhcpv4 dhcpv6 ignore
- local subnets subnets4 subnets6
- local forward arpa
- local validip4 validip6 privateip
-
- config_get logint "$cfg" interface
- config_get dhcpv4 "$cfg" dhcpv4
- config_get dhcpv6 "$cfg" dhcpv6
- config_get_bool ignore "$cfg" ignore 0
-
- # Find the list of addresses assigned to a logical interface
- # Its typical to have a logical gateway split NAME and NAME6
- network_get_subnets subnets4 "$logint"
- network_get_subnets6 subnets6 "$logint"
- subnets="$subnets4 $subnets6"
-
- network_get_subnets subnets4 "${logint}6"
- network_get_subnets6 subnets6 "${logint}6"
- subnets="$subnets $subnets4 $subnets6"
-
-
- if [ -z "$subnets" ] ; then
- forward=""
+ local ifarpa ifsubnet
- elif [ -z "$UNBOUND_N_FWD_PORTS" ] ; then
- forward=""
- elif [ "$ignore" -gt 0 ] ; then
- if [ "$UNBOUND_D_WAN_FQDN" -gt 0 ] ; then
- # Only forward the one gateway host.
- forward="host"
+ if [ -n "$UB_LIST_NETW_LAN" ] ; then
+ for ifsubnet in $UB_LIST_NETW_LAN ; do
+ ifarpa=$( domain_ptr_any "${ifsubnet#*@}" )
+ DM_LIST_FWD_ZONES="$DM_LIST_FWD_ZONES $ifarpa"
+ done
+ fi
- else
- forward=""
- fi
- else
- # Forward the entire private subnet.
- forward="domain"
+ if [ -n "$UB_LIST_NETW_WAN" -a "$DM_D_WAN_FQDN" -gt 0 ] ; then
+ for ifsubnet in $UB_LIST_NETW_WAN ; do
+ ifarpa=$( domain_ptr_any "${ifsubnet#*@}" )
+ DM_LIST_FWD_ZONES="$DM_LIST_FWD_ZONES $ifarpa"
+ done
fi
+}
+##############################################################################
- if [ -n "$forward" ] ; then
- for subnet in $subnets ; do
- validip4=$( valid_subnet4 $subnet )
- validip6=$( valid_subnet6 $subnet )
- privateip=$( private_subnet $subnet )
+dnsmasq_inactive() {
+ local record
- if [ "$validip4" = "ok" -a "$dhcpv4" != "disable" ] ; then
- if [ "$forward" = "domain" ] ; then
- arpa=$( domain_ptr_ip4 "$subnet" )
- else
- arpa=$( host_ptr_ip4 "$subnet" )
- fi
+ if [ "$UB_D_EXTRA_DNS" -gt 0 ] ; then
+ # Parasite from the uci.dhcp.domain clauses
+ DM_LIST_KNOWN_ZONES="$DM_LIST_KNOWN_ZONES $UB_TXT_DOMAIN"
+ config_load dhcp
+ config_foreach create_host_record domain
- elif [ "$validip6" = "ok" -a "$dhcpv6" != "disable" ] ; then
- if [ "$forward" = "domain" ] ; then
- arpa=$( domain_ptr_ip6 "$subnet" )
- else
- arpa=$( host_ptr_ip6 "$subnet" )
- fi
- else
- arpa=""
- fi
+ if [ "$UB_D_EXTRA_DNS" -gt 1 ] ; then
+ config_foreach create_srv_record srvhost
+ config_foreach create_mx_record mxhost
+ fi
- if [ -n "$arpa" ] ; then
- if [ "$privateip" = "ok" ] ; then
- {
- # This creates ARPA local zone privledges
- echo " local-zone: \"$arpa.\" transparent"
- echo " domain-insecure: \"$arpa\""
- echo
- } >> $UNBOUND_CONFFILE
- fi
+ if [ "$UB_D_EXTRA_DNS" -gt 2 ] ; then
+ config_foreach create_cname_record cname
+ fi
- UNBOUND_TXT_FWD_ZONE="$UNBOUND_TXT_FWD_ZONE $arpa"
+ {
+ echo "# $UB_SRVMASQ_CONF generated by UCI $( date -Is )"
+ if [ -n "$DM_LIST_TRN_ZONES" ] ; then
+ for record in $DM_LIST_TRN_ZONES ; do
+ echo " local-zone: $record transparent"
+ done
+ echo
fi
- done
+ if [ -n "$DM_LIST_LOCAL_DATA" ] ; then
+ for record in $DM_LIST_LOCAL_DATA ; do
+ echo " local-data: \"${record//@@/ }\""
+ done
+ echo
+ fi
+ if [ -n "$DM_LIST_LOCAL_PTR" ] ; then
+ for record in $DM_LIST_LOCAL_PTR ; do
+ echo " local-data-ptr: \"${record//@@/ }\""
+ done
+ echo
+ fi
+ } > $UB_SRVMASQ_CONF
fi
}
##############################################################################
-dnsmasq_forward_zone() {
- if [ -n "$UNBOUND_N_FWD_PORTS" -a -n "$UNBOUND_TXT_FWD_ZONE" ] ; then
- for fwd_domain in $UNBOUND_TXT_FWD_ZONE ; do
+dnsmasq_active() {
+ # Look at dnsmasq settings
+ config_load dhcp
+ # Zone for DHCP / SLAAC-PING DOMAIN
+ config_foreach dnsmasq_local_zone dnsmasq
+ # Zone for DHCP / SLAAC-PING ARPA
+ dnsmasq_local_arpa
+
+
+ if [ -n "$DM_LIST_FWD_PORTS" -a -n "$DM_LIST_FWD_ZONES" ] ; then
+ {
+ # Forward to dnsmasq on same host for DHCP lease hosts
+ echo "# $UB_SRVMASQ_CONF generated by UCI $( date -Is )"
+ echo " do-not-query-localhost: no"
+ echo
+ } > $UB_SRVMASQ_CONF
+
+ echo "# $UB_EXTMASQ_CONF generated by UCI $( date -Is )" > $UB_EXTMASQ_CONF
+
+
+ for fwd_domain in $DM_LIST_FWD_ZONES ; do
{
- # This is derived of dnsmasq_local_zone/arpa
- # but forward: clauses need to be seperate
- echo "forward-zone:"
- echo " name: \"$fwd_domain.\""
+ # This creates a domain with local privledges
+ echo " domain-insecure: $fwd_domain"
+ echo " private-domain: $fwd_domain"
+ echo " local-zone: $fwd_domain transparent"
+ echo
+ } >> $UB_SRVMASQ_CONF
- for port in $UNBOUND_N_FWD_PORTS ; do
+ {
+ # This is derived from dnsmasq local domain and dhcp service subnets
+ echo "forward-zone:"
+ echo " name: $fwd_domain"
+ echo " forward-first: no"
+ for port in $DM_LIST_FWD_PORTS ; do
echo " forward-addr: 127.0.0.1@$port"
done
-
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_EXTMASQ_CONF
done
fi
}
##############################################################################
dnsmasq_link() {
- # Forward to dnsmasq on same host for DHCP lease hosts
- echo " do-not-query-localhost: no" >> $UNBOUND_CONFFILE
- # Look at dnsmasq settings
- config_load dhcp
- # Zone for DHCP / SLAAC-PING DOMAIN
- config_foreach dnsmasq_local_zone dnsmasq
- # Zone for DHCP / SLAAC-PING ARPA
- config_foreach dnsmasq_local_arpa dhcp
- # Now create ALL seperate forward: clauses
- dnsmasq_forward_zone
+ if [ "$UB_D_DHCP_LINK" = "dnsmasq" ] ; then
+ dnsmasq_active
+
+ else
+ dnsmasq_inactive
+ fi
}
##############################################################################
##############################################################################
+valid_subnet_any() {
+ local subnet=$1
+ local validip4=$( valid_subnet4 $subnet )
+ local validip6=$( valid_subnet6 $subnet )
+
+
+ if [ "$validip4" = "ok" -o "$validip6" = "ok" ] ; then
+ echo "ok"
+ else
+ echo "not"
+ fi
+}
+##############################################################################
+
private_subnet() {
case "$1" in
10"."*) echo "ok" ;;
##############################################################################
+domain_ptr_any() {
+ local subnet=$1
+ local arpa validip4 validip6
+
+ validip4=$( valid_subnet4 $subnet )
+ validip6=$( valid_subnet6 $subnet )
+
+
+ if [ "$validip4" = "ok" ] ; then
+ arpa=$( domain_ptr_ip4 "$subnet" )
+ elif [ "$validip6" = "ok" ] ; then
+ arpa=$( domain_ptr_ip6 "$subnet" )
+ fi
+
+
+ if [ -n "$arpa" ] ; then
+ echo $arpa
+ fi
+}
+
+##############################################################################
+
+host_ptr_any() {
+ local subnet=$1
+ local arpa validip4 validip6
+
+ validip4=$( valid_subnet4 $subnet )
+ validip6=$( valid_subnet6 $subnet )
+
+
+ if [ "$validip4" = "ok" ] ; then
+ arpa=$( host_ptr_ip4 "$subnet" )
+ elif [ "$validip6" = "ok" ] ; then
+ arpa=$( host_ptr_ip6 "$subnet" )
+ fi
+
+
+ if [ -n "$arpa" ] ; then
+ echo $arpa
+ fi
+}
+
+##############################################################################
+
sub( /.*\//, "", cdr2 ) ;
+ if ( hst !~ /^[[:alnum:]]([-[:alnum:]]*[[:alnum:]])?$/ ) {
+ # that is not a valid host name (RFC1123)
+ hst = "-" ;
+ }
+
+
if ( bisolt == 1 ) {
# TODO: this might be better with a substituion option,
# or per DHCP pool do-not-DNS option, but its getting busy here.
}
- if ( cls == "ipv4" ) {
- if ( NF == 8 ) {
- # odhcpd errata in field format without host name
- adr = $8 ; hst = "-" ; cdr = adr ;
- sub( /\/.*/, "", adr ) ;
- sub( /.*\//, "", cdr ) ;
- }
-
-
- if (( cdr == 32 ) && ( hst != "-" )) {
- # only for provided hostnames and full /32 assignments
- ptr = adr ; qpr = "" ; split( ptr, ptr, "." ) ;
- slaac = slaac_eui64( id ) ;
+ if ((cls == "ipv4") && (hst != "-") && (cdr == 32) && (NF == 9)) {
+ # IPV4 ; only for provided hostnames and full /32 assignments
+ # NF=9 ; odhcpd errata in field format without host name
+ ptr = adr ; qpr = "" ; split( ptr, ptr, "." ) ;
+ slaac = slaac_eui64( id ) ;
- if ( bconf == 1 ) {
- x = ( "local-data: \"" fqdn ". 120 IN A " adr "\"" ) ;
- y = ( "local-data-ptr: \"" adr " 120 " fqdn "\"" ) ;
- print ( x "\n" y "\n" ) > hostfile ;
- }
+ if ( bconf == 1 ) {
+ x = ( "local-data: \"" fqdn ". 300 IN A " adr "\"" ) ;
+ y = ( "local-data-ptr: \"" adr " 300 " fqdn "\"" ) ;
+ print ( x "\n" y "\n" ) > hostfile ;
+ }
- else {
- for( i=1; i<=4; i++ ) { qpr = ( ptr[i] "." qpr) ; }
- x = ( fqdn ". 120 IN A " adr ) ;
- y = ( qpr "in-addr.arpa. 120 IN PTR " fqdn ) ;
- print ( x "\n" y ) > hostfile ;
- }
+ else {
+ for( i=1; i<=4; i++ ) { qpr = ( ptr[i] "." qpr) ; }
+ x = ( fqdn ". 300 IN A " adr ) ;
+ y = ( qpr "in-addr.arpa. 300 IN PTR " fqdn ) ;
+ print ( x "\n" y ) > hostfile ;
+ }
- if (( bslaac == 1 ) && ( slaac != 0 )) {
- # UCI option to discover IPV6 routed SLAAC addresses
- # NOT TODO - ping probe take too long when added in awk-rule loop
- cmd = ( "ip -6 --oneline route show dev " net ) ;
+ if (( bslaac == 1 ) && ( slaac != 0 )) {
+ # UCI option to discover IPV6 routed SLAAC addresses
+ # NOT TODO - ping probe take too long when added in awk-rule loop
+ cmd = ( "ip -6 --oneline route show dev " net ) ;
- while ( ( cmd | getline adr ) > 0 ) {
- if (( substr( adr, 1, 5 ) <= "fdff:" ) \
- && ( index( adr, "anycast" ) == 0 ) \
- && ( index( adr, "via" ) == 0 )) {
- # GA or ULA routed addresses only (not LL or MC)
- sub( /\/.*/, "", adr ) ;
- adr = ( adr slaac ) ;
+ while ( ( cmd | getline adr ) > 0 ) {
+ if (( substr( adr, 1, 5 ) <= "fdff:" ) \
+ && ( index( adr, "anycast" ) == 0 ) \
+ && ( index( adr, "via" ) == 0 )) {
+ # GA or ULA routed addresses only (not LL or MC)
+ sub( /\/.*/, "", adr ) ;
+ adr = ( adr slaac ) ;
- if ( split( adr, tmp0, ":" ) > 8 ) {
- sub( "::", ":", adr ) ;
- }
+ if ( split( adr, tmp0, ":" ) > 8 ) {
+ sub( "::", ":", adr ) ;
+ }
- if ( bconf == 1 ) {
- x = ( "local-data: \"" fqdn ". 120 IN AAAA " adr "\"" ) ;
- y = ( "local-data-ptr: \"" adr " 120 " fqdn "\"" ) ;
- print ( x "\n" y "\n" ) > hostfile ;
- }
+ if ( bconf == 1 ) {
+ x = ( "local-data: \"" fqdn ". 300 IN AAAA " adr "\"" ) ;
+ y = ( "local-data-ptr: \"" adr " 300 " fqdn "\"" ) ;
+ print ( x "\n" y "\n" ) > hostfile ;
+ }
- else {
- qpr = ipv6_ptr( adr ) ;
- x = ( fqdn ". 120 IN AAAA " adr ) ;
- y = ( qpr ". 120 IN PTR " fqdn ) ;
- print ( x "\n" y ) > hostfile ;
- }
+ else {
+ qpr = ipv6_ptr( adr ) ;
+ x = ( fqdn ". 300 IN AAAA " adr ) ;
+ y = ( qpr ". 300 IN PTR " fqdn ) ;
+ print ( x "\n" y ) > hostfile ;
}
}
+ }
- close( cmd ) ;
- }
+ close( cmd ) ;
}
}
- else {
- if (( cdr == 128 ) && ( hst != "-" )) {
+ else if ((cls != "ipv4") && (hst != "-") && (9 <= NF) && (NF <= 10)) {
+ if (cdr == 128) {
if ( bconf == 1 ) {
- x = ( "local-data: \"" fqdn ". 120 IN AAAA " adr "\"" ) ;
- y = ( "local-data-ptr: \"" adr " 120 " fqdn "\"" ) ;
+ x = ( "local-data: \"" fqdn ". 300 IN AAAA " adr "\"" ) ;
+ y = ( "local-data-ptr: \"" adr " 300 " fqdn "\"" ) ;
print ( x "\n" y "\n" ) > hostfile ;
}
else {
# only for provided hostnames and full /128 assignments
qpr = ipv6_ptr( adr ) ;
- x = ( fqdn ". 120 IN AAAA " adr ) ;
- y = ( qpr ". 120 IN PTR " fqdn ) ;
+ x = ( fqdn ". 300 IN AAAA " adr ) ;
+ y = ( qpr ". 300 IN PTR " fqdn ) ;
print ( x "\n" y ) > hostfile ;
}
}
- if (( cdr2 == 128 ) && ( hst != "-" )) {
+ if (cdr2 == 128) {
if ( bconf == 1 ) {
- x = ( "local-data: \"" fqdn ". 120 IN AAAA " adr2 "\"" ) ;
- y = ( "local-data-ptr: \"" adr2 " 120 " fqdn "\"" ) ;
+ x = ( "local-data: \"" fqdn ". 300 IN AAAA " adr2 "\"" ) ;
+ y = ( "local-data-ptr: \"" adr2 " 300 " fqdn "\"" ) ;
print ( x "\n" y "\n" ) > hostfile ;
}
else {
# odhcp puts GA and ULA on the same line (position 9 and 10)
qpr2 = ipv6_ptr( adr2 ) ;
- x = ( fqdn ". 120 IN AAAA " adr2 ) ;
- y = ( qpr2 ". 120 IN PTR " fqdn ) ;
+ x = ( fqdn ". 300 IN AAAA " adr2 ) ;
+ y = ( qpr2 ". 300 IN PTR " fqdn ) ;
print ( x "\n" y ) > hostfile ;
}
}
}
+
+ else {
+ # dump non-conforming lease records
+ }
}
##############################################################################
odhcpd_zonedata() {
local longconf dateconf
- local dns_ls_add=$UNBOUND_VARDIR/dhcp_dns.add
- local dns_ls_del=$UNBOUND_VARDIR/dhcp_dns.del
- local dhcp_ls_new=$UNBOUND_VARDIR/dhcp_lease.new
- local dhcp_ls_old=$UNBOUND_VARDIR/dhcp_lease.old
- local dhcp_ls_add=$UNBOUND_VARDIR/dhcp_lease.add
- local dhcp_ls_del=$UNBOUND_VARDIR/dhcp_lease.del
+ local dns_ls_add=$UB_VARDIR/dhcp_dns.add
+ local dns_ls_del=$UB_VARDIR/dhcp_dns.del
+ local dhcp_ls_new=$UB_VARDIR/dhcp_lease.new
+ local dhcp_ls_old=$UB_VARDIR/dhcp_lease.old
+ local dhcp_ls_add=$UB_VARDIR/dhcp_lease.add
+ local dhcp_ls_del=$UB_VARDIR/dhcp_lease.del
local dhcp_link=$( uci_get unbound.@unbound[0].dhcp_link )
local dhcp4_slaac6=$( uci_get unbound.@unbound[0].dhcp4_slaac6 )
local dhcp_origin=$( uci_get dhcp.@odhcpd[0].leasefile )
- if [ "$dhcp_link" = "odhcpd" -a -f "$dhcp_origin" ] ; then
+ if [ -f "$UB_TOTAL_CONF" -a -f "$dhcp_origin" \
+ -a "$dhcp_link" = "odhcpd" -a -n "$dhcp_domain" ] ; then
# Capture the lease file which could be changing often
sort $dhcp_origin > $dhcp_ls_new
- if [ ! -f $UNBOUND_DHCP_CONF -o ! -f $dhcp_ls_old ] ; then
+ if [ ! -f $UB_DHCP_CONF -o ! -f $dhcp_ls_old ] ; then
longconf=2
else
- dateconf=$(( $( date +%s ) - $( date -r $UNBOUND_DHCP_CONF +%s ) ))
+ dateconf=$(( $( date +%s ) - $( date -r $UB_DHCP_CONF +%s ) ))
if [ $dateconf > 150 ] ; then
if [ $longconf -gt 0 ] ; then
# Go through the messy business of coding up A, AAAA, and PTR records
# This static conf will be available if Unbound restarts asynchronously
- awk -v hostfile=$UNBOUND_DHCP_CONF -v domain=$dhcp_domain \
+ awk -v hostfile=$UB_DHCP_CONF -v domain=$dhcp_domain \
-v bslaac=$dhcp4_slaac6 -v bisolt=0 -v bconf=1 \
-f /usr/lib/unbound/odhcpd.awk $dhcp_ls_new
fi
if [ -f "$dns_ls_del" ] ; then
- cat $dns_ls_del | $UNBOUND_CONTROL_CFG local_datas_remove
+ cat $dns_ls_del | $UB_CONTROL_CFG local_datas_remove
fi
if [ -f "$dns_ls_add" ] ; then
- cat $dns_ls_add | $UNBOUND_CONTROL_CFG local_datas
+ cat $dns_ls_add | $UB_CONTROL_CFG local_datas
fi
+++ /dev/null
-#!/bin/sh
-##############################################################################
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Copyright (C) 2016 Eric Luehrsen
-#
-##############################################################################
-#
-# This component will copy root.key back to /etc/unbound/ periodically, but
-# avoid ROM flash abuse (UCI option).
-#
-##############################################################################
-
-roothints_update() {
- # TODO: Might not be implemented. Unbound doesn't natively update hints.
- # Unbound philosophy is built in root hints are good for machine life.
- return 0
-}
-
-##############################################################################
-
-rootkey_update() {
- local basekey_date rootkey_date rootkey_age filestuff
-
- local dnssec=$( uci_get unbound.@unbound[0].validator )
- local dnssec_ntp=$( uci_get unbound.@unbound[0].validator_ntp )
- local dnssec_age=$( uci_get unbound.@unbound[0].root_age )
-
-
- if [ "$dnssec_age" -gt 90 -o "$dnssec" -lt 1 ] ; then
- # Feature disabled
- return 0
-
- elif [ "$dnssec_ntp" -gt 0 -a ! -f "$UNBOUND_TIMEFILE" ] ; then
- # We don't have time yet
- return 0
- fi
-
-
- if [ -f /etc/unbound/root.key ] ; then
- basekey_date=$( date -r /etc/unbound/root.key +%s )
-
- else
- # No persistent storage key
- basekey_date=$( date -d 2000-01-01 +%s )
- fi
-
-
- if [ -f "$UNBOUND_KEYFILE" ] ; then
- # Unbound maintains it itself
- rootkey_date=$( date -r $UNBOUND_KEYFILE +%s )
- rootkey_age=$(( (rootkey_date - basekey_date) / 86440 ))
-
- elif [ -x "$UNBOUND_ANCHOR" ] ; then
- # No tmpfs key - use unbound-anchor
- rootkey_date=$( date -I +%s )
- rootkey_age=$(( (rootkey_date - basekey_date) / 86440 ))
- $UNBOUND_ANCHOR -a $UNBOUND_KEYFILE
-
- else
- # give up
- rootkey_age=0
- fi
-
-
- if [ "$rootkey_age" -gt "$dnssec_age" ] ; then
- filestuff=$( cat $UNBOUND_KEYFILE )
-
-
- case "$filestuff" in
- *NOERROR*)
- # Header comment for drill and dig
- logger -t unbound -s "root.key updated after $rootkey_age days"
- cp -p $UNBOUND_KEYFILE /etc/unbound/root.key
- ;;
-
- *"state=2 [ VALID ]"*)
- # Comment inline to key for unbound-anchor
- logger -t unbound -s "root.key updated after $rootkey_age days"
- cp -p $UNBOUND_KEYFILE /etc/unbound/root.key
- ;;
-
- *)
- logger -t unbound -s "root.key still $rootkey_age days old"
- ;;
- esac
- fi
-}
-
-##############################################################################
-
-rootzone_update() {
- roothints_update
- rootkey_update
-}
-
-##############################################################################
-
--- /dev/null
+#!/bin/sh
+##############################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# Copyright (C) 2016 Eric Luehrsen
+#
+##############################################################################
+#
+# This component will copy root.key back to /etc/unbound/ periodically, but
+# avoid ROM flash abuse (UCI option).
+#
+##############################################################################
+
+. /usr/lib/unbound/defaults.sh
+
+##############################################################################
+
+roothints_update() {
+ # TODO: Might not be implemented. Unbound doesn't natively update hints.
+ # Unbound philosophy is built in root hints are good for machine life.
+ return 0
+}
+
+##############################################################################
+
+rootkey_update() {
+ local basekey_date rootkey_date rootkey_age filestuff
+ local dnssec=$( uci_get unbound.@unbound[0].validator )
+ local dnssec_ntp=$( uci_get unbound.@unbound[0].validator_ntp )
+ local dnssec_age=$( uci_get unbound.@unbound[0].root_age )
+
+ # fix empty
+ [ -z "$dnssec" ] && dnssec=0
+ [ -z "$dnssec_ntp" ] && dnssec_ntp=1
+ [ -z "$dnssec_age" ] && dnssec_age=9
+
+
+ if [ "$dnssec_age" -gt 90 -o "$dnssec" -lt 1 ] ; then
+ # Feature disabled
+ return 0
+
+ elif [ "$dnssec_ntp" -gt 0 -a ! -f "$UB_TIME_FILE" ] ; then
+ # We don't have time yet
+ return 0
+ fi
+
+
+ if [ -f /etc/unbound/root.key ] ; then
+ basekey_date=$( date -r /etc/unbound/root.key +%s )
+
+ else
+ # No persistent storage key
+ basekey_date=$( date -d 2000-01-01 +%s )
+ fi
+
+
+ if [ -f "$UB_RKEY_FILE" ] ; then
+ # Unbound maintains it itself
+ rootkey_date=$( date -r $UB_RKEY_FILE +%s )
+ rootkey_age=$(( (rootkey_date - basekey_date) / 86440 ))
+
+ elif [ -x "$UB_ANCHOR" ] ; then
+ # No tmpfs key - use unbound-anchor
+ rootkey_date=$( date -I +%s )
+ rootkey_age=$(( (rootkey_date - basekey_date) / 86440 ))
+ $UB_ANCHOR -a $UB_RKEY_FILE
+
+ else
+ # give up
+ rootkey_age=0
+ fi
+
+
+ if [ "$rootkey_age" -gt "$dnssec_age" ] ; then
+ filestuff=$( cat $UB_RKEY_FILE )
+
+
+ case "$filestuff" in
+ *NOERROR*)
+ # Header comment for drill and dig
+ logger -t unbound -s "root.key updated after $rootkey_age days"
+ cp -p $UB_RKEY_FILE /etc/unbound/root.key
+ ;;
+
+ *"state=2 [ VALID ]"*)
+ # Comment inline to key for unbound-anchor
+ logger -t unbound -s "root.key updated after $rootkey_age days"
+ cp -p $UB_RKEY_FILE /etc/unbound/root.key
+ ;;
+
+ *)
+ logger -t unbound -s "root.key still $rootkey_age days old"
+ ;;
+ esac
+ fi
+}
+
+##############################################################################
+
+resolv_teardown() {
+ case $( cat /tmp/resolv.conf ) in
+ *"generated by Unbound UCI"*)
+ # our resolver file, reset to auto resolver file.
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ ;;
+ esac
+}
+
+##############################################################################
+
+unbound_stop() {
+ resolv_teardown
+ roothints_update
+ rootkey_update
+}
+
+##############################################################################
+
##############################################################################
-. /usr/lib/unbound/unbound.sh
-
-##############################################################################
-
boot() {
- UNBOUND_BOOT=1
+ UB_BOOT=1
start "$@"
}
##############################################################################
start_service() {
- if [ -n "$UNBOUND_BOOT" ] ; then
+ if [ -n "$UB_BOOT" ] ; then
# Load procd triggers (rc) and use event IFUP to really start
return 0
fi
# complex UCI work
+ . /usr/lib/unbound/unbound.sh
unbound_start
# standard procd clause
- procd_open_instance
- procd_set_param command $PROG -d -c $UNBOUND_CONFFILE
+ procd_open_instance "unbound"
+ procd_set_param command $PROG -d -c $UB_TOTAL_CONF
procd_set_param respawn
procd_close_instance
}
##############################################################################
stop_service() {
+ # clean up
+ . /usr/lib/unbound/stopping.sh
unbound_stop
# Wait! on restart Unbound may take time writing closure stats to syslog
##############################################################################
service_triggers() {
- local trigger
local legacy=$( uci_get unbound.@unbound[0].trigger )
local triggers=$( uci_get unbound.@unbound[0].trigger_interface )
+ local trigger="$triggers $legacy"
+
+ . /usr/lib/unbound/defaults.sh
- triggers="$triggers $legacy"
- PROCD_RELOAD_DELAY=2000
- procd_add_reload_trigger "unbound"
+
+ if [ ! -f "$UB_TOTAL_CONF" -o -n "$UB_BOOT" ] ; then
+ # Unbound is can be a bit heavy, so wait some on first start but any
+ # interface coming up affects the trigger and delay so guarantee start
+ procd_add_raw_trigger "interface.*.up" 3000 /etc/init.d/unbound restart
+
+ elif [ -n "$triggers" ] ; then
+ procd_add_reload_trigger "unbound" "dhcp"
- if [ -n "$triggers" ] ; then
for trigger in $triggers ; do
- # due to some netifd/procd interactions with IP6, limit interfaces
+ # User selected triggers to restart at any other time
procd_add_reload_interface_trigger "$trigger"
done
+
else
- procd_add_raw_trigger "interface.*.up" 2000 /etc/init.d/unbound reload
+ procd_add_reload_trigger "unbound" "dhcp"
fi
}
##############################################################################
# Common file location definitions
-. /usr/lib/unbound/unbound.sh
+. /usr/lib/unbound/defaults.sh
##############################################################################
-if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] ; then
- echo "ntpd: $( date )" > $UNBOUND_TIMEFILE
+if [ ! -f "$UB_TIME_FILE" -a "$ACTION" = stratum ] ; then
+ date -Is > $UB_TIME_FILE
/etc/init.d/unbound enabled && /etc/init.d/unbound restart
# Yes, hard RESTART. We need to be absolutely sure to enable DNSSEC.
fi
#
##############################################################################
-UNBOUND_B_SLAAC6_MAC=0
-UNBOUND_B_DNSSEC=0
-UNBOUND_B_DNS64=0
-UNBOUND_B_EXT_STATS=0
-UNBOUND_B_GATE_NAME=0
-UNBOUND_B_HIDE_BIND=1
-UNBOUND_B_LOCL_BLCK=0
-UNBOUND_B_LOCL_SERV=1
-UNBOUND_B_MAN_CONF=0
-UNBOUND_B_NTP_BOOT=1
-UNBOUND_B_QUERY_MIN=0
-UNBOUND_B_QRY_MINST=0
-
-UNBOUND_D_CONTROL=0
-UNBOUND_D_DOMAIN_TYPE=static
-UNBOUND_D_DHCP_LINK=none
-UNBOUND_D_EXTRA_DNS=0
-UNBOUND_D_LAN_FQDN=0
-UNBOUND_D_PRIV_BLCK=1
-UNBOUND_D_PROTOCOL=mixed
-UNBOUND_D_RESOURCE=small
-UNBOUND_D_RECURSION=passive
-UNBOUND_D_WAN_FQDN=0
-
-UNBOUND_IP_DNS64="64:ff9b::/96"
-
-UNBOUND_N_EDNS_SIZE=1280
-UNBOUND_N_FWD_PORTS=""
-UNBOUND_N_RX_PORT=53
-UNBOUND_N_ROOT_AGE=9
-
-UNBOUND_TTL_MIN=120
-
-UNBOUND_TXT_DOMAIN=lan
-UNBOUND_TXT_FWD_ZONE=""
-UNBOUND_TXT_HOSTNAME=thisrouter
-
-UNBOUND_LIST_FORWARD=""
-UNBOUND_LIST_INSECURE=""
-UNBOUND_LIST_PRV_SUBNET=""
+UB_B_SLAAC6_MAC=0
+UB_B_DNSSEC=0
+UB_B_DNS64=0
+UB_B_EXT_STATS=0
+UB_B_GATE_NAME=0
+UB_B_HIDE_BIND=1
+UB_B_LOCL_BLCK=0
+UB_B_LOCL_SERV=1
+UB_B_MAN_CONF=0
+UB_B_NTP_BOOT=1
+UB_B_QUERY_MIN=0
+UB_B_QRY_MINST=0
+UB_B_AUTH_ROOT=0
+
+UB_D_CONTROL=0
+UB_D_DOMAIN_TYPE=static
+UB_D_DHCP_LINK=none
+UB_D_EXTRA_DNS=0
+UB_D_LAN_FQDN=0
+UB_D_PRIV_BLCK=1
+UB_D_PROTOCOL=mixed
+UB_D_RESOURCE=small
+UB_D_RECURSION=passive
+UB_D_VERBOSE=1
+UB_D_WAN_FQDN=0
+
+UB_IP_DNS64="64:ff9b::/96"
+
+UB_N_EDNS_SIZE=1280
+UB_N_RX_PORT=53
+UB_N_ROOT_AGE=9
+
+UB_TTL_MIN=120
+UB_TXT_DOMAIN=lan
+UB_TXT_HOSTNAME=thisrouter
##############################################################################
-# keep track of local-domain: assignments during inserted resource records
-UNBOUND_LIST_DOMAINS=""
+# reset as a combo with UB_B_NTP_BOOT and some time stamp files
+UB_B_READY=1
+
+# keep track of assignments during inserted resource records
+UB_LIST_NETW_ALL=""
+UB_LIST_NETW_LAN=""
+UB_LIST_NETW_WAN=""
+UB_LIST_INSECURE=""
+UB_LIST_ZONE_SERVERS=""
+UB_LIST_ZONE_NAMES=""
##############################################################################
. /usr/lib/unbound/defaults.sh
. /usr/lib/unbound/dnsmasq.sh
. /usr/lib/unbound/iptools.sh
-. /usr/lib/unbound/rootzone.sh
##############################################################################
-copy_dash_update() {
- # TODO: remove this function and use builtins when this issues is resovled.
- # Due to OpenWrt/LEDE divergence "cp -u" isn't yet universally available.
- local filetime keeptime
+bundle_all_networks() {
+ local cfg="$1"
+ local ifname ifdashname validip
+ local subnet subnets subnets4 subnets6
+ network_get_subnets subnets4 "$cfg"
+ network_get_subnets6 subnets6 "$cfg"
+ network_get_device ifname "$cfg"
- if [ -f $UNBOUND_KEYFILE.keep ] ; then
- # root.key.keep is reused if newest
- filetime=$( date -r $UNBOUND_KEYFILE +%s )
- keeptime=$( date -r $UNBOUND_KEYFILE.keep +%s )
+ ifdashname="${ifname//./-}"
+ subnets="$subnets4 $subnets6"
- if [ $keeptime -gt $filetime ] ; then
- cp $UNBOUND_KEYFILE.keep $UNBOUND_KEYFILE
- fi
+ if [ -n "$subnets" ] ; then
+ for subnet in $subnets ; do
+ validip=$( valid_subnet_any $subnet )
- rm -f $UNBOUND_KEYFILE.keep
+ if [ "$validip" = "ok" ] ; then
+ UB_LIST_NETW_ALL="$UB_LIST_NETW_ALL $ifdashname@$subnet"
+ fi
+ done
fi
}
##############################################################################
-create_interface_dns() {
+bundle_lan_networks() {
local cfg="$1"
- local ipcommand logint ignore ifname ifdashname
- local name names address addresses
- local ulaprefix if_fqdn host_fqdn mode mode_ptr
+ local ifsubnet ifname ifdashname ignore
- # Create local-data: references for this hosts interfaces (router).
- config_get logint "$cfg" interface
- config_get_bool ignore "$cfg" ignore 0
+ config_get_bool ignore "$cfg" ignore 0
network_get_device ifname "$cfg"
-
ifdashname="${ifname//./-}"
- ipcommand="ip -o address show $ifname"
- addresses=$( $ipcommand | awk '/inet/{sub(/\/.*/,"",$4); print $4}' )
- ulaprefix=$( uci_get network.@globals[0].ula_prefix )
- host_fqdn="$UNBOUND_TXT_HOSTNAME.$UNBOUND_TXT_DOMAIN"
- if_fqdn="$ifdashname.$host_fqdn"
-
-
- if [ -z "${ulaprefix%%:/*}" ] ; then
- # Nonsense so this option isn't globbed below
- ulaprefix="fdno:such:addr::/48"
- fi
-
-
- if [ "$ignore" -gt 0 ] ; then
- mode="$UNBOUND_D_WAN_FQDN"
- else
- mode="$UNBOUND_D_LAN_FQDN"
- fi
-
-
- case "$mode" in
- 3)
- mode_ptr="$host_fqdn"
- names="$host_fqdn $UNBOUND_TXT_HOSTNAME"
- ;;
-
- 4)
- if [ -z "$ifdashname" ] ; then
- # race conditions at init can rarely cause a blank device return
- # the record format is invalid and Unbound won't load the conf file
- mode_ptr="$host_fqdn"
- names="$host_fqdn $UNBOUND_TXT_HOSTNAME"
- else
- mode_ptr="$if_fqdn"
- names="$if_fqdn $host_fqdn $UNBOUND_TXT_HOSTNAME"
- fi
- ;;
- *)
- mode_ptr="$UNBOUND_TXT_HOSTNAME"
- names="$UNBOUND_TXT_HOSTNAME"
- ;;
- esac
-
-
- if [ "$mode" -gt 1 ] ; then
- {
- for address in $addresses ; do
- case $address in
- fe80:*|169.254.*)
- echo " # note link address $address"
- ;;
-
- [1-9a-f]*:*[0-9a-f])
- # GA and ULA IP6 for HOST IN AAA records (ip command is robust)
- for name in $names ; do
- echo " local-data: \"$name. 120 IN AAAA $address\""
- done
- echo " local-data-ptr: \"$address 120 $mode_ptr\""
- ;;
- [1-9]*.*[0-9])
- # Old fashioned HOST IN A records
- for name in $names ; do
- echo " local-data: \"$name. 120 IN A $address\""
- done
- echo " local-data-ptr: \"$address 120 $mode_ptr\""
- ;;
- esac
- done
- echo
- } >> $UNBOUND_CONFFILE
-
- elif [ "$mode" -gt 0 ] ; then
- {
- for address in $addresses ; do
- case $address in
- fe80:*|169.254.*)
- echo " # note link address $address"
- ;;
-
- "${ulaprefix%%:/*}"*)
- # Only this networks ULA and only hostname
- echo " local-data: \"$UNBOUND_TXT_HOSTNAME. 120 IN AAAA $address\""
- echo " local-data-ptr: \"$address 120 $UNBOUND_TXT_HOSTNAME\""
- ;;
-
- [1-9]*.*[0-9])
- echo " local-data: \"$UNBOUND_TXT_HOSTNAME. 120 IN A $address\""
- echo " local-data-ptr: \"$address 120 $UNBOUND_TXT_HOSTNAME\""
+ if [ "$ignore" -eq 0 -a -n "$ifdashname" -a -n "$UB_LIST_NETW_ALL" ] ; then
+ for ifsubnet in $UB_LIST_NETW_ALL ; do
+ case $ifsubnet in
+ "${ifdashname}"@*)
+ # Special GLA protection for local block; ULA protected as a catagory
+ UB_LIST_NETW_LAN="$UB_LIST_NETW_LAN $ifsubnet"
;;
- esac
- done
- echo
- } >> $UNBOUND_CONFFILE
- fi
-}
-
-##############################################################################
-
-create_local_zone() {
- local target="$1"
- local partial domain found
-
-
- if [ -n "$UNBOUND_LIST_DOMAINS" ] ; then
- for domain in $UNBOUND_LIST_DOMAINS ; do
- case $target in
- *"${domain}")
- found=1
- break
- ;;
-
- [A-Za-z0-9]*.[A-Za-z0-9]*)
- found=0
- ;;
-
- *) # no dots
- found=1
- break
- ;;
esac
done
- else
- found=0
- fi
-
-
- if [ $found -eq 0 ] ; then
- # New Zone! Bundle local-zones: by first two name tiers "abcd.tld."
- partial=$( echo "$target" | awk -F. '{ j=NF ; i=j-1; print $i"."$j }' )
- UNBOUND_LIST_DOMAINS="$UNBOUND_LIST_DOMAINS $partial"
- echo " local-zone: $partial. transparent" >> $UNBOUND_CONFFILE
fi
}
##############################################################################
-create_host_record() {
- local cfg="$1"
- local ip name
+bundle_wan_networks() {
+ local ifsubnet
- # basefiles dhcp "domain" clause which means host A, AAAA, and PRT record
- config_get ip "$cfg" ip
- config_get name "$cfg" name
+ if [ -n "$UB_LIST_NETW_ALL" ] ; then
+ for ifsubnet in $UB_LIST_NETW_ALL ; do
+ case $UB_LIST_NETW_LAN in
+ *"${ifsubnet}"*)
+ # If LAN, then not WAN ...
+ ;;
- if [ -n "$name" -a -n "$ip" ] ; then
- create_local_zone "$name"
-
- {
- case $ip in
- fe80:*|169.254.*)
- echo " # note link address $ip for host $name"
- ;;
-
- [1-9a-f]*:*[0-9a-f])
- echo " local-data: \"$name. 120 IN AAAA $ip\""
- echo " local-data-ptr: \"$ip 120 $name\""
- ;;
-
- [1-9]*.*[0-9])
- echo " local-data: \"$name. 120 IN A $ip\""
- echo " local-data-ptr: \"$ip 120 $name\""
- ;;
+ *)
+ UB_LIST_NETW_WAN="$UB_LIST_NETW_WAN $ifsubnet"
+ ;;
esac
- } >> $UNBOUND_CONFFILE
- fi
-}
-
-##############################################################################
-
-create_mx_record() {
- local cfg="$1"
- local domain relay pref
-
- # Insert a static MX record
- config_get domain "$cfg" domain
- config_get relay "$cfg" relay
- config_get pref "$cfg" pref 10
-
-
- if [ -n "$domain" -a -n "$relay" ] ; then
- create_local_zone "$domain"
- echo " local-data: \"$domain. 120 IN MX $pref $relay.\"" \
- >> $UNBOUND_CONFFILE
- fi
-}
-
-##############################################################################
-
-create_srv_record() {
- local cfg="$1"
- local srv target port class weight
-
- # Insert a static SRV record such as SIP server
- config_get srv "$cfg" srv
- config_get target "$cfg" target
- config_get port "$cfg" port
- config_get class "$cfg" class 10
- config_get weight "$cfg" weight 10
-
-
- if [ -n "$srv" -a -n "$target" -a -n "$port" ] ; then
- create_local_zone "$srv"
- echo " local-data: \"$srv. 120 IN SRV $class $weight $port $target.\"" \
- >> $UNBOUND_CONFFILE
+ done
fi
}
##############################################################################
-create_cname_record() {
- local cfg="$1"
- local cname target
-
- # Insert static CNAME record
- config_get cname "$cfg" cname
- config_get target "$cfg" target
-
-
- if [ -n "$cname" -a -n "$target" ] ; then
- create_local_zone "$cname"
- echo " local-data: \"$cname. 120 IN CNAME $target.\"" >> $UNBOUND_CONFFILE
- fi
+bundle_resolv_conf_servers() {
+ local resolvers=$( awk '/nameserver/ { print $2 }' /tmp/resolv.conf.auto )
+ UB_LIST_ZONE_SERVERS="$UB_LIST_ZONE_SERVERS $resolvers"
}
##############################################################################
-create_access_control() {
- local cfg="$1"
- local subnets subnets4 subnets6
- local validip4 validip6
-
- network_get_subnets subnets4 "$cfg"
- network_get_subnets6 subnets6 "$cfg"
- subnets="$subnets4 $subnets6"
-
-
- if [ -n "$subnets" ] ; then
- for subnet in $subnets ; do
- validip4=$( valid_subnet4 $subnet )
- validip6=$( valid_subnet6 $subnet )
-
-
- if [ "$validip4" = "ok" -o "$validip6" = "ok" ] ; then
- # For each "network" UCI add "access-control:" white list for queries
- echo " access-control: $subnet allow" >> $UNBOUND_CONFFILE
- fi
- done
- fi
+bundle_zone_names() {
+ UB_LIST_ZONE_NAMES="$UB_LIST_ZONE_NAMES $1"
}
##############################################################################
-bundle_domain_forward() {
- UNBOUND_LIST_FORWARD="$UNBOUND_LIST_FORWARD $1"
+bundle_zone_servers() {
+ UB_LIST_ZONE_SERVERS="$UB_LIST_ZONE_SERVERS $1"
}
##############################################################################
bundle_domain_insecure() {
- UNBOUND_LIST_INSECURE="$UNBOUND_LIST_INSECURE $1"
+ UB_LIST_INSECURE="$UB_LIST_INSECURE $1"
}
##############################################################################
-bundle_private_interface() {
- local ipcommand ifsubnet ifsubnets ifname
+unbound_mkdir() {
+ local filestuff
- network_get_device ifname $1
- if [ -n "$ifname" ] ; then
- ipcommand="ip -6 -o address show $ifname"
- ifsubnets=$( $ipcommand | awk '/inet6/{ print $4 }' )
+ if [ "$UB_D_DHCP_LINK" = "odhcpd" ] ; then
+ local dhcp_origin=$( uci_get dhcp.@odhcpd[0].leasefile )
+ local dhcp_dir=$( dirname $dhcp_origin )
- if [ -n "$ifsubnets" ] ; then
- for ifsubnet in $ifsubnets ; do
- case $ifsubnet in
- [1-9]*:*[0-9a-f])
- # Special GLA protection for local block; ULA protected as a catagory
- UNBOUND_LIST_PRV_SUBNET="$UNBOUND_LIST_PRV_SUBNET $ifsubnet" ;;
- esac
- done
+ if [ ! -d "$dhcp_dir" ] ; then
+ # make sure odhcpd has a directory to write (not done itself, yet)
+ mkdir -p "$dhcp_dir"
fi
fi
-}
-
-##############################################################################
-
-unbound_mkdir() {
- local dhcp_origin=$( uci_get dhcp.@odhcpd[0].leasefile )
- local dhcp_dir=$( dirname $dhcp_origin )
- local filestuff
-
-
- if [ "$UNBOUND_D_DHCP_LINK" = "odhcpd" -a ! -d "$dhcp_dir" ] ; then
- # make sure odhcpd has a directory to write (not done itself, yet)
- mkdir -p "$dhcp_dir"
- fi
- if [ -f $UNBOUND_KEYFILE ] ; then
- filestuff=$( cat $UNBOUND_KEYFILE )
+ if [ -f $UB_RKEY_FILE ] ; then
+ filestuff=$( cat $UB_RKEY_FILE )
case "$filestuff" in
*"state=2 [ VALID ]"*)
# Lets not lose RFC 5011 tracking if we don't have to
- cp -p $UNBOUND_KEYFILE $UNBOUND_KEYFILE.keep
+ cp -p $UB_RKEY_FILE $UB_RKEY_FILE.keep
;;
esac
fi
- # Blind copy /etc/ to /var/lib/
- mkdir -p $UNBOUND_VARDIR
- rm -f $UNBOUND_VARDIR/dhcp_*
- touch $UNBOUND_CONFFILE
- touch $UNBOUND_SRV_CONF
- touch $UNBOUND_EXT_CONF
- cp -p /etc/unbound/* $UNBOUND_VARDIR/
+ # Blind copy /etc/unbound to /var/lib/unbound
+ mkdir -p $UB_VARDIR
+ rm -f $UB_VARDIR/dhcp_*
+ touch $UB_TOTAL_CONF
+ cp -p /etc/unbound/* $UB_VARDIR/
- if [ ! -f $UNBOUND_HINTFILE ] ; then
+ if [ ! -f $UB_RHINT_FILE ] ; then
if [ -f /usr/share/dns/root.hints ] ; then
# Debian-like package dns-root-data
- cp -p /usr/share/dns/root.hints $UNBOUND_HINTFILE
+ cp -p /usr/share/dns/root.hints $UB_RHINT_FILE
- elif [ ! -f "$UNBOUND_TIMEFILE" ] ; then
- logger -t unbound -s "iterator will use built-in root hints"
+ elif [ "$UB_B_READY" -eq 0 ] ; then
+ logger -t unbound -s "default root hints (built in root-servers.net)"
fi
fi
- if [ ! -f $UNBOUND_KEYFILE ] ; then
+ if [ ! -f $UB_RKEY_FILE ] ; then
if [ -f /usr/share/dns/root.key ] ; then
# Debian-like package dns-root-data
- cp -p /usr/share/dns/root.key $UNBOUND_KEYFILE
+ cp -p /usr/share/dns/root.key $UB_RKEY_FILE
- elif [ -x $UNBOUND_ANCHOR ] ; then
- $UNBOUND_ANCHOR -a $UNBOUND_KEYFILE
+ elif [ -x $UB_ANCHOR ] ; then
+ $UB_ANCHOR -a $UB_RKEY_FILE
- elif [ ! -f "$UNBOUND_TIMEFILE" ] ; then
- logger -t unbound -s "validator will use built-in trust anchor"
+ elif [ "$UB_B_READY" -eq 0 ] ; then
+ logger -t unbound -s "default trust anchor (built in root DS record)"
fi
fi
- copy_dash_update
+ if [ -f $UB_RKEY_FILE.keep ] ; then
+ # root.key.keep is reused if newest
+ cp -u $UB_RKEY_FILE.keep $UB_RKEY_FILE
+ rm -f $UB_RKEY_FILE.keep
+ fi
+
+
+ if [ -f $UB_TLS_ETC_FILE ] ; then
+ # copy the cert bundle into jail
+ cp -p $UB_TLS_ETC_FILE $UB_TLS_FWD_FILE
+ fi
# Ensure access and prepare to jail
- chown -R unbound:unbound $UNBOUND_VARDIR
- chmod 755 $UNBOUND_VARDIR
- chmod 644 $UNBOUND_VARDIR/*
+ chown -R unbound:unbound $UB_VARDIR
+ chmod 755 $UB_VARDIR
+ chmod 644 $UB_VARDIR/*
- if [ -f $UNBOUND_CTLKEY_FILE -o -f $UNBOUND_CTLPEM_FILE \
- -o -f $UNBOUND_SRVKEY_FILE -o -f $UNBOUND_SRVPEM_FILE ] ; then
+ if [ -f $UB_CTLKEY_FILE -o -f $UB_CTLPEM_FILE \
+ -o -f $UB_SRVKEY_FILE -o -f $UB_SRVPEM_FILE ] ; then
# Keys (some) exist already; do not create new ones
- chmod 640 $UNBOUND_CTLKEY_FILE $UNBOUND_CTLPEM_FILE \
- $UNBOUND_SRVKEY_FILE $UNBOUND_SRVPEM_FILE
+ chmod 640 $UB_CTLKEY_FILE $UB_CTLPEM_FILE \
+ $UB_SRVKEY_FILE $UB_SRVPEM_FILE
elif [ -x /usr/sbin/unbound-control-setup ] ; then
- case "$UNBOUND_D_CONTROL" in
- [2-3])
- # unbound-control-setup for encrypt opt. 2 and 3, but not 4 "static"
- /usr/sbin/unbound-control-setup -d $UNBOUND_VARDIR
+ case "$UB_D_CONTROL" in
+ [2-3])
+ # unbound-control-setup for encrypt opt. 2 and 3, but not 4 "static"
+ /usr/sbin/unbound-control-setup -d $UB_VARDIR
- chown -R unbound:unbound $UNBOUND_CTLKEY_FILE $UNBOUND_CTLPEM_FILE \
- $UNBOUND_SRVKEY_FILE $UNBOUND_SRVPEM_FILE
+ chown -R unbound:unbound $UB_CTLKEY_FILE $UB_CTLPEM_FILE \
+ $UB_SRVKEY_FILE $UB_SRVPEM_FILE
- chmod 640 $UNBOUND_CTLKEY_FILE $UNBOUND_CTLPEM_FILE \
- $UNBOUND_SRVKEY_FILE $UNBOUND_SRVPEM_FILE
+ chmod 640 $UB_CTLKEY_FILE $UB_CTLPEM_FILE \
+ $UB_SRVKEY_FILE $UB_SRVPEM_FILE
- cp -p $UNBOUND_CTLKEY_FILE /etc/unbound/unbound_control.key
- cp -p $UNBOUND_CTLPEM_FILE /etc/unbound/unbound_control.pem
- cp -p $UNBOUND_SRVKEY_FILE /etc/unbound/unbound_server.key
- cp -p $UNBOUND_SRVPEM_FILE /etc/unbound/unbound_server.pem
- ;;
+ cp -p $UB_CTLKEY_FILE /etc/unbound/unbound_control.key
+ cp -p $UB_CTLPEM_FILE /etc/unbound/unbound_control.pem
+ cp -p $UB_SRVKEY_FILE /etc/unbound/unbound_server.key
+ cp -p $UB_SRVPEM_FILE /etc/unbound/unbound_server.pem
+ ;;
esac
fi
+
+
+ if [ -f "$UB_TIME_FILE" ] ; then
+ # NTP is done so its like you actually had an RTC
+ UB_B_READY=1
+ UB_B_NTP_BOOT=0
+
+ elif [ "$UB_B_NTP_BOOT" -eq 0 ] ; then
+ # time is considered okay on this device (ignore /etc/hotplug/ntpd/unbound)
+ date -Is > $UB_TIME_FILE
+ UB_B_READY=0
+ UB_B_NTP_BOOT=0
+
+ else
+ # DNSSEC-TIME will not reconcile
+ UB_B_READY=0
+ UB_B_NTP_BOOT=1
+ fi
}
##############################################################################
unbound_control() {
- if [ "$UNBOUND_D_CONTROL" -gt 1 ] ; then
- if [ ! -f $UNBOUND_CTLKEY_FILE -o ! -f $UNBOUND_CTLPEM_FILE \
- -o ! -f $UNBOUND_SRVKEY_FILE -o ! -f $UNBOUND_SRVPEM_FILE ] ; then
+ echo "# $UB_CTRL_CONF generated by UCI $( date -Is )" > $UB_CTRL_CONF
+
+
+ if [ "$UB_D_CONTROL" -gt 1 ] ; then
+ if [ ! -f $UB_CTLKEY_FILE -o ! -f $UB_CTLPEM_FILE \
+ -o ! -f $UB_SRVKEY_FILE -o ! -f $UB_SRVPEM_FILE ] ; then
# Key files need to be present; if unbound-control-setup was found, then
# they might have been made during unbound_makedir() above.
- UNBOUND_D_CONTROL=0
+ UB_D_CONTROL=0
fi
fi
- case "$UNBOUND_D_CONTROL" in
- 1)
- {
- # Local Host Only Unencrypted Remote Control
- echo "remote-control:"
- echo " control-enable: yes"
- echo " control-use-cert: no"
- echo " control-interface: 127.0.0.1"
- echo " control-interface: ::1"
- echo
- } >> $UNBOUND_CONFFILE
- ;;
+ case "$UB_D_CONTROL" in
+ 1)
+ {
+ # Local Host Only Unencrypted Remote Control
+ echo "remote-control:"
+ echo " control-enable: yes"
+ echo " control-use-cert: no"
+ echo " control-interface: 127.0.0.1"
+ echo " control-interface: ::1"
+ echo
+ } >> $UB_CTRL_CONF
+ ;;
- 2)
- {
- # Local Host Only Encrypted Remote Control
- echo "remote-control:"
- echo " control-enable: yes"
- echo " control-use-cert: yes"
- echo " control-interface: 127.0.0.1"
- echo " control-interface: ::1"
- echo " server-key-file: \"$UNBOUND_SRVKEY_FILE\""
- echo " server-cert-file: \"$UNBOUND_SRVPEM_FILE\""
- echo " control-key-file: \"$UNBOUND_CTLKEY_FILE\""
- echo " control-cert-file: \"$UNBOUND_CTLPEM_FILE\""
- echo
- } >> $UNBOUND_CONFFILE
- ;;
+ 2)
+ {
+ # Local Host Only Encrypted Remote Control
+ echo "remote-control:"
+ echo " control-enable: yes"
+ echo " control-use-cert: yes"
+ echo " control-interface: 127.0.0.1"
+ echo " control-interface: ::1"
+ echo " server-key-file: $UB_SRVKEY_FILE"
+ echo " server-cert-file: $UB_SRVPEM_FILE"
+ echo " control-key-file: $UB_CTLKEY_FILE"
+ echo " control-cert-file: $UB_CTLPEM_FILE"
+ echo
+ } >> $UB_CTRL_CONF
+ ;;
- [3-4])
- {
- # Network Encrypted Remote Control
- # (3) may auto setup and (4) must have static key/pem files
- # TODO: add UCI list for interfaces to bind
- echo "remote-control:"
- echo " control-enable: yes"
- echo " control-use-cert: yes"
- echo " control-interface: 0.0.0.0"
- echo " control-interface: ::0"
- echo " server-key-file: \"$UNBOUND_SRVKEY_FILE\""
- echo " server-cert-file: \"$UNBOUND_SRVPEM_FILE\""
- echo " control-key-file: \"$UNBOUND_CTLKEY_FILE\""
- echo " control-cert-file: \"$UNBOUND_CTLPEM_FILE\""
- echo
- } >> $UNBOUND_CONFFILE
- ;;
+ [3-4])
+ {
+ # Network Encrypted Remote Control
+ # (3) may auto setup and (4) must have static key/pem files
+ # TODO: add UCI list for interfaces to bind
+ echo "remote-control:"
+ echo " control-enable: yes"
+ echo " control-use-cert: yes"
+ echo " control-interface: 0.0.0.0"
+ echo " control-interface: ::0"
+ echo " server-key-file: $UB_SRVKEY_FILE"
+ echo " server-cert-file: $UB_SRVPEM_FILE"
+ echo " control-key-file: $UB_CTLKEY_FILE"
+ echo " control-cert-file: $UB_CTLPEM_FILE"
+ echo
+ } >> $UB_CTRL_CONF
+ ;;
esac
-
-
- {
- # Amend your own extended clauses here like forward zones or disable
- # above (local, no encryption) and amend your own remote encrypted control
- echo
- echo "include: $UNBOUND_EXT_CONF" >> $UNBOUND_CONFFILE
- echo
- } >> $UNBOUND_CONFFILE
}
##############################################################################
-unbound_forward() {
- local fdomain fresolver resolvers
- # Forward selected domains to the upstream (WAN) stub resolver. This may be
- # faster or local pool addresses to ISP service login page. This may keep
- # internal organization lookups, well, internal to the organization.
+unbound_zone() {
+ local cfg=$1
+ local servers_ip=""
+ local servers_host=""
+ local zone_sym zone_name zone_type zone_enabled zone_file
+ local tls_upstream fallback
+ local server port tls_port tls_index tls_suffix url_dir
+ if [ ! -f "$UB_ZONE_CONF" ] ; then
+ echo "# $UB_ZONE_CONF generated by UCI $( date -Is )" > $UB_ZONE_CONF
+ fi
- if [ -n "$UNBOUND_LIST_FORWARD" ] ; then
- resolvers=$( grep nameserver /tmp/resolv.conf.auto | sed "s/nameserver//g" )
+ config_get_bool zone_enabled "$cfg" enabled 0
- if [ -n "$resolvers" ] ; then
- for fdomain in $UNBOUND_LIST_FORWARD ; do
- {
- echo "forward-zone:"
- echo " name: \"$fdomain.\""
- for fresolver in $resolvers ; do
- echo " forward-addr: $fresolver"
- done
- echo
- } >> $UNBOUND_CONFFILE
- done
+
+ if [ "$zone_enabled" -eq 1 ] ; then
+ # these lists are built for each zone; empty to start
+ UB_LIST_ZONE_NAMES=""
+ UB_LIST_ZONE_SERVERS=""
+
+ config_get zone_type "$cfg" zone_type ""
+ config_get port "$cfg" port ""
+ config_get tls_index "$cfg" tls_index ""
+ config_get tls_port "$cfg" tls_port 853
+ config_get url_dir "$cfg" url_dir ""
+
+ config_get_bool resolv_conf "$cfg" resolv_conf 0
+ config_get_bool fallback "$cfg" fallback 1
+ config_get_bool tls_upstream "$cfg" tls_upstream 0
+
+ config_list_foreach "$cfg" zone_name bundle_zone_names
+ config_list_foreach "$cfg" server bundle_zone_servers
+
+ # string formating for Unbound syntax
+ tls_suffix="${tls_port:+@${tls_port}${tls_index:+#${tls_index}}}"
+ [ "$fallback" -eq 0 ] && fallback=no || fallback=yes
+ [ "$tls_upstream" -eq 0 ] && tls_upstream=no || tls_upstream=yes
+
+
+ if [ $resolv_conf -eq 1 ] ; then
+ bundle_resolv_conf_servers
fi
+
+ else
+ zone_type=skip
fi
+
+
+ case $zone_type in
+ auth_zone)
+ if [ -n "$UB_LIST_ZONE_NAMES" \
+ -a \( -n "$url_dir" -o -n "$UB_LIST_ZONE_SERVERS" \) ] ; then
+ for zone_name in $UB_LIST_ZONE_NAMES ; do
+ if [ "$zone_name" = "." ] ; then
+ zone_sym=.
+ zone_name=root
+ zone_file=root.zone
+ else
+ zone_sym=$zone_name
+ zone_file=$zone_name.zone
+ zone_file=${zone_file//../.}
+ fi
+
+
+ {
+ # generate an auth-zone: with switches for prefetch cache
+ echo "auth-zone:"
+ echo " name: $zone_sym"
+ for server in $UB_LIST_ZONE_SERVERS ; do
+ echo " master: $server${port:+@${port}}"
+ done
+ if [ -n "$url_dir" ] ; then
+ echo " url: $url_dir$zone_file"
+ fi
+ echo " fallback-enabled: $fallback"
+ echo " for-downstream: no"
+ echo " for-upstream: yes"
+ echo " zonefile: $zone_file"
+ echo
+ } >> $UB_ZONE_CONF
+ done
+ fi
+ ;;
+
+ forward_zone)
+ if [ ! -f $UB_TLS_FWD_FILE -a "$tls_upstream" = "yes" ] ; then
+ logger -p 4 -t unbound -s \
+ "Forward-zone TLS benefits from authentication in package 'ca-bundle'"
+ fi
+
+
+ if [ -n "$UB_LIST_ZONE_NAMES" -a -n "$UB_LIST_ZONE_SERVERS" ] ; then
+ for server in $UB_LIST_ZONE_SERVERS ; do
+ if [ "$( valid_subnet_any $server )" = "not" ] ; then
+ case $server in
+ *@[0-9]*)
+ # unique Unbound option for server host name
+ servers_host="$servers_host $server"
+ ;;
+
+ *)
+ if [ "$tls_upstream" = "yes" ] ; then
+ servers_host="$servers_host $server${tls_port:+@${tls_port}}"
+ else
+ servers_host="$servers_host $server${port:+@${port}}"
+ fi
+ esac
+
+ else
+ case $server in
+ *[0-9]@[0-9]*)
+ # unique Unbound option for server address
+ servers_ip="$servers_ip $server"
+ ;;
+
+ *)
+ if [ "$tls_upstream" = "yes" ] ; then
+ servers_ip="$servers_ip $server$tls_suffix"
+ else
+ servers_ip="$servers_ip $server${port:+@${port}}"
+ fi
+ esac
+ fi
+ done
+
+
+ for zonename in $UB_LIST_ZONE_NAMES ; do
+ {
+ # generate a forward-zone with or without tls
+ echo "forward-zone:"
+ echo " name: $zonename"
+ for server in $servers_host ; do
+ echo " forward-host: $server"
+ done
+ for server in $servers_ip ; do
+ echo " forward-addr: $server"
+ done
+ echo " forward-first: $fallback"
+ echo " forward-tls-upstream: $tls_upstream"
+ echo
+ } >> $UB_ZONE_CONF
+ done
+ fi
+ ;;
+
+ stub_zone)
+ if [ -n "$UB_LIST_ZONE_NAMES" -a -n "$UB_LIST_ZONE_SERVERS" ] ; then
+ for zonename in $UB_LIST_ZONE_NAMES ; do
+ {
+ # generate a stub-zone: or ensure short cut to authority NS
+ echo "stub-zone:"
+ echo " name: $zonename"
+ for server in $UB_LIST_ZONE_SERVERS ; do
+ echo " stub-addr: $server${port:+@${port}}"
+ done
+ echo " stub-first: $fallback"
+ echo
+ } >> $UB_ZONE_CONF
+ done
+ fi
+ ;;
+ esac
}
##############################################################################
unbound_conf() {
- local rt_mem rt_conn modulestring domain ifsubnet
+ local rt_mem rt_conn rt_buff modulestring domain ifsubnet nsubnet
+
+ {
+ # server: for this whole function
+ echo "# $UB_CORE_CONF generated by UCI $( date -Is )"
+ echo "server:"
+ echo " username: unbound"
+ echo " chroot: $UB_VARDIR"
+ echo " directory: $UB_VARDIR"
+ echo " pidfile: $UB_PIDFILE"
+ } > $UB_CORE_CONF
+
+
+ if [ -f "$UB_TLS_FWD_FILE" ] ; then
+ # TLS cert bundle for upstream forwarder and https zone files
+ # This is loaded before drop to root, so pull from /etc/ssl
+ echo " tls-cert-bundle: $UB_TLS_FWD_FILE" >> $UB_CORE_CONF
+ fi
+
+
+ if [ -f "$UB_RHINT_FILE" ] ; then
+ # Optional hints if found
+ echo " root-hints: $UB_RHINT_FILE" >> $UB_CORE_CONF
+ fi
+
+
+ if [ "$UB_B_DNSSEC" -gt 0 -a -f "$UB_RKEY_FILE" ] ; then
+ {
+ echo " auto-trust-anchor-file: $UB_RKEY_FILE"
+ echo
+ } >> $UB_CORE_CONF
- # Make fresh conf file
- echo > $UNBOUND_CONFFILE
+ else
+ echo >> $UB_CORE_CONF
+ fi
{
- # Make fresh conf file
- echo "# $UNBOUND_CONFFILE generated by UCI $( date )"
- echo
# No threading
- echo "server:"
- echo " username: unbound"
echo " num-threads: 1"
echo " msg-cache-slabs: 1"
echo " rrset-cache-slabs: 1"
echo " infra-cache-slabs: 1"
echo " key-cache-slabs: 1"
echo
- # Interface Wildcard (access contol handled by "option local_service")
- echo " interface: 0.0.0.0"
- echo " interface: ::0"
- echo " outgoing-interface: 0.0.0.0"
- echo " outgoing-interface: ::0"
- echo
# Logging
- echo " verbosity: 1"
+ echo " use-syslog: yes"
echo " statistics-interval: 0"
echo " statistics-cumulative: no"
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
+
+
+ if [ "$UB_D_VERBOSE" -ge 0 -a "$UB_D_VERBOSE" -le 5 ] ; then
+ echo " verbosity: $UB_D_VERBOSE" >> $UB_CORE_CONF
+ fi
- if [ "$UNBOUND_B_EXT_STATS" -gt 0 ] ; then
+ if [ "$UB_B_EXT_STATS" -gt 0 ] ; then
{
# Log More
echo " extended-statistics: yes"
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
else
{
# Log Less
echo " extended-statistics: no"
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
fi
- case "$UNBOUND_D_PROTOCOL" in
+ case "$UB_D_PROTOCOL" in
ip4_only)
{
+ echo " edns-buffer-size: $UB_N_EDNS_SIZE"
+ echo " port: $UB_N_RX_PORT"
+ echo " outgoing-port-permit: 10240-65535"
+ echo " interface: 0.0.0.0"
+ echo " outgoing-interface: 0.0.0.0"
echo " do-ip4: yes"
echo " do-ip6: no"
- } >> $UNBOUND_CONFFILE
+ echo
+ } >> $UB_CORE_CONF
;;
ip6_only)
{
+ echo " edns-buffer-size: $UB_N_EDNS_SIZE"
+ echo " port: $UB_N_RX_PORT"
+ echo " outgoing-port-permit: 10240-65535"
+ echo " interface: ::0"
+ echo " outgoing-interface: ::0"
echo " do-ip4: no"
echo " do-ip6: yes"
- } >> $UNBOUND_CONFFILE
+ echo
+ } >> $UB_CORE_CONF
+ ;;
+
+ ip6_local)
+ {
+ echo " edns-buffer-size: $UB_N_EDNS_SIZE"
+ echo " port: $UB_N_RX_PORT"
+ echo " outgoing-port-permit: 10240-65535"
+ echo " interface: 0.0.0.0"
+ echo " interface: ::0"
+ echo " outgoing-interface: 0.0.0.0"
+ echo " do-ip4: yes"
+ echo " do-ip6: yes"
+ echo
+ } >> $UB_CORE_CONF
;;
ip6_prefer)
{
+ echo " edns-buffer-size: $UB_N_EDNS_SIZE"
+ echo " port: $UB_N_RX_PORT"
+ echo " outgoing-port-permit: 10240-65535"
+ echo " interface: 0.0.0.0"
+ echo " interface: ::0"
+ echo " outgoing-interface: 0.0.0.0"
+ echo " outgoing-interface: ::0"
echo " do-ip4: yes"
echo " do-ip6: yes"
echo " prefer-ip6: yes"
- } >> $UNBOUND_CONFFILE
+ echo
+ } >> $UB_CORE_CONF
;;
- *)
+ mixed)
{
+ # Interface Wildcard (access contol handled by "option local_service")
+ echo " edns-buffer-size: $UB_N_EDNS_SIZE"
+ echo " port: $UB_N_RX_PORT"
+ echo " outgoing-port-permit: 10240-65535"
+ echo " interface: 0.0.0.0"
+ echo " interface: ::0"
+ echo " outgoing-interface: 0.0.0.0"
+ echo " outgoing-interface: ::0"
echo " do-ip4: yes"
echo " do-ip6: yes"
- } >> $UNBOUND_CONFFILE
+ echo
+ } >> $UB_CORE_CONF
;;
- esac
-
-
- {
- # protocol level tuning
- echo " edns-buffer-size: $UNBOUND_N_EDNS_SIZE"
- echo " msg-buffer-size: 8192"
- echo " port: $UNBOUND_N_RX_PORT"
- echo " outgoing-port-permit: 10240-65535"
- echo
- } >> $UNBOUND_CONFFILE
-
-
- {
- # Other harding and options for an embedded router
- echo " harden-short-bufsize: yes"
- echo " harden-large-queries: yes"
- echo " harden-glue: yes"
- echo " harden-below-nxdomain: no"
- echo " harden-referral-path: no"
- echo " use-caps-for-id: no"
- echo
- } >> $UNBOUND_CONFFILE
-
-
- {
- # Default Files
- echo " use-syslog: yes"
- echo " chroot: \"$UNBOUND_VARDIR\""
- echo " directory: \"$UNBOUND_VARDIR\""
- echo " pidfile: \"$UNBOUND_PIDFILE\""
- } >> $UNBOUND_CONFFILE
-
-
- if [ -f "$UNBOUND_HINTFILE" ] ; then
- # Optional hints if found
- echo " root-hints: \"$UNBOUND_HINTFILE\"" >> $UNBOUND_CONFFILE
- fi
+ *)
+ if [ "$UB_B_READY" -eq 0 ] ; then
+ logger -t unbound -s "default protocol configuration"
+ fi
- if [ "$UNBOUND_B_DNSSEC" -gt 0 -a -f "$UNBOUND_KEYFILE" ] ; then
- {
- echo " auto-trust-anchor-file: \"$UNBOUND_KEYFILE\""
- echo
- } >> $UNBOUND_CONFFILE
- else
- echo >> $UNBOUND_CONFFILE
- fi
+ {
+ # outgoing-interface has useful defaults; incoming is localhost though
+ echo " edns-buffer-size: $UB_N_EDNS_SIZE"
+ echo " port: $UB_N_RX_PORT"
+ echo " outgoing-port-permit: 10240-65535"
+ echo " interface: 0.0.0.0"
+ echo " interface: ::0"
+ echo
+ } >> $UB_CORE_CONF
+ ;;
+ esac
- case "$UNBOUND_D_RESOURCE" in
+ case "$UB_D_RESOURCE" in
# Tiny - Unbound's recommended cheap hardware config
- tiny) rt_mem=1 ; rt_conn=1 ;;
+ tiny) rt_mem=1 ; rt_conn=2 ; rt_buff=1 ;;
# Small - Half RRCACHE and open ports
- small) rt_mem=8 ; rt_conn=5 ;;
+ small) rt_mem=8 ; rt_conn=10 ; rt_buff=2 ;;
# Medium - Nearly default but with some added balancintg
- medium) rt_mem=16 ; rt_conn=10 ;;
+ medium) rt_mem=16 ; rt_conn=15 ; rt_buff=4 ;;
# Large - Double medium
- large) rt_mem=32 ; rt_conn=10 ;;
+ large) rt_mem=32 ; rt_conn=20 ; rt_buff=4 ;;
# Whatever unbound does
*) rt_mem=0 ; rt_conn=0 ;;
esac
if [ "$rt_mem" -gt 0 ] ; then
{
+ # Other harding and options for an embedded router
+ echo " harden-short-bufsize: yes"
+ echo " harden-large-queries: yes"
+ echo " harden-glue: yes"
+ echo " use-caps-for-id: no"
+ echo
# Set memory sizing parameters
- echo " outgoing-range: $(($rt_conn*64))"
- echo " num-queries-per-thread: $(($rt_conn*32))"
+ echo " msg-buffer-size: $(($rt_buff*8192))"
+ echo " outgoing-range: $(($rt_conn*32))"
+ echo " num-queries-per-thread: $(($rt_conn*16))"
echo " outgoing-num-tcp: $(($rt_conn))"
echo " incoming-num-tcp: $(($rt_conn))"
echo " rrset-cache-size: $(($rt_mem*256))k"
echo " neg-cache-size: $(($rt_mem*64))k"
echo " infra-cache-numhosts: $(($rt_mem*256))"
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
- elif [ ! -f "$UNBOUND_TIMEFILE" ] ; then
- logger -t unbound -s "default memory resource consumption"
+ elif [ "$UB_B_READY" -eq 0 ] ; then
+ logger -t unbound -s "default memory configuration"
fi
+
# Assembly of module-config: options is tricky; order matters
modulestring="iterator"
- if [ "$UNBOUND_B_DNSSEC" -gt 0 ] ; then
- if [ ! -f "$UNBOUND_TIMEFILE" -a "$UNBOUND_B_NTP_BOOT" -gt 0 ] ; then
+ if [ "$UB_B_DNSSEC" -gt 0 ] ; then
+ if [ "$UB_B_NTP_BOOT" -gt 0 ] ; then
# DNSSEC chicken and egg with getting NTP time
- echo " val-override-date: -1" >> $UNBOUND_CONFFILE
+ echo " val-override-date: -1" >> $UB_CORE_CONF
fi
echo " harden-dnssec-stripped: yes"
echo " val-clean-additional: yes"
echo " ignore-cd-flag: yes"
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
modulestring="validator $modulestring"
fi
- if [ "$UNBOUND_B_DNS64" -gt 0 ] ; then
- echo " dns64-prefix: $UNBOUND_IP_DNS64" >> $UNBOUND_CONFFILE
+ if [ "$UB_B_DNS64" -gt 0 ] ; then
+ echo " dns64-prefix: $UB_IP_DNS64" >> $UB_CORE_CONF
modulestring="dns64 $modulestring"
fi
# Print final module string
echo " module-config: \"$modulestring\""
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
- if [ "$UNBOUND_B_QRY_MINST" -gt 0 -a "$UNBOUND_B_QUERY_MIN" -gt 0 ] ; then
- {
- # Some query privacy but "strict" will break some name servers
- echo " qname-minimisation: yes"
- echo " qname-minimisation-strict: yes"
- } >> $UNBOUND_CONFFILE
-
- elif [ "$UNBOUND_B_QUERY_MIN" -gt 0 ] ; then
- # Minor improvement on query privacy
- echo " qname-minimisation: yes" >> $UNBOUND_CONFFILE
-
- else
- echo " qname-minimisation: no" >> $UNBOUND_CONFFILE
- fi
-
-
- case "$UNBOUND_D_RECURSION" in
+ case "$UB_D_RECURSION" in
passive)
{
+ # Some query privacy but "strict" will break some servers
+ if [ "$UB_B_QRY_MINST" -gt 0 \
+ -a "$UB_B_QUERY_MIN" -gt 0 ] ; then
+ echo " qname-minimisation: yes"
+ echo " qname-minimisation-strict: yes"
+ elif [ "$UB_B_QUERY_MIN" -gt 0 ] ; then
+ echo " qname-minimisation: yes"
+ else
+ echo " qname-minimisation: no"
+ fi
+ # Use DNSSEC to quickly understand NXDOMAIN ranges
+ if [ "$UB_B_DNSSEC" -gt 0 ] ; then
+ echo " aggressive-nsec: yes"
+ echo " prefetch-key: no"
+ fi
+ # On demand fetching
echo " prefetch: no"
- echo " prefetch-key: no"
echo " target-fetch-policy: \"0 0 0 0 0\""
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
;;
aggressive)
{
+ # Some query privacy but "strict" will break some servers
+ if [ "$UB_B_QRY_MINST" -gt 0 \
+ -a "$UB_B_QUERY_MIN" -gt 0 ] ; then
+ echo " qname-minimisation: yes"
+ echo " qname-minimisation-strict: yes"
+ elif [ "$UB_B_QUERY_MIN" -gt 0 ] ; then
+ echo " qname-minimisation: yes"
+ else
+ echo " qname-minimisation: no"
+ fi
+ # Use DNSSEC to quickly understand NXDOMAIN ranges
+ if [ "$UB_B_DNSSEC" -gt 0 ] ; then
+ echo " aggressive-nsec: yes"
+ echo " prefetch-key: yes"
+ fi
+ # Prefetch what can be
echo " prefetch: yes"
- echo " prefetch-key: yes"
echo " target-fetch-policy: \"3 2 1 0 0\""
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
;;
*)
- if [ ! -f "$UNBOUND_TIMEFILE" ] ; then
+ if [ "$UB_B_READY" -eq 0 ] ; then
logger -t unbound -s "default recursion configuration"
fi
;;
{
- # Reload records more than 10 hours old
+ # Reload records more than 20 hours old
# DNSSEC 5 minute bogus cool down before retry
# Adaptive infrastructure info kept for 15 minutes
- echo " cache-min-ttl: $UNBOUND_TTL_MIN"
- echo " cache-max-ttl: 36000"
+ echo " cache-min-ttl: $UB_TTL_MIN"
+ echo " cache-max-ttl: 72000"
echo " val-bogus-ttl: 300"
echo " infra-host-ttl: 900"
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
- if [ "$UNBOUND_B_HIDE_BIND" -gt 0 ] ; then
+ if [ "$UB_B_HIDE_BIND" -gt 0 ] ; then
{
# Block server id and version DNS TXT records
echo " hide-identity: yes"
echo " hide-version: yes"
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
fi
- if [ "$UNBOUND_D_PRIV_BLCK" -gt 0 ] ; then
+ if [ "$UB_D_PRIV_BLCK" -gt 0 ] ; then
{
# Remove _upstream_ or global reponses with private addresses.
# Unbounds own "local zone" and "forward zone" may still use these.
echo " private-address: fc00::/7"
echo " private-address: fe80::/10"
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
fi
- if [ -n "$UNBOUND_LIST_PRV_SUBNET" -a "$UNBOUND_D_PRIV_BLCK" -gt 1 ] ; then
- for ifsubnet in $UNBOUND_LIST_PRV_SUBNET ; do
- # Remove global DNS responses with your local network IP6 GLA
- echo " private-address: $ifsubnet" >> $UNBOUND_CONFFILE
- done
-
-
- echo >> $UNBOUND_CONFFILE
+ if [ -n "$UB_LIST_NETW_LAN" -a "$UB_D_PRIV_BLCK" -gt 1 ] ; then
+ {
+ for ifsubnet in $UB_LIST_NETW_LAN ; do
+ case $ifsubnet in
+ *@[1-9][0-9a-f][0-9a-f][0-9a-f]:*:[0-9a-f]*)
+ # Remove global DNS responses with your local network IP6 GLA
+ echo " private-address: ${ifsubnet#*@}"
+ ;;
+ esac
+ done
+ echo
+ } >> $UB_CORE_CONF
fi
- if [ "$UNBOUND_B_LOCL_BLCK" -gt 0 ] ; then
+ if [ "$UB_B_LOCL_BLCK" -gt 0 ] ; then
{
# Remove DNS reponses from upstream with loopback IP
# Black hole DNS method for ad blocking, so consider...
echo " private-address: 127.0.0.0/8"
echo " private-address: ::1/128"
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
fi
- if [ -n "$UNBOUND_LIST_INSECURE" ] ; then
- for domain in $UNBOUND_LIST_INSECURE ; do
- # Except and accept domains without (DNSSEC); work around broken domains
- echo " domain-insecure: \"$domain\"" >> $UNBOUND_CONFFILE
- done
-
-
- echo >> $UNBOUND_CONFFILE
+ if [ -n "$UB_LIST_INSECURE" ] ; then
+ {
+ for domain in $UB_LIST_INSECURE ; do
+ # Except and accept domains without (DNSSEC); work around broken domains
+ echo " domain-insecure: $domain"
+ done
+ echo
+ } >> $UB_CORE_CONF
fi
-}
-
-##############################################################################
-
-unbound_access() {
- # TODO: Unbound 1.6.0 added "tags" and "views", so we can add tags to
- # each access-control IP block, and then divert access.
- # -- "guest" WIFI will not be allowed to see local zone data
- # -- "child" LAN can black whole a list of domains to http~deadpixel
-
-
- if [ "$UNBOUND_B_LOCL_SERV" -gt 0 ] ; then
- # Only respond to queries from which this device has an interface.
- # Prevent DNS amplification attacks by not responding to the universe.
- config_load network
- config_foreach create_access_control interface
+ if [ "$UB_B_LOCL_SERV" -gt 0 -a -n "$UB_LIST_NETW_ALL" ] ; then
{
+ for ifsubnet in $UB_LIST_NETW_ALL ; do
+ # Only respond to queries from subnets which have an interface.
+ # Prevent DNS amplification attacks by not responding to the universe.
+ echo " access-control: ${ifsubnet#*@} allow"
+ done
echo " access-control: 127.0.0.0/8 allow"
echo " access-control: ::1/128 allow"
echo " access-control: fe80::/10 allow"
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
else
{
echo " access-control: 0.0.0.0/0 allow"
echo " access-control: ::0/0 allow"
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_CORE_CONF
fi
-
-
- {
- # Amend your own "server:" stuff here
- echo " include: $UNBOUND_SRV_CONF"
- echo
- } >> $UNBOUND_CONFFILE
}
##############################################################################
-unbound_adblock() {
- # TODO: Unbound 1.6.0 added "tags" and "views"; lets work with adblock team
- local adb_enabled adb_file
-
- if [ ! -x /usr/bin/adblock.sh -o ! -x /etc/init.d/adblock ] ; then
- adb_enabled=0
- else
- /etc/init.d/adblock enabled && adb_enabled=1 || adb_enabled=0
- fi
-
+unbound_hostname() {
+ local ifsubnet ifarpa ifaddr ifname iffqdn
+ local ulaprefix hostfqdn name names namerec ptrrec
+ local zonetype=0
- if [ "$adb_enabled" -gt 0 ] ; then
- {
- # Pull in your selected openwrt/pacakges/net/adblock generated lists
- for adb_file in $UNBOUND_VARDIR/adb_list.* ; do
- echo " include: $adb_file"
- done
- echo
- } >> $UNBOUND_CONFFILE
- fi
-}
+ echo "# $UB_HOST_CONF generated by UCI $( date -Is )" > $UB_HOST_CONF
-##############################################################################
-unbound_hostname() {
- if [ -n "$UNBOUND_TXT_DOMAIN" ] ; then
+ if [ "$UB_D_DHCP_LINK" = "dnsmasq" ] ; then
{
- # TODO: Unbound 1.6.0 added "tags" and "views" and we could make
- # domains by interface to prevent DNS from "guest" to "home"
- echo " local-zone: $UNBOUND_TXT_DOMAIN. $UNBOUND_D_DOMAIN_TYPE"
- echo " domain-insecure: $UNBOUND_TXT_DOMAIN"
- echo " private-domain: $UNBOUND_TXT_DOMAIN"
- echo
- echo " local-zone: $UNBOUND_TXT_HOSTNAME. $UNBOUND_D_DOMAIN_TYPE"
- echo " domain-insecure: $UNBOUND_TXT_HOSTNAME"
- echo " private-domain: $UNBOUND_TXT_HOSTNAME"
+ echo "# Local zone is handled by dnsmasq"
echo
- } >> $UNBOUND_CONFFILE
+ } >> $UB_HOST_CONF
+ elif [ -n "$UB_TXT_DOMAIN" \
+ -a \( "$UB_D_WAN_FQDN" -gt 0 -o "$UB_D_LAN_FQDN" -gt 0 \) ] ; then
+ case "$UB_D_DOMAIN_TYPE" in
+ deny|inform_deny|refuse|static)
+ {
+ # type static means only this router has your domain
+ echo " domain-insecure: $UB_TXT_DOMAIN"
+ echo " private-domain: $UB_TXT_DOMAIN"
+ echo " local-zone: $UB_TXT_DOMAIN $UB_D_DOMAIN_TYPE"
+ echo " local-data: \"$UB_TXT_DOMAIN. $UB_XSOA\""
+ echo " local-data: \"$UB_TXT_DOMAIN. $UB_XNS\""
+ echo " local-data: '$UB_TXT_DOMAIN. $UB_XTXT'"
+ echo
+ # avoid upstream involvement in RFC6762
+ echo " domain-insecure: local"
+ echo " private-domain: local"
+ echo " local-zone: local $UB_D_DOMAIN_TYPE"
+ echo " local-data: \"local. $UB_XSOA\""
+ echo " local-data: \"local. $UB_XNS\""
+ echo " local-data: 'local. $UB_LTXT'"
+ echo
+ } >> $UB_HOST_CONF
+ zonetype=2
+ ;;
- case "$UNBOUND_D_DOMAIN_TYPE" in
- deny|inform_deny|refuse|static)
- {
- # avoid upstream involvement in RFC6762 like responses (link only)
- echo " local-zone: local. $UNBOUND_D_DOMAIN_TYPE"
- echo " domain-insecure: local"
- echo " private-domain: local"
- echo
- } >> $UNBOUND_CONFFILE
- ;;
+ transparent|typetransparent)
+ {
+ # transparent will permit forward-zone: or stub-zone: clauses
+ echo " private-domain: $UB_TXT_DOMAIN"
+ echo " local-zone: $UB_TXT_DOMAIN $UB_D_DOMAIN_TYPE"
+ echo
+ } >> $UB_HOST_CONF
+ zonetype=1
+ ;;
esac
- if [ "$UNBOUND_D_LAN_FQDN" -gt 0 -o "$UNBOUND_D_WAN_FQDN" -gt 0 ] ; then
- config_load dhcp
- config_foreach create_interface_dns dhcp
+ {
+ # Hostname as TLD works, but not transparent through recursion (singular)
+ echo " domain-insecure: $UB_TXT_HOSTNAME"
+ echo " private-domain: $UB_TXT_HOSTNAME"
+ echo " local-zone: $UB_TXT_HOSTNAME static"
+ echo " local-data: \"$UB_TXT_HOSTNAME. $UB_XSOA\""
+ echo " local-data: \"$UB_TXT_HOSTNAME. $UB_XNS\""
+ echo " local-data: '$UB_TXT_HOSTNAME. $UB_XTXT'"
+ echo
+ } >> $UB_HOST_CONF
+
+
+ if [ -n "$UB_LIST_NETW_WAN" ] ; then
+ for ifsubnet in $UB_LIST_NETW_WAN ; do
+ ifaddr=${ifsubnet#*@}
+ ifaddr=${ifaddr%/*}
+ ifarpa=$( host_ptr_any "$ifaddr" )
+
+
+ if [ -n "$ifarpa" ] ; then
+ if [ "$UB_D_WAN_FQDN" -gt 0 ] ; then
+ {
+ # Create a static zone for WAN host record only (singular)
+ echo " domain-insecure: $ifarpa"
+ echo " private-address: $ifaddr"
+ echo " local-zone: $ifarpa static"
+ echo " local-data: \"$ifarpa. $UB_XSOA\""
+ echo " local-data: \"$ifarpa. $UB_XNS\""
+ echo " local-data: '$ifarpa. $UB_MTXT'"
+ echo
+ } >> $UB_HOST_CONF
+
+ elif [ "$zonetype" -gt 0 ] ; then
+ {
+ echo " local-zone: $ifarpa transparent"
+ echo
+ } >> $UB_HOST_CONF
+ fi
+ fi
+ done
fi
- if [ -f "$UNBOUND_DHCP_CONF" ] ; then
- {
- # Seed DHCP records because dhcp scripts trigger externally
- # Incremental Unbound restarts may drop unbound-control add records
- echo " include: $UNBOUND_DHCP_CONF"
- echo
- } >> $UNBOUND_CONFFILE
+ if [ -n "$UB_LIST_NETW_LAN" ] ; then
+ for ifsubnet in $UB_LIST_NETW_LAN ; do
+ ifarpa=$( domain_ptr_any "${ifsubnet#*@}" )
+
+
+ if [ -n "$ifarpa" ] ; then
+ if [ "$zonetype" -eq 2 ] ; then
+ {
+ # Do NOT forward queries with your ip6.arpa or in-addr.arpa
+ echo " domain-insecure: $ifarpa"
+ echo " local-zone: $ifarpa static"
+ echo " local-data: \"$ifarpa. $UB_XSOA\""
+ echo " local-data: \"$ifarpa. $UB_XNS\""
+ echo " local-data: '$ifarpa. $UB_XTXT'"
+ echo
+ } >> $UB_HOST_CONF
+
+ elif [ "$zonetype" -eq 1 -a "$UB_D_PRIV_BLCK" -eq 0 ] ; then
+ {
+ echo " local-zone: $ifarpa transparent"
+ echo
+ } >> $UB_HOST_CONF
+ fi
+ fi
+ done
fi
- fi
-}
-##############################################################################
-unbound_records() {
- if [ "$UNBOUND_D_EXTRA_DNS" -gt 0 ] ; then
- # Parasite from the uci.dhcp.domain clauses
- config_load dhcp
- config_foreach create_host_record domain
- fi
+ ulaprefix=$( uci_get network.@globals[0].ula_prefix )
+ ulaprefix=${ulaprefix%%:/*}
+ hostfqdn="$UB_TXT_HOSTNAME.$UB_TXT_DOMAIN"
- if [ "$UNBOUND_D_EXTRA_DNS" -gt 1 ] ; then
- config_foreach create_srv_record srvhost
- config_foreach create_mx_record mxhost
- fi
+ if [ -z "$ulaprefix" ] ; then
+ # Nonsense so this option isn't globbed below
+ ulaprefix="fdno:such:addr::"
+ fi
- if [ "$UNBOUND_D_EXTRA_DNS" -gt 2 ] ; then
- config_foreach create_cname_record cname
- fi
+ if [ "$UB_LIST_NETW_LAN" -a "$UB_D_LAN_FQDN" -gt 0 ] ; then
+ for ifsubnet in $UB_LIST_NETW_LAN ; do
+ ifaddr=${ifsubnet#*@}
+ ifaddr=${ifaddr%/*}
+ ifname=${ifsubnet%@*}
+ iffqdn="$ifname.$hostfqdn"
+
+
+ if [ "$UB_D_LAN_FQDN" -eq 4 ] ; then
+ names="$iffqdn $hostfqdn $UB_TXT_HOSTNAME"
+ ptrrec=" local-data-ptr: \"$ifaddr 300 $iffqdn\""
+ echo "$ptrrec" >> $UB_HOST_CONF
+
+ elif [ "$UB_D_LAN_FQDN" -eq 3 ] ; then
+ names="$hostfqdn $UB_TXT_HOSTNAME"
+ ptrrec=" local-data-ptr: \"$ifaddr 300 $hostfqdn\""
+ echo "$ptrrec" >> $UB_HOST_CONF
+
+ else
+ names="$UB_TXT_HOSTNAME"
+ ptrrec=" local-data-ptr: \"$ifaddr 300 $UB_TXT_HOSTNAME\""
+ echo "$ptrrec" >> $UB_HOST_CONF
+ fi
+
+
+ for name in $names ; do
+ case $ifaddr in
+ "${ulaprefix}"*)
+ # IP6 ULA only is assigned for OPTION 1
+ namerec=" local-data: \"$name. 300 IN AAAA $ifaddr\""
+ echo "$namerec" >> $UB_HOST_CONF
+ ;;
+
+ [1-9]*.*[0-9])
+ namerec=" local-data: \"$name. 300 IN A $ifaddr\""
+ echo "$namerec" >> $UB_HOST_CONF
+ ;;
+
+ *)
+ if [ "$UB_D_LAN_FQDN" -gt 1 ] ; then
+ # IP6 GLA is assigned for higher options
+ namerec=" local-data: \"$name. 300 IN AAAA $ifaddr\""
+ echo "$namerec" >> $UB_HOST_CONF
+ fi
+ ;;
+ esac
+ done
+ echo >> $UB_HOST_CONF
+ done
+ fi
- echo >> $UNBOUND_CONFFILE
+ if [ -n "$UB_LIST_NETW_WAN" -a "$UB_D_WAN_FQDN" -gt 0 ] ; then
+ for ifsubnet in $UB_LIST_NETW_WAN ; do
+ ifaddr=${ifsubnet#*@}
+ ifaddr=${ifaddr%/*}
+ ifname=${ifsubnet%@*}
+ iffqdn="$ifname.$hostfqdn"
+
+
+ if [ "$UB_D_WAN_FQDN" -eq 4 ] ; then
+ names="$iffqdn $hostfqdn $UB_TXT_HOSTNAME"
+ ptrrec=" local-data-ptr: \"$ifaddr 300 $iffqdn\""
+ echo "$ptrrec" >> $UB_HOST_CONF
+
+ elif [ "$UB_D_WAN_FQDN" -eq 3 ] ; then
+ names="$hostfqdn $UB_TXT_HOSTNAME"
+ ptrrec=" local-data-ptr: \"$ifaddr 300 $hostfqdn\""
+ echo "$ptrrec" >> $UB_HOST_CONF
+
+ else
+ names="$UB_TXT_HOSTNAME"
+ ptrrec=" local-data-ptr: \"$ifaddr 300 $UB_TXT_HOSTNAME\""
+ echo "$ptrrec" >> $UB_HOST_CONF
+ fi
+
+
+ for name in $names ; do
+ case $ifaddr in
+ "${ulaprefix}"*)
+ # IP6 ULA only is assigned for OPTION 1
+ namerec=" local-data: \"$name. 300 IN AAAA $ifaddr\""
+ echo "$namerec" >> $UB_HOST_CONF
+ ;;
+
+ [1-9]*.*[0-9])
+ namerec=" local-data: \"$name. 300 IN A $ifaddr\""
+ echo "$namerec" >> $UB_HOST_CONF
+ ;;
+
+ *)
+ if [ "$UB_D_WAN_FQDN" -gt 1 ] ; then
+ # IP6 GLA is assigned for higher options
+ namerec=" local-data: \"$name. 300 IN AAAA $ifaddr\""
+ echo "$namerec" >> $UB_HOST_CONF
+ fi
+ ;;
+ esac
+ done
+ echo >> $UB_HOST_CONF
+ done
+ fi
+ fi # end if uci valid
}
##############################################################################
local dnsmasqpath hostnm
hostnm=$( uci_get system.@system[0].hostname | awk '{print tolower($0)}' )
- UNBOUND_TXT_HOSTNAME=${hostnm:-thisrouter}
+ UB_TXT_HOSTNAME=${hostnm:-thisrouter}
- config_get_bool UNBOUND_B_SLAAC6_MAC "$cfg" dhcp4_slaac6 0
- config_get_bool UNBOUND_B_DNS64 "$cfg" dns64 0
- config_get_bool UNBOUND_B_EXT_STATS "$cfg" extended_stats 0
- config_get_bool UNBOUND_B_HIDE_BIND "$cfg" hide_binddata 1
- config_get_bool UNBOUND_B_LOCL_SERV "$cfg" localservice 1
- config_get_bool UNBOUND_B_MAN_CONF "$cfg" manual_conf 0
- config_get_bool UNBOUND_B_QUERY_MIN "$cfg" query_minimize 0
- config_get_bool UNBOUND_B_QRY_MINST "$cfg" query_min_strict 0
- config_get_bool UNBOUND_B_LOCL_BLCK "$cfg" rebind_localhost 0
- config_get_bool UNBOUND_B_DNSSEC "$cfg" validator 0
- config_get_bool UNBOUND_B_NTP_BOOT "$cfg" validator_ntp 1
+ config_get_bool UB_B_SLAAC6_MAC "$cfg" dhcp4_slaac6 0
+ config_get_bool UB_B_DNS64 "$cfg" dns64 0
+ config_get_bool UB_B_EXT_STATS "$cfg" extended_stats 0
+ config_get_bool UB_B_HIDE_BIND "$cfg" hide_binddata 1
+ config_get_bool UB_B_LOCL_SERV "$cfg" localservice 1
+ config_get_bool UB_B_MAN_CONF "$cfg" manual_conf 0
+ config_get_bool UB_B_QUERY_MIN "$cfg" query_minimize 0
+ config_get_bool UB_B_QRY_MINST "$cfg" query_min_strict 0
+ config_get_bool UB_B_AUTH_ROOT "$cfg" prefetch_root 0
+ config_get_bool UB_B_LOCL_BLCK "$cfg" rebind_localhost 0
+ config_get_bool UB_B_DNSSEC "$cfg" validator 0
+ config_get_bool UB_B_NTP_BOOT "$cfg" validator_ntp 1
- config_get UNBOUND_IP_DNS64 "$cfg" dns64_prefix "64:ff9b::/96"
+ config_get UB_IP_DNS64 "$cfg" dns64_prefix "64:ff9b::/96"
- config_get UNBOUND_N_EDNS_SIZE "$cfg" edns_size 1280
- config_get UNBOUND_N_RX_PORT "$cfg" listen_port 53
- config_get UNBOUND_N_ROOT_AGE "$cfg" root_age 9
+ config_get UB_N_EDNS_SIZE "$cfg" edns_size 1280
+ config_get UB_N_RX_PORT "$cfg" listen_port 53
+ config_get UB_N_ROOT_AGE "$cfg" root_age 9
- config_get UNBOUND_D_CONTROL "$cfg" unbound_control 0
- config_get UNBOUND_D_DOMAIN_TYPE "$cfg" domain_type static
- config_get UNBOUND_D_DHCP_LINK "$cfg" dhcp_link none
- config_get UNBOUND_D_EXTRA_DNS "$cfg" add_extra_dns 0
- config_get UNBOUND_D_LAN_FQDN "$cfg" add_local_fqdn 0
- config_get UNBOUND_D_PRIV_BLCK "$cfg" rebind_protection 1
- config_get UNBOUND_D_PROTOCOL "$cfg" protocol mixed
- config_get UNBOUND_D_RECURSION "$cfg" recursion passive
- config_get UNBOUND_D_RESOURCE "$cfg" resource small
- config_get UNBOUND_D_WAN_FQDN "$cfg" add_wan_fqdn 0
+ config_get UB_D_CONTROL "$cfg" unbound_control 0
+ config_get UB_D_DOMAIN_TYPE "$cfg" domain_type static
+ config_get UB_D_DHCP_LINK "$cfg" dhcp_link none
+ config_get UB_D_EXTRA_DNS "$cfg" add_extra_dns 0
+ config_get UB_D_LAN_FQDN "$cfg" add_local_fqdn 0
+ config_get UB_D_PRIV_BLCK "$cfg" rebind_protection 1
+ config_get UB_D_PROTOCOL "$cfg" protocol mixed
+ config_get UB_D_RECURSION "$cfg" recursion passive
+ config_get UB_D_RESOURCE "$cfg" resource small
+ config_get UB_D_VERBOSE "$cfg" verbosity 1
+ config_get UB_D_WAN_FQDN "$cfg" add_wan_fqdn 0
- config_get UNBOUND_TTL_MIN "$cfg" ttl_min 120
- config_get UNBOUND_TXT_DOMAIN "$cfg" domain lan
+ config_get UB_TTL_MIN "$cfg" ttl_min 120
+ config_get UB_TXT_DOMAIN "$cfg" domain lan
- config_list_foreach "$cfg" "domain_forward" bundle_domain_forward
- config_list_foreach "$cfg" "domain_insecure" bundle_domain_insecure
- config_list_foreach "$cfg" "rebind_interface" bundle_private_interface
+ config_list_foreach "$cfg" domain_insecure bundle_domain_insecure
- UNBOUND_LIST_DOMAINS="nowhere $UNBOUND_TXT_DOMAIN"
- if [ "$UNBOUND_D_DHCP_LINK" = "none" ] ; then
- config_get_bool UNBOUND_B_DNSMASQ "$cfg" dnsmasq_link_dns 0
+ if [ "$UB_D_DHCP_LINK" = "none" ] ; then
+ config_get_bool UB_B_DNSMASQ "$cfg" dnsmasq_link_dns 0
- if [ "$UNBOUND_B_DNSMASQ" -gt 0 ] ; then
- UNBOUND_D_DHCP_LINK=dnsmasq
+ if [ "$UB_B_DNSMASQ" -gt 0 ] ; then
+ UB_D_DHCP_LINK=dnsmasq
- if [ ! -f "$UNBOUND_TIMEFILE" ] ; then
+ if [ "$UB_B_READY" -eq 0 ] ; then
logger -t unbound -s "Please use 'dhcp_link' selector instead"
fi
fi
fi
- if [ "$UNBOUND_D_DHCP_LINK" = "dnsmasq" ] ; then
+ if [ "$UB_D_DHCP_LINK" = "dnsmasq" ] ; then
if [ ! -x /usr/sbin/dnsmasq -o ! -x /etc/init.d/dnsmasq ] ; then
- UNBOUND_D_DHCP_LINK=none
+ UB_D_DHCP_LINK=none
else
- /etc/init.d/dnsmasq enabled || UNBOUND_D_DHCP_LINK=none
+ /etc/init.d/dnsmasq enabled || UB_D_DHCP_LINK=none
fi
- if [ "$UNBOUND_D_DHCP_LINK" = "none" -a ! -f "$UNBOUND_TIMEFILE" ] ; then
+ if [ "$UB_B_READY" -eq 0 -a "$UB_D_DHCP_LINK" = "none" ] ; then
logger -t unbound -s "cannot forward to dnsmasq"
fi
fi
- if [ "$UNBOUND_D_DHCP_LINK" = "odhcpd" ] ; then
+ if [ "$UB_D_DHCP_LINK" = "odhcpd" ] ; then
if [ ! -x /usr/sbin/odhcpd -o ! -x /etc/init.d/odhcpd ] ; then
- UNBOUND_D_DHCP_LINK=none
+ UB_D_DHCP_LINK=none
else
- /etc/init.d/odhcpd enabled || UNBOUND_D_DHCP_LINK=none
+ /etc/init.d/odhcpd enabled || UB_D_DHCP_LINK=none
fi
- if [ "$UNBOUND_D_DHCP_LINK" = "none" -a ! -f "$UNBOUND_TIMEFILE" ] ; then
+ if [ "$UB_B_READY" -eq 0 -a "$UB_D_DHCP_LINK" = "none" ] ; then
logger -t unbound -s "cannot receive records from odhcpd"
fi
fi
- if [ "$UNBOUND_N_EDNS_SIZE" -lt 512 \
- -o 4096 -lt "$UNBOUND_N_EDNS_SIZE" ] ; then
+ if [ "$UB_N_EDNS_SIZE" -lt 512 \
+ -o 4096 -lt "$UB_N_EDNS_SIZE" ] ; then
logger -t unbound -s "edns_size exceeds range, using default"
- UNBOUND_N_EDNS_SIZE=1280
+ UB_N_EDNS_SIZE=1280
fi
- if [ "$UNBOUND_N_RX_PORT" -ne 53 ] \
- && [ "$UNBOUND_N_RX_PORT" -lt 1024 -o 10240 -lt "$UNBOUND_N_RX_PORT" ] ; then
+ if [ "$UB_N_RX_PORT" -ne 53 \
+ -a \( "$UB_N_RX_PORT" -lt 1024 -o 10240 -lt "$UB_N_RX_PORT" \) ] ; then
logger -t unbound -s "privileged port or in 5 digits, using default"
- UNBOUND_N_RX_PORT=53
+ UB_N_RX_PORT=53
fi
- if [ "$UNBOUND_TTL_MIN" -gt 1800 ] ; then
+ if [ "$UB_TTL_MIN" -gt 1800 ] ; then
logger -t unbound -s "ttl_min could have had awful side effects, using 300"
- UNBOUND_TTL_MIN=300
+ UB_TTL_MIN=300
fi
}
##############################################################################
-_resolv_setup() {
- if [ "$UNBOUND_N_RX_PORT" != "53" ] ; then
- return
+unbound_include() {
+ local adb_enabled
+ local adb_files=$( ls $UB_VARDIR/adb_list.* 2>/dev/null )
+
+ echo "# $UB_TOTAL_CONF generated by UCI $( date -Is )" > $UB_TOTAL_CONF
+
+
+ if [ -f "$UB_CORE_CONF" ] ; then
+ # Yes this all looks busy, but it is in TMPFS. Working on separate files
+ # and piecing together is easier. UCI order is less constrained.
+ cat $UB_CORE_CONF >> $UB_TOTAL_CONF
+ rm $UB_CORE_CONF
+ fi
+
+
+ if [ -f "$UB_HOST_CONF" ] ; then
+ # UCI definitions of local host or local subnet
+ cat $UB_HOST_CONF >> $UB_TOTAL_CONF
+ rm $UB_HOST_CONF
+ fi
+
+
+ if [ -f $UB_SRVMASQ_CONF ] ; then
+ # UCI found link to dnsmasq
+ cat $UB_SRVMASQ_CONF >> $UB_TOTAL_CONF
+ rm $UB_SRVMASQ_CONF
+ fi
+
+
+ if [ -f "$UB_DHCP_CONF" ] ; then
+ {
+ # Seed DHCP records because dhcp scripts trigger externally
+ # Incremental Unbound restarts may drop unbound-control records
+ echo "include: $UB_DHCP_CONF"
+ echo
+ }>> $UB_TOTAL_CONF
+ fi
+
+
+ if [ -z "$adb_files" \
+ -o ! -x /usr/bin/adblock.sh -o ! -x /etc/init.d/adblock ] ; then
+ adb_enabled=0
+
+ elif /etc/init.d/adblock enabled ; then
+ adb_enabled=1
+ {
+ # Pull in your selected openwrt/pacakges/net/adblock generated lists
+ echo "include: $UB_VARDIR/adb_list.*"
+ echo
+ } >> $UB_TOTAL_CONF
+
+ else
+ adb_enabled=0
fi
- if [ -x /etc/init.d/dnsmasq ] && /etc/init.d/dnsmasq enabled \
- && nslookup localhost 127.0.0.1#53 >/dev/null 2>&1 ; then
+
+ if [ -f $UB_SRV_CONF ] ; then
+ {
+ # Pull your own "server:" options here
+ echo "include: $UB_SRV_CONF"
+ echo
+ }>> $UB_TOTAL_CONF
+ fi
+
+
+ if [ -f "$UB_ZONE_CONF" ] ; then
+ # UCI defined forward, stub, and auth zones
+ cat $UB_ZONE_CONF >> $UB_TOTAL_CONF
+ rm $UB_ZONE_CONF
+ fi
+
+
+ if [ -f "$UB_CTRL_CONF" ] ; then
+ # UCI defined control application connection
+ cat $UB_CTRL_CONF >> $UB_TOTAL_CONF
+ rm $UB_CTRL_CONF
+ fi
+
+
+ if [ -f "$UB_EXTMASQ_CONF" ] ; then
+ # UCI found link to dnsmasq
+ cat $UB_EXTMASQ_CONF >> $UB_TOTAL_CONF
+ rm $UB_EXTMASQ_CONF
+ fi
+
+
+ if [ -f "$UB_EXT_CONF" ] ; then
+ {
+ # Pull your own extend feature clauses here
+ echo "include: $UB_EXT_CONF"
+ echo
+ } >> $UB_TOTAL_CONF
+ fi
+}
+
+##############################################################################
+
+resolv_setup() {
+ if [ "$UB_N_RX_PORT" != "53" ] ; then
+ return
+
+ elif [ -x /etc/init.d/dnsmasq ] \
+ && /etc/init.d/dnsmasq enabled \
+ && nslookup localhost 127.0.0.1#53 >/dev/null 2>&1 ; then
# unbound is configured for port 53, but dnsmasq is enabled and a resolver
# listens on localhost:53, lets assume dnsmasq manages the resolver file.
# TODO:
return
fi
+
# unbound is designated to listen on 127.0.0.1#53,
# set resolver file to local.
rm -f /tmp/resolv.conf
{
- echo "# /tmp/resolv.conf generated by Unbound UCI $( date )"
+ echo "# /tmp/resolv.conf generated by Unbound UCI $( date -Is )"
echo "nameserver 127.0.0.1"
echo "nameserver ::1"
- echo "search $UNBOUND_TXT_DOMAIN."
+ echo "search $UB_TXT_DOMAIN."
} > /tmp/resolv.conf
}
##############################################################################
-_resolv_teardown() {
- case $( cat /tmp/resolv.conf ) in
- *"generated by Unbound UCI"*)
- # our resolver file, reset to auto resolver file.
- rm -f /tmp/resolv.conf
- ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
- ;;
- esac
-}
-
-##############################################################################
-
unbound_start() {
config_load unbound
config_foreach unbound_uci unbound
-
-
unbound_mkdir
- if [ "$UNBOUND_B_MAN_CONF" -eq 0 ] ; then
+ if [ "$UB_B_MAN_CONF" -eq 0 ] ; then
+ # iterate zones before we load other UCI
+ # forward-zone: auth-zone: and stub-zone:
+ config_foreach unbound_zone zone
+ # associate potential DNS RR with interfaces
+ config_load network
+ config_foreach bundle_all_networks interface
+ config_load dhcp
+ config_foreach bundle_lan_networks dhcp
+ bundle_wan_networks
+ # server:
unbound_conf
- unbound_access
- unbound_adblock
-
-
- if [ "$UNBOUND_D_DHCP_LINK" = "dnsmasq" ] ; then
- dnsmasq_link
- else
- unbound_hostname
- unbound_records
- fi
-
-
- unbound_forward
+ unbound_hostname
+ # control:
unbound_control
+ # dnsmasq
+ dnsmasq_link
+ # merge
+ unbound_include
fi
- _resolv_setup
-}
-
-##############################################################################
-
-unbound_stop() {
- _resolv_teardown
-
-
- rootzone_update
+ resolv_setup
}
##############################################################################
option domain 'lan'
option domain_type 'static'
option edns_size '1280'
- option extended_luci '0'
option extended_stats '0'
option hide_binddata '1'
option listen_port '53'
option localservice '1'
option manual_conf '0'
- option protocol 'mixed'
+ option protocol 'default'
option query_minimize '0'
option query_min_strict '0'
option rebind_localhost '0'
option rebind_protection '1'
- option recursion 'passive'
- option resource 'small'
+ option recursion 'default'
+ option resource 'default'
option root_age '9'
option ttl_min '120'
option unbound_control '0'
option validator '0'
option validator_ntp '1'
+ option verbosity '1'
list trigger_interface 'lan'
list trigger_interface 'wan'
- #list rebind_interface 'lan'
#list domain_insecure 'ntp.example.com'
- #list domain_forward 'mail.example.com'
+
+config zone
+ option enabled '0'
+ option fallback '1'
+ option url_dir 'https://www.internic.net/domain/'
+ option zone_type 'auth_zone'
+ list server 'lax.xfr.dns.icann.org'
+ list server 'iad.xfr.dns.icann.org'
+ list zone_name '.'
+ list zone_name 'arpa.'
+ list zone_name 'in-addr.arpa.'
+ list zone_name 'ip6.arpa.'
+
+config zone
+ option enabled '0'
+ option fallback '1'
+ option resolv_conf '1'
+ option zone_type 'forward_zone'
+ list zone_name 'isp-bill.example.com.'
+ list zone_name 'isp-mail.example.net.'
+++ /dev/null
-diff --git a/doc/example.conf.in b/doc/example.conf.in
-index 5396029..cbb51ec 100644
---- a/doc/example.conf.in
-+++ b/doc/example.conf.in
-@@ -1,9 +1,10 @@
--#
--# Example configuration file.
--#
--# See unbound.conf(5) man page, version 1.7.0.
--#
--# this is a comment.
-+##############################################################################
-+# MEMORY CONTROL EXAMPLE
-+# In the example config settings below memory usage is reduced. Some ser-
-+# vice levels are lower, notable very large data and a high TCP load are
-+# no longer supported ... are exceptional for the DNS.
-+# (http://unbound.net/documentation/unbound.conf.html)
-+##############################################################################
-
- #Use this to include other text into the file.
- #include: "otherfile.conf"
-@@ -12,9 +13,71 @@
- server:
- # whitespace is not necessary, but looks cleaner.
-
-- # verbosity number, 0 is least verbose. 1 is default.
-+ # verbosity 1 is default
- verbosity: 1
-
-+ # Self jail Unbound with user "unbound" to /var/lib/unbound
-+ # The script /etc/init.d/unbound will setup the location
-+ username: "unbound"
-+ directory: "/var/lib/unbound"
-+ chroot: "/var/lib/unbound"
-+
-+ # The pid file is created before privleges drop so no concern
-+ pidfile: "/var/run/unbound.pid"
-+
-+ # no threads and no memory slabs for threads
-+ num-threads: 1
-+ msg-cache-slabs: 1
-+ rrset-cache-slabs: 1
-+ infra-cache-slabs: 1
-+ key-cache-slabs: 1
-+
-+ # don't be picky about interfaces but consider your firewall
-+ interface: 0.0.0.0
-+ interface: ::0
-+ access-control: 0.0.0.0/0 allow
-+ access-control: ::0/0 allow
-+
-+ # this limits TCP service but uses less buffers
-+ outgoing-num-tcp: 1
-+ incoming-num-tcp: 1
-+
-+ # use somewhat higher port numbers versus possible NAT issue
-+ outgoing-port-permit: "10240-65335"
-+
-+ # uses less memory but less performance
-+ outgoing-range: 60
-+ num-queries-per-thread: 30
-+
-+ # exclude large responses
-+ msg-buffer-size: 8192
-+
-+ # tiny memory cache
-+ infra-cache-numhosts: 200
-+ msg-cache-size: 100k
-+ rrset-cache-size: 100k
-+ key-cache-size: 100k
-+ neg-cache-size: 10k
-+
-+ # gentle on recursion
-+ target-fetch-policy: "2 1 0 0 0 0"
-+ harden-large-queries: yes
-+ harden-short-bufsize: yes
-+
-+ # DNSSEC enable by removing comments on "module-config:" and "auto-trust-
-+ # -anchor-file:" The init script will copy root key to /var/lib/unbound.
-+ # See package documentation for crontab entry to copy RFC5011 results back.
-+ #module-config: "validator iterator"
-+ #auto-trust-anchor-file: "/var/lib/unbound/root.key"
-+
-+ # DNSSEC needs real time to validate signatures. If your device does not
-+ # have power off clock (reboot), then you may need this work around.
-+ #domain-insecure: "pool.ntp.org"
-+
-+##############################################################################
-+# Resume Stock example.conf.in
-+##############################################################################
-+
- # print statistics to the log (for every thread) every N seconds.
- # Set to "" or 0 to disable. Default is disabled.
- # statistics-interval: 0
--- /dev/null
+OpenWrt (modification):
+Patch the default configuration file with the tiny memory
+configuration example from Unbound documentation. This is the best
+starting point for embedded routers if one is not going to use UCI.
+
+Index: doc/example.conf.in
+===================================================================
+--- a/doc/example.conf.in
++++ b/doc/example.conf.in
+@@ -15,6 +15,76 @@ server:
+ # verbosity number, 0 is least verbose. 1 is default.
+ verbosity: 1
+
++ ############################################################################
++ # MEMORY CONTROL EXAMPLE
++ # In the example config settings below memory usage is reduced. Some ser-
++ # vice levels are lower, notable very large data and a high TCP load are
++ # no longer supported ... are exceptional for the DNS.
++ # (http://unbound.net/documentation/unbound.conf.html)
++ ############################################################################
++
++ # Self jail Unbound with user "unbound" to /var/lib/unbound
++ # The script /etc/init.d/unbound will setup the location
++ username: "unbound"
++ directory: "/var/lib/unbound"
++ chroot: "/var/lib/unbound"
++
++ # The pid file is created before privleges drop so no concern
++ pidfile: "/var/run/unbound.pid"
++
++ # no threads and no memory slabs for threads
++ num-threads: 1
++ msg-cache-slabs: 1
++ rrset-cache-slabs: 1
++ infra-cache-slabs: 1
++ key-cache-slabs: 1
++
++ # don't be picky about interfaces but consider your firewall
++ interface: 0.0.0.0
++ interface: ::0
++ access-control: 0.0.0.0/0 allow
++ access-control: ::0/0 allow
++
++ # this limits TCP service but uses less buffers
++ outgoing-num-tcp: 1
++ incoming-num-tcp: 1
++
++ # use somewhat higher port numbers versus possible NAT issue
++ outgoing-port-permit: "10240-65335"
++
++ # uses less memory but less performance
++ outgoing-range: 60
++ num-queries-per-thread: 30
++
++ # exclude large responses
++ msg-buffer-size: 8192
++
++ # tiny memory cache
++ infra-cache-numhosts: 200
++ msg-cache-size: 100k
++ rrset-cache-size: 100k
++ key-cache-size: 100k
++ neg-cache-size: 10k
++
++ # gentle on recursion
++ target-fetch-policy: "2 1 0 0 0 0"
++ harden-large-queries: yes
++ harden-short-bufsize: yes
++
++ # DNSSEC enable by removing comments on "module-config:" and "auto-trust-
++ # -anchor-file:" The init script will copy root key to /var/lib/unbound.
++ # See package documentation for crontab entry to copy RFC5011 results back.
++ #module-config: "validator iterator"
++ #auto-trust-anchor-file: "/var/lib/unbound/root.key"
++
++ # DNSSEC needs real time to validate signatures. If your device does not
++ # have power off clock (reboot), then you may need this work around.
++ #domain-insecure: "pool.ntp.org"
++
++ ############################################################################
++ # Resume Stock example.conf.in
++ ############################################################################
++
+ # print statistics to the log (for every thread) every N seconds.
+ # Set to "" or 0 to disable. Default is disabled.
+ # statistics-interval: 0
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=usbip
-PKG_RELEASE:=9
+PKG_RELEASE:=10
PKG_LICENSE:=GPL-2.0
# Since kernel 2.6.39.1 userspace tools are inside the kernel tree
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
-PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/usbip
$(call Package/usbip/Default)
TITLE+= (common)
- DEPENDS+= +libwrap +kmod-usbip +libudev-fbsd
+ DEPENDS+= +libwrap +kmod-usbip +libudev-fbsd +USE_GLIBC:libbsd
endef
define Package/usbip-client
CONFIGURE_PATH:=.
MAKE_PATH:=.
LIBTOOL_PATHS:=.
-MAKE_FLAGS+=CFLAGS="-Wno-implicit-function-declaration"
+MAKE_FLAGS+=CFLAGS='-Dudev_device_get_devpath\(x\)=udev_device_get_syspath\(x\)+strlen\(\"/sys\"\) \
+ -DSIGCLD=SIGCHLD'
+CONFIGURE_ARGS+= --disable-silent-rules
define Build/Configure
(cd $(PKG_BUILD_DIR); ./autogen.sh );
$(call Build/Configure/Default)
endef
+CONFIGURE_VARS+= $(if $(CONFIG_USE_GLIBC),LIBS='-lbsd -lpthread')
CFLAGS+="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include"
USB_IDS_REV:=0a6be488b4c1485d30c9efee1cc895af5d4a1383
+++ /dev/null
---- a/src/usbipd.c
-+++ b/src/usbipd.c
-@@ -453,7 +453,7 @@ static void set_signal(void)
- sigaction(SIGTERM, &act, NULL);
- sigaction(SIGINT, &act, NULL);
- act.sa_handler = SIG_IGN;
-- sigaction(SIGCLD, &act, NULL);
-+ sigaction(SIGCHLD, &act, NULL);
- }
-
- static const char *pid_file;
+++ /dev/null
-Index: trunk/src/cmd/Makefile.am
-===================================================================
---- trunk/src/cmd/Makefile.am (revision 98)
-+++ trunk/src/cmd/Makefile.am (revision 99)
-@@ -17,5 +17,5 @@
- INCLUDES = -I$(top_srcdir)/lib
- LDADD = ../lib/libusbip.la @PACKAGE_LIBS@
- EXTRA_CFLAGS = @EXTRA_CFLAGS@
--AM_CFLAGS = -Wall -W -Wstrict-prototypes -std=gnu99 $(EXTRA_CFLAGS) @PACKAGE_CFLAGS@
-+AM_CFLAGS = -Wall -W -Wstrict-prototypes -std=gnu99 $(EXTRA_CFLAGS) @PACKAGE_CFLAGS@ -DUSBIDS_FILE='"@USBIDS_DIR@/usb.ids"'
-
+++ /dev/null
---- a/drivers/head/stub_dev.c
-+++ b/drivers/head/stub_dev.c
-@@ -398,7 +398,11 @@ static int stub_probe(struct usb_interfa
- {
- struct usb_device *udev = interface_to_usbdev(interface);
- struct stub_device *sdev = NULL;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
- char *udev_busid = interface->dev.parent->bus_id;
-+#else
-+ char *udev_busid = dev_name(interface->dev.parent);
-+#endif
- int err = 0;
-
- udbg("Enter\n");
---- a/drivers/head/stub_main.c
-+++ b/drivers/head/stub_main.c
-@@ -252,18 +252,17 @@ static int __init usb_stub_init(void)
- return -ENOMEM;
- }
-
-+ info(DRIVER_DESC "" DRIVER_VERSION);
-+
-+ memset(busid_table, 0, sizeof(busid_table));
-+ spin_lock_init(&busid_table_lock);
-+
- ret = usb_register(&stub_driver);
- if (ret) {
- uerr("usb_register failed %d\n", ret);
- return ret;
- }
-
--
-- info(DRIVER_DESC "" DRIVER_VERSION);
--
-- memset(busid_table, 0, sizeof(busid_table));
-- spin_lock_init(&busid_table_lock);
--
- ret = driver_create_file(&stub_driver.drvwrap.driver, &driver_attr_match_busid);
-
- if (ret) {
---- a/drivers/head/stub_rx.c
-+++ b/drivers/head/stub_rx.c
-@@ -159,7 +159,11 @@ static int tweak_set_configuration_cmd(s
- * A user may need to set a special configuration value before
- * exporting the device.
- */
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
- uinfo("set_configuration (%d) to %s\n", config, urb->dev->dev.bus_id);
-+#else
-+ uinfo("set_configuration (%d) to %s\n", config, dev_name(&urb->dev->dev));
-+#endif
- uinfo("but, skip!\n");
-
- return 0;
-@@ -177,7 +181,11 @@ static int tweak_reset_device_cmd(struct
- value = le16_to_cpu(req->wValue);
- index = le16_to_cpu(req->wIndex);
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
- uinfo("reset_device (port %d) to %s\n", index, urb->dev->dev.bus_id);
-+#else
-+ uinfo("reset_device (port %d) to %s\n", index, dev_name(&urb->dev->dev));
-+#endif
-
- /* all interfaces should be owned by usbip driver, so just reset it. */
- ret = usb_lock_device_for_reset(urb->dev, NULL);
-@@ -187,7 +195,11 @@ static int tweak_reset_device_cmd(struct
- }
-
- /* try to reset the device */
-- ret = usb_reset_composite_device(urb->dev, NULL);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-+ ret = usb_reset_composite_device(urb->dev, NULL);
-+#else
-+ ret = usb_reset_device(urb->dev);
-+#endif
- if (ret < 0)
- uerr("device reset\n");
-
---- a/drivers/head/usbip_common.c
-+++ b/drivers/head/usbip_common.c
-@@ -55,10 +55,7 @@ static ssize_t show_flag(struct device *
- static ssize_t store_flag(struct device *dev, struct device_attribute *attr,
- const char *buf, size_t count)
- {
-- unsigned long flag;
--
-- sscanf(buf, "%lx", &flag);
-- usbip_debug_flag = flag;
-+ sscanf(buf, "%lx", &usbip_debug_flag);
-
- return count;
- }
-@@ -390,7 +387,7 @@ int usbip_thread(void *param)
- unlock_kernel();
-
- /* srv.rb must wait for rx_thread starting */
-- complete(&ut->thread_done);
-+ complete(&ut->thread_started);
-
- /* start of while loop */
- ut->loop_ops(ut);
-@@ -403,15 +400,21 @@ int usbip_thread(void *param)
-
- void usbip_start_threads(struct usbip_device *ud)
- {
-+
- /*
- * threads are invoked per one device (per one connection).
- */
-+ INIT_COMPLETION(ud->tcp_rx.thread_started);
-+ INIT_COMPLETION(ud->tcp_tx.thread_started);
-+ INIT_COMPLETION(ud->tcp_rx.thread_done);
-+ INIT_COMPLETION(ud->tcp_tx.thread_done);
-+
- kernel_thread((int(*)(void *))usbip_thread, (void *)&ud->tcp_rx, 0);
- kernel_thread((int(*)(void *))usbip_thread, (void *)&ud->tcp_tx, 0);
-
- /* confirm threads are starting */
-- wait_for_completion(&ud->tcp_rx.thread_done);
-- wait_for_completion(&ud->tcp_tx.thread_done);
-+ wait_for_completion(&ud->tcp_rx.thread_started);
-+ wait_for_completion(&ud->tcp_tx.thread_started);
- }
- EXPORT_SYMBOL(usbip_start_threads);
-
-@@ -436,6 +439,7 @@ void usbip_task_init(struct usbip_task *
- void (*loop_ops)(struct usbip_task *))
- {
- ut->thread = NULL;
-+ init_completion(&ut->thread_started);
- init_completion(&ut->thread_done);
- ut->name = name;
- ut->loop_ops = loop_ops;
---- a/drivers/head/usbip_event.c
-+++ b/drivers/head/usbip_event.c
-@@ -38,7 +38,7 @@ void usbip_start_eh(struct usbip_device
-
- kernel_thread((int(*)(void *)) usbip_thread, (void *) eh, 0);
-
-- wait_for_completion(&eh->thread_done);
-+ wait_for_completion(&eh->thread_started);
- }
- EXPORT_SYMBOL(usbip_start_eh);
-
---- a/drivers/head/vhci_hcd.c
-+++ b/drivers/head/vhci_hcd.c
-@@ -58,7 +58,7 @@ static void vhci_stop(struct usb_hcd *hc
- static int vhci_get_frame_number(struct usb_hcd *hcd);
-
- static const char driver_name[] = "vhci_hcd";
--static const char driver_desc[] = "USB/IP Virtual Host Contoroller";
-+static const char driver_desc[] = "USB/IP Virtual Host Controller";
-
-
-
-@@ -416,14 +416,6 @@ static int vhci_hub_control(struct usb_h
- case USB_PORT_FEAT_SUSPEND:
- dbg_vhci_rh(" SetPortFeature: USB_PORT_FEAT_SUSPEND\n");
- uerr(" not yet\n");
--#if 0
-- dum->port_status[rhport] |= (1 << USB_PORT_FEAT_SUSPEND);
-- if (dum->driver->suspend) {
-- spin_unlock (&dum->lock);
-- dum->driver->suspend (&dum->gadget);
-- spin_lock (&dum->lock);
-- }
--#endif
- break;
- case USB_PORT_FEAT_RESET:
- dbg_vhci_rh(" SetPortFeature: USB_PORT_FEAT_RESET\n");
-@@ -432,12 +424,6 @@ static int vhci_hub_control(struct usb_h
- dum->port_status[rhport] &= ~(USB_PORT_STAT_ENABLE
- | USB_PORT_STAT_LOW_SPEED
- | USB_PORT_STAT_HIGH_SPEED);
--#if 0
-- if (dum->driver) {
-- dev_dbg (hardware, "disconnect\n");
-- stop_activity (dum, dum->driver);
-- }
--#endif
-
- /* FIXME test that code path! */
- }
-@@ -1060,7 +1046,7 @@ static int vhci_hcd_probe(struct platfor
- struct usb_hcd *hcd;
- int ret;
-
-- uinfo("proving...\n");
-+ uinfo("probing...\n");
-
- dbg_vhci_hc("name %s id %d\n", pdev->name, pdev->id);
-
-@@ -1076,7 +1062,11 @@ static int vhci_hcd_probe(struct platfor
- * Allocate and initialize hcd.
- * Our private data is also allocated automatically.
- */
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
- hcd = usb_create_hcd(&vhci_hc_driver, &pdev->dev, pdev->dev.bus_id);
-+#else
-+ hcd = usb_create_hcd(&vhci_hc_driver, &pdev->dev, dev_name(&pdev->dev));
-+#endif
- if (!hcd) {
- uerr("create hcd failed\n");
- return -ENOMEM;
---- a/drivers/head/vhci_sysfs.c
-+++ b/drivers/head/vhci_sysfs.c
-@@ -123,7 +123,11 @@ static ssize_t show_status(struct device
- out += sprintf(out, "%03u %08x ",
- vdev->speed, vdev->devid);
- out += sprintf(out, "%16p ", vdev->ud.tcp_socket);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
- out += sprintf(out, "%s", vdev->udev->dev.bus_id);
-+#else
-+ out += sprintf(out, "%s", dev_name(&vdev->udev->dev));
-+#endif
-
- } else
- out += sprintf(out, "000 000 000 0000000000000000 0-0");
---- a/drivers/head/usbip_common.h
-+++ b/drivers/head/usbip_common.h
-@@ -300,6 +300,7 @@ struct usbip_device;
-
- struct usbip_task {
- struct task_struct *thread;
-+ struct completion thread_started;
- struct completion thread_done;
- char *name;
- void (*loop_ops)(struct usbip_task *);
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=uwsgi-cgi
+PKG_VERSION:=2.0.17.1
+PKG_RELEASE:=5
+
+PKG_SOURCE_URL=https://codeload.github.com/unbit/uwsgi/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=d2318235c74665a60021a4fc7770e9c2756f9fc07de7b8c22805efe85b5ab277
+PKG_BUILD_DIR:=$(BUILD_DIR)/uwsgi-$(PKG_VERSION)
+
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
+
+define Package/uwsgi-cgi
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Web Servers/Proxies
+ TITLE:=The uWSGI server
+ URL:=http://unbit.com/
+ DEPENDS:=+libcap +jansson +libuuid
+endef
+
+define Package/uwsgi-cgi-luci-support
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Web Servers/Proxies
+ TITLE:=Support files for LuCI on Nginx
+ URL:=http://unbit.com/
+ DEPENDS:=+uwsgi-cgi
+endef
+
+define Package/uwsgi-cgi/description
+ The uWSGI project build with cgi profile
+endef
+
+MAKE_VARS+=\
+ CPP=$(TARGET_CROSS)cpp
+
+define Build/Compile
+ $(call Build/Compile/Default,PROFILE=cgi)
+endef
+
+define Package/uwsgi-cgi/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/uwsgi $(1)/usr/sbin/
+endef
+
+define Package/uwsgi-cgi-luci-support/install
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files-luci-support/uwsgi.init $(1)/etc/init.d/uwsgi
+ $(INSTALL_BIN) ./files-luci-support/uwsgi.conf $(1)/etc/uwsgi.conf
+endef
+
+$(eval $(call BuildPackage,uwsgi-cgi))
+$(eval $(call BuildPackage,uwsgi-cgi-luci-support))
--- /dev/null
+[uwsgi]
+strict = true
+socket = /var/run/uwsgi.sock
+cgi-mode = true
+cgi = /www/
+chdir = /usr/lib/lua/luci/
+master = true
+buffer-size = 10000
+reload-mercy = 8
+max-requests = 2000
+limit-as = 200
+reload-on-as = 256
+reload-on-rss = 192
+no-orphans = true
+vacuum = true
+enable-threads = true
+post-buffering = 8192
+socket-timeout = 120
+thunder-lock = true
+logger = syslog:uwsgi
+disable-logging = true
+log-format = %(addr) %(method) %(uri) => generated %(rsize) bytes in %(msecs) msecs
+pidfile = /var/run/uwsgi.pid
+die-on-term = true
+threads = 3
+processes = 3
+chmod-socket = 666
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=79
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/uwsgi --ini /etc/uwsgi.conf
+ procd_set_param file /etc/uwsgi.conf
+ procd_set_param respawn
+ procd_close_instance
+ }
+
--- /dev/null
+--- a/buildconf/base.ini
++++ b/buildconf/base.ini
+@@ -1,9 +1,9 @@
+ [uwsgi]
+-xml = auto
+-yaml = true
+-json = auto
+-ssl = auto
+-pcre = auto
++xml = false
++yaml = embedded
++json = jansson
++ssl = false
++pcre = false
+ routing = auto
+ debug = false
+ unbit = false
--- /dev/null
+--- a/uwsgiconfig.py
++++ b/uwsgiconfig.py
+@@ -851,11 +851,11 @@ class uConf(object):
+ self.cflags.append('-DUWSGI_HAS_EXECINFO')
+ report['execinfo'] = True
+
+- if self.has_include('zlib.h'):
+- self.cflags.append('-DUWSGI_ZLIB')
+- self.libs.append('-lz')
+- self.gcc_list.append('core/zlib')
+- report['zlib'] = True
++# if self.has_include('zlib.h'):
++# self.cflags.append('-DUWSGI_ZLIB')
++# self.libs.append('-lz')
++# self.gcc_list.append('core/zlib')
++ report['zlib'] = False
+
+ if uwsgi_os == 'OpenBSD':
+ try:
--- /dev/null
+--- a/uwsgiconfig.py
++++ b/uwsgiconfig.py
+@@ -680,7 +680,7 @@ class uConf(object):
+ self.include_path += os.environ['UWSGI_INCLUDES'].split(',')
+
+
+- self.cflags = ['-O2', '-I.', '-Wall', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64'] + os.environ.get("CFLAGS", "").split() + self.get('cflags','').split()
++ self.cflags = ['-I.', '-Wall', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64'] + os.environ.get("CFLAGS", "").split() + self.get('cflags','').split()
+
+ report['kernel'] = uwsgi_os
+
--- /dev/null
+--- a/uwsgiconfig.py
++++ b/uwsgiconfig.py
+@@ -5,9 +5,9 @@
+ import os
+ import re
+ import time
+-uwsgi_os = os.uname()[0]
+-uwsgi_os_k = re.split('[-+_]', os.uname()[2])[0]
+-uwsgi_os_v = os.uname()[3]
++uwsgi_os = "Linux"
++uwsgi_os_k = "4.4.0"
++uwsgi_os_v = "Linux"
+ uwsgi_cpu = os.uname()[4]
+
+ import sys
include $(TOPDIR)/rules.mk
PKG_NAME:=vnstat
-PKG_VERSION:=1.17
-PKG_RELEASE:=1
+PKG_VERSION:=1.18
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://humdi.net/vnstat
-PKG_HASH:=18e4c53576ca9e1ef2f0e063a6d83b0c44e3b1cf008560d658745df5c9aa7971
+PKG_HASH:=d7193592b9e7445fa5cbe8af7d3b39982f165ee8fc58041ff41f509b37c687d5
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_INSTALL:=1
START=99
+USE_PROCD=1
+
vnstat_option() {
sed -ne "s/^[[:space:]]*$1[[:space:]]*['\"]\([^'\"]*\)['\"].*/\1/p" \
/etc/vnstat.conf
}
-start() {
+start_service() {
local lib="$(vnstat_option DatabaseDir)"
- local pid="$(vnstat_option PidFile)"
[ -n "$lib" ] || {
echo "Error: No DatabaseDir set in vnstat.conf" >&2
exit 1
}
- [ -n "$pid" ] || {
- echo "Error: No PidFile set in vnstat.conf" >&2
- exit 1
- }
-
mkdir -p "$lib"
init_ifaces() {
config_load vnstat
config_foreach init_ifaces vnstat
- SERVICE_PID_FILE="${pid}"
- service_start /usr/sbin/vnstatd -d
+ procd_open_instance
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_set_param command /usr/sbin/vnstatd --nodaemon
+ procd_set_param file /etc/vnstat.conf
+ procd_set_param respawn
+ procd_close_instance
}
-stop() {
- local pid="$(vnstat_option PidFile)"
-
- [ -n "$pid" ] || {
- echo "Error: No PidFile set in vnstat.conf" >&2
- exit 1
- }
+reload_service() {
+ procd_send_signal vnstat
+}
- SERVICE_PID_FILE="${pid}"
- service_stop /usr/sbin/vnstatd
+service_triggers() {
+ procd_add_reload_trigger vnstat
}
PKG_NAME:=wavemon
PKG_VERSION:=0.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=4199e2ad11a036f4289f5ad42a8b0fe518f2b5ff77447f4c366dbcf3f23e91d5
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/uoaerg/wavemon.git
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/uoaerg/wavemon/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=4199e2ad11a036f4289f5ad42a8b0fe518f2b5ff77447f4c366dbcf3f23e91d5
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ziahamza/webui-aria2
+PKG_MIRROR_HASH:=b6f78aebcb530778b28c681e5573319c0293b349f16978b685d4e8d34076e9bf
PKG_SOURCE_VERSION:=d1ce5b992680f4d03eeee899ed8280cbcab8961a
PKG_LICENSE:=MIT
include $(TOPDIR)/rules.mk
PKG_NAME:=wget
-PKG_VERSION:=1.19.2
+PKG_VERSION:=1.19.5
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=4f4a673b6d466efa50fbfba796bd84a46ae24e370fa562ede5b21ab53c11a920
+PKG_HASH:=b39212abe1a73f2b28f4c6cb223c738559caac91d6e416a6d91d4b9d55c9faee
PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
--disable-rpath \
--disable-iri \
--with-included-libunistring \
- --without-libuuid
+ --without-libuuid \
+ --without-libpsl
CONFIGURE_VARS += \
ac_cv_header_uuid_uuid_h=no
-#
-# Copyright (C) 2014-2017 OpenWrt.org
+
+# Copyright (C) 2018 Jianhui Zhao
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=wifidog-ng
-PKG_VERSION:=1.5.2
+PKG_VERSION:=2.0.0
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_SOURCE_URL=https://github.com/zhaojh329/wifidog-ng.git
-PKG_MIRROR_HASH:=0e8c1196d08f0a91819c3b87457ec55151c80dfc1114d5f8b97b9c3870cfc7c4
-
-PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
+PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/cmake.mk
define Package/wifidog-ng/default
SUBMENU:=Captive Portals
SECTION:=net
CATEGORY:=Network
- TITLE:=Next generation WifiDog
- DEPENDS:=+kmod-wifidog-ng +libuci +libuclient +libblobmsg-json +libubus +libcares \
- +ipset +libpcap
+ TITLE:=Next generation WifiDog implemented in Lua
+ DEPENDS:=+kmod-wifidog-ng +libubox-lua +libuci-lua +libubus-lua \
+ +ipset +dnsmasq-full +luasocket
endef
define Package/wifidog-ng-nossl
define Package/wifidog-ng/default/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config \
- $(1)/etc/wifidog-ng $(1)//etc/hotplug.d/dhcp
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wifidog-ng $(1)/usr/bin
+ $(1)/etc/wifidog-ng $(1)//etc/hotplug.d/dhcp $(1)/usr/lib/lua
+ $(INSTALL_BIN) ./files//wifidog-ng.lua $(1)/usr/bin/wifidog-ng
$(INSTALL_BIN) ./files/wifidog-ng.init $(1)/etc/init.d/wifidog-ng
$(INSTALL_CONF) ./files/wifidog-ng.config $(1)/etc/config/wifidog-ng
- $(INSTALL_CONF) ./files/wifidog-ng.key $(1)/etc/wifidog-ng
- $(INSTALL_CONF) ./files/wifidog-ng.crt $(1)/etc/wifidog-ng
+ $(INSTALL_CONF) ./files/ssl.key $(1)/etc/wifidog-ng
+ $(INSTALL_CONF) ./files/ssl.crt $(1)/etc/wifidog-ng
$(INSTALL_DATA) ./files/wifidog-ng.hotplug $(1)/etc/hotplug.d/dhcp/00-wifidog-ng
+ $(CP) ./files/wifidog-ng $(1)/usr/lib/lua
endef
Package/wifidog-ng-nossl/install = $(Package/wifidog-ng/default/install)
SUBMENU:=Other modules
TITLE:=Kernel module for wifidog-ng
DEPENDS:=+kmod-nf-nat +kmod-ipt-ipset
- FILES:=$(PKG_BUILD_DIR)/kmod/wifidog-ng.ko
+ FILES:=$(PKG_BUILD_DIR)/wifidog-ng.ko
endef
include $(INCLUDE_DIR)/kernel-defaults.mk
define Build/Compile
- $(call Build/Compile/Default)
- $(MAKE) $(KERNEL_MAKEOPTS) SUBDIRS="$(PKG_BUILD_DIR)"/kmod modules
+ $(MAKE) $(KERNEL_MAKEOPTS) SUBDIRS="$(PKG_BUILD_DIR)" modules
endef
$(eval $(call BuildPackage,wifidog-ng-nossl))
--- /dev/null
+-----BEGIN CERTIFICATE-----
+MIID8TCCAtmgAwIBAgICCCUwDQYJKoZIhvcNAQELBQAwczELMAkGA1UEBhMCQ04x
+EDAOBgNVBAgMB1RpYW5qaW4xEDAOBgNVBAcMB1RpYW5qaW4xFTATBgNVBAoMDENI
+SU5BU1NMIEluYzEpMCcGA1UEAwwgQ0hJTkFTU0wgQ2VydGlmaWNhdGlvbiBBdXRo
+b3JpdHkwHhcNMTgwMzAzMTQyODQ2WhcNMTkwMzAzMTQyODQ2WjCBgzELMAkGA1UE
+BhMCQ04xEDAOBgNVBAgMB3NpY2h1YW4xEjAQBgNVBAoMCXpoYW9qaDMyOTETMBEG
+A1UECwwKd2lmaWRvZy1uZzEQMA4GA1UEAwwHd2lmaWRvZzEnMCUGCSqGSIb3DQEJ
+ARYYamlhbmh1aXpoYW8zMjlAZ21haWwuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEAyD8gd3XIJvkYeySP2q0toYsfvhlA+lceUPiMi16U1nR3TD5U
+uTNGsvYBDMiR7vG0NKClFT73u/d8HBcYcTBgbhHfBkz4v9S5aMdUYQsUMQEITBdE
+hPEeXVqqj796Lu6iEkNUFrtam2h3t+kYODjbszk2woBtohaRWfNyOB/AJH6Stv4l
+jkPYwt9NHcKQSm9kjcGsAqQwkgVd4UfHX2G20gaTijimeHlJL2wv61uLBUvYux0E
++98KIcEIYu3BVAfoO2Omg/o73cwH+sFTswEXPuXirwrOzmJ850WBLScLkSKSATrY
+1YdU6CRaJuP/POFfSqAhn/mPRNQFU5fAaDcfEwIDAQABo34wfDAJBgNVHRMEAjAA
+MC8GCWCGSAGG+EIBDQQiFiBDSElOQVNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
+eTAdBgNVHQ4EFgQU9XS4dW6j1r1lEOIHWkoJx3zSqqgwHwYDVR0jBBgwFoAUXB8j
++sjhITHC2Df2iPzSb8JUQzMwDQYJKoZIhvcNAQELBQADggEBAFsaq5qehwp0zMqY
+cb0IX5/f4ZnscX587SM/NhORODa0p/bT3EwG3grtljHhRW+s/4c4gPgilrzV0Fxn
+Y5FodLfFdbNVjhgeSrDCRmwIvKSe81LYOe+rbfTBF0g3YYWDwcwc8tFvcwWBxqWn
+4F+u9aIKgHU7HXQokqCxEOTFjrAHVJf1OqtRMTXlBBb6ypVdHn0glfSxOIC/Vp2T
+5UR7oVdD4E8ASqe7Q7MmTeY377CRagfd0WD9XK7o+cbKkLLW1QWc8ht1rHjGp+/2
+gmkxEmpX2Xhpv1FX/b6sj1dTmOc2bXBzpvV6yonRMu5dYsOrdDwbH/T05X+hCFW9
+G86ZLFY=
+-----END CERTIFICATE-----
--- /dev/null
+-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDIPyB3dcgm+Rh7
+JI/arS2hix++GUD6Vx5Q+IyLXpTWdHdMPlS5M0ay9gEMyJHu8bQ0oKUVPve793wc
+FxhxMGBuEd8GTPi/1Llox1RhCxQxAQhMF0SE8R5dWqqPv3ou7qISQ1QWu1qbaHe3
+6Rg4ONuzOTbCgG2iFpFZ83I4H8AkfpK2/iWOQ9jC300dwpBKb2SNwawCpDCSBV3h
+R8dfYbbSBpOKOKZ4eUkvbC/rW4sFS9i7HQT73wohwQhi7cFUB+g7Y6aD+jvdzAf6
+wVOzARc+5eKvCs7OYnznRYEtJwuRIpIBOtjVh1ToJFom4/884V9KoCGf+Y9E1AVT
+l8BoNx8TAgMBAAECggEAK/JmvrDzt1HtxIDWrWhaXly5H7BNKWPbPGv/9EpSoeo3
+kF0RnP+a4YXJ3zNZi7YyFWa4NDx4hCEhdMzAyX6TezSi3LAh23/lHRC5/P5AdSzD
+1Gc6225LerN+QUQFna0zlox+NOrzTK4VsCAQ963K0b+ZvAARj4QibDpYc+bL9XYK
+fVrZSnGJhNY3S6YjTF4oyMejKxk+HPhgCVEcZCHiC0RmXVqfETe6Cu0UtDPTTK5Q
+IXYYZ0HLsqaGWwGCWm/ji6HjNCG1dUhUp/yZR+7X45Utok3Rd3wo0kxZGJ7LHH4N
+541qcFbaT3rX39uPypuK5dSc5lb98FAOl79jL/wnUQKBgQDjEycf6VKZYf8d/MMV
+4+0YrFV7sdi0k4TC+lFmfJZVFHqcPn99q3cO2b9npgLDpQpwpcyBGMh6hWufVXXA
+ctrxg8vjKBHG8MT70Lulvi+G3Fldw7EHVVQGEHRqPaSzA035JyVanDs6lgoqjj9b
+BuMQidIeaj2t28pEhc0rYstW6wKBgQDhwRzoCirKrtJDWclDkjbzkGUfoAKMz2p2
+mSAs2xCdrx8vtFzUXcCLsvlXa+hIEe4O5cUZg+WLPfXiV4gtF74PTkmYADXRTUBl
+dHzfjVWQINEYFsWOEP5eYB0VWiA52JUaCuHuHILt6CSy3h8xPtnq+/oEFTeqh/2C
+XoN+seKeeQKBgQDUE1c/HpLeXf/+6crp7u3JVWqhFADo5b3gvBi6NzHQVEgPFO/N
+Vw7i98sj6pA6WTHe83qEN7lFdMaHETHgg2SonAcYKJwxyTywUspuiampsrJkOBhm
+WPMYltWjQ99GsZdpU343miJXHTpxdFkHku8OyylK7r6cWeIXDUAJfUOb8QKBgFbk
+ZoTljOzwdxvXTkFE4QPEmzed9f1OxHKbo6fANdgLlJxe9rAC2d6rZ49/iCtdQ1zW
+kZOtkceTdLXG7TI2BkCL6IWp5w0Fh/jE6l99XeaYywJTmXyCC/Y1VlxmkSrSsykP
+8UAeF0MM7DswhZ8FywjILcYuiHuJ1ki8qi40t745AoGAT/5imiro59cHMbbGEQb+
+42oBY7RxeHkk6+8WTJA6kqv8tuOK3gvDFm5cRJVCduVF/Jf+276IMoTMEb8kBGQA
+R3CRsYwLPrpdWu2q9Ho1KtH+azt/d+3uglT9g3fhvFieNIwkRgaNNJQC6wmddDeG
+MEYv4HO1LykipsDVsFadVCk=
+-----END PRIVATE KEY-----
config gateway
option enabled 1
- option ifname 'br-lan'
+ option interface 'lan'
option port 2060
+ option dhcp_host_white 1
option ssl_port 8443
option checkinterval 30
option client_timeout 5
option temppass_time 30
-config authserver
+config server
option host 'authserver.com'
option port 80
option ssl 0
option portal_path 'portal'
option msg_path 'gw_message.php'
option ping_path 'ping'
- option auth_path 'auth'
-
-config popularserver
- list server www.baidu.com
- list server www.qq.com
-
-config whitelist
+ option auth_path 'auth'
\ No newline at end of file
+++ /dev/null
------BEGIN CERTIFICATE-----
-MIID8TCCAtmgAwIBAgICCCUwDQYJKoZIhvcNAQELBQAwczELMAkGA1UEBhMCQ04x
-EDAOBgNVBAgMB1RpYW5qaW4xEDAOBgNVBAcMB1RpYW5qaW4xFTATBgNVBAoMDENI
-SU5BU1NMIEluYzEpMCcGA1UEAwwgQ0hJTkFTU0wgQ2VydGlmaWNhdGlvbiBBdXRo
-b3JpdHkwHhcNMTgwMzAzMTQyODQ2WhcNMTkwMzAzMTQyODQ2WjCBgzELMAkGA1UE
-BhMCQ04xEDAOBgNVBAgMB3NpY2h1YW4xEjAQBgNVBAoMCXpoYW9qaDMyOTETMBEG
-A1UECwwKd2lmaWRvZy1uZzEQMA4GA1UEAwwHd2lmaWRvZzEnMCUGCSqGSIb3DQEJ
-ARYYamlhbmh1aXpoYW8zMjlAZ21haWwuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOC
-AQ8AMIIBCgKCAQEAyD8gd3XIJvkYeySP2q0toYsfvhlA+lceUPiMi16U1nR3TD5U
-uTNGsvYBDMiR7vG0NKClFT73u/d8HBcYcTBgbhHfBkz4v9S5aMdUYQsUMQEITBdE
-hPEeXVqqj796Lu6iEkNUFrtam2h3t+kYODjbszk2woBtohaRWfNyOB/AJH6Stv4l
-jkPYwt9NHcKQSm9kjcGsAqQwkgVd4UfHX2G20gaTijimeHlJL2wv61uLBUvYux0E
-+98KIcEIYu3BVAfoO2Omg/o73cwH+sFTswEXPuXirwrOzmJ850WBLScLkSKSATrY
-1YdU6CRaJuP/POFfSqAhn/mPRNQFU5fAaDcfEwIDAQABo34wfDAJBgNVHRMEAjAA
-MC8GCWCGSAGG+EIBDQQiFiBDSElOQVNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
-eTAdBgNVHQ4EFgQU9XS4dW6j1r1lEOIHWkoJx3zSqqgwHwYDVR0jBBgwFoAUXB8j
-+sjhITHC2Df2iPzSb8JUQzMwDQYJKoZIhvcNAQELBQADggEBAFsaq5qehwp0zMqY
-cb0IX5/f4ZnscX587SM/NhORODa0p/bT3EwG3grtljHhRW+s/4c4gPgilrzV0Fxn
-Y5FodLfFdbNVjhgeSrDCRmwIvKSe81LYOe+rbfTBF0g3YYWDwcwc8tFvcwWBxqWn
-4F+u9aIKgHU7HXQokqCxEOTFjrAHVJf1OqtRMTXlBBb6ypVdHn0glfSxOIC/Vp2T
-5UR7oVdD4E8ASqe7Q7MmTeY377CRagfd0WD9XK7o+cbKkLLW1QWc8ht1rHjGp+/2
-gmkxEmpX2Xhpv1FX/b6sj1dTmOc2bXBzpvV6yonRMu5dYsOrdDwbH/T05X+hCFW9
-G86ZLFY=
------END CERTIFICATE-----
BIN=/usr/bin/wifidog-ng
-parse_whitelist_mac() {
+dhcp_host_white=1
+
+start_wifidog() {
+ local cfg="$1"
+ local enabled interface
+
+ uci_validate_section wifidog-ng gateway "${1}" \
+ 'enabled:bool:0' \
+ 'interface:uci("network", "@interface"):lan' \
+ 'dhcp_host_white:bool:1'
+
+ [ $? -ne 0 ] && {
+ echo "validation gateway failed" >&2
+ exit 1
+ }
+
+ [ $enabled -eq 1 ] || exit 0
+
+ # timeout = 49 days
+ ipset -! create wifidog-ng-mac hash:mac timeout 4294967
+ ipset -! create wifidog-ng-ip hash:ip
+
+ modprobe wifidog-ng
+ echo "enabled=1" > /proc/wifidog-ng/config
+
+ procd_open_instance
+ procd_set_param command $BIN
+ procd_set_param respawn
+ procd_close_instance
+}
+
+parse_server() {
local cfg="$1"
- local mac
+ local host
- uci_validate_section wifidog-ng whitelist "${1}" \
+ config_get host $cfg host
+ validate_data ip4addr "$host" 2> /dev/null
+ if [ $? -eq 0 ];
+ then
+ ipset add wifidog-ng-ip $host
+ else
+ echo "ipset=/$host/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
+ fi
+}
+
+parse_validated_user() {
+ local cfg="$1"
+ local mac ip
+
+ uci_validate_section wifidog-ng validated_user "${1}" \
'mac:macaddr'
[ $? -ne 0 ] && {
- echo "validation whitelist_mac failed" >&2
+ echo "validation validated_user failed" >&2
exit 1
}
+
+ [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
}
-parse_whitelist_domain() {
+parse_validated_domain() {
local cfg="$1"
local domain
- uci_validate_section wifidog-ng whitelist "${1}" \
+ uci_validate_section wifidog-ng validated_domain "${1}" \
'domain:host'
[ $? -ne 0 ] && {
- echo "validation whitelist_domain failed" >&2
+ echo "validation validated_domain failed" >&2
exit 1
}
+
+ [ -n "$domain" ] && echo "ipset=/$domain/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
}
-start_service() {
- modprobe wifidog-ng
+parse_dhcp_host() {
+ local cfg="$1"
+ local mac ip
+
+ uci_validate_section dhcp host "${1}" \
+ 'mac:macaddr'
+
+ [ $? -ne 0 ] && {
+ echo "validation validated dhcp host failed" >&2
+ exit 1
+ }
+
+ [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
+}
+start_service() {
config_load wifidog-ng
- config_foreach parse_whitelist_mac whitelist_mac
- config_foreach parse_whitelist_domain whitelist_domain
+ config_foreach start_wifidog gateway
- procd_open_instance
- procd_set_param command $BIN
- procd_set_param respawn
- procd_close_instance
+ echo -n > /tmp/dnsmasq.d/wifidog-ng
+
+ config_foreach parse_server server
+ config_foreach parse_validated_user validated_user
+ config_foreach parse_validated_domain validated_domain
+
+ [ $dhcp_host_white -eq 1 ] && {
+ config_load dhcp
+ config_foreach parse_dhcp_host host
+ }
+
+ /etc/init.d/dnsmasq restart &
}
stop_service() {
rmmod wifidog-ng
+
+ ipset destroy wifidog-ng-mac
+ ipset destroy wifidog-ng-ip
}
+++ /dev/null
------BEGIN PRIVATE KEY-----
-MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDIPyB3dcgm+Rh7
-JI/arS2hix++GUD6Vx5Q+IyLXpTWdHdMPlS5M0ay9gEMyJHu8bQ0oKUVPve793wc
-FxhxMGBuEd8GTPi/1Llox1RhCxQxAQhMF0SE8R5dWqqPv3ou7qISQ1QWu1qbaHe3
-6Rg4ONuzOTbCgG2iFpFZ83I4H8AkfpK2/iWOQ9jC300dwpBKb2SNwawCpDCSBV3h
-R8dfYbbSBpOKOKZ4eUkvbC/rW4sFS9i7HQT73wohwQhi7cFUB+g7Y6aD+jvdzAf6
-wVOzARc+5eKvCs7OYnznRYEtJwuRIpIBOtjVh1ToJFom4/884V9KoCGf+Y9E1AVT
-l8BoNx8TAgMBAAECggEAK/JmvrDzt1HtxIDWrWhaXly5H7BNKWPbPGv/9EpSoeo3
-kF0RnP+a4YXJ3zNZi7YyFWa4NDx4hCEhdMzAyX6TezSi3LAh23/lHRC5/P5AdSzD
-1Gc6225LerN+QUQFna0zlox+NOrzTK4VsCAQ963K0b+ZvAARj4QibDpYc+bL9XYK
-fVrZSnGJhNY3S6YjTF4oyMejKxk+HPhgCVEcZCHiC0RmXVqfETe6Cu0UtDPTTK5Q
-IXYYZ0HLsqaGWwGCWm/ji6HjNCG1dUhUp/yZR+7X45Utok3Rd3wo0kxZGJ7LHH4N
-541qcFbaT3rX39uPypuK5dSc5lb98FAOl79jL/wnUQKBgQDjEycf6VKZYf8d/MMV
-4+0YrFV7sdi0k4TC+lFmfJZVFHqcPn99q3cO2b9npgLDpQpwpcyBGMh6hWufVXXA
-ctrxg8vjKBHG8MT70Lulvi+G3Fldw7EHVVQGEHRqPaSzA035JyVanDs6lgoqjj9b
-BuMQidIeaj2t28pEhc0rYstW6wKBgQDhwRzoCirKrtJDWclDkjbzkGUfoAKMz2p2
-mSAs2xCdrx8vtFzUXcCLsvlXa+hIEe4O5cUZg+WLPfXiV4gtF74PTkmYADXRTUBl
-dHzfjVWQINEYFsWOEP5eYB0VWiA52JUaCuHuHILt6CSy3h8xPtnq+/oEFTeqh/2C
-XoN+seKeeQKBgQDUE1c/HpLeXf/+6crp7u3JVWqhFADo5b3gvBi6NzHQVEgPFO/N
-Vw7i98sj6pA6WTHe83qEN7lFdMaHETHgg2SonAcYKJwxyTywUspuiampsrJkOBhm
-WPMYltWjQ99GsZdpU343miJXHTpxdFkHku8OyylK7r6cWeIXDUAJfUOb8QKBgFbk
-ZoTljOzwdxvXTkFE4QPEmzed9f1OxHKbo6fANdgLlJxe9rAC2d6rZ49/iCtdQ1zW
-kZOtkceTdLXG7TI2BkCL6IWp5w0Fh/jE6l99XeaYywJTmXyCC/Y1VlxmkSrSsykP
-8UAeF0MM7DswhZ8FywjILcYuiHuJ1ki8qi40t745AoGAT/5imiro59cHMbbGEQb+
-42oBY7RxeHkk6+8WTJA6kqv8tuOK3gvDFm5cRJVCduVF/Jf+276IMoTMEb8kBGQA
-R3CRsYwLPrpdWu2q9Ho1KtH+azt/d+3uglT9g3fhvFieNIwkRgaNNJQC6wmddDeG
-MEYv4HO1LykipsDVsFadVCk=
------END PRIVATE KEY-----
--- /dev/null
+#!/usr/bin/env lua
+
+--[[
+ Copyright (C) 2018 Jianhui Zhao <jianhuizhao329@gmail.com>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ USA
+ --]]
+
+local uloop = require "uloop"
+local uh = require "uhttpd"
+local auth = require "wifidog-ng.auth"
+local ubus = require "wifidog-ng.ubus"
+local version = require "wifidog-ng.version"
+local heartbeat = require "wifidog-ng.heartbeat"
+
+uh.log(uh.LOG_INFO, "Version: " .. version.string())
+
+uloop.init()
+
+ubus.init()
+auth.init()
+heartbeat.start()
+
+uloop.run()
--- /dev/null
+--[[
+ Copyright (C) 2018 Jianhui Zhao <jianhuizhao329@gmail.com>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ USA
+ --]]
+
+local uh = require "uhttpd"
+local http = require "socket.http"
+local util = require "wifidog-ng.util"
+local config = require "wifidog-ng.config"
+
+local M = {}
+
+local apple_host = {
+ ["captive.apple.com"] = true,
+ ["www.apple.com"] = true,
+}
+
+local terms = {}
+
+local function is_authed_user(mac)
+ local r = os.execute("ipset test wifidog-ng-mac " .. mac .. " 2> /dev/null")
+ return r == 0
+end
+
+local function allow_user(mac, temppass)
+ if not temppass then
+ terms[mac].authed = true
+ os.execute("ipset add wifidog-ng-mac " .. mac)
+ else
+ local cfg = config.get()
+ os.execute("ipset add wifidog-ng-mac " .. mac .. " timeout " .. cfg.temppass_time)
+ end
+end
+
+local function deny_user(mac)
+ os.execute("ipset del wifidog-ng-mac " .. mac)
+end
+
+function M.get_terms()
+ local r = {}
+ for k, v in pairs(terms) do
+ if v.authed then
+ r[k] = {ip = v.ip}
+ end
+ end
+
+ return r
+end
+
+function M.new_term(ip, mac, token)
+ terms[mac] = {ip = ip, token = token}
+ if token then
+ terms[mac].authed = true
+ allow_user(mac)
+ end
+end
+
+local function http_callback_auth(cl)
+ local cfg = config.get()
+ local token = cl:get_var("token")
+ local ip = cl:get_remote_addr()
+ local mac = util.arp_get(cfg.gw_ifname, ip)
+
+ if not mac then
+ uh.log(uh.LOG_ERR, "Not found macaddr for " .. ip)
+ cl:send_error(401, "Unauthorized", "Not found your macaddr")
+ return uh.REQUEST_DONE
+ end
+
+ if token and #token > 0 then
+ if cl:get_var("logout") then
+ local url = string.format("%s&stage=logout&ip=%s&mac=%s&token=%s", cfg.auth_url, ip, mac, token)
+ http.request(url)
+ deny_user(mac)
+ else
+ local url = string.format("%s&stage=login&ip=%s&mac=%s&token=%s", cfg.auth_url, ip, mac, token)
+ local r = http.request(url)
+
+ if not r then
+ cl:send_error(401, "Unauthorized")
+ return uh.REQUEST_DONE
+ end
+
+ local auth = r:match("Auth: (%d)")
+ if auth == "1" then
+ allow_user(mac)
+ cl:redirect(302, string.format("%s&mac=%s", cfg.portal_url, mac))
+ else
+ cl:redirect(302, string.format("%s&mac=%s", cfg.msg_url, mac))
+ return uh.REQUEST_DONE
+ end
+ end
+ else
+ cl:send_error(401, "Unauthorized")
+ return uh.REQUEST_DONE
+ end
+end
+
+local function http_callback_temppass(cl)
+ local cfg = config.get()
+ local ip = cl:get_remote_addr()
+ local mac = util.arp_get(cfg.gw_ifname, ip)
+
+ if not mac then
+ uh.log(uh.LOG_ERR, "Not found macaddr for " .. ip)
+ cl:send_error(401, "Unauthorized", "Not found your macaddr")
+ return uh.REQUEST_DONE
+ end
+
+ local script = cl:get_var("script") or ""
+
+ cl:send_header(200, "OK", -1)
+ cl:header_end()
+ allow_user(mac, true)
+ cl:chunk_send(cl:get_var("script") or "");
+ cl:request_done()
+
+ return uh.REQUEST_DONE
+end
+
+local function http_callback_404(cl, path)
+ local cfg = config.get()
+
+ if cl:get_http_method() ~= uh.HTTP_METHOD_GET then
+ cl:send_error(401, "Unauthorized")
+ return uh.REQUEST_DONE
+ end
+
+ local ip = cl:get_remote_addr()
+ local mac = util.arp_get(cfg.gw_ifname, ip)
+ if not mac then
+ uh.log(uh.LOG_ERR, "Not found macaddr for " .. ip)
+ cl:send_error(401, "Unauthorized", "Not found your macaddr")
+ return uh.REQUEST_DONE
+ end
+
+ term = terms[mac]
+ if not term then
+ terms[mac] = {ip = ip}
+ end
+
+ term = terms[mac]
+
+ if is_authed_user(mac) then
+ cl:redirect(302, "%s&mac=%s", cfg.portal_url, mac)
+ return uh.REQUEST_DONE
+ end
+
+ cl:send_header(200, "OK", -1)
+ cl:header_end()
+
+ local header_host = cl:get_header("host")
+ if apple_host[header_host] then
+ local http_ver = cl:get_http_version()
+ if http_ver == uh.HTTP_VER_10 then
+ if not term.apple then
+ cl:chunk_send("fuck you")
+ term.apple = true
+ cl:request_done()
+ return uh.REQUEST_DONE
+ end
+ end
+ end
+
+ local redirect_html = [[
+ <!doctype html><html><head><title>Success</title>
+ <script type="text/javascript">
+ setTimeout(function() {location.replace('%s&ip=%s&mac=%s');}, 1);</script>
+ <style type="text/css">body {color:#FFF}</style></head>
+ <body>Success</body></html>
+ ]]
+
+ cl:chunk_send(string.format(redirect_html, cfg.login_url, ip, mac))
+ cl:request_done()
+
+ return uh.REQUEST_DONE
+end
+
+local function on_request(cl, path)
+ if path == "/wifidog/auth" then
+ return http_callback_auth(cl)
+ elseif path == "/wifidog/temppass" then
+ return http_callback_temppass(cl)
+ end
+
+ return uh.REQUEST_CONTINUE
+end
+
+function M.init()
+ local cfg = config.get()
+
+ local srv = uh.new(cfg.gw_address, cfg.gw_port)
+
+ srv:on_request(on_request)
+ srv:on_error404(http_callback_404)
+
+ if uh.SSL_SUPPORTED then
+ local srv_ssl = uh.new(cfg.gw_address, cfg.gw_ssl_port)
+
+ srv_ssl:ssl_init("/etc/wifidog-ng/ssl.crt", "/etc/wifidog-ng/ssl.key")
+
+ srv_ssl:on_request(on_request)
+ srv_ssl:on_error404(http_callback_404)
+ end
+end
+
+return M
--- /dev/null
+--[[
+ Copyright (C) 2018 Jianhui Zhao <jianhuizhao329@gmail.com>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ USA
+ --]]
+
+local uci = require "uci"
+local util = require "wifidog-ng.util"
+
+local M = {}
+
+local cfg = {}
+
+function M.parse()
+ local c = uci.cursor()
+
+ c:foreach('wifidog-ng', 'gateway', function(s)
+ local port = s.port or 2060
+ local ssl_port = s.ssl_port or 8443
+ local interface = s.interface or "lan"
+ local checkinterval = s.checkinterval or 30
+ local client_timeout = s.client_timeout or 5
+ local temppass_time = s.temppass_time or 30
+ local id = s.id
+ local address = s.address
+
+ cfg.gw_port = tonumber(port)
+ cfg.gw_ssl_port = tonumber(ssl_port)
+ cfg.checkinterval = tonumber(checkinterval)
+ cfg.client_timeout = tonumber(client_timeout)
+ cfg.temppass_time = tonumber(temppass_time)
+ cfg.gw_address = s.address
+ cfg.gw_id = s.id
+
+ local st = util.ubus("network.interface." .. interface, "status")
+ cfg.gw_ifname = st.device
+
+ if not cfg.gw_address then
+ cfg.gw_address = st["ipv4-address"][1].address
+ end
+
+ if not cfg.gw_id then
+ local devst = util.ubus("network.device", "status", {name = st.device})
+ local macaddr = devst.macaddr
+ cfg.gw_id = macaddr:gsub(":", ""):upper()
+ end
+ end)
+
+ c:foreach('wifidog-ng', 'server', function(s)
+ local host = s.host
+ local path = s.path or "/wifidog/"
+ local gw_port = cfg.gw_port
+ local gw_id = cfg.gw_id
+ local gw_address = cfg.gw_address
+ local ssid = cfg.ssid or ""
+ local proto, port = "http", ""
+
+
+ if s.port ~= "80" and s.port ~= "443" then
+ port = ":" .. s.port
+ end
+
+ if s.ssl == "1" then
+ proto = "https"
+ end
+
+ cfg.login_url = string.format("%s://%s%s%s%s?gw_address=%s&gw_port=%d&gw_id=%s&ssid=%s",
+ proto, host, port, path, s.login_path, gw_address, gw_port, gw_id, ssid)
+
+ cfg.auth_url = string.format("%s://%s%s%s%s?gw_id=%s",
+ proto, host, port, path, s.auth_path, gw_id)
+
+ cfg.ping_url = string.format("%s://%s%s%s%s?gw_id=%s",
+ proto, host, port, path, s.ping_path, gw_id)
+
+ cfg.portal_url = string.format("%s://%s%s%s%s?gw_id=%s",
+ proto, host, port, path, s.portal_path, gw_id)
+
+ cfg.msg_url = string.format("%s://%s%s%s%s?gw_id=%s",
+ proto, host, port, path, s.msg_path, gw_id)
+ end)
+
+ cfg.parsed = true
+end
+
+function M.get()
+ if not cfg.parsed then
+ M.parse()
+ end
+
+ return cfg
+end
+
+function M.add_whitelist(typ, value)
+ local c = uci.cursor()
+ local opt
+
+ if typ == "mac" then
+ typ = "validated_user"
+ opt = "mac"
+ elseif typ == "domain" then
+ typ = "validated_domain"
+ opt = "domain"
+ else
+ return
+ end
+
+ local exist = false
+ c:foreach("wifidog-ng", typ, function(s)
+ if s[opt] == value then
+ exist = true
+ end
+ end)
+
+ if not exist then
+ local s = c:add("wifidog-ng", typ)
+ c:set("wifidog-ng", s, opt, value)
+ c:commit("wifidog-ng")
+ end
+end
+
+function M.del_whitelist(typ, value)
+ local c = uci.cursor()
+ local opt
+
+ if typ == "mac" then
+ typ = "validated_user"
+ opt = "mac"
+ elseif typ == "domain" then
+ typ = "validated_domain"
+ opt = "domain"
+ else
+ return
+ end
+
+ c:foreach("wifidog-ng", typ, function(s)
+ if s[opt] == value then
+ c:delete("wifidog-ng", s[".name"])
+ end
+ end)
+
+ c:commit("wifidog-ng")
+end
+
+return M
--- /dev/null
+--[[
+ Copyright (C) 2018 Jianhui Zhao <jianhuizhao329@gmail.com>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ USA
+ --]]
+
+local uloop = require "uloop"
+local http = require "socket.http"
+local util = require "wifidog-ng.util"
+local config = require "wifidog-ng.config"
+
+local M = {}
+
+local timer = nil
+local start_time = os.time()
+
+local function heartbeat()
+ local cfg = config.get()
+
+ timer:set(1000 * cfg.checkinterval)
+
+ local sysinfo = util.ubus("system", "info")
+
+ local url = string.format("%s&sys_uptime=%d&sys_memfree=%d&sys_load=%d&wifidog_uptime=%d",
+ cfg.ping_url, sysinfo.uptime, sysinfo.memory.free, sysinfo.load[1], os.time() - start_time)
+ http.request(url)
+end
+
+function M.start()
+ timer = uloop.timer(heartbeat, 1000)
+end
+
+return M
--- /dev/null
+--[[
+ Copyright (C) 2018 Jianhui Zhao <jianhuizhao329@gmail.com>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ USA
+ --]]
+
+local uci = require "uci"
+local ubus = require "ubus"
+local http = require "socket.http"
+local auth = require "wifidog-ng.auth"
+local config = require "wifidog-ng.config"
+
+
+local M = {}
+
+local conn = nil
+
+local ubus_codes = {
+ ["INVALID_COMMAND"] = 1,
+ ["INVALID_ARGUMENT"] = 2,
+ ["METHOD_NOT_FOUND"] = 3,
+ ["NOT_FOUND"] = 4,
+ ["NO_DATA"] = 5,
+ ["PERMISSION_DENIED"] = 6,
+ ["TIMEOUT"] = 7,
+ ["NOT_SUPPORTED"] = 8,
+ ["UNKNOWN_ERROR"] = 9,
+ ["CONNECTION_FAILED"] = 10
+}
+
+local function reload_validated_domain()
+ local c = uci.cursor()
+
+ local file = io.open("/tmp/dnsmasq.d/wifidog-ng", "w")
+
+ c:foreach("wifidog-ng", "validated_domain", function(s)
+ file:write("ipset=/" .. s.domain .. "/wifidog-ng-ip\n")
+ end)
+ file:close()
+
+ os.execute("/etc/init.d/dnsmasq restart &")
+end
+
+local methods = {
+ ["wifidog-ng"] = {
+ roam = {
+ function(req, msg)
+ local cfg = config.get()
+
+ if not msg.ip or not msg.mac then
+ return ubus_codes["INVALID_ARGUMENT"]
+ end
+
+ local url = string.format("%s&stage=roam&ip=%s&mac=%s", cfg.auth_url, msg.ip, msg.mac)
+ local r = http.request(url) or ""
+ local token = r:match("token=(%w+)")
+ if token then
+ auth.new_term(msg.ip, msg.mac, token)
+ end
+ end, {ip = ubus.STRING, mac = ubus.STRING }
+ },
+ term = {
+ function(req, msg)
+ if msg.action == "show" then
+ conn:reply(req, {terms = auth.get_terms()});
+ return
+ end
+
+ if not msg.action or not msg.mac then
+ return ubus_codes["INVALID_ARGUMENT"]
+ end
+
+ if msg.action == "add" then
+ auth.allow_user(mac)
+ elseif msg.action == "del" then
+ auth.deny_user(mac)
+ end
+ end, {action = ubus.STRING, mac = ubus.STRING }
+ },
+ whitelist = {
+ function(req, msg)
+ if not msg.action or not msg.type or not msg.value then
+ return ubus_codes["INVALID_ARGUMENT"]
+ end
+
+ if msg.action == "add" then
+ config.add_whitelist(msg.type, msg.value)
+ if msg.type == "mac" then
+ auth.allow_user(msg.value)
+ end
+ elseif msg.action == "del" then
+ config.del_whitelist(msg.type, msg.value)
+ if msg.type == "mac" then
+ auth.deny_user(msg.value)
+ end
+ end
+
+ if msg.type == "domain" then
+ reload_validated_domain()
+ end
+ end, {action = ubus.STRING, type = ubus.STRING, value = ubus.STRING }
+ },
+ }
+}
+
+function M.init()
+ conn = ubus.connect()
+ if not conn then
+ error("Failed to connect to ubus")
+ end
+
+ conn:add(methods)
+end
+
+return M
--- /dev/null
+--[[
+ Copyright (C) 2018 Jianhui Zhao <jianhuizhao329@gmail.com>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ USA
+ --]]
+
+local _ubus = require "ubus"
+local _ubus_connection = nil
+
+local M = {}
+
+function M.arp_get(ifname, ipaddr)
+ for l in io.lines("/proc/net/arp") do
+ local f = {}
+
+ for e in string.gmatch(l, "%S+") do
+ f[#f + 1] = e
+ end
+
+ if f[1] == ipaddr and f[6] == ifname then
+ return f[4]
+ end
+ end
+end
+
+function M.read_file(path, len)
+ local file = io.open(path, "r")
+ if not file then return nil end
+
+ if not len then len = "*a" end
+
+ local data = file:read(len)
+ file:close()
+
+ return data
+end
+
+local ubus_codes = {
+ "INVALID_COMMAND",
+ "INVALID_ARGUMENT",
+ "METHOD_NOT_FOUND",
+ "NOT_FOUND",
+ "NO_DATA",
+ "PERMISSION_DENIED",
+ "TIMEOUT",
+ "NOT_SUPPORTED",
+ "UNKNOWN_ERROR",
+ "CONNECTION_FAILED"
+}
+
+function M.ubus(object, method, data)
+ if not _ubus_connection then
+ _ubus_connection = _ubus.connect()
+ assert(_ubus_connection, "Unable to establish ubus connection")
+ end
+
+ if object and method then
+ if type(data) ~= "table" then
+ data = { }
+ end
+ local rv, err = _ubus_connection:call(object, method, data)
+ return rv, err, ubus_codes[err]
+ elseif object then
+ return _ubus_connection:signatures(object)
+ else
+ return _ubus_connection:objects()
+ end
+end
+
+return M
--- /dev/null
+--[[
+ Copyright (C) 2018 Jianhui Zhao <jianhuizhao329@gmail.com>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ USA
+ --]]
+
+local M = {
+ MAJOR = 2,
+ MINOR = 0,
+ PATCH = 0
+}
+
+function M.string()
+ return string.format("%d.%d.%d", M.MAJOR, M.MINOR, M.PATCH)
+end
+
+return M
--- /dev/null
+ifeq ($(findstring openwrt, $(CC)),)
+ifneq ($(KERNELRELEASE),)
+ wifidog-ng-objs := main.o config.o
+ obj-m := wifidog-ng.o
+else
+ KDIR = /lib/modules/$(shell uname -r)/build
+
+all:
+ make -C $(KDIR) M=$(PWD) modules
+
+clean:
+ rm -rf *.o *.ko *.mod.c Module.* modules.* .*.cmd .tmp*
+
+endif
+else
+ wifidog-ng-objs := main.o config.o
+ obj-m := wifidog-ng.o
+endif
--- /dev/null
+/*
+ * Copyright (C) 2017 jianhui zhao <jianhuizhao329@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/uaccess.h>
+#include <linux/inetdevice.h>
+#include <linux/seq_file.h>
+
+#include "config.h"
+
+static struct proc_dir_entry *proc;
+static struct config conf;
+
+static int update_gw_interface(const char *interface)
+{
+ int ret = 0;
+ struct net_device *dev;
+ struct in_device *in_dev;
+
+ dev = dev_get_by_name(&init_net, interface);
+ if (!dev) {
+ pr_err("Not found interface: %s\n", interface);
+ return -ENOENT;
+ }
+
+ conf.interface_ifindex = dev->ifindex;
+
+ in_dev = inetdev_by_index(dev_net(dev), conf.interface_ifindex);
+ if (!in_dev) {
+ pr_err("Not found in_dev on %s\n", interface);
+ ret = -ENOENT;
+ goto QUIT;
+ }
+
+ for_primary_ifa(in_dev) {
+ conf.interface_ipaddr = ifa->ifa_local;
+ conf.interface_mask = ifa->ifa_mask;
+ conf.interface_broadcast = ifa->ifa_broadcast;
+
+ pr_info("Found ip from %s: %pI4\n", interface, &conf.interface_ipaddr);
+ break;
+ } endfor_ifa(in_dev)
+
+QUIT:
+ dev_put(dev);
+
+ return ret;
+}
+
+static int proc_config_show(struct seq_file *s, void *v)
+{
+ seq_printf(s, "enabled(RW) = %d\n", conf.enabled);
+ seq_printf(s, "interface(RW) = %s\n", conf.interface);
+ seq_printf(s, "ipaddr(RO) = %pI4\n", &conf.interface_ipaddr);
+ seq_printf(s, "netmask(RO) = %pI4\n", &conf.interface_mask);
+ seq_printf(s, "broadcast(RO) = %pI4\n", &conf.interface_broadcast);
+ seq_printf(s, "port(RW) = %d\n", conf.port);
+ seq_printf(s, "ssl_port(RW) = %d\n", conf.ssl_port);
+
+ return 0;
+}
+
+static ssize_t proc_config_write(struct file *file, const char __user *buf, size_t size, loff_t *ppos)
+{
+ char data[128];
+ char *delim, *key;
+ const char *value;
+ int update = 0;
+
+ if (size == 0)
+ return -EINVAL;
+
+ if (size > sizeof(data))
+ size = sizeof(data);
+
+ if (copy_from_user(data, buf, size))
+ return -EFAULT;
+
+ data[size - 1] = 0;
+
+ key = data;
+ while (key && *key) {
+ while (*key && (*key == ' '))
+ key++;
+
+ delim = strchr(key, '=');
+ if (!delim)
+ break;
+
+ *delim++ = 0;
+ value = delim;
+
+ delim = strchr(value, '\n');
+ if (delim)
+ *delim++ = 0;
+
+ if (!strcmp(key, "enabled")) {
+ conf.enabled = simple_strtol(value, NULL, 0);
+ if (conf.enabled)
+ update = 1;
+ pr_info("wifidog %s\n", conf.enabled ? "enabled" : "disabled");
+ } else if (!strcmp(key, "interface")) {
+ strncpy(conf.interface, value, sizeof(conf.interface) - 1);
+ update = 1;
+ } else if (!strcmp(key, "port")) {
+ conf.port = simple_strtol(value, NULL, 0);
+ } else if (!strcmp(key, "ssl_port")) {
+ conf.ssl_port = simple_strtol(value, NULL, 0);
+ }
+
+ key = delim;
+ }
+
+ if (update)
+ update_gw_interface(conf.interface);
+ return size;
+}
+
+static int proc_config_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, proc_config_show, NULL);
+}
+
+const static struct file_operations proc_config_ops = {
+ .owner = THIS_MODULE,
+ .open = proc_config_open,
+ .read = seq_read,
+ .write = proc_config_write,
+ .llseek = seq_lseek,
+ .release = single_release
+};
+
+int init_config(void)
+{
+ int ret = 0;
+
+ conf.interface_ifindex= -1;
+ conf.port = 2060;
+ conf.ssl_port = 8443;
+ strcpy(conf.interface, "br-lan");
+
+ proc = proc_mkdir(PROC_DIR_NAME, NULL);
+ if (!proc) {
+ pr_err("can't create dir /proc/"PROC_DIR_NAME"/\n");
+ return -ENODEV;;
+ }
+
+ if (!proc_create("config", 0644, proc, &proc_config_ops)) {
+ pr_err("can't create file /proc/"PROC_DIR_NAME"/config\n");
+ ret = -EINVAL;
+ goto remove;
+ }
+
+ return 0;
+
+remove:
+ remove_proc_entry(PROC_DIR_NAME, NULL);
+ return ret;
+}
+
+void deinit_config(void)
+{
+ remove_proc_entry("config", proc);
+ remove_proc_entry(PROC_DIR_NAME, NULL);
+}
+
+struct config *get_config(void)
+{
+ return &conf;
+}
--- /dev/null
+/*
+ * Copyright (C) 2017 jianhui zhao <jianhuizhao329@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __CONFIG_H_
+#define __CONFIG_H_
+
+#include <linux/proc_fs.h>
+
+#define PROC_DIR_NAME "wifidog-ng"
+
+struct config {
+ int enabled;
+ char interface[32];
+ int interface_ifindex;
+ __be32 interface_ipaddr;
+ __be32 interface_mask;
+ __be32 interface_broadcast;
+ int port;
+ int ssl_port;
+};
+
+int init_config(void);
+void deinit_config(void);
+struct config *get_config(void);
+
+#endif
--- /dev/null
+/*
+ * Copyright (C) 2017 jianhui zhao <jianhuizhao329@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/version.h>
+
+#include <linux/ip.h>
+#include <linux/tcp.h>
+#include <linux/udp.h>
+#include <net/netfilter/nf_nat.h>
+#include <net/netfilter/nf_nat_l3proto.h>
+
+#include "utils.h"
+#include "config.h"
+
+#define IPS_HIJACKED (1 << 31)
+#define IPS_ALLOWED (1 << 30)
+
+static u32 wd_nf_nat_setup_info(void *priv, struct sk_buff *skb,
+ const struct nf_hook_state *state, struct nf_conn *ct)
+{
+ struct config *conf = get_config();
+ struct tcphdr *tcph = tcp_hdr(skb);
+ union nf_conntrack_man_proto proto;
+ struct nf_nat_range newrange;
+ static uint16_t PORT_80 = htons(80);
+
+ proto.tcp.port = (tcph->dest == PORT_80) ? htons(conf->port) : htons(conf->ssl_port);
+ newrange.flags = NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED;
+ newrange.min_addr.ip = newrange.max_addr.ip = conf->interface_ipaddr;
+ newrange.min_proto = newrange.max_proto = proto;
+
+ ct->status |= IPS_HIJACKED;
+
+ return nf_nat_setup_info(ct, &newrange, NF_NAT_MANIP_DST);
+}
+
+static u32 wifidog_hook(void *priv, struct sk_buff *skb, const struct nf_hook_state *state)
+{
+ struct config *conf = get_config();
+ struct iphdr *iph = ip_hdr(skb);
+ struct nf_conn *ct;
+ struct tcphdr *tcph;
+ struct udphdr *udph;
+ enum ip_conntrack_info ctinfo;
+ static uint16_t PORT_80 = htons(80); /* http */
+ static uint16_t PORT_443 = htons(443); /* https */
+ static uint16_t PORT_67 = htons(67); /* dhcp */
+ static uint16_t PORT_53 = htons(53); /* dns */
+
+ if (unlikely(!conf->enabled))
+ return NF_ACCEPT;
+
+ if (state->in->ifindex != conf->interface_ifindex)
+ return NF_ACCEPT;
+
+ /* Accept broadcast */
+ if (skb->pkt_type == PACKET_BROADCAST || skb->pkt_type == PACKET_MULTICAST)
+ return NF_ACCEPT;
+
+ /* Accept all to local area networks */
+ if ((iph->daddr | ~conf->interface_mask) == conf->interface_broadcast)
+ return NF_ACCEPT;
+
+ ct = nf_ct_get(skb, &ctinfo);
+ if (!ct || (ct->status & IPS_ALLOWED))
+ return NF_ACCEPT;
+
+ if (ct->status & IPS_HIJACKED) {
+ if (is_allowed_mac(skb, state)) {
+ /* Avoid duplication of authentication */
+ nf_reset(skb);
+ nf_ct_kill(ct);
+ }
+ return NF_ACCEPT;
+ } else if (ctinfo == IP_CT_NEW && (is_allowed_dest_ip(skb, state) || is_allowed_mac(skb, state))) {
+ ct->status |= IPS_ALLOWED;
+ return NF_ACCEPT;
+ }
+
+ switch (iph->protocol) {
+ case IPPROTO_TCP:
+ tcph = tcp_hdr(skb);
+ if(tcph->dest == PORT_53 || tcph->dest == PORT_67) {
+ ct->status |= IPS_ALLOWED;
+ return NF_ACCEPT;
+ }
+
+ if (tcph->dest == PORT_80 || tcph->dest == PORT_443)
+ goto redirect;
+ else
+ return NF_DROP;
+
+ case IPPROTO_UDP:
+ udph = udp_hdr(skb);
+ if(udph->dest == PORT_53 || udph->dest == PORT_67) {
+ ct->status |= IPS_ALLOWED;
+ return NF_ACCEPT;
+ }
+ return NF_DROP;
+
+ default:
+ ct->status |= IPS_ALLOWED;
+ return NF_ACCEPT;
+ }
+
+redirect:
+ /* all packets from unknown client are dropped */
+ if (ctinfo != IP_CT_NEW || (ct->status & IPS_DST_NAT_DONE)) {
+ pr_debug("dropping packets of suspect stream, src:%pI4, dst:%pI4\n", &iph->saddr, &iph->daddr);
+ return NF_DROP;
+ }
+
+ return nf_nat_ipv4_in(priv, skb, state, wd_nf_nat_setup_info);
+}
+
+static struct nf_hook_ops wifidog_ops[] __read_mostly = {
+ {
+ .hook = wifidog_hook,
+ .pf = PF_INET,
+ .hooknum = NF_INET_PRE_ROUTING,
+ .priority = NF_IP_PRI_CONNTRACK + 1 /* after conntrack */
+ }
+};
+
+static int __init wifidog_init(void)
+{
+ int ret;
+
+ ret = init_config();
+ if (ret)
+ return ret;
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
+ ret = nf_register_net_hooks(&init_net, wifidog_ops, ARRAY_SIZE(wifidog_ops));
+#else
+ ret = nf_register_hooks(wifidog_ops, ARRAY_SIZE(wifidog_ops));
+#endif
+ if (ret < 0) {
+ pr_err("can't register hook\n");
+ goto remove_config;
+ }
+
+ pr_info("kmod of wifidog is started\n");
+
+ return 0;
+
+remove_config:
+ deinit_config();
+ return ret;
+}
+
+static void __exit wifidog_exit(void)
+{
+ deinit_config();
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 12, 14)
+ nf_unregister_net_hooks(&init_net, wifidog_ops, ARRAY_SIZE(wifidog_ops));
+#else
+ nf_unregister_hooks(wifidog_ops, ARRAY_SIZE(wifidog_ops));
+#endif
+
+ pr_info("kmod of wifidog-ng is stop\n");
+}
+
+module_init(wifidog_init);
+module_exit(wifidog_exit);
+
+MODULE_AUTHOR("jianhui zhao <jianhuizhao329@gmail.com>");
+MODULE_LICENSE("GPL");
--- /dev/null
+/*
+ * Copyright (C) 2017 jianhui zhao <jianhuizhao329@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __UTILS_H_
+#define __UTILS_H_
+
+#include <linux/netfilter/ipset/ip_set.h>
+
+static inline int wd_ip_set_test(const char *name, const struct sk_buff *skb,
+ struct ip_set_adt_opt *opt, const struct nf_hook_state *state)
+{
+ static struct xt_action_param par = { };
+ struct ip_set *set = NULL;
+ ip_set_id_t index;
+ int ret;
+
+ index = ip_set_get_byname(state->net, name, &set);
+ if (!set)
+ return 0;
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
+ par.net = state->net;
+#else
+ par.state = state;
+#endif
+
+ ret = ip_set_test(index, skb, &par, opt);
+ ip_set_put_byindex(state->net, index);
+ return ret;
+}
+
+static inline int is_allowed_mac(struct sk_buff *skb, const struct nf_hook_state *state)
+{
+ static struct ip_set_adt_opt opt = {
+ .family = NFPROTO_IPV4,
+ .dim = IPSET_DIM_ONE,
+ .flags = IPSET_DIM_ONE_SRC,
+ .ext.timeout = UINT_MAX,
+ };
+
+ return wd_ip_set_test("wifidog-ng-mac", skb, &opt, state);
+}
+
+static inline int is_allowed_dest_ip(struct sk_buff *skb, const struct nf_hook_state *state)
+{
+ static struct ip_set_adt_opt opt = {
+ .family = NFPROTO_IPV4,
+ .dim = IPSET_DIM_ONE,
+ .ext.timeout = UINT_MAX,
+ };
+
+ return wd_ip_set_test("wifidog-ng-ip", skb, &opt, state);
+}
+
+#endif
PKG_NAME:=wifidog
PKG_VERSION:=1.3.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=GPL-2.0
--- /dev/null
+diff --git a/configure.in b/configure.in
+index bf5463a..43ec27c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -96,8 +96,8 @@ if test "x$enable_cyassl" = xyes; then
+ # the use the new naming scheme below as cyassl/ssl.h is not available for
+ # AC_SEARCH_LIBS
+ AC_CHECK_HEADERS(cyassl/ssl.h)
+- AC_SEARCH_LIBS([CyaTLSv1_client_method], [cyassl], [], [
+- AC_SEARCH_LIBS([wolfTLSv1_client_method], [wolfssl], [], [
++ AC_SEARCH_LIBS([CyaSSLv23_client_method], [cyassl], [], [
++ AC_SEARCH_LIBS([wolfSSLv23_client_method], [wolfssl], [], [
+ AC_MSG_ERROR([unable to locate SSL lib: either wolfSSL or CyaSSL needed.])
+ ])
+ ])
+@@ -110,7 +110,7 @@ if test "x$enable_cyassl" = xyes; then
+ ]], [[
+ CYASSL_CTX *ctx;
+ CyaSSL_Init();
+- ctx = CyaSSL_CTX_new(CyaTLSv1_client_method());
++ ctx = CyaSSL_CTX_new(CyaSSLv23_client_method());
+ CyaSSL_CTX_UseSNI(ctx, CYASSL_SNI_HOST_NAME, "wifidog.org", 11);
+ ]])], [enabled_sni=yes], [enabled_sni=no])
+
+diff --git a/src/simple_http.c b/src/simple_http.c
+index f0e27ee..7271021 100644
+--- a/src/simple_http.c
++++ b/src/simple_http.c
+@@ -162,8 +162,7 @@ get_cyassl_ctx(const char *hostname)
+ if (NULL == cyassl_ctx) {
+ CyaSSL_Init();
+ /* Create the CYASSL_CTX */
+- /* Allow TLSv1.0 up to TLSv1.2 */
+- if ((cyassl_ctx = CyaSSL_CTX_new(CyaTLSv1_client_method())) == NULL) {
++ if ((cyassl_ctx = CyaSSL_CTX_new(CyaSSLv23_client_method())) == NULL) {
+ debug(LOG_ERR, "Could not create CYASSL context.");
+ UNLOCK_CYASSL_CTX();
+ return NULL;
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=wsdd2
+PKG_RELEASE:=3
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/Andy2244/wsdd2.git
+PKG_SOURCE_DATE:=2018-07-24
+PKG_SOURCE_VERSION:=2c31ba3b720af81848c47dff7ad7c6c30c0c0f50
+PKG_MIRROR_HASH:=eb903a870d99c6001996dbfc22c15e1020278c45ed2441ceb61bc5395f417afa
+
+PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
+PKG_LICENSE:=GPL-3.0-only
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/wsdd2
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ TITLE:=Web Services for Devices (WSD) daemon
+ URL:=https://kb.netgear.com/2649/NETGEAR-Open-Source-Code-for-Programmers-GPL
+endef
+
+define Package/wsdd2/description
+ Web Services for Devices or Web Services on Devices (WSD),
+ is a Microsoft API to simplify programming connections to web service
+ enabled devices, such as printers, scanners and file shares.
+
+ This daemon advertises and responds to probe requests from Windows clients looking for file shares.
+ It also implements LLMNR multicast name lookup services.
+endef
+
+define Build/Compile
+ $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(PKG_BUILD_DIR)/{wsdd2.c,wsd.c,llmnr.c} -o $(PKG_BUILD_DIR)/wsdd2
+endef
+
+define Package/wsdd2/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wsdd2 $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/wsdd2.init $(1)/etc/init.d/wsdd2
+endef
+
+$(eval $(call BuildPackage,wsdd2))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/bin/wsdd2 -w
+ procd_set_param respawn
+ procd_set_param file /var/etc/smb.conf
+ procd_close_instance
+}
+
+service_triggers() {
+ PROCD_RELOAD_DELAY=3000
+ procd_add_reload_trigger "dhcp" "system" "samba4"
+}
--- /dev/null
+--- a/wsd.c 2018-07-24
++++ b/wsd.c 2018-09-10
+@@ -96,13 +96,19 @@ static void uuid_endpoint(char *uuid, si
+ {
+ FILE *fp = fopen("/etc/machine-id", "r");
+ int c, i = 0;
++
++ if (!fp) {
++ fp = fopen("/proc/sys/kernel/random/boot_id", "r");
++ }
+
+- if (!fp)
++ if (!fp) {
++ DEBUG(0, W, "Can't open required '/etc/machine-id' or '/proc/sys/kernel/random/boot_id'");
+ return;
++ }
+
+ while (i < 36 && (c = getc(fp)) != EOF &&
+- (isdigit(c) || (islower(c) && isxdigit(c)))) {
+- if (i == 8 || i == 13 || i == 18 || i == 23)
++ ((c == '-') || isdigit(c) || (islower(c) && isxdigit(c)))) {
++ if ((c != '-') && (i == 8 || i == 13 || i == 18 || i == 23))
+ uuid[i++] = '-';
+ uuid[i++] = c;
+ }
include $(TOPDIR)/rules.mk
PKG_NAME:=xl2tpd
-PKG_VERSION:=1.3.11
+PKG_VERSION:=1.3.12
PKG_RELEASE:=1
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=fdb5b28ea698515abe5b996460ee8ad3fa6c76f6eed1c26949938543d7f02994
+PKG_MIRROR_HASH:=271d40aaf97a07e4c1bbcfb9c0081f2fc848fa7ef6d69c43c141a4e5a749831d
PKG_BUILD_DEPENDS:=libpcap
PKG_NAME:=xtables-addons
PKG_VERSION:=2.14
-PKG_RELEASE:=3
+PKG_RELEASE:=5
PKG_HASH:=d215a9a8b8e66aae04b982fa2e1228e8a71e7dfe42320df99e34e5000cbdf152
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+#endif /* _NETFILTER_MIME_H */
--- /dev/null
+++ b/extensions/rtsp/nf_conntrack_rtsp.c
-@@ -0,0 +1,576 @@
+@@ -0,0 +1,761 @@
+/*
+ * RTSP extension for IP connection tracking
+ * (C) 2003 by Tom Marshall <tmarshall at real.com>
+ * 2013-03-04: Il'inykh Sergey <sergeyi at inango-sw.com>. Inango Systems Ltd
+ * - fixed rtcp nat mapping and other port mapping fixes
+ * - simple TEARDOWN request handling
-+ * - codestyle fixes and other less significant bug fixes
++ * - codestyle fixes and other less significant bug fixes
++ * 2018-04-17: Alin Nastac <alin.nastac at gmail.com>
++ * Hans Dedecker <dedeckeh at gmail.com>
++ * - use IP address read from SETUP URI in expected connections
++ * 2018-04-18: Hans Dedecker <dedeckeh at gmail.com>
++ * - update RTP expected connection source IP based on SOURCE
++ * in the SETUP reply message
++ * 2018-08-03: Alin Nastac <alin.nastac at gmail.com>
++ * Hans Dedecker <dedeckeh at gmail.com>
++ * - parse non-standard destination=address:port format
+ *
+ * based on ip_conntrack_irc.c
+ *
+#include <net/netfilter/nf_conntrack.h>
+#include <net/netfilter/nf_conntrack_expect.h>
+#include <net/netfilter/nf_conntrack_helper.h>
++#include <net/netfilter/nf_conntrack_zones.h>
+#include "nf_conntrack_rtsp.h"
+
+#define NF_NEED_STRNCASECMP
+}
+
+/*
-+ * Find lo/hi client ports (if any) in transport header
++ * Find lo/hi client ports and/or source (if any) in transport header
+ * In:
+ * ptcp, tcplen = packet
+ * tranoff, tranlen = buffer to search
+ *
+ * Out:
+ * pport_lo, pport_hi = lo/hi ports (host endian)
++ * srvaddr
+ *
+ * Returns nonzero if any client ports found
+ *
+ }
+ rc = 1;
+ }
++ } else if (strncmp(ptran+off, "source=", 7) == 0) {
++ uint srcaddrlen;
++
++ off += 7;
++ srcaddrlen = nextfieldoff - off - 1;
++
++ if (in4_pton(ptran + off, srcaddrlen,
++ (u8 *)&prtspexp->srvaddr.in,
++ -1, NULL))
++ pr_debug("source found : %pI4\n",
++ &prtspexp->srvaddr.ip);
++ } else if (nextfieldoff - off > 12 && strncmp(ptran+off, "destination=", 12) == 0) {
++ const char *psep;
++ u_int16_t port;
++
++ off += 12;
++
++ if (in4_pton(ptran+off, nextfieldoff - off - 1, (u8 *)&prtspexp->cltaddr.in, -1, NULL)) {
++ pr_debug("destination found : %pI4\n", &prtspexp->cltaddr.ip);
++
++ /*
++ * Some RTSP clients(mostly STBs) use non-standard destination parameters:
++ * destination=address:port
++ */
++ psep = memchr(ptran+off, ':', nextfieldoff-off);
++ if (psep != NULL && nf_strtou16(psep + 1, &port)) {
++ if (prtspexp->loport != 0 && prtspexp->loport != port)
++ pr_debug("multiple ports found, port %hu ignored\n", port);
++ else {
++ pr_debug("lo port found : %hu\n", port);
++ prtspexp->loport = prtspexp->hiport = port;
++ }
++ }
++ }
+ }
+
+ /*
+ uint transoff = 0;
+ uint translen = 0;
+ uint off;
++ union nf_inet_addr srvaddr;
+
+ if (!rtsp_parse_message(pdata, datalen, &dataoff,
+ &hdrsoff, &hdrslen,
+ if (strncmp(pdata+cmdoff, "SETUP ", 6) != 0)
+ continue; /* not a SETUP message */
+
++ srvaddr = ct->tuplehash[!dir].tuple.src.u3;
++
++ /* try to get RTP media source from SETUP URI */
++ off = cmdoff + 6;
++ while (off < datalen) {
++ if (strncmp(pdata+off, "://", 3) == 0) {
++ off += 3;
++ cmdoff = off;
++
++ while (off < datalen) {
++ if (pdata[off] == ':' ||
++ pdata[off] == '/' ||
++ pdata[off] == ' ') {
++ in4_pton(pdata + cmdoff,
++ off - cmdoff,
++ (u8 *)&srvaddr.in,
++ -1, NULL);
++ break;
++ }
++ off++;
++ }
++ break;
++ }
++ off++;
++ }
++
+ pr_debug("found a setup message\n");
+
+ off = 0;
+ }
+
+ nf_ct_expect_init(rtp_exp, NF_CT_EXPECT_CLASS_DEFAULT,
-+ nf_ct_l3num(ct),
-+ NULL, /* &ct->tuplehash[!dir].tuple.src.u3, */
++ nf_ct_l3num(ct), &srvaddr,
+ &ct->tuplehash[!dir].tuple.dst.u3,
+ IPPROTO_UDP, NULL, &be_loport);
+
+ }
+
+ nf_ct_expect_init(rtcp_exp, NF_CT_EXPECT_CLASS_DEFAULT,
-+ nf_ct_l3num(ct),
-+ NULL, /* &ct->tuplehash[!dir].tuple.src.u3, */
++ nf_ct_l3num(ct), &srvaddr,
+ &ct->tuplehash[!dir].tuple.dst.u3,
+ IPPROTO_UDP, NULL, &be_hiport);
+
+
+
+static inline int
-+help_in(struct sk_buff *skb, size_t pktlen,
-+ struct nf_conn* ct, enum ip_conntrack_info ctinfo)
-+{
-+ return NF_ACCEPT;
-+}
++help_in(struct sk_buff *skb, unsigned char *rb_ptr, unsigned int datalen,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++ struct nf_conn *ct, enum ip_conntrack_info ctinfo,
++ unsigned int protoff)
++#else
++ struct nf_conn *ct, enum ip_conntrack_info ctinfo)
++#endif
++ {
++ struct ip_ct_rtsp_expect expinfo;
++ union nf_inet_addr srvaddr;
++ int dir = CTINFO2DIR(ctinfo); /* = IP_CT_DIR_ORIGINAL */
++ int len;
++ char* pdata = rb_ptr;
++ uint dataoff = 0;
++ int ret = NF_ACCEPT;
++ u_int8_t family;
++ struct nf_conntrack_expect *exp_ct = NULL;
++ struct nf_conntrack_tuple t;
++ struct net *net = nf_ct_net(ct);
++
++ memset(&expinfo, 0, sizeof(expinfo));
++
++ while (dataoff < datalen) {
++ uint cmdoff = dataoff;
++ uint hdrsoff = 0;
++ uint hdrslen = 0;
++ uint cseqoff = 0;
++ uint cseqlen = 0;
++ uint transoff = 0;
++ uint translen = 0;
++
++ if (!rtsp_parse_message(pdata, datalen, &dataoff,
++ &hdrsoff, &hdrslen,
++ &cseqoff, &cseqlen,
++ &transoff, &translen))
++ break; /* not a valid message */
++
++ if (strncmp(pdata+cmdoff, "RTSP/", 5) == 0 && translen) {
++ union nf_inet_addr zeroaddr;
++
++ memset(&zeroaddr, 0, sizeof(zeroaddr));
++
++ if (!rtsp_parse_transport(pdata+transoff, translen, &expinfo))
++ continue;
++
++ srvaddr = expinfo.srvaddr;
++
++ if (nf_inet_addr_cmp(&srvaddr, &ct->tuplehash[dir].tuple.src.u3) ||
++ nf_inet_addr_cmp(&srvaddr, &zeroaddr))
++ continue;
++ } else
++ continue; /* not valid RTSP reply */
++
++ if (expinfo.loport == 0) {
++ pr_debug("no udp transports found\n");
++ continue; /* no udp transports found */
++ }
++
++ family = nf_ct_l3num(ct);
++ if (family == AF_INET)
++ len = 4;
++ else
++ len = 16;
++
++ /* replace rtp expect src addr */
++ t.src.l3num = family;
++ t.dst.protonum = IPPROTO_UDP;
++
++ memcpy(&t.src.u3, &ct->tuplehash[dir].tuple.src.u3, len);
++ if (sizeof(t.src.u3) > len)
++ /* address needs to be cleared for nf_ct_tuple_equal */
++ memset((void *)&t.src.u3 + len, 0, sizeof(t.src.u3) - len);
++
++ t.src.u.all = 0;
++
++ memcpy(&t.dst.u3, &ct->tuplehash[dir].tuple.dst.u3, len);
++ if (sizeof(t.dst.u3) > len)
++ /* address needs to be cleared for nf_ct_tuple_equal */
++ memset((void *)&t.dst.u3 + len, 0, sizeof(t.dst.u3) - len);
++
++ t.dst.u.all = htons(expinfo.loport);
++
++ /* get the rtp expect and replace the srcaddr with RTP server addr */
++ exp_ct = nf_ct_expect_find_get(net, nf_ct_zone(ct), &t);
++ if (exp_ct) {
++ memcpy(&exp_ct->tuple.src.u3, &srvaddr, len);
++ if (sizeof(exp_ct->tuple.src.u3) > len)
++ /* address needs to be cleared for nf_ct_tuple_equal */
++ memset((void *)&exp_ct->tuple.src.u3 + len, 0,
++ sizeof(exp_ct->tuple.src.u3) - len);
++ } else
++ goto out;
++
++ /* replace rtcp expect src addr */
++ if (expinfo.pbtype == pb_range) {
++ t.dst.u.all = htons(expinfo.hiport);
++
++ /* get the rtcp expect and replace the srcaddr with RTP server addr */
++ exp_ct = nf_ct_expect_find_get(net, nf_ct_zone(ct), &t);
++ if (exp_ct) {
++ memcpy(&exp_ct->tuple.src.u3, &srvaddr, len);
++ if (sizeof(exp_ct->tuple.src.u3) > len)
++ /* address needs to be cleared for nf_ct_tuple_equal */
++ memset((void *)&exp_ct->tuple.src.u3 + len, 0,
++ sizeof(exp_ct->tuple.src.u3) - len);
++ } else
++ goto out;
++ }
++
++ goto out;
++ }
++out:
++ return ret;
++ }
+
+static int help(struct sk_buff *skb, unsigned int protoff,
+ struct nf_conn *ct, enum ip_conntrack_info ctinfo)
+ case IP_CT_DIR_REPLY:
+ pr_debug("IP_CT_DIR_REPLY\n");
+ /* inbound packet: server->client */
-+ ret = NF_ACCEPT;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
++ ret = help_in(skb, rb_ptr, datalen, ct, ctinfo, protoff);
++#else
++ ret = help_in(skb, rb_ptr, datalen, ct, ctinfo);
++#endif
++ break;
++ default:
+ break;
+ }
+
+module_exit(fini);
--- /dev/null
+++ b/extensions/rtsp/nf_conntrack_rtsp.h
-@@ -0,0 +1,72 @@
+@@ -0,0 +1,74 @@
+/*
+ * RTSP extension for IP connection tracking.
+ * (C) 2003 by Tom Marshall <tmarshall at real.com>
+ */
+struct ip_ct_rtsp_expect
+{
-+ u_int32_t len; /* length of header block */
-+ portblock_t pbtype; /* Type of port block that was requested */
-+ u_int16_t loport; /* Port that was requested, low or first */
-+ u_int16_t hiport; /* Port that was requested, high or second */
++ u_int32_t len; /* length of header block */
++ portblock_t pbtype; /* Type of port block that was requested */
++ u_int16_t loport; /* Port that was requested, low or first */
++ u_int16_t hiport; /* Port that was requested, high or second */
++ union nf_inet_addr srvaddr; /* src address in SETUP reply */
++ union nf_inet_addr cltaddr; /* destination address */
+#if 0
-+ uint method; /* RTSP method */
-+ uint cseq; /* CSeq from request */
++ uint method; /* RTSP method */
++ uint cseq; /* CSeq from request */
+#endif
+};
+
+#endif /* _IP_CONNTRACK_RTSP_H */
--- /dev/null
+++ b/extensions/rtsp/nf_nat_rtsp.c
-@@ -0,0 +1,617 @@
+@@ -0,0 +1,634 @@
+/*
+ * RTSP extension for TCP NAT alteration
+ * (C) 2003 by Tom Marshall <tmarshall at real.com>
+ struct nf_conntrack_tuple *rtp_t;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
-+ char szextaddr[INET6_ADDRSTRLEN];
++ char szextaddr[INET6_ADDRSTRLEN + 16];
+#else
-+ char szextaddr[INET_ADDRSTRLEN];
++ char szextaddr[INET_ADDRSTRLEN + 16];
+#endif
+ uint extaddrlen;
+ int is_stun;
+
+ pfieldend = memchr(ptran+off, ';', nextparamoff-off);
+ nextfieldoff = (pfieldend == NULL) ? nextparamoff : pfieldend-ptran+1;
++ SKIP_WSPACE(ptran, nextfieldoff, off);
+
-+ if (dstact != DSTACT_NONE && strncmp(ptran+off, "destination=", 12) == 0) {
++ if (dstact != DSTACT_NONE && nextfieldoff - off > 12 && strncmp(ptran+off, "destination=", 12) == 0) {
+ if (strncmp(ptran+off+12, szextaddr, extaddrlen) == 0)
+ is_stun = 1;
+
+ uint dstreplen = 0;
+ diff = dstlen;
+ if (dstact == DSTACT_AUTO && !is_stun) {
-+ pr_debug("RTSP: replace dst addr\n");
++ const char* psep = memchr(ptran+off, ':', dstlen);
++ u_int16_t port;
++
+ dstoff += 12;
+ dstlen -= 13;
+ pdstrep = szextaddr;
-+ dstreplen = extaddrlen;
-+ diff = nextfieldoff-off-13-extaddrlen;
++
++ if (psep != NULL && nf_strtou16(psep + 1, &port)) {
++ pr_debug("RTSP: replace dst addr&port\n");
++
++ if (port != prtspexp->loport) {
++ pr_debug("multiple ports found, port %hu ignored\n", port);
++ dstreplen = extaddrlen;
++ } else {
++ sprintf(szextaddr+extaddrlen, ":%s", rbuf1);
++ dstreplen = extaddrlen+1+rbuf1len;
++ }
++ } else {
++ pr_debug("RTSP: replace dst addr\n");
++ dstreplen = extaddrlen;
++ }
++ diff = nextfieldoff-off-13-dstreplen;
+ }
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ pfieldend = memchr(ptran+off, ';', nextparamoff-off);
+ nextfieldoff = (pfieldend == NULL) ? nextparamoff : pfieldend-ptran+1;
+
-+ if (strncmp(ptran+off, "client_port=", 12) == 0) {
++ if (nextfieldoff - off > 12 && strncmp(ptran+off, "client_port=", 12) == 0) {
+ u_int16_t port;
+ uint numlen;
+ uint origoff;
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/binux/yaaw.git
+PKG_MIRROR_HASH:=698b176cbee67c37cb095d0d07158b917de4191a2ab3fc766c6e8378a6d52110
PKG_SOURCE_VERSION:=d3a8346c5b9c2c1875dc79e1db2533b584fc8def
PKG_LICENSE:=LGPL-3.0
include $(TOPDIR)/rules.mk
PKG_NAME:=zerotier
-PKG_VERSION:=1.2.4
-PKG_RELEASE:=3
+PKG_VERSION:=1.2.12
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/zerotier/ZeroTierOne
-PKG_SOURCE_SUBDIR:=ZeroTierOne-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=fe5257df81c4ec4b5d48f707eb794de0748b7ac0
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=131436529d26f8eb975a0a8705b489cc22a1139c323755895c1776db579003bc
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=212799bfaeb5e7dff20f2cd83f15742c8e13b8e9535606cfb85abcfb5fb6fed4
+PKG_BUILD_DIR:=$(BUILD_DIR)/ZeroTierOne-$(PKG_VERSION)
+
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
endif
endef
+# Make binary smaller
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections
+
define Package/zerotier/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-one $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/
endif
- $(INSTALL_DIR) $(1)/etc/init.d/
- $(INSTALL_BIN) files/zerotier.init $(1)/etc/init.d/zerotier
- $(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_CONF) files/zerotier.config $(1)/etc/config/zerotier
+ $(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,zerotier))
--- /dev/null
+
+config zerotier sample_config
+ option enabled 0
+
+ # persistent configuration folder (for ZT controller mode)
+ #option config_path '/etc/zerotier'
+
+ #option port '9993'
+
+ # Generate secret on first start
+ option secret ''
+
+ # Join a public network called Earth
+ list join '8056c2e21c000001'
+ #list join '<other_network>'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=90
+
+USE_PROCD=1
+
+PROG=/usr/bin/zerotier-one
+CONFIG_PATH=/var/lib/zerotier-one
+
+section_enabled() {
+ config_get_bool enabled "$1" 'enabled' 0
+ [ $enabled -ne 0 ]
+}
+
+start_instance() {
+ local cfg="$1"
+ local port secret config_path path
+ local args=""
+
+ if ! section_enabled "$cfg"; then
+ echo "disabled in config"
+ return 1
+ fi
+
+ config_get config_path $cfg 'config_path'
+ config_get port $cfg 'port'
+ config_get secret $cfg 'secret'
+
+ path=${CONFIG_PATH}_$cfg
+
+ # Remove existing link or folder
+ rm -rf $path
+
+ # Create link from CONFIG_PATH to config_path
+ if [ -n "$config_path" -a "$config_path" != "$path" ]; then
+ if [ ! -d "$config_path" ]; then
+ echo "ZeroTier config_path does not exist: $config_path" 1>&2
+ return
+ fi
+
+ ln -s $config_path $path
+ fi
+
+ mkdir -p $path/networks.d
+
+ # link latest default config path to latest config path
+ rm -f $CONFIG_PATH
+ ln -s $path $CONFIG_PATH
+
+ if [ -n "$port" ]; then
+ args="$args -p${port}"
+ fi
+
+ if [ -z "$secret" ]; then
+ echo "Generate secret - please wait..."
+ local sf="/tmp/zt.$cfg.secret"
+
+ zerotier-idtool generate "$sf" > /dev/null
+ [ $? -ne 0 ] && return 1
+
+ secret="$(cat $sf)"
+ rm "$sf"
+
+ uci set zerotier.$cfg.secret="$secret"
+ uci commit zerotier
+ fi
+
+ if [ -n "$secret" ]; then
+ echo "$secret" > $path/identity.secret
+ # make sure there is not previous identity.public
+ rm -f $path/identity.public
+ fi
+
+ add_join() {
+ # an (empty) config file will cause ZT to join a network
+ touch $path/networks.d/$1.conf
+ }
+
+ config_list_foreach $cfg 'join' add_join
+
+ procd_open_instance
+ procd_set_param command $PROG $args $path
+ procd_set_param stderr 1
+ procd_close_instance
+}
+
+start_service() {
+ config_load 'zerotier'
+ config_foreach start_instance 'zerotier'
+}
+
+stop_instance() {
+ local cfg="$1"
+
+ # Remove existing link or folder
+ rm -rf ${CONFIG_PATH}_${cfg}
+}
+
+stop_service() {
+ config_load 'zerotier'
+ config_foreach stop_instance 'zerotier'
+ rm -f ${CONFIG_PATH}
+}
+++ /dev/null
-
-config zerotier sample_config
- option enabled 0
-
- # persistent configuration folder (for ZT controller mode)
- #option config_path '/etc/zerotier'
-
- # restart ZT when wan status changed
- option interface 'wan'
-
- #option port '9993'
-
- # Generate secret on first start
- option secret 'generate'
-
- # Join a public network called Earth
- list join '8056c2e21c000001'
+++ /dev/null
-#!/bin/sh /etc/rc.common
-
-START=90
-
-USE_PROCD=1
-
-PROG=/usr/bin/zerotier-one
-CONFIG_PATH=/var/lib/zerotier-one
-
-section_enabled() {
- config_get_bool enabled "$1" 'enabled' 0
- [ $enabled -gt 0 ]
-}
-
-start_instance() {
- local cfg="$1"
- local port secret interface config_path
- local ARGS=""
-
- section_enabled "$cfg" || return 1
-
- config_get config_path $cfg 'config_path'
- config_get_bool port $cfg 'port'
- config_get secret $cfg 'secret'
- config_get interface $cfg 'interface'
-
- # Remove existing link or folder
- rm -rf $CONFIG_PATH
-
- # Create link from CONFIG_PATH to config_path
- if [ -n "$config_path" -a $config_path != $CONFIG_PATH ]; then
- if [ ! -d "$config_path" ]; then
- echo "ZeroTier config_path does not exist: $config_path"
- return
- fi
-
- ln -s $config_path $CONFIG_PATH
- fi
-
- mkdir -p $CONFIG_PATH/networks.d
-
- if [ -n "$port" ]; then
- ARGS="$ARGS -p$port"
- fi
-
- if [ "$secret" = "generate" ]; then
- echo "Generate secret - please wait..."
- local tmp="/tmp/zt.$cfg.secret"
- zerotier-idtool generate "$tmp" > /dev/null
- secret="$(cat $tmp)"
- rm "$tmp"
-
- uci set zerotier.$cfg.secret="$secret"
- uci commit zerotier
- fi
-
- if [ -n "$secret" ]; then
- echo "$secret" > $CONFIG_PATH/identity.secret
- # make sure there is not previous identity.public
- rm -f $CONFIG_PATH/identity.public
- fi
-
- add_join() {
- # an (empty) config file will cause ZT to join a network
- touch $CONFIG_PATH/networks.d/$1.conf
- }
-
- config_list_foreach $cfg 'join' add_join
-
- procd_open_instance
- procd_add_reload_interface_trigger "$interface"
- procd_set_param command $PROG $ARGS $CONFIG_PATH
- procd_close_instance
-}
-
-service_triggers() {
- procd_add_reload_trigger zerotier
-}
-
-start_service() {
- config_load 'zerotier'
- config_foreach start_instance 'zerotier'
-}
-
-stop_instance() {
- local cfg="$1"
-
- # Remove existing link or folder
- rm -rf $CONFIG_PATH
-}
-
-stop_service() {
- config_load 'zerotier'
- config_foreach stop_instance 'zerotier'
-}
--- /dev/null
+From c578216351a4daa3916265b39b14f7c23ef15c90 Mon Sep 17 00:00:00 2001
+From: Moritz Warning <moritzwarning@web.de>
+Date: Mon, 23 Apr 2018 22:12:31 +0200
+Subject: [PATCH 1/4] find miniupnpc.h in staging directory
+
+---
+ make-linux.mk | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/make-linux.mk b/make-linux.mk
+index 2e6a8632..0cd955d1 100644
+--- a/make-linux.mk
++++ b/make-linux.mk
+@@ -22,8 +22,8 @@ ONE_OBJS+=osdep/LinuxEthernetTap.o
+ # otherwise build into binary as done on Mac and Windows.
+ ONE_OBJS+=osdep/PortMapper.o
+ override DEFS+=-DZT_USE_MINIUPNPC
+-MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' /usr/include/miniupnpc/miniupnpc.h && echo 1)
+-#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
++MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
++#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
+ ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
+ override DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
+ LDLIBS+=-lminiupnpc
+--
+2.17.0
+
+++ /dev/null
-From 61b69f74fecf3c34c0fd2003897c92790ca5a9f5 Mon Sep 17 00:00:00 2001
-From: Moritz Warning <moritzwarning@web.de>
-Date: Thu, 4 May 2017 22:13:55 +0200
-Subject: [PATCH 1/2] use external libminiupnpc and libnatpmp
-
----
- make-linux.mk | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/make-linux.mk b/make-linux.mk
-index 87d29af..f5b3d8d 100644
---- a/make-linux.mk
-+++ b/make-linux.mk
-@@ -22,20 +22,20 @@ OBJS+=ext/http-parser/http_parser.o
- # otherwise build into binary as done on Mac and Windows.
- OBJS+=osdep/PortMapper.o
- DEFS+=-DZT_USE_MINIUPNPC
--MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
--ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
-+#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
-+#ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
- DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
- LDLIBS+=-lminiupnpc
--else
-- DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR
-- OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o
--endif
--ifeq ($(wildcard /usr/include/natpmp.h),)
-- OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
--else
-+#else
-+# DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR
-+# OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o
-+#endif
-+#ifeq ($(wildcard /usr/include/natpmp.h),)
-+# OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
-+#else
- LDLIBS+=-lnatpmp
- DEFS+=-DZT_USE_SYSTEM_NATPMP
--endif
-+#endif
-
- ifeq ($(ZT_ENABLE_CLUSTER),1)
- DEFS+=-DZT_ENABLE_CLUSTER
---
-2.1.4
-
+++ /dev/null
-From b8a0598002fd08618d20cd1bbfb03559435241a8 Mon Sep 17 00:00:00 2001
-From: Moritz Warning <moritzwarning@web.de>
-Date: Thu, 4 May 2017 22:35:58 +0200
-Subject: [PATCH 2/2] pin target to linux
-
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 9511862..d5b0dfc 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,6 @@
- # Common makefile -- loads make rules for each platform
-
--OSTYPE=$(shell uname -s)
-+OSTYPE=Linux
-
- ifeq ($(OSTYPE),Darwin)
- include make-mac.mk
---
-2.1.4
-
--- /dev/null
+From 7cfe751128d412a9b780ba5e4cb11908fc71cd3d Mon Sep 17 00:00:00 2001
+From: Moritz Warning <moritzwarning@web.de>
+Date: Mon, 30 Apr 2018 16:14:30 +0200
+Subject: [PATCH 2/4] remove -pie
+
+fixes relocation "against `a local symbol' can not be used
+when making a shared object; recompile with -fPIC" error
+---
+ make-linux.mk | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/make-linux.mk b/make-linux.mk
+index 0cd955d1..add1d3ae 100644
+--- a/make-linux.mk
++++ b/make-linux.mk
+@@ -71,11 +71,11 @@ ifeq ($(ZT_DEBUG),1)
+ # C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box!
+ node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
+ else
+- CFLAGS?=-O3 -fstack-protector -fPIE
++ CFLAGS?=-O3 -fstack-protector
+ override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS)
+- CXXFLAGS?=-O3 -fstack-protector -fPIE
++ CXXFLAGS?=-O3 -fstack-protector
+ override CXXFLAGS+=-Wall -Wno-deprecated -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
+- LDFLAGS=-pie -Wl,-z,relro,-z,now
++ LDFLAGS=-Wl,-z,relro,-z,now
+ STRIP?=strip
+ STRIP+=--strip-all
+ endif
+--
+2.17.0
+
+++ /dev/null
-Index: ZeroTierOne-1.2.4/ext/json/json.hpp
-===================================================================
---- ZeroTierOne-1.2.4.orig/ext/json/json.hpp
-+++ ZeroTierOne-1.2.4/ext/json/json.hpp
-@@ -64,7 +64,7 @@ SOFTWARE.
- #endif
- #elif defined(__GNUC__)
- #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
-- #if GCC_VERSION < 40900
-+ #if GCC_VERSION < 40800
- #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
- #endif
- #endif
+++ /dev/null
-From ab8ececbe70f7c83667d6ebb592fc1df17ad26a4 Mon Sep 17 00:00:00 2001
-From: Moritz Warning <moritzwarning@web.de>
-Date: Sat, 20 Jan 2018 21:55:52 +0100
-Subject: [PATCH] Revert "Do not serve controller requests until init is done."
-
-This reverts commit f4feccc6265cc480b84c85f897b225714072d4ec.
----
- controller/JSONDB.cpp | 20 +++++++-------------
- controller/JSONDB.hpp | 15 +++++++--------
- 2 files changed, 14 insertions(+), 21 deletions(-)
-
-diff --git a/controller/JSONDB.cpp b/controller/JSONDB.cpp
-index d3e76fc1..007e0fec 100644
---- a/controller/JSONDB.cpp
-+++ b/controller/JSONDB.cpp
-@@ -26,8 +26,7 @@ static const nlohmann::json _EMPTY_JSON(nlohmann::json::object());
- static const std::map<std::string,std::string> _ZT_JSONDB_GET_HEADERS;
-
- JSONDB::JSONDB(const std::string &basePath) :
-- _basePath(basePath),
-- _ready(false)
-+ _basePath(basePath)
- {
- if ((_basePath.length() > 7)&&(_basePath.substr(0,7) == "http://")) {
- // TODO: this doesn't yet support IPv6 since bracketed address notiation isn't supported.
-@@ -50,7 +49,7 @@ JSONDB::JSONDB(const std::string &basePath) :
- OSUtils::mkdir(_basePath.c_str());
- OSUtils::lockDownFile(_basePath.c_str(),true); // networks might contain auth tokens, etc., so restrict directory permissions
- }
-- _ready = _reload(_basePath,std::string());
-+ _reload(_basePath,std::string());
- }
-
- bool JSONDB::writeRaw(const std::string &n,const std::string &obj)
-@@ -84,13 +83,9 @@ bool JSONDB::put(const std::string &n,const nlohmann::json &obj)
-
- const nlohmann::json &JSONDB::get(const std::string &n)
- {
-- while (!_ready) {
-- Thread::sleep(250);
-- _ready = _reload(_basePath,std::string());
-- }
--
- if (!_isValidObjectName(n))
- return _EMPTY_JSON;
-+
- std::map<std::string,_E>::iterator e(_db.find(n));
- if (e != _db.end())
- return e->second.obj;
-@@ -138,7 +133,7 @@ void JSONDB::erase(const std::string &n)
- _db.erase(n);
- }
-
--bool JSONDB::_reload(const std::string &p,const std::string &b)
-+void JSONDB::_reload(const std::string &p,const std::string &b)
- {
- if (_httpAddr) {
- std::string body;
-@@ -155,11 +150,11 @@ bool JSONDB::_reload(const std::string &p,const std::string &b)
- _db[tmp].obj = i.value();
- }
- }
-- return true;
- }
-- } catch ( ... ) {} // invalid JSON, so maybe incomplete request
-+ } catch ( ... ) {
-+ // TODO: report error?
-+ }
- }
-- return false;
- } else {
- std::vector<std::string> dl(OSUtils::listDirectory(p.c_str(),true));
- for(std::vector<std::string>::const_iterator di(dl.begin());di!=dl.end();++di) {
-@@ -169,7 +164,6 @@ bool JSONDB::_reload(const std::string &p,const std::string &b)
- this->_reload((p + ZT_PATH_SEPARATOR + *di),(b + *di + ZT_PATH_SEPARATOR));
- }
- }
-- return true;
- }
- }
-
-diff --git a/controller/JSONDB.hpp b/controller/JSONDB.hpp
-index beafbaf5..c19112ed 100644
---- a/controller/JSONDB.hpp
-+++ b/controller/JSONDB.hpp
-@@ -36,7 +36,6 @@
- #include "../ext/json/json.hpp"
- #include "../osdep/OSUtils.hpp"
- #include "../osdep/Http.hpp"
--#include "../osdep/Thread.hpp"
-
- namespace ZeroTier {
-
-@@ -48,6 +47,12 @@ class JSONDB
- public:
- JSONDB(const std::string &basePath);
-
-+ inline void reload()
-+ {
-+ _db.clear();
-+ _reload(_basePath,std::string());
-+ }
-+
- bool writeRaw(const std::string &n,const std::string &obj);
-
- bool put(const std::string &n,const nlohmann::json &obj);
-@@ -74,11 +79,6 @@ public:
- template<typename F>
- inline void filter(const std::string &prefix,F func)
- {
-- while (!_ready) {
-- Thread::sleep(250);
-- _ready = _reload(_basePath,std::string());
-- }
--
- for(std::map<std::string,_E>::iterator i(_db.lower_bound(prefix));i!=_db.end();) {
- if ((i->first.length() >= prefix.length())&&(!memcmp(i->first.data(),prefix.data(),prefix.length()))) {
- if (!func(i->first,get(i->first))) {
-@@ -94,7 +94,7 @@ public:
- inline bool operator!=(const JSONDB &db) const { return (!(*this == db)); }
-
- private:
-- bool _reload(const std::string &p,const std::string &b);
-+ void _reload(const std::string &p,const std::string &b);
- bool _isValidObjectName(const std::string &n);
- std::string _genPath(const std::string &n,bool create);
-
-@@ -108,7 +108,6 @@ private:
- InetAddress _httpAddr;
- std::string _basePath;
- std::map<std::string,_E> _db;
-- volatile bool _ready;
- };
-
- } // namespace ZeroTier
---
-2.15.1
-
--- /dev/null
+From a2cf8bf645d25f18cbc2ed7ad4b9a25725811afd Mon Sep 17 00:00:00 2001
+From: Moritz Warning <moritzwarning@web.de>
+Date: Wed, 2 May 2018 16:06:46 +0200
+Subject: [PATCH 4/4] accept external linker flags
+
+---
+ make-linux.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/make-linux.mk b/make-linux.mk
+index 49e14f70..8e766bfb 100644
+--- a/make-linux.mk
++++ b/make-linux.mk
+@@ -75,7 +75,7 @@ else
+ override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS)
+ CXXFLAGS?=-O3 -fstack-protector
+ override CXXFLAGS+=-Wall -Wno-deprecated -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
+- LDFLAGS=-Wl,-z,relro,-z,now
++ LDFLAGS+=-Wl,-z,relro,-z,now
+ STRIP?=strip
+ STRIP+=--strip-all
+ endif
+--
+2.17.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=znc
-PKG_VERSION:=1.6.5
-PKG_RELEASE:=1
+PKG_VERSION:=1.7.1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://znc.in/releases \
- http://znc.in/releases/archive
-PKG_HASH:=2f0225d49c53a01f8d94feea4619a6fe92857792bb3401a4eb1edd65f0342aca
+PKG_SOURCE_URL:=https://znc.in/releases \
+ https://znc.in/releases/archive
+PKG_HASH:=44cfea7158ea05dc2547c7c6bc22371e66c869def90351de0ab90a9c200d39c4
-PKG_MAINTAINER:=Jonas Gorski <jogo@openwrt.org>
+PKG_MAINTAINER:=Jonas Gorski <jonas.gorski@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1
-PKG_CONFIG_DEPENDS := CONFIG_ZNC_ICU
+PKG_CONFIG_DEPENDS:= CONFIG_ZNC_ICU
define Package/znc/default
SUBMENU:=Instant Messaging
SECTION:=net
CATEGORY:=Network
TITLE:=ZNC
- URL:=http://en.znc.in/
+ URL:=https://znc.in/
USERID:=znc:znc
endef
include $(INCLUDE_DIR)/package.mk
CONFIGURE_VARS += \
- CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \
+ CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
LDFLAGS="-nodefaultlibs -lc -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
LIBS="-lstdc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc"
+++ /dev/null
-From adf42357c9043c38d9a9b47544a1b46445bdae19 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
-Date: Wed, 6 Apr 2011 04:10:23 +0200
-Subject: [PATCH] Move the root check to after config parsing
-
----
- src/main.cpp | 27 ++++++++++++++-------------
- 1 file changed, 14 insertions(+), 13 deletions(-)
-
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -312,19 +312,6 @@ int main(int argc, char** argv) {
- CUtils::PrintStatus(true, "");
- }
-
-- if (isRoot()) {
-- CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid");
-- CUtils::PrintError("reasons for this and it can, in theory, cause great damage!");
-- if (!bAllowRoot) {
-- CZNC::DestroyInstance();
-- return 1;
-- }
-- CUtils::PrintError("You have been warned.");
-- CUtils::PrintError("Hit CTRL+C now if you don't want to run ZNC as root.");
-- CUtils::PrintError("ZNC will start in 30 seconds.");
-- sleep(30);
-- }
--
- if (bMakeConf) {
- if (!pZNC->WriteNewConfig(sConfig)) {
- CZNC::DestroyInstance();
-@@ -346,6 +333,20 @@ int main(int argc, char** argv) {
- return 1;
- }
-
-+ if (isRoot()) {
-+ CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid");
-+ CUtils::PrintError("reasons for this and it can, in theory, cause great damage!");
-+ if (!bAllowRoot) {
-+ CZNC::DestroyInstance();
-+ return 1;
-+ }
-+ CUtils::PrintError("You have been warned.");
-+ CUtils::PrintError("Hit CTRL+C now if you don't want to run ZNC as root.");
-+ CUtils::PrintError("ZNC will start in 30 seconds.");
-+ sleep(30);
-+ }
-+
-+
- if (bForeground) {
- int iPid = getpid();
- CUtils::PrintMessage("Staying open for debugging [pid: " + CString(iPid) + "]");
--- a/Makefile.in
+++ b/Makefile.in
-@@ -112,7 +112,7 @@ clean:
+@@ -128,7 +128,7 @@ clean:
distclean: clean
rm -rf $(DISTCLEAN)
$(Q)$(CXX) $(CXXFLAGS) -c -o $@ $< -MD -MF .depend/$*.dep -MT $@
--- a/modules/Makefile.in
+++ b/modules/Makefile.in
-@@ -112,12 +112,12 @@ install_datadir:
+@@ -127,12 +127,12 @@ install_datadir:
clean:
rm -rf $(CLEAN)
--- a/src/main.cpp
+++ b/src/main.cpp
-@@ -304,10 +304,12 @@ int main(int argc, char** argv) {
- CUtils::PrintStatus(false, "");
- CUtils::PrintError("No modules found. Perhaps you didn't install ZNC properly?");
- CUtils::PrintError("Read http://wiki.znc.in/Installation for instructions.");
+@@ -412,12 +412,14 @@ int main(int argc, char** argv) {
+ "No modules found. Perhaps you didn't install ZNC properly?");
+ CUtils::PrintError(
+ "Read https://wiki.znc.in/Installation for instructions.");
+#if 0
- if (!CUtils::GetBoolInput("Do you really want to run ZNC without any modules?", false)) {
- CZNC::DestroyInstance();
- return 1;
- }
+ if (!CUtils::GetBoolInput(
+ "Do you really want to run ZNC without any modules?",
+ false)) {
+ CZNC::DestroyInstance();
+ return 1;
+ }
+#endif
- }
- CUtils::PrintStatus(true, "");
- }
+ }
+ CUtils::PrintStatus(true, "");
+ }
include $(TOPDIR)/rules.mk
PKG_NAME:=alsa-utils
-PKG_VERSION:=1.1.0
-PKG_RELEASE:=1
+PKG_VERSION:=1.1.6
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \
- http://alsa.cybermirror.org/utils/
-PKG_HASH:=3b1c3135b76e14532d3dd23fb15759ddd7daf9ffbc183f7a9a0a3a86374748f1
+ http://distfiles.gentoo.org/distfiles/
+PKG_HASH:=155caecc40b2220f686f34ba3655a53e3bdbc0586adb1056733949feaaf7d36e
PKG_INSTALL:=1
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
--disable-alsatest \
--disable-bat \
--disable-xmlto \
+ --disable-rst2man \
--with-curses=ncursesw
define Package/alsa-utils/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amidi $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aplaymidi $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arecordmidi $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iecset $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/alsaloop $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/alsatplg $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/alsaucm $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aseqdump $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aseqnet $(1)/usr/bin/
endef
--- /dev/null
+diff --git a/alsaloop/Makefile.am b/alsaloop/Makefile.am
+index 4cdf20b..0715b02 100644
+--- a/alsaloop/Makefile.am
++++ b/alsaloop/Makefile.am
+@@ -1,9 +1,9 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/include
+ LDADD = -lm
+ AM_CFLAGS = -D_GNU_SOURCE
+-if HAVE_SAMPLERATE
+-LDADD += -lsamplerate
+-endif
++# if HAVE_SAMPLERATE
++# LDADD += -lsamplerate
++# endif
+ # LDFLAGS = -static
+ # CFLAGS += -g -Wall
+
+diff --git a/alsaloop/Makefile.in b/alsaloop/Makefile.in
+index 374cbcc..25dbae3 100644
+--- a/alsaloop/Makefile.in
++++ b/alsaloop/Makefile.in
+@@ -51,7 +51,7 @@ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+-@HAVE_SAMPLERATE_TRUE@am__append_1 = -lsamplerate
++# @HAVE_SAMPLERATE_TRUE@am__append_1 = -lsamplerate
+ bin_PROGRAMS = alsaloop$(EXEEXT)
+ subdir = alsaloop
+ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+diff --git a/configure.ac b/configure.ac
+index 3e8f1e8..487e5de 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -38,8 +38,8 @@ AC_CHECK_HEADERS([alsa/use-case.h], [have_ucm="yes"], [have_ucm="no"],
+ [#include <alsa/asoundlib.h>])
+ AC_CHECK_HEADERS([alsa/topology.h], [have_topology="yes"], [have_topology="no"],
+ [#include <alsa/asoundlib.h>])
+-AC_CHECK_HEADERS([samplerate.h], [have_samplerate="yes"], [have_samplerate="no"],
+- [#include <samplerate.h>])
++dnl AC_CHECK_HEADERS([samplerate.h], [have_samplerate="no"], [have_samplerate="no"],
++dnl [#include <samplerate.h>])
+
+ AC_CHECK_LIB([asound], [snd_seq_client_info_get_card], [HAVE_SEQ_CLIENT_INFO_GET_CARD="yes"])
+ if test "$HAVE_SEQ_CLIENT_INFO_GET_CARD" = "yes" ; then
#
-# Copyright (C) 2014 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
PKG_NAME:=espeak
PKG_VERSION:=1.48.04
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.zip
PKG_SOURCE_URL:=@SF/espeak
MAKE_PATH:=./src
+# Use system header for portaudio
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ rm $(PKG_BUILD_DIR)/src/portaudio.h
+endef
+
define Package/espeak/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/espeak $(1)/usr/bin/
--- /dev/null
+--- a/src/tr_languages.cpp
++++ b/src/tr_languages.cpp
+@@ -198,7 +198,7 @@ static const unsigned short chars_ignore
+ 0x200d, 1, // zero width joiner
+ 0, 0 };
+
+-const char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8
++const unsigned char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8
+
+
+ static Translator* NewTranslator(void)
+@@ -758,7 +758,7 @@ Translator *SelectTranslator(const char
+ tr->langopts.stress_flags = S_FINAL_SPANISH | S_FINAL_DIM_ONLY | S_FINAL_NO_2;
+ tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_AND_UNITS | NUM_OMIT_1_HUNDRED | NUM_OMIT_1_THOUSAND | NUM_ROMAN | NUM_ROMAN_ORDINAL;
+ tr->langopts.numbers2 = NUM2_ORDINAL_NO_AND;
+- tr->langopts.roman_suffix = string_ordinal;
++ tr->langopts.roman_suffix = (const char *)string_ordinal;
+ }
+ else
+ if(name2 == L_pap)
+++ /dev/null
---- a/src/portaudio.h
-+++ /dev/null
-@@ -1,466 +0,0 @@
--// NOTE: Copy this file to portaudio.h in order to compile with V18 portaudio
--
--
--#ifndef PORT_AUDIO_H
--#define PORT_AUDIO_H
--
--#ifdef __cplusplus
--extern "C"
--{
--#endif /* __cplusplus */
--
--/*
-- * $Id: portaudio.h,v 1.5 2002/03/26 18:04:22 philburk Exp $
-- * PortAudio Portable Real-Time Audio Library
-- * PortAudio API Header File
-- * Latest version available at: http://www.audiomulch.com/portaudio/
-- *
-- * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining
-- * a copy of this software and associated documentation files
-- * (the "Software"), to deal in the Software without restriction,
-- * including without limitation the rights to use, copy, modify, merge,
-- * publish, distribute, sublicense, and/or sell copies of the Software,
-- * and to permit persons to whom the Software is furnished to do so,
-- * subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be
-- * included in all copies or substantial portions of the Software.
-- *
-- * Any person wishing to distribute modifications to the Software is
-- * requested to send the modifications to the original developer so that
-- * they can be incorporated into the canonical version.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- *
-- */
--
--typedef int PaError;
--typedef enum {
-- paNoError = 0,
--
-- paHostError = -10000,
-- paInvalidChannelCount,
-- paInvalidSampleRate,
-- paInvalidDeviceId,
-- paInvalidFlag,
-- paSampleFormatNotSupported,
-- paBadIODeviceCombination,
-- paInsufficientMemory,
-- paBufferTooBig,
-- paBufferTooSmall,
-- paNullCallback,
-- paBadStreamPtr,
-- paTimedOut,
-- paInternalError,
-- paDeviceUnavailable
--} PaErrorNum;
--
--/*
-- Pa_Initialize() is the library initialisation function - call this before
-- using the library.
--
--*/
--
--PaError Pa_Initialize( void );
--
--/*
-- Pa_Terminate() is the library termination function - call this after
-- using the library.
--
--*/
--
--PaError Pa_Terminate( void );
--
--/*
-- Pa_GetHostError() returns a host specific error code.
-- This can be called after receiving a PortAudio error code of paHostError.
--
--*/
--
--long Pa_GetHostError( void );
--
--/*
-- Pa_GetErrorText() translates the supplied PortAudio error number
-- into a human readable message.
--
--*/
--
--const char *Pa_GetErrorText( PaError errnum );
--
--/*
-- Sample formats
--
-- These are formats used to pass sound data between the callback and the
-- stream. Each device has a "native" format which may be used when optimum
-- efficiency or control over conversion is required.
--
-- Formats marked "always available" are supported (emulated) by all
-- PortAudio implementations.
--
-- The floating point representation (paFloat32) uses +1.0 and -1.0 as the
-- maximum and minimum respectively.
--
-- paUInt8 is an unsigned 8 bit format where 128 is considered "ground"
--
--*/
--
--typedef unsigned long PaSampleFormat;
--#define paFloat32 ((PaSampleFormat) (1<<0)) /*always available*/
--#define paInt16 ((PaSampleFormat) (1<<1)) /*always available*/
--#define paInt32 ((PaSampleFormat) (1<<2)) /*always available*/
--#define paInt24 ((PaSampleFormat) (1<<3))
--#define paPackedInt24 ((PaSampleFormat) (1<<4))
--#define paInt8 ((PaSampleFormat) (1<<5))
--#define paUInt8 ((PaSampleFormat) (1<<6))
--#define paCustomFormat ((PaSampleFormat) (1<<16))
--
--/*
-- Device enumeration mechanism.
--
-- Device ids range from 0 to Pa_CountDevices()-1.
--
-- Devices may support input, output or both.
--
--*/
--
--typedef int PaDeviceID;
--#define paNoDevice -1
--
--int Pa_CountDevices( void );
--
--typedef struct
--{
-- int structVersion;
-- const char *name;
-- int maxInputChannels;
-- int maxOutputChannels;
-- /* Number of discrete rates, or -1 if range supported. */
-- int numSampleRates;
-- /* Array of supported sample rates, or {min,max} if range supported. */
-- const double *sampleRates;
-- PaSampleFormat nativeSampleFormats;
--}
--PaDeviceInfo;
--
--/*
-- Pa_GetDefaultInputDeviceID(), Pa_GetDefaultOutputDeviceID() return the
-- default device ids for input and output respectively, or paNoDevice if
-- no device is available.
-- The result can be passed to Pa_OpenStream().
--
-- On the PC, the user can specify a default device by
-- setting an environment variable. For example, to use device #1.
--
-- set PA_RECOMMENDED_OUTPUT_DEVICE=1
--
-- The user should first determine the available device ids by using
-- the supplied application "pa_devs".
--
--*/
--
--PaDeviceID Pa_GetDefaultInputDeviceID( void );
--PaDeviceID Pa_GetDefaultOutputDeviceID( void );
--
--
--
--/*
-- Pa_GetDeviceInfo() returns a pointer to an immutable PaDeviceInfo structure
-- for the device specified.
-- If the device parameter is out of range the function returns NULL.
--
-- PortAudio manages the memory referenced by the returned pointer, the client
-- must not manipulate or free the memory. The pointer is only guaranteed to be
-- valid between calls to Pa_Initialize() and Pa_Terminate().
--
--*/
--
--const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceID device );
--
--/*
-- PaTimestamp is used to represent a continuous sample clock with arbitrary
-- start time that can be used for syncronization. The type is used for the
-- outTime argument to the PortAudioCallback and as the result of Pa_StreamTime()
--
--*/
--
--typedef double PaTimestamp;
--
--/*
-- PortAudioCallback is implemented by PortAudio clients.
--
-- inputBuffer and outputBuffer are arrays of interleaved samples,
-- the format, packing and number of channels used by the buffers are
-- determined by parameters to Pa_OpenStream() (see below).
--
-- framesPerBuffer is the number of sample frames to be processed by the callback.
--
-- outTime is the time in samples when the buffer(s) processed by
-- this callback will begin being played at the audio output.
-- See also Pa_StreamTime()
--
-- userData is the value of a user supplied pointer passed to Pa_OpenStream()
-- intended for storing synthesis data etc.
--
-- return value:
-- The callback can return a non-zero value to stop the stream. This may be
-- useful in applications such as soundfile players where a specific duration
-- of output is required. However, it is not necessary to utilise this mechanism
-- as StopStream() will also terminate the stream. A callback returning a
-- non-zero value must fill the entire outputBuffer.
--
-- NOTE: None of the other stream functions may be called from within the
-- callback function except for Pa_GetCPULoad().
--
--*/
--
--typedef int (PortAudioCallback)(
-- void *inputBuffer, void *outputBuffer,
-- unsigned long framesPerBuffer,
-- PaTimestamp outTime, void *userData );
--
--
--/*
-- Stream flags
--
-- These flags may be supplied (ored together) in the streamFlags argument to
-- the Pa_OpenStream() function.
--
--*/
--
--#define paNoFlag (0)
--#define paClipOff (1<<0) /* disable default clipping of out of range samples */
--#define paDitherOff (1<<1) /* disable default dithering */
--#define paPlatformSpecificFlags (0x00010000)
--typedef unsigned long PaStreamFlags;
--
--/*
-- A single PortAudioStream provides multiple channels of real-time
-- input and output audio streaming to a client application.
-- Pointers to PortAudioStream objects are passed between PortAudio functions.
--*/
--
--typedef void PortAudioStream;
--#define PaStream PortAudioStream
--
--/*
-- Pa_OpenStream() opens a stream for either input, output or both.
--
-- stream is the address of a PortAudioStream pointer which will receive
-- a pointer to the newly opened stream.
--
-- inputDevice is the id of the device used for input (see PaDeviceID above.)
-- inputDevice may be paNoDevice to indicate that an input device is not required.
--
-- numInputChannels is the number of channels of sound to be delivered to the
-- callback. It can range from 1 to the value of maxInputChannels in the
-- PaDeviceInfo record for the device specified by the inputDevice parameter.
-- If inputDevice is paNoDevice numInputChannels is ignored.
--
-- inputSampleFormat is the sample format of inputBuffer provided to the callback
-- function. inputSampleFormat may be any of the formats described by the
-- PaSampleFormat enumeration (see above). PortAudio guarantees support for
-- the device's native formats (nativeSampleFormats in the device info record)
-- and additionally 16 and 32 bit integer and 32 bit floating point formats.
-- Support for other formats is implementation defined.
--
-- inputDriverInfo is a pointer to an optional driver specific data structure
-- containing additional information for device setup or stream processing.
-- inputDriverInfo is never required for correct operation. If not used
-- inputDriverInfo should be NULL.
--
-- outputDevice is the id of the device used for output (see PaDeviceID above.)
-- outputDevice may be paNoDevice to indicate that an output device is not required.
--
-- numOutputChannels is the number of channels of sound to be supplied by the
-- callback. See the definition of numInputChannels above for more details.
--
-- outputSampleFormat is the sample format of the outputBuffer filled by the
-- callback function. See the definition of inputSampleFormat above for more
-- details.
--
-- outputDriverInfo is a pointer to an optional driver specific data structure
-- containing additional information for device setup or stream processing.
-- outputDriverInfo is never required for correct operation. If not used
-- outputDriverInfo should be NULL.
--
-- sampleRate is the desired sampleRate. For full-duplex streams it is the
-- sample rate for both input and output
--
-- framesPerBuffer is the length in sample frames of all internal sample buffers
-- used for communication with platform specific audio routines. Wherever
-- possible this corresponds to the framesPerBuffer parameter passed to the
-- callback function.
--
-- numberOfBuffers is the number of buffers used for multibuffered communication
-- with the platform specific audio routines. If you pass zero, then an optimum
-- value will be chosen for you internally. This parameter is provided only
-- as a guide - and does not imply that an implementation must use multibuffered
-- i/o when reliable double buffering is available (such as SndPlayDoubleBuffer()
-- on the Macintosh.)
--
-- streamFlags may contain a combination of flags ORed together.
-- These flags modify the behaviour of the streaming process. Some flags may only
-- be relevant to certain buffer formats.
--
-- callback is a pointer to a client supplied function that is responsible
-- for processing and filling input and output buffers (see above for details.)
--
-- userData is a client supplied pointer which is passed to the callback
-- function. It could for example, contain a pointer to instance data necessary
-- for processing the audio buffers.
--
-- return value:
-- Upon success Pa_OpenStream() returns PaNoError and places a pointer to a
-- valid PortAudioStream in the stream argument. The stream is inactive (stopped).
-- If a call to Pa_OpenStream() fails a non-zero error code is returned (see
-- PaError above) and the value of stream is invalid.
--
--*/
--
--PaError Pa_OpenStream( PortAudioStream** stream,
-- PaDeviceID inputDevice,
-- int numInputChannels,
-- PaSampleFormat inputSampleFormat,
-- void *inputDriverInfo,
-- PaDeviceID outputDevice,
-- int numOutputChannels,
-- PaSampleFormat outputSampleFormat,
-- void *outputDriverInfo,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- unsigned long numberOfBuffers,
-- PaStreamFlags streamFlags,
-- PortAudioCallback *callback,
-- void *userData );
--
--
--/*
-- Pa_OpenDefaultStream() is a simplified version of Pa_OpenStream() that opens
-- the default input and/or output devices. Most parameters have identical meaning
-- to their Pa_OpenStream() counterparts, with the following exceptions:
--
-- If either numInputChannels or numOutputChannels is 0 the respective device
-- is not opened. This has the same effect as passing paNoDevice in the device
-- arguments to Pa_OpenStream().
--
-- sampleFormat applies to both the input and output buffers.
--
--*/
--
--PaError Pa_OpenDefaultStream( PortAudioStream** stream,
-- int numInputChannels,
-- int numOutputChannels,
-- PaSampleFormat sampleFormat,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- unsigned long numberOfBuffers,
-- PortAudioCallback *callback,
-- void *userData );
--
--/*
-- Pa_CloseStream() closes an audio stream, flushing any pending buffers.
--
--*/
--
--PaError Pa_CloseStream( PortAudioStream* );
--
--/*
-- Pa_StartStream() and Pa_StopStream() begin and terminate audio processing.
-- Pa_StopStream() waits until all pending audio buffers have been played.
-- Pa_AbortStream() stops playing immediately without waiting for pending
-- buffers to complete.
--
--*/
--
--PaError Pa_StartStream( PortAudioStream *stream );
--
--PaError Pa_StopStream( PortAudioStream *stream );
--
--PaError Pa_AbortStream( PortAudioStream *stream );
--
--/*
-- Pa_StreamActive() returns one (1) when the stream is active (ie playing
-- or recording audio), zero (0) when not playing, or a negative error number
-- if the stream is invalid.
-- The stream is active between calls to Pa_StartStream() and Pa_StopStream(),
-- but may also become inactive if the callback returns a non-zero value.
-- In the latter case, the stream is considered inactive after the last
-- buffer has finished playing.
--
--*/
--
--PaError Pa_StreamActive( PortAudioStream *stream );
--
--/*
-- Pa_StreamTime() returns the current output time in samples for the stream.
-- This time may be used as a time reference (for example synchronizing audio to
-- MIDI).
--
--*/
--
--PaTimestamp Pa_StreamTime( PortAudioStream *stream );
--
--/*
-- Pa_GetCPULoad() returns the CPU Load for the stream.
-- The "CPU Load" is a fraction of total CPU time consumed by the stream's
-- audio processing routines including, but not limited to the client supplied
-- callback.
-- A value of 0.5 would imply that PortAudio and the sound generating
-- callback was consuming roughly 50% of the available CPU time.
-- This function may be called from the callback function or the application.
--
--*/
--
--double Pa_GetCPULoad( PortAudioStream* stream );
--
--/*
-- Pa_GetMinNumBuffers() returns the minimum number of buffers required by
-- the current host based on minimum latency.
-- On the PC, for the DirectSound implementation, latency can be optionally set
-- by user by setting an environment variable.
-- For example, to set latency to 200 msec, put:
--
-- set PA_MIN_LATENCY_MSEC=200
--
-- in the AUTOEXEC.BAT file and reboot.
-- If the environment variable is not set, then the latency will be determined
-- based on the OS. Windows NT has higher latency than Win95.
--
--*/
--
--int Pa_GetMinNumBuffers( int framesPerBuffer, double sampleRate );
--
--/*
-- Pa_Sleep() puts the caller to sleep for at least 'msec' milliseconds.
-- You may sleep longer than the requested time so don't rely on this for
-- accurate musical timing.
--
-- Pa_Sleep() is provided as a convenience for authors of portable code (such as
-- the tests and examples in the PortAudio distribution.)
--
--*/
--
--void Pa_Sleep( long msec );
--
--/*
-- Pa_GetSampleSize() returns the size in bytes of a single sample in the
-- supplied PaSampleFormat, or paSampleFormatNotSupported if the format is
-- no supported.
--
--*/
--
--PaError Pa_GetSampleSize( PaSampleFormat format );
--
--
--#ifdef __cplusplus
--}
--#endif /* __cplusplus */
--#endif /* PORT_AUDIO_H */
---- a/src/portaudio18.h
-+++ /dev/null
-@@ -1,466 +0,0 @@
--// NOTE: Copy this file to portaudio.h in order to compile with V18 portaudio
--
--
--#ifndef PORT_AUDIO_H
--#define PORT_AUDIO_H
--
--#ifdef __cplusplus
--extern "C"
--{
--#endif /* __cplusplus */
--
--/*
-- * $Id: portaudio.h,v 1.5 2002/03/26 18:04:22 philburk Exp $
-- * PortAudio Portable Real-Time Audio Library
-- * PortAudio API Header File
-- * Latest version available at: http://www.audiomulch.com/portaudio/
-- *
-- * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining
-- * a copy of this software and associated documentation files
-- * (the "Software"), to deal in the Software without restriction,
-- * including without limitation the rights to use, copy, modify, merge,
-- * publish, distribute, sublicense, and/or sell copies of the Software,
-- * and to permit persons to whom the Software is furnished to do so,
-- * subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be
-- * included in all copies or substantial portions of the Software.
-- *
-- * Any person wishing to distribute modifications to the Software is
-- * requested to send the modifications to the original developer so that
-- * they can be incorporated into the canonical version.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- *
-- */
--
--typedef int PaError;
--typedef enum {
-- paNoError = 0,
--
-- paHostError = -10000,
-- paInvalidChannelCount,
-- paInvalidSampleRate,
-- paInvalidDeviceId,
-- paInvalidFlag,
-- paSampleFormatNotSupported,
-- paBadIODeviceCombination,
-- paInsufficientMemory,
-- paBufferTooBig,
-- paBufferTooSmall,
-- paNullCallback,
-- paBadStreamPtr,
-- paTimedOut,
-- paInternalError,
-- paDeviceUnavailable
--} PaErrorNum;
--
--/*
-- Pa_Initialize() is the library initialisation function - call this before
-- using the library.
--
--*/
--
--PaError Pa_Initialize( void );
--
--/*
-- Pa_Terminate() is the library termination function - call this after
-- using the library.
--
--*/
--
--PaError Pa_Terminate( void );
--
--/*
-- Pa_GetHostError() returns a host specific error code.
-- This can be called after receiving a PortAudio error code of paHostError.
--
--*/
--
--long Pa_GetHostError( void );
--
--/*
-- Pa_GetErrorText() translates the supplied PortAudio error number
-- into a human readable message.
--
--*/
--
--const char *Pa_GetErrorText( PaError errnum );
--
--/*
-- Sample formats
--
-- These are formats used to pass sound data between the callback and the
-- stream. Each device has a "native" format which may be used when optimum
-- efficiency or control over conversion is required.
--
-- Formats marked "always available" are supported (emulated) by all
-- PortAudio implementations.
--
-- The floating point representation (paFloat32) uses +1.0 and -1.0 as the
-- maximum and minimum respectively.
--
-- paUInt8 is an unsigned 8 bit format where 128 is considered "ground"
--
--*/
--
--typedef unsigned long PaSampleFormat;
--#define paFloat32 ((PaSampleFormat) (1<<0)) /*always available*/
--#define paInt16 ((PaSampleFormat) (1<<1)) /*always available*/
--#define paInt32 ((PaSampleFormat) (1<<2)) /*always available*/
--#define paInt24 ((PaSampleFormat) (1<<3))
--#define paPackedInt24 ((PaSampleFormat) (1<<4))
--#define paInt8 ((PaSampleFormat) (1<<5))
--#define paUInt8 ((PaSampleFormat) (1<<6))
--#define paCustomFormat ((PaSampleFormat) (1<<16))
--
--/*
-- Device enumeration mechanism.
--
-- Device ids range from 0 to Pa_CountDevices()-1.
--
-- Devices may support input, output or both.
--
--*/
--
--typedef int PaDeviceID;
--#define paNoDevice -1
--
--int Pa_CountDevices( void );
--
--typedef struct
--{
-- int structVersion;
-- const char *name;
-- int maxInputChannels;
-- int maxOutputChannels;
-- /* Number of discrete rates, or -1 if range supported. */
-- int numSampleRates;
-- /* Array of supported sample rates, or {min,max} if range supported. */
-- const double *sampleRates;
-- PaSampleFormat nativeSampleFormats;
--}
--PaDeviceInfo;
--
--/*
-- Pa_GetDefaultInputDeviceID(), Pa_GetDefaultOutputDeviceID() return the
-- default device ids for input and output respectively, or paNoDevice if
-- no device is available.
-- The result can be passed to Pa_OpenStream().
--
-- On the PC, the user can specify a default device by
-- setting an environment variable. For example, to use device #1.
--
-- set PA_RECOMMENDED_OUTPUT_DEVICE=1
--
-- The user should first determine the available device ids by using
-- the supplied application "pa_devs".
--
--*/
--
--PaDeviceID Pa_GetDefaultInputDeviceID( void );
--PaDeviceID Pa_GetDefaultOutputDeviceID( void );
--
--
--
--/*
-- Pa_GetDeviceInfo() returns a pointer to an immutable PaDeviceInfo structure
-- for the device specified.
-- If the device parameter is out of range the function returns NULL.
--
-- PortAudio manages the memory referenced by the returned pointer, the client
-- must not manipulate or free the memory. The pointer is only guaranteed to be
-- valid between calls to Pa_Initialize() and Pa_Terminate().
--
--*/
--
--const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceID device );
--
--/*
-- PaTimestamp is used to represent a continuous sample clock with arbitrary
-- start time that can be used for syncronization. The type is used for the
-- outTime argument to the PortAudioCallback and as the result of Pa_StreamTime()
--
--*/
--
--typedef double PaTimestamp;
--
--/*
-- PortAudioCallback is implemented by PortAudio clients.
--
-- inputBuffer and outputBuffer are arrays of interleaved samples,
-- the format, packing and number of channels used by the buffers are
-- determined by parameters to Pa_OpenStream() (see below).
--
-- framesPerBuffer is the number of sample frames to be processed by the callback.
--
-- outTime is the time in samples when the buffer(s) processed by
-- this callback will begin being played at the audio output.
-- See also Pa_StreamTime()
--
-- userData is the value of a user supplied pointer passed to Pa_OpenStream()
-- intended for storing synthesis data etc.
--
-- return value:
-- The callback can return a non-zero value to stop the stream. This may be
-- useful in applications such as soundfile players where a specific duration
-- of output is required. However, it is not necessary to utilise this mechanism
-- as StopStream() will also terminate the stream. A callback returning a
-- non-zero value must fill the entire outputBuffer.
--
-- NOTE: None of the other stream functions may be called from within the
-- callback function except for Pa_GetCPULoad().
--
--*/
--
--typedef int (PortAudioCallback)(
-- void *inputBuffer, void *outputBuffer,
-- unsigned long framesPerBuffer,
-- PaTimestamp outTime, void *userData );
--
--
--/*
-- Stream flags
--
-- These flags may be supplied (ored together) in the streamFlags argument to
-- the Pa_OpenStream() function.
--
--*/
--
--#define paNoFlag (0)
--#define paClipOff (1<<0) /* disable default clipping of out of range samples */
--#define paDitherOff (1<<1) /* disable default dithering */
--#define paPlatformSpecificFlags (0x00010000)
--typedef unsigned long PaStreamFlags;
--
--/*
-- A single PortAudioStream provides multiple channels of real-time
-- input and output audio streaming to a client application.
-- Pointers to PortAudioStream objects are passed between PortAudio functions.
--*/
--
--typedef void PortAudioStream;
--#define PaStream PortAudioStream
--
--/*
-- Pa_OpenStream() opens a stream for either input, output or both.
--
-- stream is the address of a PortAudioStream pointer which will receive
-- a pointer to the newly opened stream.
--
-- inputDevice is the id of the device used for input (see PaDeviceID above.)
-- inputDevice may be paNoDevice to indicate that an input device is not required.
--
-- numInputChannels is the number of channels of sound to be delivered to the
-- callback. It can range from 1 to the value of maxInputChannels in the
-- PaDeviceInfo record for the device specified by the inputDevice parameter.
-- If inputDevice is paNoDevice numInputChannels is ignored.
--
-- inputSampleFormat is the sample format of inputBuffer provided to the callback
-- function. inputSampleFormat may be any of the formats described by the
-- PaSampleFormat enumeration (see above). PortAudio guarantees support for
-- the device's native formats (nativeSampleFormats in the device info record)
-- and additionally 16 and 32 bit integer and 32 bit floating point formats.
-- Support for other formats is implementation defined.
--
-- inputDriverInfo is a pointer to an optional driver specific data structure
-- containing additional information for device setup or stream processing.
-- inputDriverInfo is never required for correct operation. If not used
-- inputDriverInfo should be NULL.
--
-- outputDevice is the id of the device used for output (see PaDeviceID above.)
-- outputDevice may be paNoDevice to indicate that an output device is not required.
--
-- numOutputChannels is the number of channels of sound to be supplied by the
-- callback. See the definition of numInputChannels above for more details.
--
-- outputSampleFormat is the sample format of the outputBuffer filled by the
-- callback function. See the definition of inputSampleFormat above for more
-- details.
--
-- outputDriverInfo is a pointer to an optional driver specific data structure
-- containing additional information for device setup or stream processing.
-- outputDriverInfo is never required for correct operation. If not used
-- outputDriverInfo should be NULL.
--
-- sampleRate is the desired sampleRate. For full-duplex streams it is the
-- sample rate for both input and output
--
-- framesPerBuffer is the length in sample frames of all internal sample buffers
-- used for communication with platform specific audio routines. Wherever
-- possible this corresponds to the framesPerBuffer parameter passed to the
-- callback function.
--
-- numberOfBuffers is the number of buffers used for multibuffered communication
-- with the platform specific audio routines. If you pass zero, then an optimum
-- value will be chosen for you internally. This parameter is provided only
-- as a guide - and does not imply that an implementation must use multibuffered
-- i/o when reliable double buffering is available (such as SndPlayDoubleBuffer()
-- on the Macintosh.)
--
-- streamFlags may contain a combination of flags ORed together.
-- These flags modify the behaviour of the streaming process. Some flags may only
-- be relevant to certain buffer formats.
--
-- callback is a pointer to a client supplied function that is responsible
-- for processing and filling input and output buffers (see above for details.)
--
-- userData is a client supplied pointer which is passed to the callback
-- function. It could for example, contain a pointer to instance data necessary
-- for processing the audio buffers.
--
-- return value:
-- Upon success Pa_OpenStream() returns PaNoError and places a pointer to a
-- valid PortAudioStream in the stream argument. The stream is inactive (stopped).
-- If a call to Pa_OpenStream() fails a non-zero error code is returned (see
-- PaError above) and the value of stream is invalid.
--
--*/
--
--PaError Pa_OpenStream( PortAudioStream** stream,
-- PaDeviceID inputDevice,
-- int numInputChannels,
-- PaSampleFormat inputSampleFormat,
-- void *inputDriverInfo,
-- PaDeviceID outputDevice,
-- int numOutputChannels,
-- PaSampleFormat outputSampleFormat,
-- void *outputDriverInfo,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- unsigned long numberOfBuffers,
-- PaStreamFlags streamFlags,
-- PortAudioCallback *callback,
-- void *userData );
--
--
--/*
-- Pa_OpenDefaultStream() is a simplified version of Pa_OpenStream() that opens
-- the default input and/or output devices. Most parameters have identical meaning
-- to their Pa_OpenStream() counterparts, with the following exceptions:
--
-- If either numInputChannels or numOutputChannels is 0 the respective device
-- is not opened. This has the same effect as passing paNoDevice in the device
-- arguments to Pa_OpenStream().
--
-- sampleFormat applies to both the input and output buffers.
--
--*/
--
--PaError Pa_OpenDefaultStream( PortAudioStream** stream,
-- int numInputChannels,
-- int numOutputChannels,
-- PaSampleFormat sampleFormat,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- unsigned long numberOfBuffers,
-- PortAudioCallback *callback,
-- void *userData );
--
--/*
-- Pa_CloseStream() closes an audio stream, flushing any pending buffers.
--
--*/
--
--PaError Pa_CloseStream( PortAudioStream* );
--
--/*
-- Pa_StartStream() and Pa_StopStream() begin and terminate audio processing.
-- Pa_StopStream() waits until all pending audio buffers have been played.
-- Pa_AbortStream() stops playing immediately without waiting for pending
-- buffers to complete.
--
--*/
--
--PaError Pa_StartStream( PortAudioStream *stream );
--
--PaError Pa_StopStream( PortAudioStream *stream );
--
--PaError Pa_AbortStream( PortAudioStream *stream );
--
--/*
-- Pa_StreamActive() returns one (1) when the stream is active (ie playing
-- or recording audio), zero (0) when not playing, or a negative error number
-- if the stream is invalid.
-- The stream is active between calls to Pa_StartStream() and Pa_StopStream(),
-- but may also become inactive if the callback returns a non-zero value.
-- In the latter case, the stream is considered inactive after the last
-- buffer has finished playing.
--
--*/
--
--PaError Pa_StreamActive( PortAudioStream *stream );
--
--/*
-- Pa_StreamTime() returns the current output time in samples for the stream.
-- This time may be used as a time reference (for example synchronizing audio to
-- MIDI).
--
--*/
--
--PaTimestamp Pa_StreamTime( PortAudioStream *stream );
--
--/*
-- Pa_GetCPULoad() returns the CPU Load for the stream.
-- The "CPU Load" is a fraction of total CPU time consumed by the stream's
-- audio processing routines including, but not limited to the client supplied
-- callback.
-- A value of 0.5 would imply that PortAudio and the sound generating
-- callback was consuming roughly 50% of the available CPU time.
-- This function may be called from the callback function or the application.
--
--*/
--
--double Pa_GetCPULoad( PortAudioStream* stream );
--
--/*
-- Pa_GetMinNumBuffers() returns the minimum number of buffers required by
-- the current host based on minimum latency.
-- On the PC, for the DirectSound implementation, latency can be optionally set
-- by user by setting an environment variable.
-- For example, to set latency to 200 msec, put:
--
-- set PA_MIN_LATENCY_MSEC=200
--
-- in the AUTOEXEC.BAT file and reboot.
-- If the environment variable is not set, then the latency will be determined
-- based on the OS. Windows NT has higher latency than Win95.
--
--*/
--
--int Pa_GetMinNumBuffers( int framesPerBuffer, double sampleRate );
--
--/*
-- Pa_Sleep() puts the caller to sleep for at least 'msec' milliseconds.
-- You may sleep longer than the requested time so don't rely on this for
-- accurate musical timing.
--
-- Pa_Sleep() is provided as a convenience for authors of portable code (such as
-- the tests and examples in the PortAudio distribution.)
--
--*/
--
--void Pa_Sleep( long msec );
--
--/*
-- Pa_GetSampleSize() returns the size in bytes of a single sample in the
-- supplied PaSampleFormat, or paSampleFormatNotSupported if the format is
-- no supported.
--
--*/
--
--PaError Pa_GetSampleSize( PaSampleFormat format );
--
--
--#ifdef __cplusplus
--}
--#endif /* __cplusplus */
--#endif /* PORT_AUDIO_H */
---- a/src/portaudio19.h
-+++ /dev/null
-@@ -1,1127 +0,0 @@
--// NOTE: Copy this file to portaudio.h in order to compile with V19 portaudio
--
--#ifndef PORTAUDIO_H
--#define PORTAUDIO_H
--/*
-- * $Id: portaudio.h 1061 2006-06-19 22:46:41Z lschwardt $
-- * PortAudio Portable Real-Time Audio Library
-- * PortAudio API Header File
-- * Latest version available at: http://www.portaudio.com/
-- *
-- * Copyright (c) 1999-2002 Ross Bencina and Phil Burk
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining
-- * a copy of this software and associated documentation files
-- * (the "Software"), to deal in the Software without restriction,
-- * including without limitation the rights to use, copy, modify, merge,
-- * publish, distribute, sublicense, and/or sell copies of the Software,
-- * and to permit persons to whom the Software is furnished to do so,
-- * subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be
-- * included in all copies or substantial portions of the Software.
-- *
-- * Any person wishing to distribute modifications to the Software is
-- * requested to send the modifications to the original developer so that
-- * they can be incorporated into the canonical version.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- */
--
--/** @file
-- @brief The PortAudio API.
--*/
--
--
--#ifdef __cplusplus
--extern "C"
--{
--#endif /* __cplusplus */
--
--
--/** Retrieve the release number of the currently running PortAudio build,
-- eg 1900.
--*/
--int Pa_GetVersion( void );
--
--
--/** Retrieve a textual description of the current PortAudio build,
-- eg "PortAudio V19-devel 13 October 2002".
--*/
--const char* Pa_GetVersionText( void );
--
--
--/** Error codes returned by PortAudio functions.
-- Note that with the exception of paNoError, all PaErrorCodes are negative.
--*/
--
--typedef int PaError;
--typedef enum PaErrorCode
--{
-- paNoError = 0,
--
-- paNotInitialized = -10000,
-- paUnanticipatedHostError,
-- paInvalidChannelCount,
-- paInvalidSampleRate,
-- paInvalidDevice,
-- paInvalidFlag,
-- paSampleFormatNotSupported,
-- paBadIODeviceCombination,
-- paInsufficientMemory,
-- paBufferTooBig,
-- paBufferTooSmall,
-- paNullCallback,
-- paBadStreamPtr,
-- paTimedOut,
-- paInternalError,
-- paDeviceUnavailable,
-- paIncompatibleHostApiSpecificStreamInfo,
-- paStreamIsStopped,
-- paStreamIsNotStopped,
-- paInputOverflowed,
-- paOutputUnderflowed,
-- paHostApiNotFound,
-- paInvalidHostApi,
-- paCanNotReadFromACallbackStream, /**< @todo review error code name */
-- paCanNotWriteToACallbackStream, /**< @todo review error code name */
-- paCanNotReadFromAnOutputOnlyStream, /**< @todo review error code name */
-- paCanNotWriteToAnInputOnlyStream, /**< @todo review error code name */
-- paIncompatibleStreamHostApi,
-- paBadBufferPtr
--} PaErrorCode;
--
--
--/** Translate the supplied PortAudio error code into a human readable
-- message.
--*/
--const char *Pa_GetErrorText( PaError errorCode );
--
--
--/** Library initialization function - call this before using PortAudio.
-- This function initialises internal data structures and prepares underlying
-- host APIs for use. This function MUST be called before using any other
-- PortAudio API functions.
--
-- If Pa_Initialize() is called multiple times, each successful
-- call must be matched with a corresponding call to Pa_Terminate().
-- Pairs of calls to Pa_Initialize()/Pa_Terminate() may overlap, and are not
-- required to be fully nested.
--
-- Note that if Pa_Initialize() returns an error code, Pa_Terminate() should
-- NOT be called.
--
-- @return paNoError if successful, otherwise an error code indicating the cause
-- of failure.
--
-- @see Pa_Terminate
--*/
--PaError Pa_Initialize( void );
--
--
--/** Library termination function - call this when finished using PortAudio.
-- This function deallocates all resources allocated by PortAudio since it was
-- initializied by a call to Pa_Initialize(). In cases where Pa_Initialise() has
-- been called multiple times, each call must be matched with a corresponding call
-- to Pa_Terminate(). The final matching call to Pa_Terminate() will automatically
-- close any PortAudio streams that are still open.
--
-- Pa_Terminate() MUST be called before exiting a program which uses PortAudio.
-- Failure to do so may result in serious resource leaks, such as audio devices
-- not being available until the next reboot.
--
-- @return paNoError if successful, otherwise an error code indicating the cause
-- of failure.
--
-- @see Pa_Initialize
--*/
--PaError Pa_Terminate( void );
--
--
--
--/** The type used to refer to audio devices. Values of this type usually
-- range from 0 to (Pa_DeviceCount-1), and may also take on the PaNoDevice
-- and paUseHostApiSpecificDeviceSpecification values.
--
-- @see Pa_DeviceCount, paNoDevice, paUseHostApiSpecificDeviceSpecification
--*/
--typedef int PaDeviceIndex;
--
--
--/** A special PaDeviceIndex value indicating that no device is available,
-- or should be used.
--
-- @see PaDeviceIndex
--*/
--#define paNoDevice ((PaDeviceIndex)-1)
--
--
--/** A special PaDeviceIndex value indicating that the device(s) to be used
-- are specified in the host api specific stream info structure.
--
-- @see PaDeviceIndex
--*/
--#define paUseHostApiSpecificDeviceSpecification ((PaDeviceIndex)-2)
--
--
--/* Host API enumeration mechanism */
--
--/** The type used to enumerate to host APIs at runtime. Values of this type
-- range from 0 to (Pa_GetHostApiCount()-1).
--
-- @see Pa_GetHostApiCount
--*/
--typedef int PaHostApiIndex;
--
--
--/** Retrieve the number of available host APIs. Even if a host API is
-- available it may have no devices available.
--
-- @return A non-negative value indicating the number of available host APIs
-- or, a PaErrorCode (which are always negative) if PortAudio is not initialized
-- or an error is encountered.
--
-- @see PaHostApiIndex
--*/
--PaHostApiIndex Pa_GetHostApiCount( void );
--
--
--/** Retrieve the index of the default host API. The default host API will be
-- the lowest common denominator host API on the current platform and is
-- unlikely to provide the best performance.
--
-- @return A non-negative value ranging from 0 to (Pa_GetHostApiCount()-1)
-- indicating the default host API index or, a PaErrorCode (which are always
-- negative) if PortAudio is not initialized or an error is encountered.
--*/
--PaHostApiIndex Pa_GetDefaultHostApi( void );
--
--
--/** Unchanging unique identifiers for each supported host API. This type
-- is used in the PaHostApiInfo structure. The values are guaranteed to be
-- unique and to never change, thus allowing code to be written that
-- conditionally uses host API specific extensions.
--
-- New type ids will be allocated when support for a host API reaches
-- "public alpha" status, prior to that developers should use the
-- paInDevelopment type id.
--
-- @see PaHostApiInfo
--*/
--typedef enum PaHostApiTypeId
--{
-- paInDevelopment=0, /* use while developing support for a new host API */
-- paDirectSound=1,
-- paMME=2,
-- paASIO=3,
-- paSoundManager=4,
-- paCoreAudio=5,
-- paOSS=7,
-- paALSA=8,
-- paAL=9,
-- paBeOS=10,
-- paWDMKS=11,
-- paJACK=12,
-- paWASAPI=13,
-- paAudioScienceHPI=14
--} PaHostApiTypeId;
--
--
--/** A structure containing information about a particular host API. */
--
--typedef struct PaHostApiInfo
--{
-- /** this is struct version 1 */
-- int structVersion;
-- /** The well known unique identifier of this host API @see PaHostApiTypeId */
-- PaHostApiTypeId type;
-- /** A textual description of the host API for display on user interfaces. */
-- const char *name;
--
-- /** The number of devices belonging to this host API. This field may be
-- used in conjunction with Pa_HostApiDeviceIndexToDeviceIndex() to enumerate
-- all devices for this host API.
-- @see Pa_HostApiDeviceIndexToDeviceIndex
-- */
-- int deviceCount;
--
-- /** The default input device for this host API. The value will be a
-- device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice
-- if no default input device is available.
-- */
-- PaDeviceIndex defaultInputDevice;
--
-- /** The default output device for this host API. The value will be a
-- device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice
-- if no default output device is available.
-- */
-- PaDeviceIndex defaultOutputDevice;
--
--} PaHostApiInfo;
--
--
--/** Retrieve a pointer to a structure containing information about a specific
-- host Api.
--
-- @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)
--
-- @return A pointer to an immutable PaHostApiInfo structure describing
-- a specific host API. If the hostApi parameter is out of range or an error
-- is encountered, the function returns NULL.
--
-- The returned structure is owned by the PortAudio implementation and must not
-- be manipulated or freed. The pointer is only guaranteed to be valid between
-- calls to Pa_Initialize() and Pa_Terminate().
--*/
--const PaHostApiInfo * Pa_GetHostApiInfo( PaHostApiIndex hostApi );
--
--
--/** Convert a static host API unique identifier, into a runtime
-- host API index.
--
-- @param type A unique host API identifier belonging to the PaHostApiTypeId
-- enumeration.
--
-- @return A valid PaHostApiIndex ranging from 0 to (Pa_GetHostApiCount()-1) or,
-- a PaErrorCode (which are always negative) if PortAudio is not initialized
-- or an error is encountered.
--
-- The paHostApiNotFound error code indicates that the host API specified by the
-- type parameter is not available.
--
-- @see PaHostApiTypeId
--*/
--PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type );
--
--
--/** Convert a host-API-specific device index to standard PortAudio device index.
-- This function may be used in conjunction with the deviceCount field of
-- PaHostApiInfo to enumerate all devices for the specified host API.
--
-- @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)
--
-- @param hostApiDeviceIndex A valid per-host device index in the range
-- 0 to (Pa_GetHostApiInfo(hostApi)->deviceCount-1)
--
-- @return A non-negative PaDeviceIndex ranging from 0 to (Pa_GetDeviceCount()-1)
-- or, a PaErrorCode (which are always negative) if PortAudio is not initialized
-- or an error is encountered.
--
-- A paInvalidHostApi error code indicates that the host API index specified by
-- the hostApi parameter is out of range.
--
-- A paInvalidDevice error code indicates that the hostApiDeviceIndex parameter
-- is out of range.
--
-- @see PaHostApiInfo
--*/
--PaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi,
-- int hostApiDeviceIndex );
--
--
--
--/** Structure used to return information about a host error condition.
--*/
--typedef struct PaHostErrorInfo{
-- PaHostApiTypeId hostApiType; /**< the host API which returned the error code */
-- long errorCode; /**< the error code returned */
-- const char *errorText; /**< a textual description of the error if available, otherwise a zero-length string */
--}PaHostErrorInfo;
--
--
--/** Return information about the last host error encountered. The error
-- information returned by Pa_GetLastHostErrorInfo() will never be modified
-- asyncronously by errors occurring in other PortAudio owned threads
-- (such as the thread that manages the stream callback.)
--
-- This function is provided as a last resort, primarily to enhance debugging
-- by providing clients with access to all available error information.
--
-- @return A pointer to an immutable structure constaining information about
-- the host error. The values in this structure will only be valid if a
-- PortAudio function has previously returned the paUnanticipatedHostError
-- error code.
--*/
--const PaHostErrorInfo* Pa_GetLastHostErrorInfo( void );
--
--
--
--/* Device enumeration and capabilities */
--
--/** Retrieve the number of available devices. The number of available devices
-- may be zero.
--
-- @return A non-negative value indicating the number of available devices or,
-- a PaErrorCode (which are always negative) if PortAudio is not initialized
-- or an error is encountered.
--*/
--PaDeviceIndex Pa_GetDeviceCount( void );
--
--
--/** Retrieve the index of the default input device. The result can be
-- used in the inputDevice parameter to Pa_OpenStream().
--
-- @return The default input device index for the default host API, or paNoDevice
-- if no default input device is available or an error was encountered.
--*/
--PaDeviceIndex Pa_GetDefaultInputDevice( void );
--
--
--/** Retrieve the index of the default output device. The result can be
-- used in the outputDevice parameter to Pa_OpenStream().
--
-- @return The default output device index for the defualt host API, or paNoDevice
-- if no default output device is available or an error was encountered.
--
-- @note
-- On the PC, the user can specify a default device by
-- setting an environment variable. For example, to use device #1.
--<pre>
-- set PA_RECOMMENDED_OUTPUT_DEVICE=1
--</pre>
-- The user should first determine the available device ids by using
-- the supplied application "pa_devs".
--*/
--PaDeviceIndex Pa_GetDefaultOutputDevice( void );
--
--
--/** The type used to represent monotonic time in seconds that can be used
-- for syncronisation. The type is used for the outTime argument to the
-- PaStreamCallback and as the result of Pa_GetStreamTime().
--
-- @see PaStreamCallback, Pa_GetStreamTime
--*/
--typedef double PaTime;
--
--
--/** A type used to specify one or more sample formats. Each value indicates
-- a possible format for sound data passed to and from the stream callback,
-- Pa_ReadStream and Pa_WriteStream.
--
-- The standard formats paFloat32, paInt16, paInt32, paInt24, paInt8
-- and aUInt8 are usually implemented by all implementations.
--
-- The floating point representation (paFloat32) uses +1.0 and -1.0 as the
-- maximum and minimum respectively.
--
-- paUInt8 is an unsigned 8 bit format where 128 is considered "ground"
--
-- The paNonInterleaved flag indicates that a multichannel buffer is passed
-- as a set of non-interleaved pointers.
--
-- @see Pa_OpenStream, Pa_OpenDefaultStream, PaDeviceInfo
-- @see paFloat32, paInt16, paInt32, paInt24, paInt8
-- @see paUInt8, paCustomFormat, paNonInterleaved
--*/
--typedef unsigned long PaSampleFormat;
--
--
--#define paFloat32 ((PaSampleFormat) 0x00000001) /**< @see PaSampleFormat */
--#define paInt32 ((PaSampleFormat) 0x00000002) /**< @see PaSampleFormat */
--#define paInt24 ((PaSampleFormat) 0x00000004) /**< Packed 24 bit format. @see PaSampleFormat */
--#define paInt16 ((PaSampleFormat) 0x00000008) /**< @see PaSampleFormat */
--#define paInt8 ((PaSampleFormat) 0x00000010) /**< @see PaSampleFormat */
--#define paUInt8 ((PaSampleFormat) 0x00000020) /**< @see PaSampleFormat */
--#define paCustomFormat ((PaSampleFormat) 0x00010000)/**< @see PaSampleFormat */
--
--#define paNonInterleaved ((PaSampleFormat) 0x80000000)
--
--/** A structure providing information and capabilities of PortAudio devices.
-- Devices may support input, output or both input and output.
--*/
--typedef struct PaDeviceInfo
--{
-- int structVersion; /* this is struct version 2 */
-- const char *name;
-- PaHostApiIndex hostApi; /* note this is a host API index, not a type id*/
--
-- int maxInputChannels;
-- int maxOutputChannels;
--
-- /* Default latency values for interactive performance. */
-- PaTime defaultLowInputLatency;
-- PaTime defaultLowOutputLatency;
-- /* Default latency values for robust non-interactive applications (eg. playing sound files). */
-- PaTime defaultHighInputLatency;
-- PaTime defaultHighOutputLatency;
--
-- double defaultSampleRate;
--} PaDeviceInfo;
--
--
--/** Retrieve a pointer to a PaDeviceInfo structure containing information
-- about the specified device.
-- @return A pointer to an immutable PaDeviceInfo structure. If the device
-- parameter is out of range the function returns NULL.
--
-- @param device A valid device index in the range 0 to (Pa_GetDeviceCount()-1)
--
-- @note PortAudio manages the memory referenced by the returned pointer,
-- the client must not manipulate or free the memory. The pointer is only
-- guaranteed to be valid between calls to Pa_Initialize() and Pa_Terminate().
--
-- @see PaDeviceInfo, PaDeviceIndex
--*/
--const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceIndex device );
--
--
--/** Parameters for one direction (input or output) of a stream.
--*/
--typedef struct PaStreamParameters
--{
-- /** A valid device index in the range 0 to (Pa_GetDeviceCount()-1)
-- specifying the device to be used or the special constant
-- paUseHostApiSpecificDeviceSpecification which indicates that the actual
-- device(s) to use are specified in hostApiSpecificStreamInfo.
-- This field must not be set to paNoDevice.
-- */
-- PaDeviceIndex device;
--
-- /** The number of channels of sound to be delivered to the
-- stream callback or accessed by Pa_ReadStream() or Pa_WriteStream().
-- It can range from 1 to the value of maxInputChannels in the
-- PaDeviceInfo record for the device specified by the device parameter.
-- */
-- int channelCount;
--
-- /** The sample format of the buffer provided to the stream callback,
-- a_ReadStream() or Pa_WriteStream(). It may be any of the formats described
-- by the PaSampleFormat enumeration.
-- */
-- PaSampleFormat sampleFormat;
--
-- /** The desired latency in seconds. Where practical, implementations should
-- configure their latency based on these parameters, otherwise they may
-- choose the closest viable latency instead. Unless the suggested latency
-- is greater than the absolute upper limit for the device implementations
-- should round the suggestedLatency up to the next practial value - ie to
-- provide an equal or higher latency than suggestedLatency wherever possibe.
-- Actual latency values for an open stream may be retrieved using the
-- inputLatency and outputLatency fields of the PaStreamInfo structure
-- returned by Pa_GetStreamInfo().
-- @see default*Latency in PaDeviceInfo, *Latency in PaStreamInfo
-- */
-- PaTime suggestedLatency;
--
-- /** An optional pointer to a host api specific data structure
-- containing additional information for device setup and/or stream processing.
-- hostApiSpecificStreamInfo is never required for correct operation,
-- if not used it should be set to NULL.
-- */
-- void *hostApiSpecificStreamInfo;
--
--} PaStreamParameters;
--
--
--/** Return code for Pa_IsFormatSupported indicating success. */
--#define paFormatIsSupported (0)
--
--/** Determine whether it would be possible to open a stream with the specified
-- parameters.
--
-- @param inputParameters A structure that describes the input parameters used to
-- open a stream. The suggestedLatency field is ignored. See PaStreamParameters
-- for a description of these parameters. inputParameters must be NULL for
-- output-only streams.
--
-- @param outputParameters A structure that describes the output parameters used
-- to open a stream. The suggestedLatency field is ignored. See PaStreamParameters
-- for a description of these parameters. outputParameters must be NULL for
-- input-only streams.
--
-- @param sampleRate The required sampleRate. For full-duplex streams it is the
-- sample rate for both input and output
--
-- @return Returns 0 if the format is supported, and an error code indicating why
-- the format is not supported otherwise. The constant paFormatIsSupported is
-- provided to compare with the return value for success.
--
-- @see paFormatIsSupported, PaStreamParameters
--*/
--PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,
-- const PaStreamParameters *outputParameters,
-- double sampleRate );
--
--
--
--/* Streaming types and functions */
--
--
--/**
-- A single PaStream can provide multiple channels of real-time
-- streaming audio input and output to a client application. A stream
-- provides access to audio hardware represented by one or more
-- PaDevices. Depending on the underlying Host API, it may be possible
-- to open multiple streams using the same device, however this behavior
-- is implementation defined. Portable applications should assume that
-- a PaDevice may be simultaneously used by at most one PaStream.
--
-- Pointers to PaStream objects are passed between PortAudio functions that
-- operate on streams.
--
-- @see Pa_OpenStream, Pa_OpenDefaultStream, Pa_OpenDefaultStream, Pa_CloseStream,
-- Pa_StartStream, Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive,
-- Pa_GetStreamTime, Pa_GetStreamCpuLoad
--
--*/
--typedef void PaStream;
--
--
--/** Can be passed as the framesPerBuffer parameter to Pa_OpenStream()
-- or Pa_OpenDefaultStream() to indicate that the stream callback will
-- accept buffers of any size.
--*/
--#define paFramesPerBufferUnspecified (0)
--
--
--/** Flags used to control the behavior of a stream. They are passed as
-- parameters to Pa_OpenStream or Pa_OpenDefaultStream. Multiple flags may be
-- ORed together.
--
-- @see Pa_OpenStream, Pa_OpenDefaultStream
-- @see paNoFlag, paClipOff, paDitherOff, paNeverDropInput,
-- paPrimeOutputBuffersUsingStreamCallback, paPlatformSpecificFlags
--*/
--typedef unsigned long PaStreamFlags;
--
--/** @see PaStreamFlags */
--#define paNoFlag ((PaStreamFlags) 0)
--
--/** Disable default clipping of out of range samples.
-- @see PaStreamFlags
--*/
--#define paClipOff ((PaStreamFlags) 0x00000001)
--
--/** Disable default dithering.
-- @see PaStreamFlags
--*/
--#define paDitherOff ((PaStreamFlags) 0x00000002)
--
--/** Flag requests that where possible a full duplex stream will not discard
-- overflowed input samples without calling the stream callback. This flag is
-- only valid for full duplex callback streams and only when used in combination
-- with the paFramesPerBufferUnspecified (0) framesPerBuffer parameter. Using
-- this flag incorrectly results in a paInvalidFlag error being returned from
-- Pa_OpenStream and Pa_OpenDefaultStream.
--
-- @see PaStreamFlags, paFramesPerBufferUnspecified
--*/
--#define paNeverDropInput ((PaStreamFlags) 0x00000004)
--
--/** Call the stream callback to fill initial output buffers, rather than the
-- default behavior of priming the buffers with zeros (silence). This flag has
-- no effect for input-only and blocking read/write streams.
--
-- @see PaStreamFlags
--*/
--#define paPrimeOutputBuffersUsingStreamCallback ((PaStreamFlags) 0x00000008)
--
--/** A mask specifying the platform specific bits.
-- @see PaStreamFlags
--*/
--#define paPlatformSpecificFlags ((PaStreamFlags)0xFFFF0000)
--
--/**
-- Timing information for the buffers passed to the stream callback.
--*/
--typedef struct PaStreamCallbackTimeInfo{
-- PaTime inputBufferAdcTime;
-- PaTime currentTime;
-- PaTime outputBufferDacTime;
--} PaStreamCallbackTimeInfo;
--
--
--/**
-- Flag bit constants for the statusFlags to PaStreamCallback.
--
-- @see paInputUnderflow, paInputOverflow, paOutputUnderflow, paOutputOverflow,
-- paPrimingOutput
--*/
--typedef unsigned long PaStreamCallbackFlags;
--
--/** In a stream opened with paFramesPerBufferUnspecified, indicates that
-- input data is all silence (zeros) because no real data is available. In a
-- stream opened without paFramesPerBufferUnspecified, it indicates that one or
-- more zero samples have been inserted into the input buffer to compensate
-- for an input underflow.
-- @see PaStreamCallbackFlags
--*/
--#define paInputUnderflow ((PaStreamCallbackFlags) 0x00000001)
--
--/** In a stream opened with paFramesPerBufferUnspecified, indicates that data
-- prior to the first sample of the input buffer was discarded due to an
-- overflow, possibly because the stream callback is using too much CPU time.
-- Otherwise indicates that data prior to one or more samples in the
-- input buffer was discarded.
-- @see PaStreamCallbackFlags
--*/
--#define paInputOverflow ((PaStreamCallbackFlags) 0x00000002)
--
--/** Indicates that output data (or a gap) was inserted, possibly because the
-- stream callback is using too much CPU time.
-- @see PaStreamCallbackFlags
--*/
--#define paOutputUnderflow ((PaStreamCallbackFlags) 0x00000004)
--
--/** Indicates that output data will be discarded because no room is available.
-- @see PaStreamCallbackFlags
--*/
--#define paOutputOverflow ((PaStreamCallbackFlags) 0x00000008)
--
--/** Some of all of the output data will be used to prime the stream, input
-- data may be zero.
-- @see PaStreamCallbackFlags
--*/
--#define paPrimingOutput ((PaStreamCallbackFlags) 0x00000010)
--
--/**
-- Allowable return values for the PaStreamCallback.
-- @see PaStreamCallback
--*/
--typedef enum PaStreamCallbackResult
--{
-- paContinue=0,
-- paComplete=1,
-- paAbort=2
--} PaStreamCallbackResult;
--
--
--/**
-- Functions of type PaStreamCallback are implemented by PortAudio clients.
-- They consume, process or generate audio in response to requests from an
-- active PortAudio stream.
--
-- @param input and @param output are arrays of interleaved samples,
-- the format, packing and number of channels used by the buffers are
-- determined by parameters to Pa_OpenStream().
--
-- @param frameCount The number of sample frames to be processed by
-- the stream callback.
--
-- @param timeInfo The time in seconds when the first sample of the input
-- buffer was received at the audio input, the time in seconds when the first
-- sample of the output buffer will begin being played at the audio output, and
-- the time in seconds when the stream callback was called.
-- See also Pa_GetStreamTime()
--
-- @param statusFlags Flags indicating whether input and/or output buffers
-- have been inserted or will be dropped to overcome underflow or overflow
-- conditions.
--
-- @param userData The value of a user supplied pointer passed to
-- Pa_OpenStream() intended for storing synthesis data etc.
--
-- @return
-- The stream callback should return one of the values in the
-- PaStreamCallbackResult enumeration. To ensure that the callback continues
-- to be called, it should return paContinue (0). Either paComplete or paAbort
-- can be returned to finish stream processing, after either of these values is
-- returned the callback will not be called again. If paAbort is returned the
-- stream will finish as soon as possible. If paComplete is returned, the stream
-- will continue until all buffers generated by the callback have been played.
-- This may be useful in applications such as soundfile players where a specific
-- duration of output is required. However, it is not necessary to utilise this
-- mechanism as Pa_StopStream(), Pa_AbortStream() or Pa_CloseStream() can also
-- be used to stop the stream. The callback must always fill the entire output
-- buffer irrespective of its return value.
--
-- @see Pa_OpenStream, Pa_OpenDefaultStream
--
-- @note With the exception of Pa_GetStreamCpuLoad() it is not permissable to call
-- PortAudio API functions from within the stream callback.
--*/
--typedef int PaStreamCallback(
-- const void *input, void *output,
-- unsigned long frameCount,
-- const PaStreamCallbackTimeInfo* timeInfo,
-- PaStreamCallbackFlags statusFlags,
-- void *userData );
--
--
--/** Opens a stream for either input, output or both.
--
-- @param stream The address of a PaStream pointer which will receive
-- a pointer to the newly opened stream.
--
-- @param inputParameters A structure that describes the input parameters used by
-- the opened stream. See PaStreamParameters for a description of these parameters.
-- inputParameters must be NULL for output-only streams.
--
-- @param outputParameters A structure that describes the output parameters used by
-- the opened stream. See PaStreamParameters for a description of these parameters.
-- outputParameters must be NULL for input-only streams.
--
-- @param sampleRate The desired sampleRate. For full-duplex streams it is the
-- sample rate for both input and output
--
-- @param framesPerBuffer The number of frames passed to the stream callback
-- function, or the preferred block granularity for a blocking read/write stream.
-- The special value paFramesPerBufferUnspecified (0) may be used to request that
-- the stream callback will recieve an optimal (and possibly varying) number of
-- frames based on host requirements and the requested latency settings.
-- Note: With some host APIs, the use of non-zero framesPerBuffer for a callback
-- stream may introduce an additional layer of buffering which could introduce
-- additional latency. PortAudio guarantees that the additional latency
-- will be kept to the theoretical minimum however, it is strongly recommended
-- that a non-zero framesPerBuffer value only be used when your algorithm
-- requires a fixed number of frames per stream callback.
--
-- @param streamFlags Flags which modify the behaviour of the streaming process.
-- This parameter may contain a combination of flags ORed together. Some flags may
-- only be relevant to certain buffer formats.
--
-- @param streamCallback A pointer to a client supplied function that is responsible
-- for processing and filling input and output buffers. If this parameter is NULL
-- the stream will be opened in 'blocking read/write' mode. In blocking mode,
-- the client can receive sample data using Pa_ReadStream and write sample data
-- using Pa_WriteStream, the number of samples that may be read or written
-- without blocking is returned by Pa_GetStreamReadAvailable and
-- Pa_GetStreamWriteAvailable respectively.
--
-- @param userData A client supplied pointer which is passed to the stream callback
-- function. It could for example, contain a pointer to instance data necessary
-- for processing the audio buffers. This parameter is ignored if streamCallback
-- is NULL.
--
-- @return
-- Upon success Pa_OpenStream() returns paNoError and places a pointer to a
-- valid PaStream in the stream argument. The stream is inactive (stopped).
-- If a call to Pa_OpenStream() fails, a non-zero error code is returned (see
-- PaError for possible error codes) and the value of stream is invalid.
--
-- @see PaStreamParameters, PaStreamCallback, Pa_ReadStream, Pa_WriteStream,
-- Pa_GetStreamReadAvailable, Pa_GetStreamWriteAvailable
--*/
--PaError Pa_OpenStream( PaStream** stream,
-- const PaStreamParameters *inputParameters,
-- const PaStreamParameters *outputParameters,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- PaStreamFlags streamFlags,
-- PaStreamCallback *streamCallback,
-- void *userData );
--
--
--/** A simplified version of Pa_OpenStream() that opens the default input
-- and/or output devices.
--
-- @param stream The address of a PaStream pointer which will receive
-- a pointer to the newly opened stream.
--
-- @param numInputChannels The number of channels of sound that will be supplied
-- to the stream callback or returned by Pa_ReadStream. It can range from 1 to
-- the value of maxInputChannels in the PaDeviceInfo record for the default input
-- device. If 0 the stream is opened as an output-only stream.
--
-- @param numOutputChannels The number of channels of sound to be delivered to the
-- stream callback or passed to Pa_WriteStream. It can range from 1 to the value
-- of maxOutputChannels in the PaDeviceInfo record for the default output dvice.
-- If 0 the stream is opened as an output-only stream.
--
-- @param sampleFormat The sample format of both the input and output buffers
-- provided to the callback or passed to and from Pa_ReadStream and Pa_WriteStream.
-- sampleFormat may be any of the formats described by the PaSampleFormat
-- enumeration.
--
-- @param sampleRate Same as Pa_OpenStream parameter of the same name.
-- @param framesPerBuffer Same as Pa_OpenStream parameter of the same name.
-- @param streamCallback Same as Pa_OpenStream parameter of the same name.
-- @param userData Same as Pa_OpenStream parameter of the same name.
--
-- @return As for Pa_OpenStream
--
-- @see Pa_OpenStream, PaStreamCallback
--*/
--PaError Pa_OpenDefaultStream( PaStream** stream,
-- int numInputChannels,
-- int numOutputChannels,
-- PaSampleFormat sampleFormat,
-- double sampleRate,
-- unsigned long framesPerBuffer,
-- PaStreamCallback *streamCallback,
-- void *userData );
--
--
--/** Closes an audio stream. If the audio stream is active it
-- discards any pending buffers as if Pa_AbortStream() had been called.
--*/
--PaError Pa_CloseStream( PaStream *stream );
--
--
--/** Functions of type PaStreamFinishedCallback are implemented by PortAudio
-- clients. They can be registered with a stream using the Pa_SetStreamFinishedCallback
-- function. Once registered they are called when the stream becomes inactive
-- (ie once a call to Pa_StopStream() will not block).
-- A stream will become inactive after the stream callback returns non-zero,
-- or when Pa_StopStream or Pa_AbortStream is called. For a stream providing audio
-- output, if the stream callback returns paComplete, or Pa_StopStream is called,
-- the stream finished callback will not be called until all generated sample data
-- has been played.
--
-- @param userData The userData parameter supplied to Pa_OpenStream()
--
-- @see Pa_SetStreamFinishedCallback
--*/
--typedef void PaStreamFinishedCallback( void *userData );
--
--
--/** Register a stream finished callback function which will be called when the
-- stream becomes inactive. See the description of PaStreamFinishedCallback for
-- further details about when the callback will be called.
--
-- @param stream a pointer to a PaStream that is in the stopped state - if the
-- stream is not stopped, the stream's finished callback will remain unchanged
-- and an error code will be returned.
--
-- @param streamFinishedCallback a pointer to a function with the same signature
-- as PaStreamFinishedCallback, that will be called when the stream becomes
-- inactive. Passing NULL for this parameter will un-register a previously
-- registered stream finished callback function.
--
-- @return on success returns paNoError, otherwise an error code indicating the cause
-- of the error.
--
-- @see PaStreamFinishedCallback
--*/
--PaError Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback );
--
--
--/** Commences audio processing.
--*/
--PaError Pa_StartStream( PaStream *stream );
--
--
--/** Terminates audio processing. It waits until all pending
-- audio buffers have been played before it returns.
--*/
--PaError Pa_StopStream( PaStream *stream );
--
--
--/** Terminates audio processing immediately without waiting for pending
-- buffers to complete.
--*/
--PaError Pa_AbortStream( PaStream *stream );
--
--
--/** Determine whether the stream is stopped.
-- A stream is considered to be stopped prior to a successful call to
-- Pa_StartStream and after a successful call to Pa_StopStream or Pa_AbortStream.
-- If a stream callback returns a value other than paContinue the stream is NOT
-- considered to be stopped.
--
-- @return Returns one (1) when the stream is stopped, zero (0) when
-- the stream is running or, a PaErrorCode (which are always negative) if
-- PortAudio is not initialized or an error is encountered.
--
-- @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive
--*/
--PaError Pa_IsStreamStopped( PaStream *stream );
--
--
--/** Determine whether the stream is active.
-- A stream is active after a successful call to Pa_StartStream(), until it
-- becomes inactive either as a result of a call to Pa_StopStream() or
-- Pa_AbortStream(), or as a result of a return value other than paContinue from
-- the stream callback. In the latter case, the stream is considered inactive
-- after the last buffer has finished playing.
--
-- @return Returns one (1) when the stream is active (ie playing or recording
-- audio), zero (0) when not playing or, a PaErrorCode (which are always negative)
-- if PortAudio is not initialized or an error is encountered.
--
-- @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamStopped
--*/
--PaError Pa_IsStreamActive( PaStream *stream );
--
--
--
--/** A structure containing unchanging information about an open stream.
-- @see Pa_GetStreamInfo
--*/
--
--typedef struct PaStreamInfo
--{
-- /** this is struct version 1 */
-- int structVersion;
--
-- /** The input latency of the stream in seconds. This value provides the most
-- accurate estimate of input latency available to the implementation. It may
-- differ significantly from the suggestedLatency value passed to Pa_OpenStream().
-- The value of this field will be zero (0.) for output-only streams.
-- @see PaTime
-- */
-- PaTime inputLatency;
--
-- /** The output latency of the stream in seconds. This value provides the most
-- accurate estimate of output latency available to the implementation. It may
-- differ significantly from the suggestedLatency value passed to Pa_OpenStream().
-- The value of this field will be zero (0.) for input-only streams.
-- @see PaTime
-- */
-- PaTime outputLatency;
--
-- /** The sample rate of the stream in Hertz (samples per second). In cases
-- where the hardware sample rate is inaccurate and PortAudio is aware of it,
-- the value of this field may be different from the sampleRate parameter
-- passed to Pa_OpenStream(). If information about the actual hardware sample
-- rate is not available, this field will have the same value as the sampleRate
-- parameter passed to Pa_OpenStream().
-- */
-- double sampleRate;
--
--} PaStreamInfo;
--
--
--/** Retrieve a pointer to a PaStreamInfo structure containing information
-- about the specified stream.
-- @return A pointer to an immutable PaStreamInfo structure. If the stream
-- parameter invalid, or an error is encountered, the function returns NULL.
--
-- @param stream A pointer to an open stream previously created with Pa_OpenStream.
--
-- @note PortAudio manages the memory referenced by the returned pointer,
-- the client must not manipulate or free the memory. The pointer is only
-- guaranteed to be valid until the specified stream is closed.
--
-- @see PaStreamInfo
--*/
--const PaStreamInfo* Pa_GetStreamInfo( PaStream *stream );
--
--
--/** Determine the current time for the stream according to the same clock used
-- to generate buffer timestamps. This time may be used for syncronising other
-- events to the audio stream, for example synchronizing audio to MIDI.
--
-- @return The stream's current time in seconds, or 0 if an error occurred.
--
-- @see PaTime, PaStreamCallback
--*/
--PaTime Pa_GetStreamTime( PaStream *stream );
--
--
--/** Retrieve CPU usage information for the specified stream.
-- The "CPU Load" is a fraction of total CPU time consumed by a callback stream's
-- audio processing routines including, but not limited to the client supplied
-- stream callback. This function does not work with blocking read/write streams.
--
-- This function may be called from the stream callback function or the
-- application.
--
-- @return
-- A floating point value, typically between 0.0 and 1.0, where 1.0 indicates
-- that the stream callback is consuming the maximum number of CPU cycles possible
-- to maintain real-time operation. A value of 0.5 would imply that PortAudio and
-- the stream callback was consuming roughly 50% of the available CPU time. The
-- return value may exceed 1.0. A value of 0.0 will always be returned for a
-- blocking read/write stream, or if an error occurrs.
--*/
--double Pa_GetStreamCpuLoad( PaStream* stream );
--
--
--/** Read samples from an input stream. The function doesn't return until
-- the entire buffer has been filled - this may involve waiting for the operating
-- system to supply the data.
--
-- @param stream A pointer to an open stream previously created with Pa_OpenStream.
--
-- @param buffer A pointer to a buffer of sample frames. The buffer contains
-- samples in the format specified by the inputParameters->sampleFormat field
-- used to open the stream, and the number of channels specified by
-- inputParameters->numChannels. If non-interleaved samples were requested,
-- buffer is a pointer to the first element of an array of non-interleaved
-- buffer pointers, one for each channel.
--
-- @param frames The number of frames to be read into buffer. This parameter
-- is not constrained to a specific range, however high performance applications
-- will want to match this parameter to the framesPerBuffer parameter used
-- when opening the stream.
--
-- @return On success PaNoError will be returned, or PaInputOverflowed if input
-- data was discarded by PortAudio after the previous call and before this call.
--*/
--PaError Pa_ReadStream( PaStream* stream,
-- void *buffer,
-- unsigned long frames );
--
--
--/** Write samples to an output stream. This function doesn't return until the
-- entire buffer has been consumed - this may involve waiting for the operating
-- system to consume the data.
--
-- @param stream A pointer to an open stream previously created with Pa_OpenStream.
--
-- @param buffer A pointer to a buffer of sample frames. The buffer contains
-- samples in the format specified by the outputParameters->sampleFormat field
-- used to open the stream, and the number of channels specified by
-- outputParameters->numChannels. If non-interleaved samples were requested,
-- buffer is a pointer to the first element of an array of non-interleaved
-- buffer pointers, one for each channel.
--
-- @param frames The number of frames to be written from buffer. This parameter
-- is not constrained to a specific range, however high performance applications
-- will want to match this parameter to the framesPerBuffer parameter used
-- when opening the stream.
--
-- @return On success PaNoError will be returned, or paOutputUnderflowed if
-- additional output data was inserted after the previous call and before this
-- call.
--*/
--PaError Pa_WriteStream( PaStream* stream,
-- const void *buffer,
-- unsigned long frames );
--
--
--/** Retrieve the number of frames that can be read from the stream without
-- waiting.
--
-- @return Returns a non-negative value representing the maximum number of frames
-- that can be read from the stream without blocking or busy waiting or, a
-- PaErrorCode (which are always negative) if PortAudio is not initialized or an
-- error is encountered.
--*/
--signed long Pa_GetStreamReadAvailable( PaStream* stream );
--
--
--/** Retrieve the number of frames that can be written to the stream without
-- waiting.
--
-- @return Returns a non-negative value representing the maximum number of frames
-- that can be written to the stream without blocking or busy waiting or, a
-- PaErrorCode (which are always negative) if PortAudio is not initialized or an
-- error is encountered.
--*/
--signed long Pa_GetStreamWriteAvailable( PaStream* stream );
--
--
--/* Miscellaneous utilities */
--
--
--/** Retrieve the size of a given sample format in bytes.
--
-- @return The size in bytes of a single sample in the specified format,
-- or paSampleFormatNotSupported if the format is not supported.
--*/
--PaError Pa_GetSampleSize( PaSampleFormat format );
--
--
--/** Put the caller to sleep for at least 'msec' milliseconds. This function is
-- provided only as a convenience for authors of portable code (such as the tests
-- and examples in the PortAudio distribution.)
--
-- The function may sleep longer than requested so don't rely on this for accurate
-- musical timing.
--*/
--void Pa_Sleep( long msec );
--
--
--
--#ifdef __cplusplus
--}
--#endif /* __cplusplus */
--#endif /* PORTAUDIO_H */
---- a/src/wave.cpp
-+++ b/src/wave.cpp
-@@ -31,7 +31,10 @@
- #include <sys/time.h>
- #include <time.h>
-
--#include "portaudio.h"
-+#ifdef USE_PORTAUDIO
-+#include <portaudio.h>
-+#endif
-+
- #ifdef PLATFORM_WINDOWS
- #include <windows.h>
- #else
---- a/src/wavegen.cpp
-+++ b/src/wavegen.cpp
-@@ -40,7 +40,7 @@
- #endif
-
- #ifdef USE_PORTAUDIO
--#include "portaudio.h"
-+#include <portaudio.h>
- #undef USE_PORTAUDIO
- // determine portaudio version by looking for a #define which is not in V18
- #ifdef paNeverDropInput
PKG_NAME:=fdk-aac
PKG_VERSION:=0.1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=Fraunhofer-FDK-AAC-for-Android
PKG_LICENSE_FILES:=NOTICE
-
PKG_SOURCE_URL=https://codeload.github.com/mstorsjo/fdk-aac/tar.gz/v$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=adbcd793e406e1b88b3c1c41382d49f8c27371485b823c0fdab69c9124fd2ce3
PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
PKG_CONFIG_DEPENDS:= CONFIG_FDK-AAC_OPTIMIZE_SPEED
define Package/fdk-aac/install
$(INSTALL_DIR) $(1)/usr/lib/
- $(CP) $(PKG_BUILD_DIR)/.libs/*.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdk-aac.so* $(1)/usr/lib/
endef
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/fdk-aac
- $(CP) $(PKG_BUILD_DIR)/libAACdec/include/aacdecoder_lib.h $(1)/usr/include/fdk-aac
- $(CP) $(PKG_BUILD_DIR)/libAACenc/include/aacenc_lib.h $(1)/usr/include/fdk-aac
- $(CP) $(PKG_BUILD_DIR)/libSYS/include/FDK_audio.h $(1)/usr/include/fdk-aac
- $(CP) $(PKG_BUILD_DIR)/libSYS/include/genericStds.h $(1)/usr/include/fdk-aac
- $(CP) $(PKG_BUILD_DIR)/libSYS/include/machine_type.h $(1)/usr/include/fdk-aac
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/fdk-aac $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib/
- $(CP) $(PKG_BUILD_DIR)/.libs/*.{la,so*} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdk-aac.{la,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fdk-aac.pc $(1)/usr/lib/pkgconfig/
endef
$(eval $(call BuildPackage,fdk-aac))
--- /dev/null
+From a50eecf65b5ce5d4f03768c5c2cb4b492d2badad Mon Sep 17 00:00:00 2001
+From: Martin Storsjo <martin@martin.st>
+Date: Fri, 4 May 2018 12:46:44 +0300
+Subject: [PATCH] Fix overflows in accumulation, fixing crashes
+
+This fixes github issue #83.
+---
+ libSBRenc/src/tran_det.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libSBRenc/src/tran_det.cpp b/libSBRenc/src/tran_det.cpp
+index 0e35ec3..51d6efe 100644
+--- a/libSBRenc/src/tran_det.cpp
++++ b/libSBRenc/src/tran_det.cpp
+@@ -256,12 +256,12 @@ static FIXP_DBL addLowbandEnergies(FIXP_DBL **Energies,
+ /* freqBandTable[LORES] has MAX_FREQ_COEFFS/2 +1 coeefs max. */
+ for (ts=tran_offdiv2; ts<YBufferWriteOffset; ts++) {
+ for (k = 0; k < freqBandTable[0]; k++) {
+- accu1 += Energies[ts][k] >> 6;
++ accu1 = fAddSaturate(accu1, Energies[ts][k] >> 6);
+ }
+ }
+ for (; ts<tran_offdiv2+(slots>>nrgSzShift); ts++) {
+ for (k = 0; k < freqBandTable[0]; k++) {
+- accu2 += Energies[ts][k] >> 9;
++ accu2 = fAddSaturate(accu2, Energies[ts][k] >> 9);
+ }
+ }
+
include $(TOPDIR)/rules.mk
PKG_NAME:=forked-daapd
-PKG_VERSION:=25.0
+PKG_VERSION:=26.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/ejurgensen/$(PKG_NAME)/releases/download/$(PKG_VERSION)/
-PKG_HASH:=5741a64d8f54e11e89dfa2fbfae693b2837e1e19a0c4980a20f8ff56bce4456e
+PKG_HASH:=c37012faf56238544fc7274ad0ade7bf16c15a9ae6af9ef4ba56ba88e508fffa
-PKG_BUILD_DEPENDS:=gperf/host
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
PKG_INSTALL:=1
DEPENDS:=+libgpg-error +libgcrypt +libgdbm +zlib +libexpat +libunistring \
+libevent2 +libdaemon +libantlr3c +confuse +alsa-lib +libffmpeg-full \
+mxml +libavahi-client +sqlite3-cli +libplist +libcurl +libjson-c \
- +libprotobuf-c +libgnutls +libsodium $(ICONV_DEPENDS)
+ +libprotobuf-c +libgnutls +libsodium +libwebsockets $(ICONV_DEPENDS)
endef
define Package/forked-daapd/description
--enable-mpd \
--enable-chromecast \
--enable-verification \
+ --enable-webinterface \
--disable-spotify \
+ --with-libplist \
+ --with-libwebsockets \
+ --with-alsa \
--without-pulseaudio \
--without-libevent_pthreads
+++ /dev/null
-From 1b8adc11edec48a9b8fcb75b9efdaf618a6744bd Mon Sep 17 00:00:00 2001
-From: ejurgensen <espenjurgensen@gmail.com>
-Date: Fri, 25 Aug 2017 19:27:41 +0200
-Subject: [PATCH] [dmap] Use a wrapper for dmap_find_field() Avoids the need to
- have definition of dmap_find_field in dmap_common.h that must be kept in sync
- with the definition that gperf generates.
-
-Also should fix compilation problems when gperf is not present, ref pr #390
----
- configure.ac | 21 ---------------------
- src/dmap_common.c | 6 ++++++
- src/dmap_common.h | 4 +---
- src/httpd_daap.c | 2 +-
- 4 files changed, 8 insertions(+), 25 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9b149be..9819c82 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -32,27 +32,6 @@ to install it.]])],
- [AC_MSG_ERROR([[GNU gperf required, please install it.]])])
- ])
-
--GPERF_TEST="$(echo foo,bar | ${GPERF} -L ANSI-C)"
--
--AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM([
-- #include <string.h>
-- const char * in_word_set(const char *, size_t);
-- $GPERF_TEST]
-- )],
-- [GPERF_LEN_TYPE=size_t],
-- [AC_COMPILE_IFELSE(
-- [AC_LANG_PROGRAM([
-- #include <string.h>
-- const char * in_word_set(const char *, unsigned);
-- $GPERF_TEST]
-- )],
-- [GPERF_LEN_TYPE=unsigned],
-- [AC_MSG_ERROR([** unable to determine gperf len type])]
-- )]
--)
--
--AC_DEFINE_UNQUOTED([GPERF_LEN_TYPE], [$GPERF_LEN_TYPE], [gperf len type])
- AC_PATH_PROG([ANTLR], [[antlr3]])
- AS_IF([[test -z "$ANTLR"]],
- [AS_IF([[test -f "$srcdir/src/SMARTPLLexer.h"]],
-diff --git a/src/dmap_common.c b/src/dmap_common.c
-index 250a2d1..b2bc362 100644
---- a/src/dmap_common.c
-+++ b/src/dmap_common.c
-@@ -42,6 +42,12 @@ dmap_get_fields_table(int *nfields)
- return dmap_fields;
- }
-
-+// This wrapper is so callers don't need to include dmap_fields_hash.h
-+const struct dmap_field *
-+dmap_find_field_wrapper(const char *str, int len)
-+{
-+ return dmap_find_field(str, len);
-+}
-
- void
- dmap_add_container(struct evbuffer *evbuf, const char *tag, int len)
-diff --git a/src/dmap_common.h b/src/dmap_common.h
-index 93a2bdc..73f72d0 100644
---- a/src/dmap_common.h
-+++ b/src/dmap_common.h
-@@ -2,7 +2,6 @@
- #ifndef __DMAP_HELPERS_H__
- #define __DMAP_HELPERS_H__
-
--#include "config.h"
- #include <event2/buffer.h>
- #include <event2/http.h>
-
-@@ -45,9 +44,8 @@ extern const struct dmap_field_map dfm_dmap_aeSP;
- const struct dmap_field *
- dmap_get_fields_table(int *nfields);
-
--/* From dmap_fields.gperf - keep in sync, don't alter */
- const struct dmap_field *
--dmap_find_field (register const char *str, register GPERF_LEN_TYPE len);
-+dmap_find_field_wrapper(const char *str, int len);
-
-
- void
-diff --git a/src/httpd_daap.c b/src/httpd_daap.c
-index aef2fe0..0564275 100644
---- a/src/httpd_daap.c
-+++ b/src/httpd_daap.c
-@@ -738,7 +738,7 @@ parse_meta(struct evhttp_request *req, char *tag, const char *param, const struc
-
- if (n == i)
- {
-- meta[i] = dmap_find_field(field, strlen(field));
-+ meta[i] = dmap_find_field_wrapper(field, strlen(field));
-
- if (!meta[i])
- {
---
-2.7.4
-
endif
ifeq ($(CONFIG_LAME-LIB_OPTIMIZE_SPEED),y)
- TARGET_CFLAGS += $(TARGET_CFLAGS) -O3 -ffast-math
- TARGET_CFLAGS := $(filter-out -Os,$(TARGET_CFLAGS))
+ TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3 -ffast-math
endif
CONFIGURE_ARGS += --disable-gtktest --disable-static
include $(TOPDIR)/rules.mk
PKG_NAME:=mpc
-PKG_VERSION:=0.28
+PKG_VERSION:=0.30
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://www.musicpd.org/download/mpc/0
-PKG_HASH:=a4337d06c85dc81a638821d30fce8a137a58d13d510be34a11c1cce95cabc547
+PKG_SOURCE_URL:=https://www.musicpd.org/download/mpc/0
+PKG_HASH:=65fc5b0a8430efe9acbe6e261127960682764b20ab994676371bdc797d867fce
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
define Package/mpc
this is MPC
endef
-define Build/Configure
-$(call Build/Configure/Default, \
- --disable-iconv \
-)
-endef
+CONFIGURE_ARGS+= --disable-iconv
-define Build/Compile
-$(call Build/Compile/Default,\
- CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \
- prefix="/usr" \
- all \
-)
+# Newer sources require meson/ninja to build so...
+# Use our hacked-up version of the mpc v0.28 autotools.
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ $(CP) ./autotools-files/* $(PKG_BUILD_DIR)/
endef
define Package/mpc/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mpc $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpc $(1)/usr/bin/
$(INSTALL_BIN) ./files/pls-handler.sh $(1)/usr/bin/
endef
--- /dev/null
+ACLOCAL_AMFLAGS = -I m4
+AUTOMAKE_OPTIONS = foreign 1.11 dist-xz subdir-objects
+
+bin_PROGRAMS = src/mpc
+
+src_mpc_SOURCES = \
+ src/main.c src/mpc.h \
+ src/list.c src/list.h \
+ src/password.c src/password.h \
+ src/status.c src/status.h \
+ src/args.c src/args.h \
+ src/format.c src/format.h \
+ src/song_format.c src/song_format.h \
+ src/util.c src/util.h \
+ src/command.c src/command.h \
+ src/queue.c src/queue.h \
+ src/sticker.c src/sticker.h \
+ src/tab.c src/tab.h \
+ src/idle.c src/idle.h \
+ src/message.c src/message.h \
+ src/search.c src/search.h \
+ src/output.c src/output.h \
+ src/options.c src/options.h \
+ src/path.c src/path.h \
+ src/Compiler.h
+
+if HAVE_ICONV
+src_mpc_SOURCES += src/charset.c src/charset.h
+endif
+
+src_mpc_CPPFLAGS = $(AM_CPPFLAGS) $(ICONV_CFLAGS) $(LIBMPDCLIENT_CFLAGS)
+src_mpc_LDADD = $(ICONV_LIBS) $(LIBMPDCLIENT_LIBS)
+
--- /dev/null
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define if iconv() support is enabled */
+#undef HAVE_ICONV
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
--- /dev/null
+AC_PREREQ(2.60)
+AC_INIT(mpc, 0.30, musicpd-dev-team@lists.sourceforge.net)
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_SRCDIR(src/main.c)
+AM_INIT_AUTOMAKE([foreign 1.11 dist-xz subdir-objects])
+AM_SILENT_RULES
+AC_CONFIG_HEADERS(config.h)
+
+
+dnl
+dnl programs
+dnl
+
+AC_PROG_CC_C99
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+PKG_PROG_PKG_CONFIG
+
+
+dnl
+dnl declare variables
+dnl
+
+AC_SUBST(AM_CFLAGS)
+AC_SUBST(AM_CPPFLAGS)
+
+
+dnl
+dnl OS specific defaults
+dnl
+
+case "$host" in
+*-mingw32* | *-windows* | *-cygwin*)
+ AM_CFLAGS="$AM_CFLAGS -mms-bitfields -fno-strict-aliasing"
+ ;;
+esac
+
+if test -z "$prefix" || test "x$prefix" = xNONE; then
+ local_lib=
+ local_include=
+
+ # aren't autotools supposed to be smart enough to figure this out?
+ # oh well, the git-core Makefile managed to do some of the work for us :)
+ case "`uname -s | tr A-Z a-z`" in
+ darwin*)
+ local_lib='/sw/lib /opt/local/lib'
+ local_include='/sw/include /opt/local/include'
+ ;;
+ freebsd* | openbsd*)
+ local_lib=/usr/local/lib
+ local_include=/usr/local/include
+ ;;
+ netbsd*)
+ local_lib=/usr/pkg/lib
+ local_include=/usr/pkg/include
+ LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/pkg/lib"
+ ;;
+ esac
+
+ for d in $local_lib; do
+ if test -d "$d"; then
+ LDFLAGS="$LDFLAGS -L$d"
+ break
+ fi
+ done
+ for d in $local_include; do
+ if test -d "$d"; then
+ CFLAGS="$CFLAGS -I$d"
+ break
+ fi
+ done
+fi
+
+
+dnl
+dnl libc features
+dnl
+
+PKG_CHECK_MODULES([LIBMPDCLIENT], [libmpdclient >= 2.9],,
+ [AC_MSG_ERROR([libmpdclient 2.9 is required])])
+
+
+dnl
+dnl i18n / l10n (iconv)
+dnl
+
+AC_ARG_ENABLE(iconv,
+ AS_HELP_STRING([--disable-iconv],
+ [disable iconv support (default: enable)]),,
+ [enable_iconv=yes])
+
+if test x$enable_iconv = xyes; then
+ AC_CHECK_FUNC(iconv,
+ [ICONV_CFLAGS="" ICONV_LIBS=""],
+ [AC_CHECK_LIB(intl, iconv,
+ [ICONV_CFLAGS="" ICONV_LIBS="-lintl"],
+ [enable_iconv=no])])
+fi
+
+if test x$enable_iconv = xyes; then
+ AC_CHECK_HEADER([locale.h],, [enable_iconv=no])
+ if test x$enable_iconv != xyes; then
+ AC_MSG_WARN(locale.h not available - disabling iconv)
+ fi
+fi
+
+if test x$enable_iconv = xyes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if iconv() support is enabled])
+else
+ ICONV_CPPFLAGS=""
+ ICONV_LIBS=""
+fi
+
+AC_SUBST(ICONV_CPPFLAGS)
+AC_SUBST(ICONV_LIBS)
+
+AM_CONDITIONAL(HAVE_ICONV, test x$enable_iconv = xyes)
+
+
+dnl
+dnl CFLAGS
+dnl
+
+AX_APPEND_COMPILE_FLAGS([-Wall])
+AX_APPEND_COMPILE_FLAGS([-Wextra])
+AX_APPEND_COMPILE_FLAGS([-Wno-deprecated-declarations])
+AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes])
+AX_APPEND_COMPILE_FLAGS([-Wshadow])
+AX_APPEND_COMPILE_FLAGS([-Wpointer-arith])
+AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes])
+AX_APPEND_COMPILE_FLAGS([-Wcast-qual])
+AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
+
+
+dnl
+dnl build options
+dnl
+
+AC_ARG_ENABLE(werror,
+ AS_HELP_STRING([--enable-werror],
+ [Treat warnings as errors @<:@default=disabled@:>@]),,
+ enable_werror=no)
+
+if test "x$enable_werror" = xyes; then
+ AM_CFLAGS="$AM_CFLAGS -Werror -pedantic-errors"
+fi
+
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug],
+ [Enable debugging @<:@default=disabled@:>@]),,
+ enable_debug=no)
+
+if test "x$enable_debug" = xno; then
+ AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG"
+
+ AX_APPEND_COMPILE_FLAGS([-ffunction-sections])
+ AX_APPEND_COMPILE_FLAGS([-fdata-sections])
+ AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden])
+
+ AX_APPEND_LINK_FLAGS([-Wl,--gc-sections])
+fi
+
+AC_ARG_ENABLE(test,
+ AS_HELP_STRING([--enable-test],
+ [build the test programs (default: disabled)]),,
+ enable_test=no)
+
+if test "x$enable_test" = xyes; then
+ AM_PATH_CHECK(,, [AC_MSG_ERROR([check not found])])
+fi
+
+AM_CONDITIONAL(ENABLE_TEST, test "x$enable_test" = xyes)
+
+
+dnl
+
+AC_OUTPUT(Makefile)
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
+#
+# DESCRIPTION
+#
+# For every FLAG1, FLAG2 it is checked whether the compiler works with the
+# flag. If it does, the flag is added FLAGS-VARIABLE
+#
+# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+# CFLAGS) is used. During the check the flag is always added to the
+# current language's flags.
+#
+# If EXTRA-FLAGS is defined, it is added to the current language's default
+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
+# force the compiler to issue an error when a bad flag is given.
+#
+# NOTE: This macro depends on the AX_APPEND_FLAG and
+# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
+# AX_APPEND_LINK_FLAGS.
+#
+# LICENSE
+#
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 4
+
+AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
+[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
+AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
+for flag in $1; do
+ AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
+done
+])dnl AX_APPEND_COMPILE_FLAGS
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
+#
+# DESCRIPTION
+#
+# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
+# added in between.
+#
+# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
+# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
+# FLAG.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 6
+
+AC_DEFUN([AX_APPEND_FLAG],
+[dnl
+AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
+AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
+AS_VAR_SET_IF(FLAGS,[
+ AS_CASE([" AS_VAR_GET(FLAGS) "],
+ [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
+ [
+ AS_VAR_APPEND(FLAGS,[" $1"])
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
+ ],
+ [
+ AS_VAR_SET(FLAGS,[$1])
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
+AS_VAR_POPDEF([FLAGS])dnl
+])dnl AX_APPEND_FLAG
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
+#
+# DESCRIPTION
+#
+# For every FLAG1, FLAG2 it is checked whether the linker works with the
+# flag. If it does, the flag is added FLAGS-VARIABLE
+#
+# If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is
+# used. During the check the flag is always added to the linker's flags.
+#
+# If EXTRA-FLAGS is defined, it is added to the linker's default flags
+# when the check is done. The check is thus made with the flags: "LDFLAGS
+# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
+# issue an error when a bad flag is given.
+#
+# NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG.
+# Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS.
+#
+# LICENSE
+#
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 4
+
+AC_DEFUN([AX_APPEND_LINK_FLAGS],
+[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
+AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
+for flag in $1; do
+ AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3])
+done
+])dnl AX_APPEND_LINK_FLAGS
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# Check whether the given FLAG works with the current language's compiler
+# or gives an error. (Warnings, however, are ignored)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# If EXTRA-FLAGS is defined, it is added to the current language's default
+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
+# force the compiler to issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 4
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# Check whether the given FLAG works with the linker or gives an error.
+# (Warnings, however, are ignored)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# If EXTRA-FLAGS is defined, it is added to the linker's default flags
+# when the check is done. The check is thus made with the flags: "LDFLAGS
+# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
+# issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_LINK_IFELSE.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 4
+
+AC_DEFUN([AX_CHECK_LINK_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
+AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS $4 $1"
+ AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ LDFLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_LINK_FLAGS
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_REQUIRE_DEFINED(MACRO)
+#
+# DESCRIPTION
+#
+# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
+# been defined and thus are available for use. This avoids random issues
+# where a macro isn't expanded. Instead the configure script emits a
+# non-fatal:
+#
+# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
+#
+# It's like AC_REQUIRE except it doesn't expand the required macro.
+#
+# Here's an example:
+#
+# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
+#
+# LICENSE
+#
+# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
+ m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
+])dnl AX_REQUIRE_DEFINED
--- /dev/null
+dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS
+dnl
+
+AC_DEFUN([AM_PATH_CHECK],
+[
+ AC_MSG_WARN([A@&t@M_PATH_CHECK() is deprecated])
+ AC_MSG_WARN([[use P@&t@KG_CHECK_MODULES([CHECK], [check >= 0.9.4]) instead]])
+ AC_ARG_WITH([check],
+ [ --with-check=PATH prefix where check is installed [default=auto]])
+
+ min_check_version=ifelse([$1], ,0.8.2,$1)
+
+ AC_MSG_CHECKING(for check - version >= $min_check_version)
+
+ if test x$with_check = xno; then
+ AC_MSG_RESULT(disabled)
+ ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3])
+ else
+ if test "x$with_check" != x; then
+ CHECK_CFLAGS="-I$with_check/include"
+ CHECK_LIBS="-L$with_check/lib -lcheck"
+ else
+ CHECK_CFLAGS=""
+ CHECK_LIBS="-lcheck"
+ fi
+
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+
+ CFLAGS="$CFLAGS $CHECK_CFLAGS"
+ LIBS="$CHECK_LIBS $LIBS"
+
+ rm -f conf.check-test
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT([])
+#include <check.h>
+
+int main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ system ("touch conf.check-test");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = strdup("$min_check_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_check_version");
+ return 1;
+ }
+
+ if ((CHECK_MAJOR_VERSION != check_major_version) ||
+ (CHECK_MINOR_VERSION != check_minor_version) ||
+ (CHECK_MICRO_VERSION != check_micro_version))
+ {
+ printf("\n*** The check header file (version %d.%d.%d) does not match\n",
+ CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
+ printf("*** the check library (version %d.%d.%d).\n",
+ check_major_version, check_minor_version, check_micro_version);
+ return 1;
+ }
+
+ if ((check_major_version > major) ||
+ ((check_major_version == major) && (check_minor_version > minor)) ||
+ ((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of check (%d.%d.%d) was found.\n",
+ check_major_version, check_minor_version, check_micro_version);
+ printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro);
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the check library and header\n");
+ printf("*** file is being found. Rerun configure with the --with-check=PATH option\n");
+ printf("*** to specify the prefix where the correct version was installed.\n");
+ }
+
+ return 1;
+}
+])],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+
+ if test "x$no_check" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test -f conf.check-test ; then
+ :
+ else
+ echo "*** Could not run check test program, checking why..."
+ CFLAGS="$CFLAGS $CHECK_CFLAGS"
+ LIBS="$CHECK_LIBS $LIBS"
+ AC_TRY_LINK([
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <check.h>
+], , [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding check. You'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+ [ echo "*** The test program failed to compile or link. See the file config.log for"
+ echo "*** the exact error that occured." ])
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+
+ CHECK_CFLAGS=""
+ CHECK_LIBS=""
+
+ rm -f conf.check-test
+ ifelse([$3], , AC_MSG_ERROR([check not found]), [$3])
+ fi
+
+ AC_SUBST(CHECK_CFLAGS)
+ AC_SUBST(CHECK_LIBS)
+
+ rm -f conf.check-test
+
+ fi
+])
include $(TOPDIR)/rules.mk
PKG_NAME:=mpd
-PKG_VERSION:=0.20.9
-PKG_RELEASE:=2
+PKG_VERSION:=0.20.21
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.20/
-PKG_HASH:=cd77a2869e32354b004cc6b34fcb0bee56114caa2d9ed862aaa8071441e34eb7
+PKG_HASH:=8322764dc265c20f05c8c8fdfdd578b0722e74626bef56fcd8eebfb01acc58dc
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0
TITLE:=Music Player Daemon
URL:=http://www.musicpd.org/
DEPENDS:= +zlib +libcurl +libpthread +libmpdclient +libstdcpp $(ICONV_DEPENDS) \
- +AUDIO_SUPPORT:alsa-lib +boost +boost-container +libexpat
+ +AUDIO_SUPPORT:alsa-lib +boost +boost-container +libexpat +libflac
endef
define Package/mpd/Default/description
define Package/mpd-mini
$(call Package/mpd/Default)
TITLE+= (mini)
- DEPENDS+= +libflac +libmpg123 +libvorbisidec
+ DEPENDS+= +libmpg123 +libvorbisidec
PROVIDES:=mpd
VARIANT:=mini
endef
--disable-vorbis-encoder \
--enable-wave-encoder \
--disable-wavpack \
- --disable-webdav \
- --disable-wildmidi \
+ --enable-webdav \
--disable-zzip \
--with-zeroconf=no \
--disable-soxr \
CONFIGURE_ARGS += \
--enable-upnp \
--enable-ffmpeg \
- --disable-flac \
--enable-id3 \
--enable-mms \
--disable-mpg123 \
--- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx
+++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
-@@ -931,6 +931,7 @@ static const char *const ffmpeg_mime_typ
+@@ -937,6 +937,7 @@ static const char *const ffmpeg_mime_typ
"audio/qcelp",
"audio/vorbis",
"audio/vorbis+ogg",
include $(TOPDIR)/rules.mk
PKG_NAME:=mpg123
-PKG_VERSION:=1.25.8
+PKG_VERSION:=1.25.10
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/mpg123
-PKG_HASH:=79da51efae011814491f07c95cb5e46de0476aca7a0bf240ba61cfc27af8499b
+PKG_HASH:=6c1337aee2e4bf993299851c70b7db11faec785303cfca3a5c3eb5f329ba7023
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
PKG_FIXUP:=libtool
include $(TOPDIR)/rules.mk
PKG_NAME:=pianod
-PKG_VERSION:=174.07
+PKG_VERSION:=174.09
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/thess/pianod-sc/releases/download/$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=eee969926c095497893fbd28711258a31efb2d2301da87563dbcd101d8771bff
+PKG_HASH:=744c833ee17a7c95068c6925f4301f342bcad838ad8e48b40a19fd6739533eac
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
include $(TOPDIR)/rules.mk
PKG_NAME:=portaudio
-PKG_VERSION:=19_20140130
-PKG_RELEASE:=2
+PKG_VERSION:=190600_20161030
+PKG_RELEASE:=1
PKG_SOURCE:=pa_stable_v$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://www.portaudio.com/archives/
-PKG_HASH:=8fe024a5f0681e112c6979808f684c3516061cc51d3acc0b726af98fc96c8d57
+PKG_HASH:=f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.txt
#
-# Copyright (C) 2011-2016 OpenWrt.org
+# Copyright (C) 2011-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=pulseaudio
-PKG_VERSION:=11.1
-PKG_RELEASE:=2
+PKG_VERSION:=12.2
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://freedesktop.org/software/pulseaudio/releases/
-PKG_HASH:=f2521c525a77166189e3cb9169f75c2ee2b82fa3fcf9476024fbc2c3a6c9cd9e
+PKG_HASH:=809668ffc296043779c984f53461c2b3987a45b7a25eb2f0a1d11d9f23ba4055
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=GPL LICENSE
+PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=intltool/host
PKG_FIXUP:=autoreconf
define Package/pulseaudio-daemon-avahi
$(call Package/pulseaudio/Default)
DEPENDS+=+dbus +libavahi-client +sbc
-# DEPENDS+=+avahi-daemon
TITLE+= (avahi/bluez)
VARIANT:=avahi
endef
--without-fftw \
--without-soxr \
--without-speex
-# --disable-bluez
ifeq ($(BUILD_VARIANT),avahi)
CONFIGURE_ARGS += \
CONFIGURE_VARS += \
PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
-#SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib
-TARGET_CFLAGS += -std=gnu99
-
define Build/InstallDev
$(INSTALL_DIR) \
$(1)/usr/lib/pkgconfig \
PKG_NAME:=shairplay
PKG_VERSION:=2016-01-01
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/juhovh/shairplay.git
+PKG_SOURCE_URL:=https://github.com/juhovh/shairplay
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=ce80e005908f41d0e6fde1c4a21e9cb8ee54007b
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=55fe50e21ab5998d745626bd3f98fdbbf2f670b87c26823f5654537a29e7f6c9
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_MIRROR_HASH:=a77e42fcde7b0d023c94d748e62c100bb0bc06da2adc5d4aff19361e4f1a313d
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=MIT
include $(TOPDIR)/rules.mk
PKG_NAME:=shairport-sync
-PKG_VERSION:=3.1.6
-PKG_RELEASE:=1
+PKG_VERSION:=3.2.1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/mikebrady/shairport-sync.git
+PKG_SOURCE_URL:=https://github.com/mikebrady/shairport-sync.git
PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=8f440a6bca6a58d04f7c0f6c7ea711b31a0aa4abc7e4d8f4da7346a085dcd966
+PKG_MIRROR_HASH:=f07553651485d04e9482ebb94eb8034fb46076664c716d060514a85b3ce8aef3
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
Mike Brady <mikebrady@eircom.net>
TITLE:=AirPlay compatible audio player
DEPENDS:=@AUDIO_SUPPORT +libpthread +libstdcpp +alsa-lib +libconfig +libdaemon +libpopt
PROVIDES:=shairport-sync
- URL:=http://github.com/mikebrady/shairport-sync
+ URL:=https://github.com/mikebrady/shairport-sync
endef
define Package/shairport-sync-openssl
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/shairport-sync.init $(1)/etc/init.d/shairport-sync
$(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_DATA) ./files/shairport-sync.config $(1)/etc/config/shairport-sync
+ $(INSTALL_CONF) ./files/shairport-sync.config $(1)/etc/config/shairport-sync
endef
Package/shairport-sync-openssl/install = $(Package/shairport-sync/default/install)
include $(TOPDIR)/rules.mk
PKG_NAME:=shine
-PKG_VERSION:=3.1.0
-PKG_RELEASE:=2
+PKG_VERSION:=3.1.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/toots/shine/releases/download/$(PKG_VERSION)/
-PKG_HASH:=6c5310bda766b116ed2415d639a27e5e11040e068b4b2db6bd733333e620cb4f
+PKG_HASH:=58e61e70128cf73f88635db495bfc17f0dde3ce9c9ac070d505a0cd75b93d384
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
+++ /dev/null
-From 3695118267be9b7a9412c86c7c5424ab47efe7ec Mon Sep 17 00:00:00 2001
-From: Romain Beauxis <toots@rastageeks.org>
-Date: Thu, 7 Apr 2016 13:20:46 -0500
-Subject: [PATCH] Rename slen{1,2}_table to avoid name collision with ffmpeg.
-
----
- src/lib/l3bitstream.c | 4 ++--
- src/lib/l3loop.c | 4 ++--
- src/lib/tables.c | 4 ++--
- src/lib/tables.h | 4 ++--
- 4 files changed, 8 insertions(+), 8 deletions(-)
-
---- a/src/lib/l3bitstream.c
-+++ b/src/lib/l3bitstream.c
-@@ -127,8 +127,8 @@ static void encodeMainData(shine_global_
- {
- BF_PartHolder **pph = &config->l3stream.scaleFactorsPH[gr][ch];
- gr_info *gi = &(si.gr[gr].ch[ch].tt);
-- unsigned slen1 = slen1_tab[ gi->scalefac_compress ];
-- unsigned slen2 = slen2_tab[ gi->scalefac_compress ];
-+ unsigned slen1 = shine_slen1_tab[ gi->scalefac_compress ];
-+ unsigned slen2 = shine_slen2_tab[ gi->scalefac_compress ];
- int *ix = &config->l3_enc[ch][gr][0];
-
- if ( (gr == 0) || (si.scfsi[ch][0] == 0) )
---- a/src/lib/l3loop.c
-+++ b/src/lib/l3loop.c
-@@ -287,8 +287,8 @@ int part2_length(int gr, int ch, shine_g
- bits = 0;
-
- {
-- slen1 = slen1_tab[ gi->scalefac_compress ];
-- slen2 = slen2_tab[ gi->scalefac_compress ];
-+ slen1 = shine_slen1_tab[ gi->scalefac_compress ];
-+ slen2 = shine_slen2_tab[ gi->scalefac_compress ];
-
- if ( !gr || !(config->side_info.scfsi[ch][0]) )
- bits += (6 * slen1);
---- a/src/lib/tables.c
-+++ b/src/lib/tables.c
-@@ -7,8 +7,8 @@
- \r
- #include "tables.h"\r
- \r
--const int slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 };\r
--const int slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 };\r
-+const int shine_slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 };\r
-+const int shine_slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 };\r
- \r
- /* Valid samplerates and bitrates. */\r
- const int samplerates[9] = {\r
---- a/src/lib/tables.h
-+++ b/src/lib/tables.h
-@@ -3,8 +3,8 @@
- \r
- #include "types.h"\r
- \r
--extern const int slen1_tab[16];\r
--extern const int slen2_tab[16];\r
-+extern const int shine_slen1_tab[16];\r
-+extern const int shine_slen2_tab[16];\r
- \r
- extern const int samplerates[9];\r
- extern const int bitrates[16][4];\r
include $(TOPDIR)/rules.mk
PKG_NAME:=acl
-PKG_REV:=c39f7c5475e3e00d8abeb7b30e61958670fb3ee2
-PKG_VERSION:=20180121
+PKG_VERSION:=2.2.53
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=0291d931bbac041f14bc12d317e505cd596e0ec6f1b8bcdfa03b9a1fad274ac2
-PKG_SOURCE_URL:=https://git.savannah.gnu.org/git/acl.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_URL:=https://git.savannah.nongnu.org/cgit/acl.git/snapshot
+PKG_HASH:=9e905397ac10d06768c63edd0579c34b8431555f2ea8e8f2cee337b31f856805
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=LGPL-2.1 GPL-2.0
define Package/acl/Default
TITLE:=Access control list (ACL) manipulation
- URL:=http://savannah.nongnu.org/projects/acl
+ URL:=https://savannah.nongnu.org/projects/acl
SUBMENU:=Filesystem
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=acpica-unix
-PKG_VERSION:=20171215
+PKG_VERSION:=20180927
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://acpica.org/sites/$(patsubst %-unix,%,$(PKG_NAME))/files/$(PKG_SOURCE_URL)
-PKG_HASH:=1287c3d75c7956680dbb7e90151caef0255797eb29e18dd55588d713ada97d14
+PKG_HASH:=dc408d11889bcbedcfe9cc5b7ed23f65e857ca8fd5125f8c7a9e075e0b282db1
PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
PKG_LICENSE:=GPL-2.0
include $(TOPDIR)/rules.mk
PKG_NAME:=acpid
-PKG_VERSION:=2.0.28
+PKG_VERSION:=2.0.30
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@SF/acpid2
-PKG_HASH:=980c3a54b0d3f2fd49fd845a0584c5c2abeaab9e9ac09fcbb68686bbb57a7110
+PKG_SOURCE_URL:=@SF/acpid2
+PKG_HASH:=28b77b62d3f64ebd1c2a3d16bccc6d4333b4e24a86aeacebec255fad223cf4cb
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
SECTION:=utils
CATEGORY:=Utilities
TITLE:=The ACPI Daemon (acpid) With Netlink Support
- URL:=http://tedfelix.com/linux/acpid-netlink.html
- DEPENDS:=@(TARGET_x86||TARGET_x86_64) +kmod-input-evdev
+ URL:=https://sourceforge.net/projects/acpid2/
+ DEPENDS:=+kmod-input-evdev
endef
define Package/acpid/description
+++ /dev/null
-Partially roll back upstream commit 4711119089e1ad08dad206f4fded68f1972fdeed
-since released versions of uClibc don't support isfdtype().
-
-Signed-off-by: Gustavo Zaarias <gustavo@zacarias.com.ar>
-
-Index: acpid-2.0.23/sock.c
-===================================================================
---- acpid-2.0.23.orig/sock.c
-+++ acpid-2.0.23/sock.c
-@@ -53,7 +53,10 @@ int non_root_clients;
- int
- is_socket(int fd)
- {
-- return (isfdtype(fd, S_IFSOCK) == 1);
-+ int v;
-+ socklen_t l = sizeof(int);
-+
-+ return (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
- }
-
- /* accept a new client connection */
include $(TOPDIR)/rules.mk
PKG_NAME:=ap51-flash
-PKG_VERSION:=2017-12-07
+PKG_VERSION:=2018.0
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/ap51-flash/ap51-flash.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=f94f9c99711d14a3c0186318d822d67d9d0ce391
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=15786a0ecae9be5ed4e8f32940624d1a1c83da924294df08003616a863947074
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/ap51-flash/ap51-flash/releases/download/v$(PKG_VERSION)
+PKG_HASH:=e38e48a12d7c7b8e189f5538b78bbf00548044414d9ededa18ec9a5b5886afaa
PKG_MAINTAINER:=Russell Senior <russell@personaltelco.net>
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=LICENSES/preferred/GPL-3.0
SECTION:=utils
CATEGORY:=Utilities
TITLE:=A tool for flashing (nearly) all ap51/ap61 based routers
- URL:=http://dev.cloudtrax.com/wiki/ap51-flash-station
+ URL:=https://ap51-flash.readthedocs.io/en/latest/
endef
# pass optimization flags
include $(TOPDIR)/rules.mk
PKG_NAME:=at
-PKG_VERSION:=3.1.20
+PKG_VERSION:=3.1.23
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/a/at
-PKG_HASH:=0871923cab73050b98ace020664eb2ddc1e669e4166b5abb64d864d02fcefab9
+PKG_HASH:=97450aa954aaa8a70218cc8e61a33df9fee9f86527e9f861de302fb7a3c81710
PKG_LICENSE:=GPL-2.0+ GPL-3.0+ ISC
PKG_LICENSE_FILES:=COPYING Copyright
include $(TOPDIR)/rules.mk
PKG_NAME:=attr
-PKG_REV:=cfd8e6ef491a7a5ff900ba2ba3deff7d0bebb0a6
-PKG_VERSION:=20170915
+PKG_VERSION:=2.4.48
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://git.savannah.gnu.org/git/attr.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_MIRROR_HASH:=3c4f9331fd73192801a30071a379f07b48699adffe0d560133a740ade029a04c
+PKG_SOURCE_URL:=http://git.savannah.nongnu.org/cgit/attr.git/snapshot
+PKG_HASH:=095699f71230ace37e5bc680c6f9d15cf8e53eb38d00b2c46db5cc7e0712e5f3
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=LGPL-2.1 GPL-2.0
include $(TOPDIR)/rules.mk
PKG_NAME:=bandwidthd
-PKG_VERSION:=2.0.1-34
-PKG_RELEASE:=1
+PKG_VERSION:=2.0.1-35
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/NethServer/bandwidthd/archive/$(PKG_VERSION)
-PKG_HASH:=41803a202956ae99b095f98ce92e5637dad62d25509ccd5cff9a8913626a4226
+PKG_SOURCE_URL:=https://codeload.github.com/NethServer/bandwidthd/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=75f526d9e81c5a543accbb9e197b6b582c293aa20d6cdfc8be5cef43046981c5
PKG_MAINTAINER:=Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
ac_cv_lib_sqlite3_sqlite3_open=no
endif
-EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
+EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) -fgnu89-inline
EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
define Package/bandwidthd/install
include $(TOPDIR)/rules.mk
-BASE_VERSION:=4.4
-
PKG_NAME:=bash
-PKG_VERSION:=$(BASE_VERSION).12
-PKG_RELEASE:=1
+PKG_VERSION:=4.4.18
+PKG_RELEASE:=2
-PKG_SOURCE:=$(PKG_NAME)-$(BASE_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/bash
-PKG_HASH:=d86b3392c1202e8ff5a423b302e6284db7f8f435ea9f39b5b1b20fd3ac36dfcb
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BASE_VERSION)
+PKG_HASH:=604d9eec5e4ed5fd2180ee44dd756ddca92e0b6aa4217bbab2b6227380317f23
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
-PKG_CHECK_FORMAT_SECURITY:=0
+PKG_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
define Package/bash
CATEGORY:=Utilities
SUBMENU:=Shells
TITLE:=The GNU Bourne Again SHell
- DEPENDS:=+libncurses
+ DEPENDS:=+libncurses +libreadline
URL:=http://www.gnu.org/software/bash/
endef
incorporates useful features from the Korn and C shells (ksh and csh).
endef
-
-define Build/Configure
- $(call Build/Configure/Default, \
- --without-bash-malloc \
- --bindir=/bin \
- )
-endef
-
-
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR)/builtins LDFLAGS_FOR_BUILD= mkbuiltins
- $(MAKE) -C $(PKG_BUILD_DIR) \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- SHELL="/bin/bash" \
- all install
-endef
+# Bash detects and enables certain features by runtest simple piece of code
+# which is not viable when doing cross compilation and default to no in many
+# cases. Grep for 'cross.compil' in aclocal.m4 and config-bot.h for details
+#
+# bash_cv_job_control_missing: Job control is needed for bash to be used as the
+# default shell
+#
+# bash_cv_getcwd_malloc: The replacement by bash does not work well with
+# overlayfs. See "bash getcwd errors when running under OverlayFS"
+# http://permalink.gmane.org/gmane.linux.embedded.yocto.general/25204
+#
+# bash_cv_dev_fd: The test is done on build system but OpenWrt currently does
+# not have /dev/fd, it provides /proc/self/fd/ instead
+#
+# bash_cv_sys_named_pipes: Required for process substituion
+CONFIGURE_VARS += \
+ ac_cv_rl_prefix="$(STAGING_DIR)/usr" \
+ ac_cv_rl_version="7.0" \
+ bash_cv_getcwd_malloc=yes \
+ bash_cv_job_control_missing=present \
+ bash_cv_dev_fd=whacky \
+ bash_cv_sys_named_pipes=present \
+
+# The following are some other tests that cannot run when cross-compiling
+CONFIGURE_VARS += \
+ bash_cv_func_sigsetjmp=present \
+ bash_cv_printf_a_format=yes \
+
+CONFIGURE_ARGS+= \
+ --with-installed-readline="$(STAGING_DIR)/usr" \
+ --with-curses \
+ --without-bash-malloc \
+ --bindir=/bin \
+ --disable-rpath \
define Package/bash/postinst
#!/bin/sh
-grep bash $${IPKG_INSTROOT}/etc/shells || \
- echo "/bin/bash" >> $${IPKG_INSTROOT}/etc/shells
- echo "/bin/rbash" >> $${IPKG_INSTROOT}/etc/shells
+grep -q bash "$${IPKG_INSTROOT}/etc/shells" || {
+ echo /bin/bash >> "$${IPKG_INSTROOT}/etc/shells"
+ echo /bin/rbash >> "$${IPKG_INSTROOT}/etc/shells"
+}
endef
define Package/bash/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
- ln -sf bash $(1)/bin/rbash
+ $(LN) bash $(1)/bin/rbash
endef
+++ /dev/null
-Index: bash-4.4/execute_cmd.c
-===================================================================
---- bash-4.4.orig/execute_cmd.c
-+++ bash-4.4/execute_cmd.c
-@@ -2459,7 +2459,11 @@ execute_pipeline (command, asynchronous,
- /* If the `lastpipe' option is set with shopt, and job control is not
- enabled, execute the last element of non-async pipelines in the
- current shell environment. */
-- if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
-+ if (lastpipe_opt &&
-+#if defined(JOB_CONTROL)
-+ job_control == 0 &&
-+#endif
-+ asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
- {
- lstdin = move_to_high_fd (0, 1, -1);
- if (lstdin > 0)
+++ /dev/null
-Index: bash-4.4/configure
-===================================================================
---- bash-4.4.orig/configure
-+++ bash-4.4/configure
-@@ -5420,8 +5420,7 @@ if test $opt_readline = yes; then
- # static version specified as -llibname to override the
- # dynamic version
- case "${host_os}" in
-- darwin[89]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;;
-- *) READLINE_LIB=-lreadline ;;
-+ *) READLINE_LIB='${READLINE_LIBRARY}' ;;
- esac
- fi
- else
-Index: bash-4.4/configure.ac
-===================================================================
---- bash-4.4.orig/configure.ac
-+++ bash-4.4/configure.ac
-@@ -573,8 +573,7 @@ if test $opt_readline = yes; then
- # static version specified as -llibname to override the
- # dynamic version
- case "${host_os}" in
-- darwin[[89]]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;;
-- *) READLINE_LIB=-lreadline ;;
-+ *) READLINE_LIB='${READLINE_LIBRARY}' ;;
- esac
- fi
- else
--- /dev/null
+Fix job control
+
+Patch was taken from https://git.alpinelinux.org/cgit/aports/tree/main/bash/fix-jobs.patch
+
+See also "Bash 4.4.12-r2 jobs hangs on arm (alpine 3.7)", https://bugs.alpinelinux.org/issues/8447
+diff --git a/jobs.c b/jobs.c
+index cef3c79..bf99266 100644
+--- a/jobs.c
++++ b/jobs.c
+@@ -4166,10 +4166,8 @@ initialize_job_control (force)
+ if (js.c_childmax < 0)
+ js.c_childmax = DEFAULT_CHILD_MAX;
+
+-#if 0
+ if (js.c_childmax > MAX_CHILD_MAX)
+ js.c_childmax = MAX_CHILD_MAX;
+-#endif
+
+ return job_control;
+ }
+@@ -4547,10 +4545,8 @@ mark_dead_jobs_as_notified (force)
+ if (js.c_childmax < 0)
+ js.c_childmax = DEFAULT_CHILD_MAX;
+
+-#if 0
+ if (js.c_childmax > MAX_CHILD_MAX)
+ js.c_childmax = MAX_CHILD_MAX;
+-#endif
+
+ /* Don't do anything if the number of dead processes is less than CHILD_MAX
+ and we're not forcing a cleanup. */
+++ /dev/null
-Index: bash-4.4/lib/readline/history.c
-===================================================================
---- bash-4.4.orig/lib/readline/history.c
-+++ bash-4.4/lib/readline/history.c
-@@ -57,6 +57,8 @@ extern int errno;
- /* How big to make the_history when we first allocate it. */
- #define DEFAULT_HISTORY_INITIAL_SIZE 502
-
-+#define MAX_HISTORY_INITIAL_SIZE 8192
-+
- /* The number of slots to increase the_history by. */
- #define DEFAULT_HISTORY_GROW_SIZE 50
-
-@@ -307,7 +309,9 @@ add_history (string)
- if (history_size == 0)
- {
- if (history_stifled && history_max_entries > 0)
-- history_size = history_max_entries + 2;
-+ history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
-+ ? MAX_HISTORY_INITIAL_SIZE
-+ : history_max_entries + 2;
- else
- history_size = DEFAULT_HISTORY_INITIAL_SIZE;
- the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 0
-+#define PATCHLEVEL 1
-
- #endif /* _PATCHLEVEL_H_ */
+++ /dev/null
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 1
-+#define PATCHLEVEL 2
-
- #endif /* _PATCHLEVEL_H_ */
-Index: bash-4.4/subst.c
-===================================================================
---- bash-4.4.orig/subst.c
-+++ bash-4.4/subst.c
-@@ -5931,6 +5931,7 @@ read_comsub (fd, quoted, rflag)
- char *istring, buf[128], *bufp, *s;
- int istring_index, istring_size, c, tflag, skip_ctlesc, skip_ctlnul;
- ssize_t bufn;
-+ int nullbyte;
-
- istring = (char *)NULL;
- istring_index = istring_size = bufn = tflag = 0;
-@@ -5938,6 +5939,8 @@ read_comsub (fd, quoted, rflag)
- for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++)
- skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL;
-
-+ nullbyte = 0;
-+
- /* Read the output of the command through the pipe. This may need to be
- changed to understand multibyte characters in the future. */
- while (1)
-@@ -5956,7 +5959,11 @@ read_comsub (fd, quoted, rflag)
- if (c == 0)
- {
- #if 1
-- internal_warning ("%s", _("command substitution: ignored null byte in input"));
-+ if (nullbyte == 0)
-+ {
-+ internal_warning ("%s", _("command substitution: ignored null byte in input"));
-+ nullbyte = 1;
-+ }
- #endif
- continue;
- }
+++ /dev/null
-Index: bash-4.4/lib/glob/sm_loop.c
-===================================================================
---- bash-4.4.orig/lib/glob/sm_loop.c
-+++ bash-4.4/lib/glob/sm_loop.c
-@@ -330,6 +330,12 @@ PARSE_COLLSYM (p, vp)
- for (pc = 0; p[pc]; pc++)
- if (p[pc] == L('.') && p[pc+1] == L(']'))
- break;
-+ if (p[pc] == 0)
-+ {
-+ if (vp)
-+ *vp = INVALID;
-+ return (p + pc);
-+ }
- val = COLLSYM (p, pc);
- if (vp)
- *vp = val;
-@@ -483,6 +489,9 @@ BRACKMATCH (p, test, flags)
- c = *p++;
- c = FOLD (c);
-
-+ if (c == L('\0'))
-+ return ((test == L('[')) ? savep : (CHAR *)0);
-+
- if ((flags & FNM_PATHNAME) && c == L('/'))
- /* [/] can never match when matching a pathname. */
- return (CHAR *)0;
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 2
-+#define PATCHLEVEL 3
-
- #endif /* _PATCHLEVEL_H_ */
+++ /dev/null
-Index: bash-4.4/jobs.c
-===================================================================
---- bash-4.4.orig/jobs.c
-+++ bash-4.4/jobs.c
-@@ -453,6 +453,21 @@ cleanup_the_pipeline ()
- discard_pipeline (disposer);
- }
-
-+void
-+discard_last_procsub_child ()
-+{
-+ PROCESS *disposer;
-+ sigset_t set, oset;
-+
-+ BLOCK_CHILD (set, oset);
-+ disposer = last_procsub_child;
-+ last_procsub_child = (PROCESS *)NULL;
-+ UNBLOCK_CHILD (oset);
-+
-+ if (disposer)
-+ discard_pipeline (disposer);
-+}
-+
- struct pipeline_saver *
- alloc_pipeline_saver ()
- {
-Index: bash-4.4/jobs.h
-===================================================================
---- bash-4.4.orig/jobs.h
-+++ bash-4.4/jobs.h
-@@ -190,6 +190,7 @@ extern JOB **jobs;
- extern void making_children __P((void));
- extern void stop_making_children __P((void));
- extern void cleanup_the_pipeline __P((void));
-+extern void discard_last_procsub_child __P((void));
- extern void save_pipeline __P((int));
- extern PROCESS *restore_pipeline __P((int));
- extern void start_pipeline __P((void));
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 3
-+#define PATCHLEVEL 4
-
- #endif /* _PATCHLEVEL_H_ */
-Index: bash-4.4/subst.c
-===================================================================
---- bash-4.4.orig/subst.c
-+++ bash-4.4/subst.c
-@@ -5808,10 +5808,7 @@ process_substitute (string, open_for_rea
- {
- #if defined (JOB_CONTROL)
- if (last_procsub_child)
-- {
-- discard_pipeline (last_procsub_child);
-- last_procsub_child = (PROCESS *)NULL;
-- }
-+ discard_last_procsub_child ();
- last_procsub_child = restore_pipeline (0);
- #endif
-
+++ /dev/null
-Index: bash-4.4/builtins/evalstring.c
-===================================================================
---- bash-4.4.orig/builtins/evalstring.c
-+++ bash-4.4/builtins/evalstring.c
-@@ -104,12 +104,9 @@ should_suppress_fork (command)
- running_trap == 0 &&
- *bash_input.location.string == '\0' &&
- command->type == cm_simple &&
--#if 0
- signal_is_trapped (EXIT_TRAP) == 0 &&
- signal_is_trapped (ERROR_TRAP) == 0 &&
--#else
- any_signals_trapped () < 0 &&
--#endif
- command->redirects == 0 && command->value.Simple->redirects == 0 &&
- ((command->flags & CMD_TIME_PIPELINE) == 0) &&
- ((command->flags & CMD_INVERT_RETURN) == 0));
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 4
-+#define PATCHLEVEL 5
-
- #endif /* _PATCHLEVEL_H_ */
+++ /dev/null
-Index: bash-4.4/builtins/pushd.def
-===================================================================
---- bash-4.4.orig/builtins/pushd.def
-+++ bash-4.4/builtins/pushd.def
-@@ -365,7 +365,7 @@ popd_builtin (list)
- break;
- }
-
-- if (which > directory_list_offset || (directory_list_offset == 0 && which == 0))
-+ if (which > directory_list_offset || (which < -directory_list_offset) || (directory_list_offset == 0 && which == 0))
- {
- pushd_error (directory_list_offset, which_word ? which_word : "");
- return (EXECUTION_FAILURE);
-@@ -387,6 +387,11 @@ popd_builtin (list)
- remove that directory from the list and shift the remainder
- of the list into place. */
- i = (direction == '+') ? directory_list_offset - which : which;
-+ if (i < 0 || i > directory_list_offset)
-+ {
-+ pushd_error (directory_list_offset, which_word ? which_word : "");
-+ return (EXECUTION_FAILURE);
-+ }
- free (pushd_directory_list[i]);
- directory_list_offset--;
-
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 5
-+#define PATCHLEVEL 6
-
- #endif /* _PATCHLEVEL_H_ */
+++ /dev/null
-Index: bash-4.4/bashline.c
-===================================================================
---- bash-4.4.orig/bashline.c
-+++ bash-4.4/bashline.c
-@@ -142,7 +142,7 @@ static int executable_completion __P((co
- static rl_icppfunc_t *save_directory_hook __P((void));
- static void restore_directory_hook __P((rl_icppfunc_t));
-
--static int directory_exists __P((const char *));
-+static int directory_exists __P((const char *, int));
-
- static void cleanup_expansion_error __P((void));
- static void maybe_make_readline_line __P((char *));
-@@ -3102,18 +3102,20 @@ restore_directory_hook (hookf)
- rl_directory_rewrite_hook = hookf;
- }
-
--/* Check whether not the (dequoted) version of DIRNAME, with any trailing slash
-- removed, exists. */
-+/* Check whether not DIRNAME, with any trailing slash removed, exists. If
-+ SHOULD_DEQUOTE is non-zero, we dequote the directory name first. */
- static int
--directory_exists (dirname)
-+directory_exists (dirname, should_dequote)
- const char *dirname;
-+ int should_dequote;
- {
- char *new_dirname;
- int dirlen, r;
- struct stat sb;
-
-- /* First, dequote the directory name */
-- new_dirname = bash_dequote_filename ((char *)dirname, rl_completion_quote_character);
-+ /* We save the string and chop the trailing slash because stat/lstat behave
-+ inconsistently if one is present. */
-+ new_dirname = should_dequote ? bash_dequote_filename ((char *)dirname, rl_completion_quote_character) : savestring (dirname);
- dirlen = STRLEN (new_dirname);
- if (new_dirname[dirlen - 1] == '/')
- new_dirname[dirlen - 1] = '\0';
-@@ -3145,7 +3147,7 @@ bash_filename_stat_hook (dirname)
- else if (t = mbschr (local_dirname, '`')) /* XXX */
- should_expand_dirname = '`';
-
-- if (should_expand_dirname && directory_exists (local_dirname))
-+ if (should_expand_dirname && directory_exists (local_dirname, 0))
- should_expand_dirname = 0;
-
- if (should_expand_dirname)
-@@ -3155,7 +3157,7 @@ bash_filename_stat_hook (dirname)
- have to worry about restoring this setting. */
- global_nounset = unbound_vars_is_error;
- unbound_vars_is_error = 0;
-- wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_COMPLETE); /* does the right thing */
-+ wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_NOPROCSUB|W_COMPLETE); /* does the right thing */
- unbound_vars_is_error = global_nounset;
- if (wl)
- {
-@@ -3244,13 +3246,13 @@ bash_directory_completion_hook (dirname)
- should_expand_dirname = '`';
- }
-
-- if (should_expand_dirname && directory_exists (local_dirname))
-+ if (should_expand_dirname && directory_exists (local_dirname, 1))
- should_expand_dirname = 0;
-
- if (should_expand_dirname)
- {
- new_dirname = savestring (local_dirname);
-- wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_COMPLETE); /* does the right thing */
-+ wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB|W_NOPROCSUB|W_COMPLETE); /* does the right thing */
- if (wl)
- {
- *dirname = string_list (wl);
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 6
-+#define PATCHLEVEL 7
-
- #endif /* _PATCHLEVEL_H_ */
-Index: bash-4.4/subst.c
-===================================================================
---- bash-4.4.orig/subst.c
-+++ bash-4.4/subst.c
-@@ -9458,6 +9458,10 @@ add_twochars:
- tword->flags |= word->flags & (W_ASSIGNARG|W_ASSIGNRHS); /* affects $@ */
- if (word->flags & W_COMPLETE)
- tword->flags |= W_COMPLETE; /* for command substitutions */
-+ if (word->flags & W_NOCOMSUB)
-+ tword->flags |= W_NOCOMSUB;
-+ if (word->flags & W_NOPROCSUB)
-+ tword->flags |= W_NOPROCSUB;
-
- temp = (char *)NULL;
-
+++ /dev/null
-Index: bash-4.4/expr.c
-===================================================================
---- bash-4.4.orig/expr.c
-+++ bash-4.4/expr.c
-@@ -578,24 +578,23 @@ expcond ()
- rval = cval = explor ();
- if (curtok == QUES) /* found conditional expr */
- {
-- readtok ();
-- if (curtok == 0 || curtok == COL)
-- evalerror (_("expression expected"));
- if (cval == 0)
- {
- set_noeval = 1;
- noeval++;
- }
-
-+ readtok ();
-+ if (curtok == 0 || curtok == COL)
-+ evalerror (_("expression expected"));
-+
- val1 = EXP_HIGHEST ();
-
- if (set_noeval)
- noeval--;
- if (curtok != COL)
- evalerror (_("`:' expected for conditional expression"));
-- readtok ();
-- if (curtok == 0)
-- evalerror (_("expression expected"));
-+
- set_noeval = 0;
- if (cval)
- {
-@@ -603,7 +602,11 @@ expcond ()
- noeval++;
- }
-
-+ readtok ();
-+ if (curtok == 0)
-+ evalerror (_("expression expected"));
- val2 = expcond ();
-+
- if (set_noeval)
- noeval--;
- rval = cval ? val1 : val2;
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 7
-+#define PATCHLEVEL 8
-
- #endif /* _PATCHLEVEL_H_ */
+++ /dev/null
-Index: bash-4.4/lib/readline/history.c
-===================================================================
---- bash-4.4.orig/lib/readline/history.c
-+++ bash-4.4/lib/readline/history.c
-@@ -279,6 +279,7 @@ add_history (string)
- const char *string;
- {
- HIST_ENTRY *temp;
-+ int new_length;
-
- if (history_stifled && (history_length == history_max_entries))
- {
-@@ -295,13 +296,9 @@ add_history (string)
-
- /* Copy the rest of the entries, moving down one slot. Copy includes
- trailing NULL. */
--#if 0
-- for (i = 0; i < history_length; i++)
-- the_history[i] = the_history[i + 1];
--#else
- memmove (the_history, the_history + 1, history_length * sizeof (HIST_ENTRY *));
--#endif
-
-+ new_length = history_length;
- history_base++;
- }
- else
-@@ -315,7 +312,7 @@ add_history (string)
- else
- history_size = DEFAULT_HISTORY_INITIAL_SIZE;
- the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
-- history_length = 1;
-+ new_length = 1;
- }
- else
- {
-@@ -325,14 +322,15 @@ add_history (string)
- the_history = (HIST_ENTRY **)
- xrealloc (the_history, history_size * sizeof (HIST_ENTRY *));
- }
-- history_length++;
-+ new_length = history_length + 1;
- }
- }
-
- temp = alloc_history_entry ((char *)string, hist_inittime ());
-
-- the_history[history_length] = (HIST_ENTRY *)NULL;
-- the_history[history_length - 1] = temp;
-+ the_history[new_length] = (HIST_ENTRY *)NULL;
-+ the_history[new_length - 1] = temp;
-+ history_length = new_length;
- }
-
- /* Change the time stamp of the most recent history entry to STRING. */
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 8
-+#define PATCHLEVEL 9
-
- #endif /* _PATCHLEVEL_H_ */
+++ /dev/null
-Index: bash-4.4/builtins/read.def
-===================================================================
---- bash-4.4.orig/builtins/read.def
-+++ bash-4.4/builtins/read.def
-@@ -181,7 +181,8 @@ read_builtin (list)
- WORD_LIST *list;
- {
- register char *varname;
-- int size, i, nr, pass_next, saw_escape, eof, opt, retval, code, print_ps2;
-+ int size, nr, pass_next, saw_escape, eof, opt, retval, code, print_ps2;
-+ volatile int i;
- int input_is_tty, input_is_pipe, unbuffered_read, skip_ctlesc, skip_ctlnul;
- int raw, edit, nchars, silent, have_timeout, ignore_delim, fd, lastsig, t_errno;
- unsigned int tmsec, tmusec;
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 9
-+#define PATCHLEVEL 10
-
- #endif /* _PATCHLEVEL_H_ */
+++ /dev/null
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 10
-+#define PATCHLEVEL 11
-
- #endif /* _PATCHLEVEL_H_ */
-Index: bash-4.4/sig.c
-===================================================================
---- bash-4.4.orig/sig.c
-+++ bash-4.4/sig.c
-@@ -585,7 +585,8 @@ termsig_handler (sig)
- #if defined (JOB_CONTROL)
- if (sig == SIGHUP && (interactive || (subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB))))
- hangup_all_jobs ();
-- end_job_control ();
-+ if ((subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB)) == 0)
-+ end_job_control ();
- #endif /* JOB_CONTROL */
-
- #if defined (PROCESS_SUBSTITUTION)
+++ /dev/null
-Index: bash-4.4/patchlevel.h
-===================================================================
---- bash-4.4.orig/patchlevel.h
-+++ bash-4.4/patchlevel.h
-@@ -25,6 +25,6 @@
- regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
- looks for to find the patch level (for the sccs version string). */
-
--#define PATCHLEVEL 11
-+#define PATCHLEVEL 12
-
- #endif /* _PATCHLEVEL_H_ */
-Index: bash-4.4/subst.c
-===================================================================
---- bash-4.4.orig/subst.c
-+++ bash-4.4/subst.c
-@@ -2825,11 +2825,15 @@ list_string (string, separators, quoted)
-
- /* Parse a single word from STRING, using SEPARATORS to separate fields.
- ENDPTR is set to the first character after the word. This is used by
-- the `read' builtin. This is never called with SEPARATORS != $IFS;
-- it should be simplified.
-+ the `read' builtin.
-+
-+ This is never called with SEPARATORS != $IFS, and takes advantage of that.
-
- XXX - this function is very similar to list_string; they should be
- combined - XXX */
-+
-+#define islocalsep(c) (local_cmap[(unsigned char)(c)] != 0)
-+
- char *
- get_word_from_string (stringp, separators, endptr)
- char **stringp, *separators, **endptr;
-@@ -2837,6 +2841,7 @@ get_word_from_string (stringp, separator
- register char *s;
- char *current_word;
- int sindex, sh_style_split, whitesep, xflags;
-+ unsigned char local_cmap[UCHAR_MAX+1]; /* really only need single-byte chars here */
- size_t slen;
-
- if (!stringp || !*stringp || !**stringp)
-@@ -2846,20 +2851,23 @@ get_word_from_string (stringp, separator
- separators[1] == '\t' &&
- separators[2] == '\n' &&
- separators[3] == '\0';
-- for (xflags = 0, s = ifs_value; s && *s; s++)
-+ memset (local_cmap, '\0', sizeof (local_cmap));
-+ for (xflags = 0, s = separators; s && *s; s++)
- {
- if (*s == CTLESC) xflags |= SX_NOCTLESC;
- if (*s == CTLNUL) xflags |= SX_NOESCCTLNUL;
-+ local_cmap[(unsigned char)*s] = 1; /* local charmap of separators */
- }
-
- s = *stringp;
- slen = 0;
-
- /* Remove sequences of whitespace at the beginning of STRING, as
-- long as those characters appear in IFS. */
-- if (sh_style_split || !separators || !*separators)
-+ long as those characters appear in SEPARATORS. This happens if
-+ SEPARATORS == $' \t\n' or if IFS is unset. */
-+ if (sh_style_split || separators == 0)
- {
-- for (; *s && spctabnl (*s) && isifs (*s); s++);
-+ for (; *s && spctabnl (*s) && islocalsep (*s); s++);
-
- /* If the string is nothing but whitespace, update it and return. */
- if (!*s)
-@@ -2878,9 +2886,9 @@ get_word_from_string (stringp, separator
-
- This obeys the field splitting rules in Posix.2. */
- sindex = 0;
-- /* Don't need string length in ADVANCE_CHAR or string_extract_verbatim
-- unless multibyte chars are possible. */
-- slen = (MB_CUR_MAX > 1) ? STRLEN (s) : 1;
-+ /* Don't need string length in ADVANCE_CHAR unless multibyte chars are
-+ possible, but need it in string_extract_verbatim for bounds checking */
-+ slen = STRLEN (s);
- current_word = string_extract_verbatim (s, slen, &sindex, separators, xflags);
-
- /* Set ENDPTR to the first character after the end of the word. */
-@@ -2899,19 +2907,19 @@ get_word_from_string (stringp, separator
-
- /* Now skip sequences of space, tab, or newline characters if they are
- in the list of separators. */
-- while (s[sindex] && spctabnl (s[sindex]) && isifs (s[sindex]))
-+ while (s[sindex] && spctabnl (s[sindex]) && islocalsep (s[sindex]))
- sindex++;
-
- /* If the first separator was IFS whitespace and the current character is
- a non-whitespace IFS character, it should be part of the current field
- delimiter, not a separate delimiter that would result in an empty field.
- Look at POSIX.2, 3.6.5, (3)(b). */
-- if (s[sindex] && whitesep && isifs (s[sindex]) && !spctabnl (s[sindex]))
-+ if (s[sindex] && whitesep && islocalsep (s[sindex]) && !spctabnl (s[sindex]))
- {
- sindex++;
- /* An IFS character that is not IFS white space, along with any adjacent
- IFS white space, shall delimit a field. */
-- while (s[sindex] && spctabnl (s[sindex]) && isifs (s[sindex]))
-+ while (s[sindex] && spctabnl (s[sindex]) && islocalsep(s[sindex]))
- sindex++;
- }
-
PKG_NAME:=bluelog
PKG_VERSION:=1.1.2
-PKG_RELEASE:=2
+PKG_RELEASE:=4
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=ftp://ftp.digifail.com/software/bluelog
-PKG_HASH:=9750b007daffaffecea3b8dd2332bf74cc24955c307861197a20d04d845bc412
+PKG_SOURCE:=Bluelog-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/MS3FGX/Bluelog/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=ebbc1357e14bc46cbddd8390cdbd29c0131b09b8ab680a1c382164ef076cb53e
+PKG_BUILD_DIR:=$(BUILD_DIR)/Bluelog-$(PKG_VERSION)
OUI_SOURCE:=oui-2016-05-30.txt.gz
-OUI_URL:=http://sources.lede-project.org/
+OUI_URL:=https://sources.openwrt.org/
OUI_MD5SUM:=38048729fdb5a7a7e0c5db6a51dc2dd1
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Bluetooth scanner and logger
- URL:=http://www.digifail.com/software/bluelog.shtml
+ URL:=https://github.com/MS3FGX/Bluelog
DEPENDS:=+bluez-libs +kmod-bluetooth
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=bluez
-PKG_VERSION:=5.47
+PKG_VERSION:=5.50
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
-PKG_HASH:=cf75bf7cd5d564f21cc4a2bd01d5c39ce425397335fd47d9bbe43af0a58342c8
+PKG_HASH:=5ffcaae18bbb6155f1591be8c24898dc12f062075a40b538b745bfd477481911
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_MAINTAINER:=
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
SECTION:=utils
CATEGORY:=Utilities
TITLE+= utilities
- DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
+ DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS) +dbus
endef
define Package/bluez-daemon
/etc/bluetooth/main.conf
/etc/bluetooth/network.conf
/etc/bluetooth/input.conf
-/etc/bluetooth/audio.conf
+/etc/bluetooth/keys
/etc/config/bluetooth
endef
+TARGET_CFLAGS += -D_GNU_SOURCE -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections
+
CONFIGURE_ARGS += \
--enable-static \
--enable-shared \
--disable-udev \
--enable-deprecated
-TARGET_CPPFLAGS += \
- -D_GNU_SOURCE
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/bccmd $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/btattach $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/
$(CP) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/mpris-proxy $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
- $(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_DATA) ./files/bluetooth.config $(1)/etc/config/bluetooth
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
- $(INSTALL_DATA) ./files/bluetooth.dbus $(1)/etc/dbus-1/system.d/bluetooth.conf
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bluetooth.conf $(1)/etc/dbus-1/system.d/bluetooth.conf
$(INSTALL_DIR) $(1)/etc/bluetooth
+ $(INSTALL_DIR) $(1)/etc/bluetooth/keys
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/main.conf $(1)/etc/bluetooth/main.conf
$(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/network/network.conf $(1)/etc/bluetooth/network.conf
$(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/input/input.conf $(1)/etc/bluetooth/input.conf
- $(INSTALL_DATA) ./files/audio.conf $(1)/etc/bluetooth/audio.conf
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd
endef
+++ /dev/null
-Enable=Source,Sink,Media,Socket
+++ /dev/null
-config bluetoothd
-# option config /etc/bluetooth/main.conf
- option enabled 1
-
-config hciattach
- option initspeed 115200
- option tty ttyS1
- option type csr
- option speed 115200
- option flow noflow
- option enabled 0
-
-config rfcomm
-# option config /etc/bluetooth/rfcomm.conf
- option enabled 0
+++ /dev/null
-<!-- This configuration file specifies the required security policies
- for Bluetooth core daemon to work. -->
-
-<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
-
- <!-- ../system.conf have denied everything, so we just punch some holes -->
-
- <policy user="root">
- <allow own="org.bluez"/>
- </policy>
-
- <policy at_console="true">
- <allow send_path="/"/>
- <allow send_path="/org/bluez"/>
-
- <allow send_destination="org.bluez.Manager"/>
- <allow receive_sender="org.bluez.Manager"/>
-
- <allow send_destination="org.bluez.Adapter"/>
- <allow receive_sender="org.bluez.Adapter"/>
-
- <allow send_destination="org.bluez.Device"/>
- <allow receive_sender="org.bluez.Device"/>
-
- <allow send_destination="org.bluez.Service"/>
- <allow receive_sender="org.bluez.Service"/>
-
- <allow send_destination="org.bluez.Database"/>
- <allow receive_sender="org.bluez.Database"/>
-
- <allow send_destination="org.bluez.Security"/>
- <allow receive_sender="org.bluez.Security"/>
- </policy>
-
-</busconfig>
PROG=/usr/bin/bluetoothd
start_service() {
+ ln -snf /etc/bluetooth/keys/ /var/lib/bluetooth
procd_open_instance
procd_set_param command "$PROG" -n
procd_close_instance
---- a/Makefile.in 2017-09-14 11:47:06.000000000 +0200
-+++ b/Makefile.in 2017-09-15 02:52:39.315926972 +0200
-@@ -2447,7 +2447,7 @@
- @CLIENT_TRUE@ monitor/uuid.h monitor/uuid.c
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -2547,7 +2547,7 @@ unit_tests = $(am__append_52) unit/test-
+ @CLIENT_TRUE@ client/gatt.h client/gatt.c
@CLIENT_TRUE@client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
-@CLIENT_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
@MESH_TRUE@mesh_meshctl_SOURCES = mesh/main.c \
@MESH_TRUE@ mesh/mesh-net.h \
-@@ -2468,7 +2468,7 @@
+@@ -2566,7 +2566,7 @@ unit_tests = $(am__append_52) unit/test-
@MESH_TRUE@mesh_meshctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
@MESH_TRUE@ lib/libbluetooth-internal.la \
@MONITOR_TRUE@monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
@MONITOR_TRUE@ monitor/display.h monitor/display.c \
-@@ -2724,7 +2724,7 @@
+@@ -2827,7 +2827,7 @@ unit_tests = $(am__append_52) unit/test-
@READLINE_TRUE@ tools/obex-client-tool.c
@READLINE_TRUE@tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \
@READLINE_TRUE@tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \
@READLINE_TRUE@ tools/obex-server-tool.c
-@@ -2734,17 +2734,17 @@
- @READLINE_TRUE@ client/display.h client/display.c
-
+@@ -2836,15 +2836,15 @@ unit_tests = $(am__append_52) unit/test-
+ @READLINE_TRUE@tools_bluetooth_player_SOURCES = tools/bluetooth-player.c
@READLINE_TRUE@tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \
+ @READLINE_TRUE@ src/libshared-glib.la \
-@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
+@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline -lncurses
- @READLINE_TRUE@tools_obexctl_SOURCES = tools/obexctl.c \
- @READLINE_TRUE@ client/display.h client/display.c
-
- @READLINE_TRUE@tools_obexctl_LDADD = gdbus/libgdbus-internal.la \
+ @READLINE_TRUE@tools_obexctl_SOURCES = tools/obexctl.c
+ @READLINE_TRUE@tools_obexctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
-@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
+@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline -lncurses
@DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \
@DEPRECATED_TRUE@@READLINE_TRUE@ attrib/gattrib.c btio/btio.c \
-@@ -2753,7 +2753,7 @@
+@@ -2853,7 +2853,7 @@ unit_tests = $(am__append_52) unit/test-
@DEPRECATED_TRUE@@READLINE_TRUE@ client/display.h
@DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \
--- /dev/null
+--- a/src/shared/util.h
++++ b/src/shared/util.h
+@@ -26,6 +26,7 @@
+ #include <alloca.h>
+ #include <byteswap.h>
+ #include <string.h>
++#include <endian.h>
+
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+ #define le16_to_cpu(val) (val)
--- /dev/null
+Submitted By: Armin K. <krejzi at email dot com>
+Date: 2013-04-29
+Initial Package Version: 5.17
+Upstream Status: unknown
+Origin: Arch Linux (Giovanni Campagna)
+Description: Allow using obexd without systemd in the user session
+
+Not all sessions run systemd --user (actually, the majority
+doesn't), so the dbus daemon must be able to spawn obexd
+directly, and to do so it needs the full path of the daemon.
+---
+ Makefile.obexd | 4 ++--
+ obexd/src/org.bluez.obex.service | 4 ----
+ obexd/src/org.bluez.obex.service.in | 4 ++++
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+ delete mode 100644 obexd/src/org.bluez.obex.service
+ create mode 100644 obexd/src/org.bluez.obex.service.in
+
+--- a/Makefile.obexd
++++ b/Makefile.obexd
+@@ -1,12 +1,12 @@
+ if SYSTEMD
+ systemduserunitdir = @SYSTEMD_USERUNITDIR@
+ systemduserunit_DATA = obexd/src/obex.service
++endif
+
+ dbussessionbusdir = @DBUS_SESSIONBUSDIR@
+ dbussessionbus_DATA = obexd/src/org.bluez.obex.service
+-endif
+
+-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
+
+ if OBEX
+
+--- a/obexd/src/org.bluez.obex.service
++++ /dev/null
+@@ -1,4 +0,0 @@
+-[D-BUS Service]
+-Name=org.bluez.obex
+-Exec=/bin/false
+-SystemdService=dbus-org.bluez.obex.service
+--- /dev/null
++++ b/obexd/src/org.bluez.obex.service.in
+@@ -0,0 +1,4 @@
++[D-BUS Service]
++Name=org.bluez.obex
++Exec=@libexecdir@/obexd
++SystemdService=dbus-org.bluez.obex.service
--- /dev/null
+--- a/src/bluetooth.conf
++++ b/src/bluetooth.conf
+@@ -26,10 +26,10 @@
+ </policy>
+
+ <!-- allow users of lp group (printing subsystem) to
+- communicate with bluetoothd -->
++ communicate with bluetoothd
+ <policy group="lp">
+ <allow send_destination="org.bluez"/>
+- </policy>
++ </policy> -->
+
+ <policy context="default">
+ <deny send_destination="org.bluez"/>
--- /dev/null
+From 2c3bba7b38be03834162e34069156f1fd49f0528 Mon Sep 17 00:00:00 2001
+From: "antoine.belvire@laposte.net" <antoine.belvire@laposte.net>
+Date: Tue, 27 Mar 2018 20:30:26 +0200
+Subject: adapter: Don't refresh adv_manager for non-LE devices
+
+btd_adv_manager_refresh is called upon MGMT_SETTING_DISCOVERABLE setting change
+but as only LE adapters have an adv_manager, this leads to segmentation fault
+for non-LE devices:
+
+0 btd_adv_manager_refresh (manager=0x0) at src/advertising.c:1176
+1 0x0000556fe45fcb02 in settings_changed (settings=<optimized out>,
+ adapter=0x556fe53f7c70) at src/adapter.c:543
+2 new_settings_callback (index=<optimized out>, length=<optimized out>,
+ param=<optimized out>, user_data=0x556fe53f7c70) at src/adapter.c:573
+3 0x0000556fe462c278 in request_complete (mgmt=mgmt@entry=0x556fe53f20c0,
+ status=<optimized out>, opcode=opcode@entry=7, index=index@entry=0,
+ length=length@entry=4, param=0x556fe53eb5f9) at src/shared/mgmt.c:261
+4 0x0000556fe462cd9d in can_read_data (io=<optimized out>,
+ user_data=0x556fe53f20c0) at src/shared/mgmt.c:353
+5 0x0000556fe46396e3 in watch_callback (channel=<optimized out>,
+ cond=<optimized out>, user_data=<optimized out>)
+ at src/shared/io-glib.c:170
+6 0x00007fe351c980e5 in g_main_context_dispatch ()
+ from /usr/lib64/libglib-2.0.so.0
+7 0x00007fe351c984b0 in ?? () from /usr/lib64/libglib-2.0.so.0
+8 0x00007fe351c987c2 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
+9 0x0000556fe45abc75 in main (argc=<optimized out>, argv=<optimized out>)
+ at src/main.c:770
+
+This commit prevents the call to btd_adv_manager_refresh for non-LE devices.
+---
+ src/adapter.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/src/adapter.c
++++ b/src/adapter.c
+@@ -540,7 +540,8 @@ static void settings_changed(struct btd_
+ g_dbus_emit_property_changed(dbus_conn, adapter->path,
+ ADAPTER_INTERFACE, "Discoverable");
+ store_adapter_info(adapter);
+- btd_adv_manager_refresh(adapter->adv_manager);
++ if (adapter->supported_settings & MGMT_SETTING_LE)
++ btd_adv_manager_refresh(adapter->adv_manager);
+ }
+
+ if (changed_mask & MGMT_SETTING_BONDABLE) {
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bmx7-dnsupdate
+PKG_VERSION:=0.1
+PKG_RELEASE:=2
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bmx7-dnsupdate
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=bmx7-dnsupdate
+ MAINTAINER:=Paul Spooren <spooren@informatik.uni-leipzig.de>
+ DEPENDS:=+bmx7 +bmx7-json inotifywait jshn
+endef
+
+define Build/Compile
+endef
+
+define Build/Configure
+endef
+
+define Package/bmx7-dnsupdate/install
+ $(CP) files/* $(1)/
+endef
+
+$(eval $(call BuildPackage,bmx7-dnsupdate))
--- /dev/null
+#!/bin/sh /etc/rc.common
+START=92
+USE_PROCD=1
+
+BIN=/usr/bin/bmx7-dnsupdate
+
+start_service() {
+ procd_open_instance "bmx7-dnsupdate"
+ procd_set_param command "$BIN"
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_set_param respawn
+ procd_close_instance
+}
--- /dev/null
+#!/bin/sh
+
+. /usr/share/libubox/jshn.sh
+
+while true; do
+ json_load "$(bmx7 -c jshow=originators)"
+ json_select "originators"
+ idx="1"
+
+ # clean all bmx7 dns entries
+ > /tmp/hosts/bmx7
+
+ while json_get_type Type "$idx" && [ "$Type" == object ]; do
+ json_select "$idx"
+ json_get_var shortId shortId
+ json_get_var name name
+ json_get_var primaryIp primaryIp
+ printf "$primaryIp $name\n$primaryIp $shortId\n" >> /tmp/hosts/bmx7
+ json_select ..
+ $((idx++)) 2> /dev/null
+ done
+
+ # reload dnsmasq to apply changes
+ logger -t bmx7-dnsupdate "dnsmasq updated due to new hosts"
+ killall -HUP dnsmasq
+
+ # block until originators changes
+ inotifywait -e create -e delete -q /var/run/bmx7/json/originators/ || sleep 10
+done
include $(TOPDIR)/rules.mk
PKG_NAME:=bonnie++
-PKG_VERSION:=1.97
+PKG_VERSION:=1.97.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://www.coker.com.au/bonnie++/experimental/
-PKG_HASH:=44f5a05937648a6526ba99354555d7d15f2dd392e55d3436f6746da6f6c35982
+PKG_SOURCE_URL:=http://www.coker.com.au/bonnie++/
+PKG_HASH:=e27b386ae0dc054fa7b530aab6bdead7aea6337a864d1f982bc9ebacb320746e
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=copyright.txt
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).1
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-Index: bonnie++-1.97.1/configure
+Index: bonnie++-1.97.3/configure
===================================================================
---- bonnie++-1.97.1.orig/configure
-+++ bonnie++-1.97.1/configure
+--- bonnie++-1.97.3.orig/configure
++++ bonnie++-1.97.3/configure
@@ -3955,9 +3955,7 @@ rm -f core conftest.err conftest.$ac_obj
if test "$cross_compiling" = yes; then :
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-Index: bonnie++-1.97.1/Makefile
+Index: bonnie++-1.97.3/Makefile
===================================================================
---- bonnie++-1.97.1.orig/Makefile
-+++ bonnie++-1.97.1/Makefile
+--- bonnie++-1.97.3.orig/Makefile
++++ bonnie++-1.97.3/Makefile
@@ -1,5 +1,7 @@
EXES=bonnie++ zcav getc_putc getc_putc_helper
EXE=bon_csv2html generate_randfile
include $(TOPDIR)/rules.mk
PKG_NAME:=btrfs-progs
-PKG_VERSION:=4.15.1
+PKG_VERSION:=4.17.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs/
-PKG_HASH:=67102ac0d6795f368acc94efaca29b6626d972638790a4a0c9f89a27cd543f96
-PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
+PKG_HASH:=bf0b34f1538c0b6e88f959937b0419678cadbf2ba7044336dcbfb2bcdc28cd74
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=acl
-PKG_FIXUP:=autoreconf
-
include $(INCLUDE_DIR)/package.mk
define Package/btrfs-progs
SUBMENU:=Filesystem
DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread
TITLE:=Btrfs filesystems utilities
- URL:=http://btrfs.wiki.kernel.org/
+ URL:=https://btrfs.wiki.kernel.org/
endef
define Package/btrfs-progs/description
GPL and open for contribution from anyone.
endef
-progs = btrfs btrfs-debug-tree btrfs-find-root btrfs-image btrfs-map-logical \
- btrfs-select-super btrfstune btrfs-zero-log fsck.btrfs mkfs.btrfs
+progs = btrfs btrfs-find-root btrfs-image btrfs-map-logical \
+ btrfs-select-super btrfstune fsck.btrfs mkfs.btrfs
CONFIGURE_ARGS += \
--disable-backtrace \
--disable-convert \
--disable-documentation \
+ --disable-python \
--disable-zstd
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections -flto
+
EXTRA_CFLAGS=$(TARGET_CPPFLAGS)
define Build/InstallDev
include $(TOPDIR)/rules.mk
PKG_NAME:=ccid
-PKG_VERSION:=1.4.28
+PKG_VERSION:=1.4.29
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4230
-PKG_HASH:=875836ac5d9d952b40dc1a253a726e74361671864d81337285a3260268f8ade0
+PKG_SOURCE_URL:=https://ccid.apdu.fr/files/
+PKG_HASH:=a5432ae845730493c04e59304b5c0c6103cd0e2c8827df57d69469a3eaaab84d
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
CATEGORY:=Libraries
DEPENDS:=+libusb-1.0 +libpcsclite
TITLE:=Generic USB CCID smart card reader driver
- URL:=http://pcsclite.alioth.debian.org/ccid.html
+ URL:=https://ccid.apdu.fr/
endef
define Package/ccid/description
include $(TOPDIR)/rules.mk
PKG_NAME:=ccrypt
-PKG_VERSION:=1.10
-PKG_RELEASE:=3
+PKG_VERSION:=1.11
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/ccrypt
-PKG_HASH:=87d66da2170facabf6f2fc073586ae2c7320d4689980cfca415c74688e499ba0
+PKG_HASH:=b19c47500a96ee5fbd820f704c912f6efcc42b638c0a6aa7a4e3dc0a6b51a44f
PKG_MAINTAINER:=Hannu Nyman <hannu.nyman@iki.fi>
PKG_LICENSE:=GPLv2+
---- a/configure.ac
-+++ b/configure.ac
-@@ -123,17 +123,6 @@ AC_MSG_RESULT($UINT32_TYPE)
- AC_DEFINE_UNQUOTED(UINT32_TYPE,$UINT32_TYPE,unsigned 32 bit integer type)
-
- dnl ----------------------------------------------------------------------
--dnl Internationalization
--
--GETTEXT_PACKAGE=ccrypt
--AC_SUBST(GETTEXT_PACKAGE)
--AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
--
--AM_GNU_GETTEXT
--AM_GNU_GETTEXT_VERSION([0.14.3])
--IT_PO_SUBDIR(po)
--
--dnl ----------------------------------------------------------------------
- dnl Libtool (needed by intl/)
-
- LT_INIT
-@@ -153,9 +142,7 @@ AC_SUBST(TAR)
- dnl ----------------------------------------------------------------------
- AC_CONFIG_FILES([doc/ccrypt.1
- doc/ccguess.1
-- po/Makefile.in
- m4/Makefile
-- intl/Makefile
- Makefile
- src/Makefile
- emacs/Makefile
+diff --git a/Makefile.am b/Makefile.am
+index bfe1d43..2f45264 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,7 @@
EXTRA_DIST = m4/ChangeLog config.rpath README-WIN
+diff --git a/Makefile.in b/Makefile.in
+index 314e162..18dcff3 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -36,7 +36,7 @@ host_triplet = @host@
- subdir = .
- DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/config.h.in \
-- $(top_srcdir)/configure $(top_srcdir)/intl/Makefile.in \
-+ $(top_srcdir)/configure \
- ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS config.guess \
- config.rpath config.sub depcomp elisp-comp install-sh \
- ltmain.sh missing mkinstalldirs
-@@ -66,7 +66,7 @@ am__CONFIG_DISTCLEAN_FILES = config.stat
+@@ -117,7 +117,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = intl/Makefile
+CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
- SOURCES =
- DIST_SOURCES =
-@@ -277,7 +277,7 @@ target_alias = @target_alias@
+ AM_V_P = $(am__v_P_@AM_V@)
+ am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+@@ -177,7 +177,7 @@ CTAGS = ctags
+ CSCOPE = cscope
+ DIST_SUBDIRS = $(SUBDIRS)
+ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+- $(top_srcdir)/intl/Makefile.in ABOUT-NLS AUTHORS COPYING \
++ ABOUT-NLS AUTHORS COPYING \
+ ChangeLog INSTALL NEWS README compile config.guess \
+ config.rpath config.sub install-sh ltmain.sh missing \
+ mkinstalldirs
+@@ -403,7 +403,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = m4/ChangeLog config.rpath README-WIN
ACLOCAL_AMFLAGS = -I m4
all: config.h
+diff --git a/configure.ac b/configure.ac
+index 56d11f1..6d32602 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -148,17 +148,6 @@ fi
+ AC_MSG_RESULT($UINT32_TYPE)
+ AC_DEFINE_UNQUOTED(UINT32_TYPE,$UINT32_TYPE,unsigned 32 bit integer type)
+
+-dnl ----------------------------------------------------------------------
+-dnl Internationalization
+-
+-GETTEXT_PACKAGE=ccrypt
+-AC_SUBST(GETTEXT_PACKAGE)
+-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
+-
+-AM_GNU_GETTEXT
+-AM_GNU_GETTEXT_VERSION([0.19.8])
+-dnl IT_PO_SUBDIR(po)
+-
+ dnl ----------------------------------------------------------------------
+ dnl Libtool (needed by intl/)
+
+@@ -180,9 +169,7 @@ AC_SUBST(TAR)
+ dnl ----------------------------------------------------------------------
+ AC_CONFIG_FILES([doc/ccrypt.1
+ doc/ccguess.1
+- po/Makefile.in
+ m4/Makefile
+- intl/Makefile
+ Makefile
+ src/Makefile
+ emacs/Makefile
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 4cb1d03..ff33d59 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -56,4 +56,4 @@ uninstall-local:
# internationalization stuff
localedir = $(datadir)/locale
- INCLUDES = -I../intl -I$(top_srcdir)/intl -DLOCALEDIR=\"$(localedir)\"
+ AM_CPPFLAGS = @EXTRA_INCLUDES@ -I../intl -I$(top_srcdir)/intl -DLOCALEDIR=\"$(localedir)\"
-LIBS = @LIBINTL@ @LIBS@
+LIBS = @LIBS@
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 27c7d28..01c6764 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
-@@ -159,7 +159,7 @@ LDFLAGS = @LDFLAGS@
- LIBICONV = @LIBICONV@
- LIBINTL = @LIBINTL@
+@@ -278,7 +278,7 @@ LIBMULTITHREAD = @LIBMULTITHREAD@
LIBOBJS = @LIBOBJS@
+ LIBPTH = @LIBPTH@
+ LIBPTH_PREFIX = @LIBPTH_PREFIX@
-LIBS = @LIBINTL@ @LIBS@
+LIBS = @LIBS@
+ LIBTHREAD = @LIBTHREAD@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
- LN_S = @LN_S@
PKG_NAME:=collectd
PKG_VERSION:=5.8.0
-PKG_RELEASE:=4
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://collectd.org/files/ \
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/kernel.mk
+# collectd-mod-mysql needs iconv
+include $(INCLUDE_DIR)/nls.mk
define Package/collectd/Default
SECTION:=utils
select PACKAGE_collectd-mod-network
endef
-ifneq ($(CONFIG_avr32),)
- TARGET_CFLAGS += -fsigned-char
-endif
-
# common configure args
CONFIGURE_ARGS+= \
--disable-werror \
$(eval $(call BuildPlugin,match-regex,regex match,match_regex,))
$(eval $(call BuildPlugin,match-timediff,timediff match,match_timediff,))
$(eval $(call BuildPlugin,match-value,value match,match_value,))
-#$(eval $(call BuildPlugin,mysql,MySQL status input,mysql,+PACKAGE_collectd-mod-mysql:libmysqlclient-r))
+$(eval $(call BuildPlugin,mysql,MySQL status input,mysql,+PACKAGE_collectd-mod-mysql:libmysqlclient-r))
$(eval $(call BuildPlugin,memory,physical memory usage input,memory,))
$(eval $(call BuildPlugin,modbus,read variables through libmodbus,modbus,+PACKAGE_collectd-mod-modbus:libmodbus))
$(eval $(call BuildPlugin,mqtt,transmit data with MQTT,mqtt,+PACKAGE_collectd-mod-mqtt:libmosquitto))
$(eval $(call BuildPlugin,tail-csv,tail CSV input,tail_csv,))
$(eval $(call BuildPlugin,table,table-like structured file input,table,))
$(eval $(call BuildPlugin,teamspeak2,TeamSpeak2 input,teamspeak2,))
-$(eval $(call BuildPlugin,ted,The Energy Detective input,ted,@((!TARGET_avr32)||BROKEN))) # fails on avr32 because of warnings treated as errors
+$(eval $(call BuildPlugin,ted,The Energy Detective input,ted,))
$(eval $(call BuildPlugin,tcpconns,TCP connection tracking input,tcpconns,))
$(eval $(call BuildPlugin,thermal,system temperatures input,thermal,))
$(eval $(call BuildPlugin,unixsock,unix socket output,unixsock,))
STOP=10
USE_PROCD=1
+NICEPRIO=5
start_service() {
mkdir -m 0755 -p /var/lib/collectd
procd_open_instance
procd_set_param command /usr/sbin/collectd -f
+ procd_set_param nice "$NICEPRIO"
procd_close_instance
}
include $(TOPDIR)/rules.mk
+PKG_SOURCE_VERSION:=8bd996400d087028ba56b724abc1f5b378eaa77f
+
PKG_NAME:=crconf
-PKG_VERSION:=pre2
+PKG_VERSION:=pre2-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/crconf
-PKG_HASH:=15d39b599acda93a50f473190e702d593ba13613b6ed31711f3584b5726b81b8
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.code.sf.net/p/crconf/code
+PKG_MIRROR_HASH:=f772306c0b005c18f481b73e3be193dba5ebb9f6f3bf20cb3f67c4a80dac0613
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=crelay
-PKG_VERSION:=0.10.1
+PKG_VERSION:=0.13
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/ondrej1024/crelay
-PKG_SOURCE_VERSION:=V$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=e7cae6dcc299cbec86e6cbc79dd155a1489d97c9a46b3b4e5179a6ca11cc4b8b
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://codeload.github.com/ondrej1024/crelay/tar.gz/V$(PKG_VERSION)?
+PKG_HASH:=d9919fe91e8641352f0b4705a37acc7ba4b3c4286ca78a629968f16f343cfdc4
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0
SECTION:=utils
CATEGORY:=Utilities
TITLE:=USB relay remote control daemon
- URL:=http://github.com/ondrej1024/crelay
+ URL:=https://github.com/ondrej1024/crelay
DEPENDS:=+libftdi1 +hidapi +libusb-1.0
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=cryptsetup
-PKG_VERSION:=1.7.5
+PKG_VERSION:=2.0.4
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0+ LGPL-2.1+
PKG_LICENSE_FILES:=COPYING COPYING.LGPL
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v1.7
-PKG_HASH:=2b30cd1d0dd606a53ac77b406e1d37798d4b0762fa89de6ea546201906a251bd
+PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v2.0
+PKG_HASH:=9d3a3c7033293e0c97f0ad0501fd5b4d4913ae497cbf70cca06633ccc54b5734
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
CATEGORY:=Utilities
SUBMENU:=Encryption
TITLE:=Cryptsetup
- DEPENDS:=+libblkid +libuuid +libpopt +lvm2 +libdevmapper +@KERNEL_DIRECT_IO
- URL:=http://code.google.com/p/cryptsetup/
+ DEPENDS:=+libblkid +libuuid +libpopt +lvm2 +libdevmapper +libjson-c +@KERNEL_DIRECT_IO
+ URL:=https://gitlab.com/cryptsetup/cryptsetup/
endef
define Package/cryptsetup
define Package/cryptsetup/install
$(INSTALL_DIR) $(1)/usr/sbin
- $(CP) $(PKG_BUILD_DIR)/src/.libs/cryptsetup $(1)/usr/sbin
+ $(CP) $(PKG_BUILD_DIR)/.libs/cryptsetup $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_BUILD_DIR)/lib/.libs/libcryptsetup.so* $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libcryptsetup.so* $(1)/usr/lib
endef
Package/cryptsetup-openssl/install = $(Package/cryptsetup/install)
include $(TOPDIR)/rules.mk
-# Make sure to also update the dbus-x package
PKG_NAME:=dbus
-PKG_VERSION:=1.10.4
+PKG_VERSION:=1.12.10
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus/
-PKG_HASH:=ad7dcad73ad9b0ff55819985d354eacfffe07e2eb8c763e155efc21d6001084b
-PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
+PKG_SOURCE_URL:=https://dbus.freedesktop.org/releases/dbus/
+PKG_HASH:=4b693d24976258c3f2fa9cc33ad9288c5fbfa7a16481dbd9a8a429f7aa8cdcf7
+PKG_MAINTAINER:=
PKG_LICENSE:=AFL-2.1
PKG_BUILD_PARALLEL:=1
-PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
-TARGET_LDFLAGS+= \
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-
define Package/dbus/Default
SECTION:=utils
CATEGORY:=Utilities
define Package/dbus-utils
$(call Package/dbus/Default)
TITLE+= (utilities)
- DEPENDS:= dbus
+ DEPENDS:= +dbus
endef
define Package/dbus-utils/Description
This package contains D-Bus utilities.
endef
-
-define Build/Prepare
- $(Build/Prepare/Default)
- $(SED) 's/-Wl,--gc-sections/--gc-sections/' $(PKG_BUILD_DIR)/configure
-endef
-
CONFIGURE_ARGS += \
+ --disable-maintainer-mode \
+ --disable-developer \
+ --enable-debug=no \
--enable-shared \
- --enable-static \
- --disable-abstract-sockets \
- --disable-ansi \
+ --disable-static \
+ --disable-verbose-mode \
--disable-asserts \
- --disable-console-owner-file \
+ --disable-xml-docs \
--disable-doxygen-docs \
- --disable-compiler_coverage \
+ --disable-ducktype-docs \
--disable-selinux \
+ --disable-apparmor \
+ --disable-libaudit \
+ --enable-inotify \
+ --disable-kqueue \
+ --disable-console-owner-file \
+ --disable-systemd \
--disable-tests \
- --disable-verbose-mode \
- --disable-xml-docs \
- --with-xml="expat" \
+ --disable-code-coverage \
+ --disable-x11-autolaunch \
+ --with-session-socket-dir=/tmp \
+ --with-system-socket=/var/run/dbus/system_bus_socket \
+ --with-system-pid-file=/var/run/dbus.pid \
--with-dbus-user=root \
- --with-dbus-daemondir="/usr/sbin" \
- --with-system-socket="/var/run/dbus/system_bus_socket" \
- --with-system-pid-file="/var/run/dbus.pid" \
- --without-x \
- --libexecdir=/usr/lib/dbus-1
-
-CONFIGURE_VARS+= \
- ac_cv_have_abstract_sockets="yes" \
- ac_cv_lib_expat_XML_ParserCreate_MM="yes" \
+ --without-x
HOST_CONFIGURE_ARGS+= \
+ --disable-maintainer-mode \
+ --disable-developer \
+ --enable-debug=no \
--enable-shared \
- --enable-static \
- --disable-abstract-sockets \
- --disable-ansi \
+ --disable-static \
+ --disable-verbose-mode \
--disable-asserts \
- --disable-console-owner-file \
- --disable-docygen-docs \
- --disable-compiler_coverage \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --disable-ducktype-docs \
--disable-selinux \
+ --disable-apparmor \
+ --disable-libaudit \
+ --enable-inotify \
+ --disable-kqueue \
+ --disable-console-owner-file \
+ --disable-systemd \
--disable-tests \
- --disable-verbose-mode \
- --disable-xml-docs \
- --with-dbus-user=root \
- --with-dbus-daemondir="$(STAGING_DIR_HOSTPKG)/bin" \
+ --disable-code-coverage \
+ --disable-x11-autolaunch \
--with-system-socket="$(STAGING_DIR_HOSTPKG)/var/run/dbus/system_bus_socket" \
--with-system-pid-file="$(STAGING_DIR_HOSTPKG)/var/run/dbus.pid" \
- --without-x \
- --libexecdir="$(STAGING_DIR_HOSTPKG)/lib/dbus-1"
-
-HOST_CONFIGURE_VARS+= \
- ac_cv_have_abstract_sockets="yes" \
- ac_cv_lib_expat_XML_ParserCreate_MM="yes" \
+ --with-dbus-daemondir="$(STAGING_DIR_HOSTPKG)/bin" \
+ --without-x
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/include/dbus-1.0 \
- $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/dbus-1.0 $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib/dbus-1.0/include/dbus/
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/lib/dbus-1.0/include/dbus/*.h \
$(1)/usr/lib/dbus-1.0/include/dbus/
-
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.{so*,la,a} \
- $(1)/usr/lib/
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0 \
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.{so*,la} \
$(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0 $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-1.pc \
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-1.pc \
$(1)/usr/lib/pkgconfig/
endef
-define Package/dbus/conffiles
-/etc/dbus-1/session.conf
-/etc/dbus-1/system.conf
-endef
-
define Package/libdbus/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.so.* \
- $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.so.* $(1)/usr/lib/
endef
define Package/dbus/install
- $(INSTALL_DIR) $(1)/usr/share
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/share/dbus-1 \
- $(1)/usr/share/
-
- $(INSTALL_DIR) $(1)/usr/lib/dbus-1
- $(INSTALL_BIN) \
- $(PKG_INSTALL_DIR)/usr/lib/dbus-1/dbus-daemon-launch-helper \
- $(1)/usr/lib/dbus-1/
-
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) \
- $(PKG_INSTALL_DIR)/usr/sbin/dbus-daemon \
- $(1)/usr/sbin/
-
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) \
- $(PKG_INSTALL_DIR)/usr/bin/dbus-uuidgen \
- $(1)/usr/bin/
-
- $(INSTALL_BIN) \
- $(PKG_INSTALL_DIR)/usr/bin/dbus-launch \
- $(1)/usr/bin/dbus-launch.real
- $(INSTALL_BIN) \
- ./files/dbus-launch \
- $(1)/usr/bin/
-
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dbus-cleanup-sockets $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dbus-daemon $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dbus-launch $(1)/usr/bin/dbus-launch.real
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dbus-uuidgen $(1)/usr/bin/
+ $(INSTALL_BIN) ./files/dbus-launch $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/dbus-daemon-launch-helper $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) \
- ./files/dbus.init \
- $(1)/etc/init.d/dbus
+ $(INSTALL_BIN) ./files/dbus.init $(1)/etc/init.d/dbus
+ $(INSTALL_DIR) $(1)/usr/share/dbus-1
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/dbus-1 $(1)/usr/share/
endef
define Package/dbus-utils/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) \
- $(PKG_INSTALL_DIR)/usr/bin/dbus-{send,monitor,cleanup-sockets} \
- $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dbus-{monitor,send,update-activation-environment} $(1)/usr/bin/
endef
$(eval $(call HostBuild))
mkdir -m 0755 -p /var/lib/dbus
mkdir -m 0755 -p /var/run/dbus
[ -x /usr/bin/dbus-uuidgen ] && /usr/bin/dbus-uuidgen --ensure
- service_start /usr/sbin/dbus-daemon --system
+ service_start /usr/bin/dbus-daemon --system
}
stop() {
- service_stop /usr/sbin/dbus-daemon && rm $SERVICE_PID_FILE
+ service_stop /usr/bin/dbus-daemon
}
+++ /dev/null
-Index: dbus-1.9.4/tools/tool-common.c
-===================================================================
---- dbus-1.9.4.orig/tools/tool-common.c
-+++ dbus-1.9.4/tools/tool-common.c
-@@ -29,6 +29,8 @@
- #include <string.h>
- #include <time.h>
-
-+#include <sys/select.h>
-+
- #ifdef DBUS_WIN
- #include <windows.h>
- #endif
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=device-observatory
+PKG_VERSION:=1.2.0
+PKG_RELEASE:=1
+
+PKG_LICENSE:=GPL-3.0+
+
+PKG_SOURCE_URL:=https://codeload.github.com/mwarning/device-observatory/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=83b3f362f154a427abbd3af31b3c2dda9983cdc15f6b833d804727ef0fbdc72e
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/device-observatory
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=device-observatory
+ MAINTAINER:=Moritz Warning <moritzwarning@web.de>
+ URL:=https://github.com/mwarning/device-observatory/
+ DEPENDS:=+iw +libpcap +libmicrohttpd-no-ssl
+endef
+
+define Package/device-observatory/description
+ Show information about connected devices and connections to increase security awareness.
+endef
+
+define Package/device-observatory/install
+ $(CP) files/* $(1)
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/device-observatory $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/share/device-observatory
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/macdb.txt $(1)/usr/share/device-observatory/macdb.txt
+endef
+
+$(eval $(call BuildPackage,device-observatory))
--- /dev/null
+
+config setup
+ list dev 'wlan0'
+ list mdev 'mon0'
+
+ option mac_db '/usr/share/device-observatory/macdb.txt'
+ option port_db '/etc/services'
+
+ # Optional JSON output into file
+# option json_output '/tmp/device-observatory.json'
+
+ # Time after which a device is removed from the record
+ option device_timeout 3600
+
+ # Create monitoring interface mon0 based on physical interface wifi phy0.
+ # See 'iw dev' output for a list of interfaces.
+ list create_monitor 'mon0'
+
+ # Track router itself as device
+ option track_localhost 0
+
+ # Set to 0 to disable webserver
+ option webserver_port 8080
+
+ # Not needed, all necessary files are included
+# option webserver_path '/www'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=90
+USE_PROCD=1
+PROG=/usr/bin/device-observatory
+OPTS=""
+
+
+boot() {
+ local dev="$(uci get -q device-observatory.@setup[0].dev | cut -d ' ' -f 1)"
+
+ # Wait for interface to be up
+ ubus -t 15 wait_for network.interface network.${dev:-localhost} 2>/dev/null
+ rc_procd start_service
+}
+
+xappend() {
+ local name="$2" value="$1"
+ OPTS="$OPTS --${name//_/-} ${value//'/\\'}"
+}
+
+append_opts() {
+ local name value cfg="$1"; shift
+ for name in $*; do
+ config_get value "$cfg" "$name"
+ [ -n "$value" ] && xappend "$value" "$name"
+ done
+}
+
+append_opts_list() {
+ local name cfg="$1"; shift
+ for name in $*; do
+ config_list_foreach "$cfg" "$name" xappend "$name"
+ done
+}
+
+create_monitor_interface() {
+ local ifce="$1" n=$(echo -n "$1" | tail -c 1)
+
+ if [ ! -d "/sys/class/net/$ifce/" ]; then
+ iw phy "phy$n" interface add "$ifce" type monitor
+ ip link set dev "$ifce" up
+ fi
+}
+
+start_instance() {
+ local cfg="$1"
+
+ OPTS=""
+
+ config_list_foreach "$cfg" "create_monitor" create_monitor_interface "create_monitor"
+
+ append_opts_list "$cfg" dev mdev
+ append_opts "$cfg" mac_db port_db json_output device_timeout webserver_port webserver_path track_localhost
+
+ procd_open_instance
+ procd_set_param command $PROG $OPTS
+ procd_set_param stderr 1
+ procd_set_param stdout 0
+ procd_close_instance
+}
+
+start_service() {
+ config_load 'device-observatory'
+ config_foreach start_instance 'setup'
+}
PKG_NAME:=digitemp
PKG_VERSION:=3.7.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/bcl/digitemp/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=6fa4d965350d5501b6ca73ee8a09276ca4f65b6d85dae62f0a796239bae5000e
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/bcl/digitemp.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=be824bbbc81189931bf4b130a8acc39288d75662
PKG_MAINTAINER:=Jasper Scholte <NightNL@outlook.com>
PKG_LICENSE:=GPL-2.0+
-PKG_MIRROR_HASH:=490f9c94c671aa74ce0ef4fbc95231644f3aa7023d2b947714ed55fd712672f2
include $(INCLUDE_DIR)/package.mk
SECTION:=utils
CATEGORY:=Utilities
TITLE:=DigiTemp is a simple to use program for reading values from 1-wire devices.
- URL:=http://www.digitemp.com
+ URL:=https://www.digitemp.com
endef
define Package/digitemp/Default/description
include $(TOPDIR)/rules.mk
PKG_NAME:=domoticz
-PKG_VERSION_MAJOR:=3
-PKG_VERSION_PATCH:=8153
+PKG_VERSION_MAJOR:=4
+PKG_VERSION_PATCH:=9700
+PKG_COMMIT:=
PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH)
-PKG_RELEASE:=3
+PKG_RELEASE:=1
+ifeq ($(PKG_COMMIT),)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_VERSION)/$(PKG_SOURCE)
-PKG_HASH:=5ea8f37f2ef900e9bd17b1b5375e75bfdec4f09001e3e2e0b647a260989d014c
+else
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_COMMIT).tar.gz
+PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_COMMIT)/$(PKG_SOURCE)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_COMMIT)
+endif
+PKG_HASH:=c31f185a1ffac01b86a77bf33e059a4403d814e826c9d6639c63c2e9afa55a46
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=License.txt
+PKG_BUILD_DEPENDS:=python3
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
-DUSE_STATIC_BOOST=no \
-DUSE_STATIC_LIBSTDCXX=no \
-DUSE_STATIC_OPENZWAVE=no \
- -DUSE_PYTHON=no
+ -DUSE_OPENSSL_STATIC=no \
+ -DUSE_PYTHON=yes \
+ -DWITH_LIBUSB=no
-TARGET_CXXFLAGS+=-DWITH_GPIO
+TARGET_CFLAGS+=-flto
+TARGET_CXXFLAGS+=-DWITH_GPIO -flto
define Build/Prepare
$(call Build/Prepare/Default)
- # Fix APPVERSION to suppress update popup
+ # Fix APPVERSION/APPDATE since we don't build from a git tree
sed -i 's/#define APPVERSION.*/#define APPVERSION $(PKG_VERSION_PATCH)/' \
$(PKG_BUILD_DIR)/appversion.default
+ COMMITDATE=`tar tvfz $(DL_DIR)/$(PKG_SOURCE) --full-time | sed 's/.* \(20..-..-.. ..:..:..\) domoticz-.*/\1/;q'`; \
+ COMMITTS=`date --date="$$$${COMMITDATE}" +%s`; \
+ sed -i "s/#define APPDATE.*/#define APPDATE $$$${COMMITTS}/" $(PKG_BUILD_DIR)/appversion.default
+ifneq ($(PKG_COMMIT),)
+ sed -i "s/#define APPHASH.*/#define APPHASH \"$(shell echo $(PKG_COMMIT) | cut -c1-8)\"/" $(PKG_BUILD_DIR)/appversion.default
+endif
# Remove unwanted scripts
cd $(PKG_BUILD_DIR)/scripts && rm -rf \
buienradar_rain_example.pl \
_domoticz_main* \
download_update.sh \
- dzVents/{.gitignore,documentation,examples,generated_scripts} \
+ dzVents/{.gitignore,documentation,examples,generated_scripts,data} \
dzVents/runtime/{integration-tests,misc/smoothing.xlsx,tests} \
logrotate/ \
lua_parsers/example* \
readme.txt \
restart_domoticz \
templates/All.Python \
- update_domoticz
+ update_domoticz \
+ domoticz.conf
# Remove *.md
cd $(PKG_BUILD_DIR) && $(FIND) -name '*.md' -delete
endef
define Package/domoticz/install
- $(INSTALL_DIR) $(1)/etc/config $(1)/etc/hotplug.d/tty $(1)/etc/init.d
+ $(INSTALL_DIR) $(1)/etc/config $(1)/etc/hotplug.d/tty $(1)/etc/init.d $(1)/etc/domoticz/plugins
$(INSTALL_BIN) ./files/domoticz.hotplug $(1)/etc/hotplug.d/tty/domoticz
$(INSTALL_BIN) ./files/domoticz.init $(1)/etc/init.d/domoticz
$(INSTALL_CONF) ./files/domoticz.config $(1)/etc/config/domoticz
$(INSTALL_DIR) $(1)/usr/share/domoticz $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/Config $(1)/usr/share/domoticz/openzwave
- $(CP) $(PKG_INSTALL_DIR)/usr/scripts $(1)/usr/share/domoticz/
+ $(CP) $(PKG_INSTALL_DIR)/usr/dzVents $(1)/usr/share/domoticz/dzVents
+ $(CP) $(PKG_INSTALL_DIR)/usr/Config $(1)/usr/share/domoticz/Config
+ $(CP) $(PKG_INSTALL_DIR)/usr/scripts $(1)/etc/domoticz/scripts
+ ln -sf /var/lib/domoticz/dzVents/generated_scripts $(1)/etc/domoticz/scripts/dzVents
+ ln -sf /var/lib/domoticz/dzVents/data $(1)/etc/domoticz/scripts/dzVents
$(CP) $(PKG_INSTALL_DIR)/usr/www $(1)/usr/share/domoticz/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/domoticz $(1)/usr/bin/domoticz
+ # compress static web content
+ find $(1)/usr/share/domoticz/www -name "*.css" -exec gzip -9 {} \;
+ find $(1)/usr/share/domoticz/www -name "*.js" -exec gzip -9 {} \;
+ gzip -9 $(1)/usr/share/domoticz/www/*.html
+ gzip -9 $(1)/usr/share/domoticz/www/secpanel/*.html
+ find $(1)/usr/share/domoticz/www/views -name "*.html" -exec sh -c 'grep -q "<\!--#embed" {} || gzip -9 {}' \;
endef
define Package/domoticz/conffiles
/etc/config/domoticz
/var/lib/domoticz/
+/etc/domoticz/
endef
$(eval $(call BuildPackage,domoticz))
# option sslcert '/path/to/ssl.crt'
# option sslkey '/path/to/ssl.key'
# option sslpass 'passphrase'
+ # option ssldhparam '/path/to/dhparam.pem'
option sslwww '0'
# CAUTION - by default, /var is not persistent accross reboots
# Don't forget the trailing / - domoticz requires it
chgrp domoticz "/dev/$DEVICENAME"
chmod g+rw "/dev/$DEVICENAME"
- [ -n "$symlink" ] && ln -s "/dev/$DEVICENAME" "/dev/$symlink"
+ [ -n "$symlink" ] && ln -sf "/dev/$DEVICENAME" "/dev/$symlink"
}
remove() {
config_get sslcert "$section" "sslcert"
config_get sslkey "$section" "sslkey"
config_get sslpass "$section" "sslpass"
+ config_get ssldhparam "$section" "ssldhparam"
config_get sslwww "$section" "sslwww"
config_get syslog "$section" "syslog"
- config_get userdata "$section" "userdata"
+ config_get userdata "$section" "userdata" userdata /var/lib/domoticz
[ -n "$loglevel" ] && procd_append_param command -loglevel "$loglevel"
[ -n "$syslog" ] && procd_append_param command -syslog "$syslog"
- [ -n "$userdata" ] && {
- mkdir -p "${userdata}/generated_scripts"
- chmod -R 0770 "$userdata"
- chown -R domoticz:domoticz "$userdata"
- procd_append_param command -userdata "$userdata"
+
+ [ -d "${userdata}" ] || {
+ mkdir -p "${userdata}"
+ chmod 0770 "$userdata"
+ chown domoticz:domoticz "$userdata"
}
+
+ # By default, ${userdata}/scripts is a symlink to /etc/domoticz/scripts
+ # and the two dzVents directories under there which Domoticz will actually
+ # write to at runtime are symlinked back to /var/lib again.
+ [ -d "${userdata}/plugins" ] || ln -sf /etc/domoticz/plugins "${userdata}/plugins"
+ [ -d "${userdata}/scripts" ] || ln -sf /etc/domoticz/scripts "${userdata}/scripts"
+ for DIR in data generated_scripts; do
+ [ -d /var/lib/domoticz/dzVents/$DIR ] || {
+ mkdir -p /var/lib/domoticz/dzVents/$DIR
+ chown domoticz.domoticz /var/lib/domoticz/dzVents/$DIR
+ }
+ done
+ procd_append_param command -userdata "$userdata"
+
[ -n "$sslcert" -a "${sslwww:-0}" -gt 0 ] && {
procd_append_param command -sslcert "$sslcert"
procd_append_param command -sslwww "$sslwww"
[ -n "$sslkey" ] && procd_append_param command -sslkey "$sslkey"
[ -n "$sslpass" ] && procd_append_param command -sslpass "$sslpass"
+ [ -n "$ssldhparam" ] && procd_append_param command -ssldhparam "$ssldhparam"
} || procd_append_param command -sslwww 0
}
procd_open_instance
procd_set_param command "$PROG"
- procd_append_param command -scripts /usr/share/domoticz/scripts/
- procd_append_param command -wwwroot /usr/share/domoticz/www/
+ procd_append_param command -noupdates
+ procd_append_param command -approot /usr/share/domoticz/
config_load "domoticz"
config_get_bool disabled "$section" "disabled" 0
+++ /dev/null
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -645,8 +645,6 @@ else()
- target_link_libraries(domoticz -lrt ${Boost_LIBRARIES} ${ZLIB_LIBRARIES} ${CURL_LIBRARIES} pthread ${LUA_LIBRARIES} ${MQTT_LIBRARIES} ${SQLite_LIBRARIES} ${CMAKE_DL_LIBS} ${TELLDUS_LIBRARIES} ${EXECINFO_LIBRARIES})
- ENDIF()
-
--ADD_PRECOMPILED_HEADER(domoticz "main/stdafx.h")
--
- IF(CMAKE_COMPILER_IS_GNUCXX)
- option(USE_STATIC_LIBSTDCXX "Build with static libgcc/libstdc++ libraries" YES)
- IF(USE_STATIC_LIBSTDCXX)
+++ /dev/null
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -579,39 +579,6 @@ IF(OpenZWave)
- target_link_libraries(domoticz ${OpenZWave})
- include_directories(${CMAKE_SOURCE_DIR}/hardware/openzwave)
- add_definitions(-DWITH_OPENZWAVE)
-- # open-zwave needs libudev
-- IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-- set(IOKIT_LIBRARY "-framework IOKit -framework CoreFoundation" CACHE FILEPATH "IOKit framework" FORCE)
-- target_link_libraries(domoticz ${IOKIT_LIBRARY})
-- else()
-- IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
-- MESSAGE(STATUS "Building on FreeBSD, libudev not needed!")
-- FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
-- FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c)
-- IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-- SET(ICONV_FOUND TRUE)
-- #target_link_libraries(domoticz ${ICONV_INCLUDE_DIR})
-- target_link_libraries(domoticz ${ICONV_LIBRARIES} -lrt)
-- message(STATUS ${ICONV_LIBRARIES})
-- else()
-- MESSAGE(FATAL_ERROR "libiconv not found on your system")
-- ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-- else()
-- find_library(UDEV NAMES libudev.a)
-- IF(UDEV)
-- message(STATUS ${UDEV})
-- target_link_libraries(domoticz ${UDEV} -lrt -lresolv)
-- else()
-- find_library(UDEV NAMES libudev.so)
-- IF(UDEV)
-- message(STATUS ${UDEV})
-- target_link_libraries(domoticz ${UDEV} -lrt -lresolv)
-- else()
-- MESSAGE(FATAL_ERROR "LIB UDEV not found on your system, see install.txt how to get them installed.\nsudo apt-get install libudev-dev")
-- ENDIF(UDEV)
-- ENDIF(UDEV)
-- ENDIF()
-- ENDIF()
- else()
- MESSAGE(STATUS "==== OpenZWave not found, support disabled!")
- ENDIF(OpenZWave)
+++ /dev/null
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -521,20 +521,23 @@ else()
- MESSAGE(FATAL_ERROR "cURL not found on your system, see install.txt how to get them installed. (for example 'sudo apt-get install curl libcurl4-openssl-dev')")
- ENDIF(CURL_FOUND)
-
--find_path(LIBUSB_INCLUDE_DIR usb.h
-- HINTS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})
--find_library(LIBUSB_LIBRARY NAMES usb
-- HINTS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
--set(LIBUSB_LIBRARIES ${LIBUSB_LIBRARY})
-+option(WITH_LIBUSB "Enable libusb support" NO)
-+ if(WITH_LIBUSB)
-+ find_path(LIBUSB_INCLUDE_DIR usb.h
-+ HINTS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})
-+ find_library(LIBUSB_LIBRARY NAMES usb
-+ HINTS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
-+ set(LIBUSB_LIBRARIES ${LIBUSB_LIBRARY})
-
--find_package_handle_standard_args(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR)
--IF(LIBUSB_FOUND)
-- MESSAGE(STATUS "LIBUSB found at: ${LIBUSB_LIBRARIES}")
-- add_definitions(-DWITH_LIBUSB)
-- target_link_libraries(domoticz ${LIBUSB_LIBRARIES})
--else()
-- MESSAGE(STATUS "==== LibUSB not found, support for TE923/Voltcraft disabled!")
--ENDIF(LIBUSB_FOUND)
-+ find_package_handle_standard_args(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR)
-+ IF(LIBUSB_FOUND)
-+ MESSAGE(STATUS "LIBUSB found at: ${LIBUSB_LIBRARIES}")
-+ add_definitions(-DWITH_LIBUSB)
-+ target_link_libraries(domoticz ${LIBUSB_LIBRARIES})
-+ else()
-+ MESSAGE(STATUS "==== LibUSB not found, support for TE923/Voltcraft disabled!")
-+ ENDIF(LIBUSB_FOUND)
-+endif(WITH_LIBUSB)
-
- #
- # Find MD5/RMD160/SHA library
+++ /dev/null
-diff --git a/hardware/EvohomeScript.cpp b/hardware/EvohomeScript.cpp
-index 5258fc55..0a44e97c 100644
---- a/hardware/EvohomeScript.cpp
-+++ b/hardware/EvohomeScript.cpp
-@@ -30,7 +30,7 @@
-
- #include <string>
-
--extern std::string szUserDataFolder;
-+extern std::string szScriptsFolder;
-
-
- CEvohomeScript::CEvohomeScript(const int ID)
-@@ -143,7 +143,7 @@ void CEvohomeScript::RunScript(const char *pdata, const unsigned char length)
- std::string scriptname = OnAction.substr(9);
- #if !defined WIN32
- if (scriptname.find("/") != 0)
-- scriptname = szUserDataFolder + "scripts/" + scriptname;
-+ scriptname = szScriptsFolder + "scripts/" + scriptname;
- #endif
- std::string scriptparams="";
- //Add parameters
-diff --git a/hardware/OpenZWave.cpp b/hardware/OpenZWave.cpp
-index 1f5c341c..24db61c9 100644
---- a/hardware/OpenZWave.cpp
-+++ b/hardware/OpenZWave.cpp
-@@ -948,7 +948,7 @@ bool COpenZWave::OpenSerialConnector()
-
- m_nodes.clear();
- m_bNeedSave = false;
-- std::string ConfigPath = szStartupFolder + "Config/";
-+ std::string ConfigPath = "/usr/share/domoticz/openzwave/";
- std::string UserPath = ConfigPath;
- if (szStartupFolder != szUserDataFolder)
- {
-diff --git a/main/EventSystem.cpp b/main/EventSystem.cpp
-index 4eff02fd..f2b17b97 100644
---- a/main/EventSystem.cpp
-+++ b/main/EventSystem.cpp
-@@ -33,9 +33,11 @@ extern "C" {
- #endif
- }
-
-+extern std::string szScriptsFolder;
- extern std::string szUserDataFolder;
- extern http::server::CWebServerHelper m_webservers;
-
-+static std::string dzv_Dir;
- static std::string m_printprefix;
-
- #ifdef ENABLE_PYTHON
-@@ -115,7 +117,6 @@ static const _tJsonMap JsonMap[] =
- { NULL, NULL, tString }
- };
-
--
- CEventSystem::CEventSystem(void)
- {
- m_stoprequested = false;
-@@ -149,7 +150,7 @@ void CEventSystem::StartEventSystem()
- GetCurrentScenesGroups();
- GetCurrentUserVariables();
- #ifdef ENABLE_PYTHON
-- Plugins::PythonEventsInitialize(szUserDataFolder);
-+ Plugins::PythonEventsInitialize(szScriptsFolder);
- #endif
-
- m_thread = boost::shared_ptr<boost::thread>(new boost::thread(boost::bind(&CEventSystem::Do_Work, this)));
-@@ -179,11 +180,11 @@ void CEventSystem::SetEnabled(const bool bEnabled)
-
- void CEventSystem::LoadEvents()
- {
-- std::string dzv_Dir,s;
-+ std::string s;
- #ifdef WIN32
-- dzv_Dir = szUserDataFolder + "scripts\\dzVents\\generated_scripts\\";
-+ dzv_Dir = szUserDataFolder + "generated_scripts\\";
- #else
-- dzv_Dir = szUserDataFolder + "scripts/dzVents/generated_scripts/";
-+ dzv_Dir = szUserDataFolder + "generated_scripts/";
- #endif
- boost::unique_lock<boost::shared_mutex> eventsMutexLock(m_eventsMutex);
- _log.Log(LOG_STATUS, "EventSystem: reset all events...");
-@@ -274,18 +275,18 @@ void CEventSystem::LoadEvents()
- void CEventSystem::Do_Work()
- {
- #ifdef WIN32
-- m_lua_Dir = szUserDataFolder + "scripts\\lua\\";
-- m_dzv_Dir = szUserDataFolder + "scripts\\dzVents\\runtime\\";
-+ m_lua_Dir = szScriptsFolder + "lua\\";
-+ m_dzv_Dir = szScriptsFolder + "dzVents\\runtime\\";
- #else
-- m_lua_Dir = szUserDataFolder + "scripts/lua/";
-- m_dzv_Dir = szUserDataFolder + "scripts/dzVents/runtime/";
-+ m_lua_Dir = szScriptsFolder + "lua/";
-+ m_dzv_Dir = szScriptsFolder + "dzVents/runtime/";
- #endif
-
- #ifdef ENABLE_PYTHON
- #ifdef WIN32
-- m_python_Dir = szUserDataFolder + "scripts\\python\\";
-+ m_python_Dir = szScriptsFolder + "python\\";
- #else
-- m_python_Dir = szUserDataFolder + "scripts/python/";
-+ m_python_Dir = szScriptsFolder + "python/";
- #endif
- #endif
- m_stoprequested = false;
-@@ -1426,9 +1427,9 @@ void CEventSystem::EvaluateEvent(const std::string &reason, const uint64_t Devic
- {
- std::string dzv_scripts;
- #ifdef WIN32
-- dzv_scripts = szUserDataFolder + "scripts\\dzVents\\scripts\\";
-+ dzv_scripts = szScriptsFolder + "dzVents\\scripts\\";
- #else
-- dzv_scripts = szUserDataFolder + "scripts/dzVents/scripts/";
-+ dzv_scripts = szScriptsFolder + "dzVents/scripts/";
- #endif
- DirectoryListing(FileEntries, dzv_scripts, false, true);
- for (itt = FileEntries.begin(); itt != FileEntries.end(); ++itt)
-@@ -2404,7 +2405,7 @@ bool CEventSystem::parseBlocklyActions(const std::string &Actions, const std::st
- }
- #if !defined WIN32
- if (sPath.find("/") != 0)
-- sPath = szUserDataFolder + "scripts/" + sPath;
-+ sPath = szScriptsFolder + sPath;
- #endif
-
- m_sql.AddTaskItem(_tTaskItem::ExecuteScript(0.2f, sPath, sParam));
-@@ -3508,13 +3509,16 @@ void CEventSystem::EvaluateLua(const std::string &reason, const std::string &fil
- {
- std::stringstream lua_DirT;
-
-- lua_DirT << szUserDataFolder <<
-+ lua_DirT << szScriptsFolder <<
- #ifdef WIN32
-- "scripts\\dzVents\\";
-+ "dzVents\\";
- #else
-- "scripts/dzVents/";
-+ "dzVents/";
- #endif
-
-+ lua_pushstring(lua_state, "generated_script_path");
-+ lua_pushstring(lua_state, dzv_Dir.c_str());
-+ lua_rawset(lua_state, -3);
- lua_pushstring(lua_state, "script_path");
- lua_pushstring(lua_state, lua_DirT.str().c_str());
- lua_rawset(lua_state, -3);
-@@ -4695,9 +4699,9 @@ namespace http {
-
- std::stringstream template_file;
- #ifdef WIN32
-- template_file << szUserDataFolder << "scripts\\templates\\" << eventType << "." << interpreter;
-+ template_file << szScriptsFolder << "templates\\" << eventType << "." << interpreter;
- #else
-- template_file << szUserDataFolder << "scripts/templates/" << eventType << "." << interpreter;
-+ template_file << szScriptsFolder << "templates/" << eventType << "." << interpreter;
- #endif
- std::ifstream file;
- std::stringstream template_content;
-diff --git a/main/EventsPythonModule.cpp b/main/EventsPythonModule.cpp
-index f69e7219..2d97562e 100644
---- a/main/EventsPythonModule.cpp
-+++ b/main/EventsPythonModule.cpp
-@@ -108,7 +108,7 @@
-
- int PythonEventsInitalized = 0;
-
-- bool PythonEventsInitialize(std::string szUserDataFolder) {
-+ bool PythonEventsInitialize(std::string szScriptsFolder) {
-
- if (!Plugins::Py_LoadLibrary())
- {
-@@ -131,9 +131,9 @@
-
- std::string ssPath;
- #ifdef WIN32
-- ssPath = szUserDataFolder + "scripts\\python\\;";
-+ ssPath = szScriptsFolder + "python\\;";
- #else
-- ssPath = szUserDataFolder + "scripts/python/:";
-+ ssPath = szScriptsFolder + "python/:";
- #endif
-
- std::wstring sPath = std::wstring(ssPath.begin(), ssPath.end());
-diff --git a/main/LuaHandler.cpp b/main/LuaHandler.cpp
-index 8fdcb278..c2ad98ff 100644
---- a/main/LuaHandler.cpp
-+++ b/main/LuaHandler.cpp
-@@ -22,7 +22,7 @@ extern "C" {
- #include "mainworker.h"
- #include "../hardware/hardwaretypes.h"
-
--extern std::string szUserDataFolder;
-+extern std::string szScriptsFolder;
-
- int CLuaHandler::l_domoticz_updateDevice(lua_State* lua_state)
- {
-@@ -155,9 +155,9 @@ bool CLuaHandler::executeLuaScript(const std::string &script, const std::string
- {
- std::stringstream lua_DirT;
- #ifdef WIN32
-- lua_DirT << szUserDataFolder << "scripts\\lua_parsers\\";
-+ lua_DirT << szScriptsFolder << "lua_parsers\\";
- #else
-- lua_DirT << szUserDataFolder << "scripts/lua_parsers/";
-+ lua_DirT << szScriptsFolder << "lua_parsers/";
- #endif
- std::string lua_Dir = lua_DirT.str();
-
-diff --git a/main/SQLHelper.cpp b/main/SQLHelper.cpp
-index 491aa5a2..d529243a 100644
---- a/main/SQLHelper.cpp
-+++ b/main/SQLHelper.cpp
-@@ -633,6 +633,7 @@ const char *sqlCreateMobileDevices =
- "[LastUpdate] DATETIME DEFAULT(datetime('now', 'localtime'))"
- ");";
-
-+extern std::string szScriptsFolder;
- extern std::string szUserDataFolder;
-
- CSQLHelper::CSQLHelper(void)
-@@ -3683,9 +3684,9 @@ uint64_t CSQLHelper::UpdateValueInt(const int HardwareID, const char* ID, const
- //Execute possible script
- std::string scriptname;
- #ifdef WIN32
-- scriptname = szUserDataFolder + "scripts\\domoticz_main.bat";
-+ scriptname = szScriptsFolder + "domoticz_main.bat";
- #else
-- scriptname = szUserDataFolder + "scripts/domoticz_main";
-+ scriptname = szScriptsFolder + "domoticz_main";
- #endif
- if (file_exist(scriptname.c_str()))
- {
-@@ -6641,7 +6642,7 @@ bool CSQLHelper::HandleOnOffAction(const bool bIsOn, const std::string &OnAction
- std::string scriptname = OnAction.substr(9);
- #if !defined WIN32
- if (scriptname.find("/") != 0)
-- scriptname = szUserDataFolder + "scripts/" + scriptname;
-+ scriptname = szScriptsFolder + scriptname;
- #endif
- std::string scriptparams="";
- //Add parameters
-@@ -6675,7 +6676,7 @@ bool CSQLHelper::HandleOnOffAction(const bool bIsOn, const std::string &OnAction
- std::string scriptname = OffAction.substr(9);
- #if !defined WIN32
- if (scriptname.find("/") != 0)
-- scriptname = szUserDataFolder + "scripts/" + scriptname;
-+ scriptname = szScriptsFolder + scriptname;
- #endif
- std::string scriptparams = "";
- int pindex = scriptname.find(' ');
-diff --git a/main/WebServer.cpp b/main/WebServer.cpp
-index f8471791..d2cf10b2 100644
---- a/main/WebServer.cpp
-+++ b/main/WebServer.cpp
-@@ -59,6 +59,7 @@
-
- #define round(a) ( int ) ( a + .5 )
-
-+extern std::string szScriptsFolder;
- extern std::string szUserDataFolder;
- extern std::string szWWWFolder;
-
-@@ -2987,9 +2988,9 @@ namespace http {
- if (scriptname.find("..") != std::string::npos)
- return;
- #ifdef WIN32
-- scriptname = szUserDataFolder + "scripts\\" + scriptname;
-+ scriptname = szScriptsFolder + scriptname;
- #else
-- scriptname = szUserDataFolder + "scripts/" + scriptname;
-+ scriptname = szScriptsFolder + scriptname;
- #endif
- if (!file_exist(scriptname.c_str()))
- return;
-diff --git a/main/domoticz.cpp b/main/domoticz.cpp
-index 5ef96f68..52599b14 100644
---- a/main/domoticz.cpp
-+++ b/main/domoticz.cpp
-@@ -136,6 +136,7 @@ static const _facilities facilities[] =
- };
- std::string logfacname = "user";
- #endif
-+std::string szScriptsFolder;
- std::string szStartupFolder;
- std::string szUserDataFolder;
- std::string szWWWFolder;
-@@ -696,6 +697,19 @@ int main(int argc, char**argv)
- szUserDataFolder = szroot;
- }
-
-+ szScriptsFolder=szStartupFolder;
-+ if (cmdLine.HasSwitch("-scripts"))
-+ {
-+ if (cmdLine.GetArgumentCount("-scripts") != 1)
-+ {
-+ _log.Log(LOG_ERROR, "Please specify a path for scripts directory");
-+ return 1;
-+ }
-+ std::string szroot = cmdLine.GetSafeArgument("-scripts", 0, "");
-+ if (szroot.size() != 0)
-+ szScriptsFolder = szroot;
-+ }
-+
- if (cmdLine.HasSwitch("-startupdelay"))
- {
- if (cmdLine.GetArgumentCount("-startupdelay") != 1)
-diff --git a/main/mainworker.cpp b/main/mainworker.cpp
-index 803690e1..e89a783b 100644
---- a/main/mainworker.cpp
-+++ b/main/mainworker.cpp
-@@ -159,6 +159,7 @@
-
- #define round(a) ( int ) ( a + .5 )
-
-+extern std::string szScriptsFolder;
- extern std::string szStartupFolder;
- extern std::string szUserDataFolder;
- extern std::string szWWWFolder;
-@@ -1473,8 +1474,8 @@ void MainWorker::Do_Work()
- m_sql.GetPreferencesVar("ReleaseChannel", nValue);
- bool bIsBetaChannel = (nValue != 0);
-
-- std::string scriptname = szUserDataFolder + "scripts/download_update.sh";
-- std::string strparm = szUserDataFolder;
-+ std::string scriptname = szScriptsFolder + "download_update.sh";
-+ std::string strparm = szScriptsFolder;
- if (bIsBetaChannel)
- strparm += " /beta";
-
-diff --git a/notifications/NotificationHTTP.cpp b/notifications/NotificationHTTP.cpp
-index decff3b4..632e4e66 100644
---- a/notifications/NotificationHTTP.cpp
-+++ b/notifications/NotificationHTTP.cpp
-@@ -6,7 +6,7 @@
- #include "../main/SQLHelper.h"
- #include "../main/Logger.h"
-
--extern std::string szUserDataFolder;
-+extern std::string szScriptsFolder;
-
- CNotificationHTTP::CNotificationHTTP() : CNotificationBase(std::string("http"), OPTIONS_NONE)
- {
-@@ -105,7 +105,7 @@ bool CNotificationHTTP::SendMessageImplementation(
- std::string scriptparams = "";
- #if !defined WIN32
- if (scriptname.find("/") != 0)
-- scriptname = szUserDataFolder + "scripts/" + scriptname;
-+ scriptname = szScriptsFolder + scriptname;
- #endif
- //Add parameters
- uPos = scriptname.find(" ");
-diff --git a/push/GooglePubSubPush.cpp b/push/GooglePubSubPush.cpp
-index 359a7d7c..46e489f6 100644
---- a/push/GooglePubSubPush.cpp
-+++ b/push/GooglePubSubPush.cpp
-@@ -22,7 +22,7 @@ extern "C" {
- using namespace boost::python;
- #endif
-
--extern std::string szUserDataFolder;
-+extern std::string szScriptsFolder;
-
- // this should be filled in by the preprocessor
- extern const char * Python_exe;
-@@ -231,11 +231,11 @@ void CGooglePubSubPush::DoGooglePubSubPush()
-
- #ifdef ENABLE_PYTHON_DECAP
- #ifdef WIN32
-- python_DirT << szUserDataFolder << "scripts\\python\\";
-- std::string filename = szUserDataFolder + "scripts\\python\\" + "googlepubsub.py";
-+ python_DirT << szScriptsFolder << "python\\";
-+ std::string filename = szScriptsFolder + "python\\" + "googlepubsub.py";
- #else
-- python_DirT << szUserDataFolder << "scripts/python/";
-- std::string filename = szUserDataFolder + "scripts/python/" + "googlepubsub.py";
-+ python_DirT << szScriptsFolder << "python/";
-+ std::string filename = szScriptsFolder + "python/" + "googlepubsub.py";
- #endif
-
- wchar_t * argv[1];
-diff --git a/scripts/dzVents/runtime/dzVents.lua b/scripts/dzVents/runtime/dzVents.lua
-index d0dfa869..8370d6a9 100644
---- a/scripts/dzVents/runtime/dzVents.lua
-+++ b/scripts/dzVents/runtime/dzVents.lua
-@@ -1,8 +1,9 @@
- local currentPath = globalvariables['script_path']
-+local generatedScriptPath = globalvariables['generated_script_path']
- local triggerReason = globalvariables['script_reason']
-
- _G.scriptsFolderPath = currentPath .. 'scripts' -- global
--_G.generatedScriptsFolderPath = currentPath .. 'generated_scripts' -- global
-+_G.generatedScriptsFolderPath = generatedScriptPath -- global
- _G.dataFolderPath = currentPath .. 'data' -- global
-
- package.path = package.path .. ';' .. currentPath .. '?.lua'
-@@ -10,7 +11,7 @@ package.path = package.path .. ';' .. currentPath .. 'runtime/?.lua'
- package.path = package.path .. ';' .. currentPath .. 'runtime/device-adapters/?.lua'
- package.path = package.path .. ';' .. currentPath .. 'dzVents/?.lua'
- package.path = package.path .. ';' .. currentPath .. 'scripts/?.lua'
--package.path = package.path .. ';' .. currentPath .. 'generated_scripts/?.lua'
-+package.path = package.path .. ';' .. generatedScriptPath .. '?.lua'
- package.path = package.path .. ';' .. currentPath .. 'data/?.lua'
-
- local EventHelpers = require('EventHelpers')
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=b155fdb458c3241ab375d1f2b12fbb6a9f8a8a3a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=ff1bc142107d367c6c58ccc5dbcec822c251a683e43e3b771ab4a33a9012f602
+PKG_MIRROR_HASH:=bea40197bce22c837273848bc75d273c2688b131c11895685a35ee6c6242843a
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=GPL-2.0
include $(TOPDIR)/rules.mk
PKG_NAME:=evtest
-PKG_REV:=ab140a2dab1547f7deb5233be6d94a388cf08b26
PKG_VERSION:=1.33
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=9716be17dadc496f15861e41e17980be9d444de856bc2e5b9a732f9ce826b8dd
-PKG_SOURCE_URL:=git://anongit.freedesktop.org/evtest
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://cgit.freedesktop.org/evtest/snapshot
+PKG_HASH:=5037d1162f4c407053cd97e85763ba03150a0c35f929ee9bf9a360abd32ef1c1
PKG_MAINTAINER:=Pushpal Sidhu <psidhu.devel@gmail.com>
+
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
PKG_HASH:=ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d
-PKG_MAINTAINER:=Daniel Dickinson <lede@daniel.thecshore.com>
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
--- /dev/null
+#
+# Copyright (C) 2018 Daniel Engberg <daniel.engberg.lists@pyret.net>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fio
+PKG_VERSION:=3.11
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://brick.kernel.dk/snaps
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_HASH:=4aab4f81e443f554f7526ff8f3a026ab78afc7e40049ba6050dac8f219071569
+
+PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fio
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=Disc
+ DEPENDS:=+libaio +zlib
+ TITLE:=I/O testing and benchmarking tool
+ URL:=https://github.com/axboe/fio
+endef
+
+define Package/fio/description
+ Fio is an I/O testing tool that will spawn a number of threads or
+ processes doing a particular type of I/O action as specified by
+ the user. Fio can be driven by a 'job file' describing the I/O
+ load one wants to simulate.
+endef
+
+TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
+
+CONFIGURE_ARGS = \
+ --disable-numa \
+ --disable-rdma \
+ --disable-rados \
+ --disable-http \
+ --disable-rbd \
+ --disable-gfapi \
+ --disable-lex \
+ --disable-pmem \
+ --disable-native \
+ --cc="$(TARGET_CC)" \
+ --extra-cflags="$(TARGET_CFLAGS)"
+
+define Package/fio/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/fio $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,fio))
--- /dev/null
+From 2759b7c8dda77641fe271102a26ad7a02419ad62 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sun, 16 Sep 2018 11:07:14 -0700
+Subject: [PATCH] Add Musl support
+
+The *48_r functions are glibc extensions that also happen to be supported
+by uclibc as well. Adapted from the Android solution.
+
+__USE_FILE_OFFSET64 is glibc specific so use LARGEFILE_SOURCE.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ os/os-linux.h | 17 +++++++++++++++++
+ oslib/libmtd_common.h | 2 +-
+ 2 files changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/os/os-linux.h b/os/os-linux.h
+index 6b63d123..e06aadae 100644
+--- a/os/os-linux.h
++++ b/os/os-linux.h
+@@ -60,7 +60,11 @@
+
+ typedef cpu_set_t os_cpu_mask_t;
+
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ typedef struct drand48_data os_random_state_t;
++#else
++typedef struct { unsigned short r[3]; } os_random_state_t;
++#endif
+
+ #ifdef CONFIG_3ARG_AFFINITY
+ #define fio_setaffinity(pid, cpumask) \
+@@ -172,14 +176,27 @@ static inline unsigned long long os_phys_mem(void)
+
+ static inline void os_random_seed(unsigned long seed, os_random_state_t *rs)
+ {
++#if defined(__GLIBC__) || defined (__UCLIBC__)
+ srand48_r(seed, rs);
++#else
++ rs->r[0] = seed & 0xffff;
++ seed >>= 16;
++ rs->r[1] = seed & 0xffff;
++ seed >>= 16;
++ rs->r[2] = seed & 0xffff;
++ seed48(rs->r);
++#endif
+ }
+
+ static inline long os_random_long(os_random_state_t *rs)
+ {
+ long val;
+
++#if defined(__GLIBC__) || (__UCLIBC__)
+ lrand48_r(rs, &val);
++#else
++ val = nrand48(rs->r);
++#endif
+ return val;
+ }
+
+diff --git a/oslib/libmtd_common.h b/oslib/libmtd_common.h
+index 4ed9f0ba..c5cfd217 100644
+--- a/oslib/libmtd_common.h
++++ b/oslib/libmtd_common.h
+@@ -69,7 +69,7 @@ extern "C" {
+ #endif
+
+ /* define a print format specifier for off_t */
+-#ifdef __USE_FILE_OFFSET64
++#ifdef _LARGEFILE_SOURCE
+ #define PRIxoff_t PRIx64
+ #define PRIdoff_t PRId64
+ #else
+--
+2.19.1
+
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fish
+PKG_VERSION:=2.7.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/fish-shell/fish-shell/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=eb43ea2eb9accf76661c487dd530a5fd345fa40a3201bd22cef2c52be39fb474
+PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>
+PKG_LICENSE:=GPL-2.0
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_DIR:=$(BUILD_DIR)/fish-shell-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fish
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=Shells
+ TITLE:=A smart and user-friendly command line shell
+ DEPENDS:=+libncurses +libstdcpp +librt
+ URL:=https://fishshell.com
+endef
+
+define Package/fish/description
+ Fish is a smart and user-friendly command line shell for OS X, Linux, and the
+ rest of the family. Fish includes features like syntax highlighting,
+ autosuggest-as-you-type, and fancy tab completions that just work, with no
+ configuration required.
+endef
+
+CONFIGURE_VARS += ac_cv_file__proc_self_stat=yes
+TARGET_CXXFLAGS += -std=c++0x
+
+define Package/fish/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fish $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/share/fish
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/fish/* $(1)/usr/share/fish/
+ rm -rf $(1)/usr/share/fish/groff
+ rm -rf $(1)/usr/share/fish/man
+ rm -rf $(1)/usr/share/fish/tools
+endef
+
+define Package/fish/postinst
+#!/bin/sh
+grep fish $${IPKG_INSTROOT}/etc/shells || \
+ echo "/usr/bin/fish" >> $${IPKG_INSTROOT}/etc/shells
+
+ # Backwards compatibility
+ if [[ -e /bin/fish ]] && ([[ ! -L /bin/fish ]] || [[ "$(readlink -fn $${IPKG_INSTROOT}/bin/fish)" != "../$(CONFIGURE_PREFIX)/bin/fish" ]]); then
+ ln -fs "../$(CONFIGURE_PREFIX)/bin/fish" "$${IPKG_INSTROOT}/bin/fish"
+ fi
+endef
+
+define Package/fish/postrm
+ rm -rf "$${IPKG_INSTROOT}/$(CONFIGURE_PREFIX)/share/fish/$(PKG_VERSION)"
+endef
+
+$(eval $(call BuildPackage,fish))
--- /dev/null
+diff --git a/share/functions/prompt_hostname.fish b/share/functions/prompt_hostname.fish
+index 4348bce2..8502ce3f 100644
+--- a/share/functions/prompt_hostname.fish
++++ b/share/functions/prompt_hostname.fish
+@@ -2,7 +2,7 @@
+ # hostname command uses. So cache the answer so including it in the prompt doesn't make fish seem
+ # slow.
+ if not set -q __fish_prompt_hostname
+- set -g __fish_prompt_hostname (hostname | string split '.')[1]
++ set -g __fish_prompt_hostname (uname -n | string split '.')[1]
+ end
+
+ function prompt_hostname
+diff --git a/share/tools/web_config/sample_prompts/pythonista.fish b/share/tools/web_config/sample_prompts/pythonista.fish
+index 9529035c..57ffaf86 100644
+--- a/share/tools/web_config/sample_prompts/pythonista.fish
++++ b/share/tools/web_config/sample_prompts/pythonista.fish
+@@ -7,7 +7,7 @@ function fish_prompt
+ set -g VIRTUAL_ENV_DISABLE_PROMPT true
+ end
+ set_color yellow
+- printf '%s' (whoami)
++ printf '%s' (id -un)
+ set_color normal
+ printf ' at '
+
+diff --git a/share/tools/web_config/sample_prompts/screen_savvy.fish b/share/tools/web_config/sample_prompts/screen_savvy.fish
+index 411a5501..5cdcfb69 100644
+--- a/share/tools/web_config/sample_prompts/screen_savvy.fish
++++ b/share/tools/web_config/sample_prompts/screen_savvy.fish
+@@ -2,8 +2,8 @@
+ # author: Matthias
+ function fish_prompt -d "Write out the prompt"
+ if test -z $WINDOW
+- printf '%s%s@%s%s%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (prompt_hostname) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
++ printf '%s%s@%s%s%s%s%s> ' (set_color yellow) (id -un) (set_color purple) (prompt_hostname) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
+ else
+- printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (prompt_hostname) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
++ printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) (id -un) (set_color purple) (prompt_hostname) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
+ end
+ end
+diff --git a/share/tools/web_config/sample_prompts/terlar.fish b/share/tools/web_config/sample_prompts/terlar.fish
+index d49ef340..59b3d267 100644
+--- a/share/tools/web_config/sample_prompts/terlar.fish
++++ b/share/tools/web_config/sample_prompts/terlar.fish
+@@ -6,7 +6,7 @@ function fish_prompt --description 'Write out the prompt'
+
+ # User
+ set_color $fish_color_user
+- echo -n (whoami)
++ echo -n (id -un)
+ set_color normal
+
+ echo -n '@'
include $(TOPDIR)/rules.mk
PKG_NAME:=flashrom
-PKG_VERSION:=0.9.9.1
+PKG_VERSION:=1.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.flashrom.org/releases
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_HASH:=0e145a5b9b18c98752acf0f8329a9a260ddf030abf687416daab9f05a0f508d0
+PKG_HASH:=3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170c4dc9dee64
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
--- /dev/null
+From 291764a70e6d8b212680e311bfb0825abf2b9a2f Mon Sep 17 00:00:00 2001
+From: Alex James <theracermaster@gmail.com>
+Date: Sat, 14 Apr 2018 22:59:57 -0500
+Subject: ch341a_spi: Avoid deprecated libusb functions
+
+libusb 1.0.22 marked libusb_set_debug as deprecated. For such versions
+of libusb, use libusb_set_option instead.
+
+Change-Id: Ib71ebe812316eaf49136979a942a946ef9e4d487
+Signed-off-by: Alex James <theracermaster@gmail.com>
+Reviewed-on: https://review.coreboot.org/25681
+Tested-by: Nico Huber <nico.h@gmx.de>
+Reviewed-by: David Hendricks <david.hendricks@gmail.com>
+---
+ ch341a_spi.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+(limited to 'ch341a_spi.c')
+
+diff --git a/ch341a_spi.c b/ch341a_spi.c
+index 95e9c95..ee18624 100644
+--- a/ch341a_spi.c
++++ b/ch341a_spi.c
+@@ -441,7 +441,12 @@ int ch341a_spi_init(void)
+ return -1;
+ }
+
+- libusb_set_debug(NULL, 3); // Enable information, warning and error messages (only).
++ /* Enable information, warning, and error messages (only). */
++#if LIBUSB_API_VERSION < 0x01000106
++ libusb_set_debug(NULL, 3);
++#else
++ libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO);
++#endif
+
+ uint16_t vid = devs_ch341a_spi[0].vendor_id;
+ uint16_t pid = devs_ch341a_spi[0].device_id;
+--
+cgit v1.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=gammu
-PKG_VERSION:=1.38.4
+PKG_VERSION:=1.39.0
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://dl.cihar.com/gammu/releases/
+PKG_SOURCE_URL:=https://dl.cihar.com/gammu/releases
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=a8ba1dc52ee82562abd57e9546c409f2f887f45187aae012fe43af0b730611ae
+PKG_HASH:=66d1d991d7a993fdf254d4c425f0fdd38c9cca15b1735936695a486067a6a9f8
+
PKG_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
PKG_LICENCE:=GPL-2.0
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Cell phone/modem SMS and control tool
- URL:=http://dl.cihar.com/gammu/releases/
+ URL:=https://wammu.eu/gammu/
DEPENDS:=+libpthread +libcurl +glib2 $(ICONV_DEPENDS) $(INTL_DEPENDS)
DEPENDS+=+PACKAGE_python:python +PACKAGE_bluez-libs:bluez-libs
- DEPENDS+=+PACKAGE_libmysqlclient:libmysqlclient +PACKAGE_unixodbc:unixodbc +PACKAGE_libpq:libpq
+ DEPENDS+=+PACKAGE_libmariadb:libmariadb +PACKAGE_unixodbc:unixodbc +PACKAGE_libpq:libpq
DEPENDS+=+PACKAGE_libusb-1.0:libusb-1.0
endef
+diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake
+index 3ec0493..f716700 100644
--- a/cmake/FindIconv.cmake
+++ b/cmake/FindIconv.cmake
-@@ -34,9 +34,9 @@ string(REGEX REPLACE "(.*)/include/?" "\
+@@ -9,10 +9,10 @@
+ include(CheckCCompilerFlag)
+ include(CheckCSourceCompiles)
- FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c HINTS "${ICONV_INCLUDE_BASE_DIR}/lib" PATHS /opt/local/lib)
-
--IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-+IF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
- SET(ICONV_FOUND TRUE)
--ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-+ENDIF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
+-IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
++IF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
+ # Already in cache, be silent
+ SET(ICONV_FIND_QUIETLY TRUE)
+-ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
++ENDIF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
- set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
- set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
+ IF(APPLE)
+ FIND_PATH(ICONV_INCLUDE_DIR iconv.h
+diff --git a/configure b/configure
+index 4f51ca7..5b0d993 100755
--- a/configure
+++ b/configure
-@@ -31,6 +31,7 @@ Usage: ./configure [options]
+@@ -33,6 +33,7 @@ Usage: ./configure [options]
--enable-backup enable backup support
--enable-win32 enable mingw crosscomilation
--enable-protection enable compile time protections
+--disable-iconv disable iconv support
- --with-python=<path> path to Python interpreter
--without-gnapplet disable installation of gnapplet
--without-completion disable installation of bash completion script
-@@ -57,6 +58,7 @@ CMAKE_PROTECTION=
- CMAKE_PYTHON=
+
+@@ -57,6 +58,7 @@ CMAKE_CROSS=
+ CMAKE_PROTECTION=
CMAKE_GNAP=
CMAKE_COMPLETE=
+CMAKE_ICONV=
# process command line
while [ "$#" -gt 0 ] ; do
-@@ -94,6 +96,12 @@ while [ "$#" -gt 0 ] ; do
+@@ -91,6 +93,12 @@ while [ "$#" -gt 0 ] ; do
--disable-protection)
CMAKE_PROTECTION="-DENABLE_PROTECTION=OFF"
;;
--enable-debug)
CMAKE_DEBUG="-DCMAKE_BUILD_TYPE=Debug"
;;
-@@ -142,4 +150,4 @@ fi
+@@ -139,4 +147,4 @@ fi
cd "$BUILD_DIR"
# invoke cmake to do configuration
--cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE
-+cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
+-cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE
++cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -537,8 +537,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMP
+@@ -511,8 +511,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMP
# MACRO_TUNE_LINKER("-pie")
# These do not work on Windows right now
if (NOT WIN32)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
--- a/configure
+++ b/configure
-@@ -25,6 +25,7 @@ Usage: ./configure [options]
+@@ -27,6 +27,7 @@ Usage: ./configure [options]
--help|-h shows this help
--prefix=<path> installation prefix
--enable-shared enables shared build
--enable-debug enables debug build
--enable-tiger enables Mac OS X 10.4 (Tiger) build
-@@ -50,6 +51,7 @@ SOURCE_DIR=`pwd`
+@@ -51,6 +52,7 @@ SOURCE_DIR=`pwd`
# cmake parameters
CMAKE_PREFIX=
+ CMAKE_ROOT="-DCMAKE_TOOLCHAIN_FILE=$SOURCE_DIR/cmake/Toolchain-cross.cmake"
+ echo "SET(CMAKE_FIND_ROOT_PATH ${1##--cross-root=})" >> $SOURCE_DIR/cmake/Toolchain-cross.cmake
+ ;;
- --with-python=*)
- CMAKE_PYTHON="-DBUILD_PYTHON=${1##--with-python=}"
+ --enable-backup)
+ CMAKE_BACKUP="-DWITH_BACKUP=ON"
;;
-@@ -150,4 +156,4 @@ fi
+@@ -147,4 +153,4 @@ fi
cd "$BUILD_DIR"
# invoke cmake to do configuration
--cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
-+cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
+-cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
++cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
--- a/configure
+++ b/configure
-@@ -36,6 +36,7 @@ Usage: ./configure [options]
- --with-python=<path> path to Python interpreter
+@@ -37,6 +37,7 @@ Usage: ./configure [options]
+ --disable-iconv disable iconv support
--without-gnapplet disable installation of gnapplet
--without-completion disable installation of bash completion script
+--without-libdbi disable libdbi support
# process command line
while [ "$#" -gt 0 ] ; do
-@@ -120,6 +122,9 @@ while [ "$#" -gt 0 ] ; do
+@@ -117,6 +119,9 @@ while [ "$#" -gt 0 ] ; do
--without-completion)
CMAKE_COMPLETE="-DINSTALL_BASH_COMPLETION=OFF"
;;
--build=*)
;;
--disable-dependency-tracking)
-@@ -156,4 +161,4 @@ fi
+@@ -153,4 +158,4 @@ fi
cd "$BUILD_DIR"
# invoke cmake to do configuration
--cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
-+cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV $CMAKE_LIBDBI
+-cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
++cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV $CMAKE_LIBDBI
include $(TOPDIR)/rules.mk
PKG_NAME:=gawk
-PKG_VERSION:=4.2.0
-PKG_RELEASE:=2
+PKG_VERSION:=4.2.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/gawk
-PKG_HASH:=d4f3cd31c001fd0ed52832d4fbfbdfeaa38ad541c182f80ff8fdf87324a6a9f2
+PKG_HASH:=d1119785e746d46a8209d28b2de404a57f983aa48670f4e225531d3bdc175551
PKG_LICENSE:=GPL
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=gnupg
-PKG_VERSION:=1.4.21
+PKG_VERSION:=1.4.23
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/gnupg \
- ftp://ftp.gnupg.org/gcrypt/gnupg
-PKG_HASH:=6b47a3100c857dcab3c60e6152e56a997f2c7862c1b8b2b25adf3884a1ae2276
+PKG_SOURCE_URL:=https://gnupg.org/ftp/gcrypt/gnupg
+PKG_HASH:=c9462f17e651b6507848c08c430c791287cd75491f8b5a8b50c6ed46b12678ba
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Daniel Dickinson <lede@cshore.thecshore.com>
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=gpsd
-PKG_VERSION:=3.16
+PKG_VERSION:=3.17
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
-PKG_HASH:=03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029
+PKG_HASH:=68e0dbecfb5831997f8b3d6ba48aed812eb465d8c0089420ab68f9ce4d85e77a
PKG_MAINTAINER:=Pushpal Sidhu <psidhu.devel@gmail.com>
PKG_LICENSE:=BSD-3-Clause
===================================================================
--- gpsd-3.16.orig/SConstruct
+++ gpsd-3.16/SConstruct
-@@ -543,6 +543,10 @@ else:
- ncurseslibs = pkg_config('ncurses')
- if config.CheckPKG('tinfo'):
- ncurseslibs += pkg_config('tinfo')
+@@ -672,6 +672,10 @@ else:
+ ncurseslibs += pkg_config('tinfo', rpath_hack=True)
+ # It's not yet known whether rpath_hack is appropriate for
+ # ncurses5-config.
+ elif WhereIs('ncurses6-config'):
+ ncurseslibs = ['!ncurses6-config --libs --cflags']
+ elif WhereIs('ncursesw6-config'):
--- /dev/null
+#
+# Copyright (C) 2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gptfdisk
+PKG_VERSION:=1.0.4
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Alif M. Ahmad <alive4ever@live.com>
+PKG_LICENSE:=GPL-2.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)
+PKG_HASH:=b663391a6876f19a3cd901d862423a16e2b5ceaa2f4a3b9bb681e64b9c7ba78d
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/gptfdisk/Default
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=Disc
+ URL:=http://www.rodsbooks.com/gdisk
+ DEPENDS:= +libstdcpp
+endef
+
+define Package/gdisk
+$(call Package/gptfdisk/Default)
+ TITLE:=GPT aware disk manipulation utility for interactive use
+ DEPENDS+= +libuuid
+endef
+
+define Package/gdisk/description
+ gdisk is GPT aware disk partitioning tool, with interactive UI.
+endef
+
+define Package/cgdisk
+$(call Package/gptfdisk/Default)
+ TITLE:=GPT aware disk manipulation utility for interactive use
+ DEPENDS+= +libuuid +libncursesw
+endef
+
+define Package/cgdisk/description
+ cgdisk is GPT aware disk partitioning tool, with interactive ncurses based UI.
+endef
+
+define Package/sgdisk
+$(call Package/gptfdisk/Default)
+ TITLE:=GPT aware disk manipulation utility for scripting use
+ DEPENDS+= +libuuid +libpopt
+endef
+
+define Package/sgdisk/description
+ sgdisk is GPT-aware disk partitioning tool for scripting use.
+endef
+
+define Package/fixparts
+$(call Package/gptfdisk/Default)
+ TITLE:=A utility to fix corrupted MBR partitions
+ DEPENDS+=
+endef
+
+define Package/fixparts/description
+ a text-mode menu-driven program for repairing certain types of problems with
+ Master Boot Record (MBR) partition tables
+endef
+
+define Package/gdisk/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/gdisk $(1)/usr/bin/
+endef
+
+define Package/cgdisk/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgdisk $(1)/usr/bin/
+endef
+
+define Package/sgdisk/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/sgdisk $(1)/usr/bin/
+endef
+
+define Package/fixparts/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/fixparts $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,gdisk))
+$(eval $(call BuildPackage,cgdisk))
+$(eval $(call BuildPackage,sgdisk))
+$(eval $(call BuildPackage,fixparts))
include $(TOPDIR)/rules.mk
PKG_NAME:=grep
-PKG_VERSION:=2.26
+PKG_VERSION:=3.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/grep
-PKG_HASH:=246a8fb37e82aa33d495b07c22fdab994c039ab0f818538eac81b01e78636870
+PKG_HASH:=db625c7ab3bb3ee757b3926a5cfa8d9e1c3991ad24707a83dde8a5ef2bf7a07e
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
-TARGET_CFLAGS+=--std=gnu99
-
define Package/grep
SECTION:=utils
CATEGORY:=Utilities
TITLE:=grep search utility - full version
DEPENDS:=+libpcre
- URL:=http://www.gnu.org/software/grep/
+ URL:=https://www.gnu.org/software/grep/
endef
define Package/grep/description
include $(TOPDIR)/rules.mk
PKG_NAME:=gzip
-PKG_VERSION:=1.7
+PKG_VERSION:=1.9
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/gzip
-PKG_HASH:=eccbaa178c7801618c887956f1668d45bb57863a9d2678bfc3e36d01fb951904
+PKG_HASH:=ae506144fc198bd8f81f1f4ad19ce63d5a2d65e42333255977cf1dcf1479089a
PKG_LICENSE:=GPL-3.0+
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=hamlib
-PKG_VERSION:=3.0.1
+PKG_VERSION:=3.3
PKG_RELEASE:=1
-PKG_HASH:=3fec97ea326d02aa8f35834c4af34194a3f544e6212f391397d788c566b44e32
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/hamlib
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
+PKG_HASH:=c90b53949c767f049733b442cd6e0a48648b55d99d4df5ef3f852d985f45e880
+PKG_MAINTAINER:=Vasilis Tsiligiannis <acinonyx@openwrt.gr>
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Vasilis Tsiligiannis <acinonyx@openwrt.gr>
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=hdparm
-PKG_VERSION:=9.52
+PKG_VERSION:=9.56
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=c3429cd423e271fa565bf584598fd751dd2e773bb7199a592b06b5a61cec4fb6
+PKG_HASH:=6ff9ed695f1017396eec4101f990f114b7b0e0a04c5aa6369c0394053d16e4da
PKG_MAINTAINER:=Richard Kunze <richard.kunze@web.de>
PKG_LICENSE:=BSD-Style Open Source License
--- /dev/null
+#
+# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2017-2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hplip
+PKG_VERSION:=3.18.9
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/hplip
+PKG_HASH:=20093830994de16bb36c049c1fdb688569531525fb994f7e605e66266a2d783c
+
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+PKG_LICENSE:=GPL-2.0 GPL-2.0+
+PKG_LICENSE_FILES:=COPYING LICENSE
+
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:= python libcups
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hplip/Default
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=HP Linux Imaging and Printing
+ URL:=https://sourceforge.net/projects/hplip/
+endef
+
+define Package/hplip/Default/description
+ HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux.
+endef
+
+define Package/hplip-common
+$(call Package/hplip/Default)
+ TITLE+= (common files)
+ DEPENDS+=+libusb-1.0
+endef
+
+define Package/hplip-common/description
+$(call Package/hplip/Default/description)
+
+These are common files shared between subpackages
+endef
+
+define Package/hplip-sane
+$(call Package/hplip/Default)
+ TITLE+= (scanner drivers)
+ DEPENDS+=+libsane +hplip-common
+endef
+
+define Package/hplip-sane/description
+$(call Package/hplip/Default/description)
+
+S.A.N.E backend for HP Scanners
+endef
+
+CONFIGURE_ARGS += \
+ --disable-gui-build \
+ --disable-network-build \
+ --disable-fax-build \
+ --disable-pp-build \
+ --disable-doc-build \
+ --disable-dbus-build \
+ --disable-hpijs-only-build \
+ --disable-hpcups-install \
+ --disable-hpps-install \
+ --disable-cups-drv-install \
+ --enable-lite-build
+
+define Package/hplip-common/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libhpip.so* $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/.libs/libhpmud.so* $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/etc/hp
+ $(CP) $(PKG_BUILD_DIR)/hplip.conf $(1)/etc/hp/hplip.conf
+
+ $(INSTALL_DIR) $(1)/usr/share/hplip/data/models/
+ $(CP) $(PKG_BUILD_DIR)/data/models/models.dat $(1)/usr/share/hplip/data/models/
+
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/usb/
+ $(INSTALL_BIN) ./files/20-hplip $(1)/etc/hotplug.d/usb/
+endef
+
+define Package/hplip-sane/install
+ $(INSTALL_DIR) $(1)/usr/lib/sane
+ $(CP) $(PKG_BUILD_DIR)/.libs/libsane-hpaio.so* $(1)/usr/lib/sane
+
+ $(INSTALL_DIR) $(1)/etc/sane.d/dll.d/
+ $(INSTALL_DATA) ./files/hplib.conf $(1)/etc/sane.d/dll.d/hplib
+endef
+
+define Package/hplip-common/conffiles
+/etc/hp/hplip.conf
+endef
+
+define Package/hplip-sane/conffiles
+/etc/sane.d/dll.d/hplib
+endef
+
+$(eval $(call BuildPackage,hplip-common))
+$(eval $(call BuildPackage,hplip-sane))
--- /dev/null
+#!/bin/sh
+
+# Copyright (C) 2009 OpenWrt.org
+
+
+case "$ACTION" in
+ add)
+ # You have to figure out your PRODUCT id. Uncomment the line below,
+ # attach and detach your HP USB printer to find your id in /tmp/hplip.test.
+ # It will look like "Found 3f0/1717/100 on /proc/bus/usb/002/009"
+ # Replace 3f0/1717/100 below with your id.
+ #
+ # echo "Found $PRODUCT on $DEVICE" > /tmp/hplip.test
+
+ [ "$PRODUCT" = "3f0/1717/100" ] && chown nobody $DEVICE && chmod 666 $DEVICE
+ ;;
+ remove)
+ # device is gone
+ ;;
+esac
--- /dev/null
+# Load the hplib driver
+hpaio
--- /dev/null
+--- a/configure.in
++++ b/configure.in
+@@ -598,6 +598,10 @@ if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$hpcu
+ else
+ AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)])
+ AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)])
++ PKG_CHECK_MODULES(LIBUSB_1_0, [ libusb-1.0 >= 1.0.0 ], have_libusb_1_0=yes, have_libusb_1_0=no)
++ if test "$have_libusb_1_0" = "yes"; then
++ CFLAGS="$CFLAGS $LIBUSB_1_0_CFLAGS"
++ fi
+ fi
+ fi
+
--- /dev/null
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -71,7 +71,7 @@ else
+ libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
+ endif
+ # The following is a interlibrary dependency that must be compiled first.
+-libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la libhpipp.la $(DBUS_LIBS) -lcups -ldl
++libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la libhpipp.la $(DBUS_LIBS) -ldl
+ #libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
+ libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol
+
+--- a/scan/sane/hpaio.c
++++ b/scan/sane/hpaio.c
+@@ -34,7 +34,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <cups/cups.h>
+ #include "hpmud.h"
+ #include "hp_ipp.h"
+ #include "soap.h"
+@@ -145,98 +144,6 @@ static int GetUriLine(char *buf, char *uri, char **tail)
+ return i;
+ }
+
+-static int AddCupsList(char *uri, char ***printer)
+-{
+- int i, stat=1;
+-
+- /* Look for hp network URIs only. */
+- if (strncasecmp(uri, "hp:/net/", 8) !=0)
+- goto bugout;
+-
+- if (*printer == NULL)
+- {
+- /* Allocate array of string pointers. */
+- *printer = malloc(sizeof(char *) * MAX_DEVICE);
+- memset(*printer, 0, sizeof(char *) * MAX_DEVICE);
+- }
+-
+- /* Ignor duplicates (ie: printer queues using the same device). */
+- for (i=0; (*printer)[i] != NULL && i<MAX_DEVICE; i++)
+- {
+- if (strcmp((*printer)[i], uri) == 0)
+- goto bugout;
+- }
+-
+- /* Find empty slot in array of pointers. */
+- for (i=0; i<MAX_DEVICE; i++)
+- {
+- if ((*printer)[i] == NULL)
+- {
+- (*printer)[i] = strdup(uri);
+- break;
+- }
+- }
+-
+- stat = 0;
+-
+-bugout:
+-
+- return stat;
+-}
+-
+-
+-static int GetCupsPrinters(char ***printer)
+-{
+- http_t *http=NULL; /* HTTP object */
+- ipp_t *request=NULL; /* IPP request object */
+- ipp_t *response=NULL; /* IPP response object */
+- ipp_attribute_t *attr; /* Current IPP attribute */
+- int cnt=0;
+-
+- /* Connect to the HTTP server */
+- if ((http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption())) == NULL)
+- goto bugout;
+-
+- /* Assemble the IPP request */
+- request = ippNew();
+-
+- ippSetOperation( request, CUPS_GET_PRINTERS );
+- ippSetRequestId( request, 1 );
+-
+- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, "utf-8");
+- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, "en");
+- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", NULL, "device-uri");
+-
+- /* Send the request and get a response. */
+- if ((response = cupsDoRequest(http, request, "/")) == NULL)
+- goto bugout;
+-
+- for (attr = ippFirstAttribute ( response ); attr != NULL; attr = ippNextAttribute( response ))
+- {
+- /* Skip leading attributes until we hit a printer. */
+- while (attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER)
+- attr = ippNextAttribute( response );
+-
+- if (attr == NULL)
+- break;
+-
+- while (attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER)
+- {
+- if (strcmp(ippGetName( attr ), "device-uri") == 0 && ippGetValueTag( attr ) == IPP_TAG_URI && AddCupsList(ippGetString( attr, 0, NULL ), printer) == 0)
+- cnt++;
+- attr = ippNextAttribute( response );
+- }
+-
+- if (attr == NULL)
+- break;
+- }
+-
+- ippDelete(response);
+-
+- bugout:
+- return cnt;
+-}
+-
+ static int AddDevice(char *uri)
+ {
+ struct hpmud_model_attributes ma;
+@@ -289,7 +196,6 @@ static int DevDiscovery(int localOnly)
+ char uri[HPMUD_LINE_SIZE];
+ char *tail = message;
+ int i, scan_type, cnt=0, total=0, bytes_read;
+- char **cups_printer=NULL; /* list of printers */
+ char* token = NULL;
+ enum HPMUD_RESULT stat;
+
+@@ -304,34 +210,6 @@ static int DevDiscovery(int localOnly)
+ total += AddDevice(uri);
+ }
+
+- /* Look for Network Scan devices if localonly flag if FALSE. */
+- if (!localOnly)
+- {
+- /* Look for all-in-one scan devices for which print queue created */
+- cnt = GetCupsPrinters(&cups_printer);
+- for (i=0; i<cnt; i++)
+- {
+- total += AddDevice(cups_printer[i]);
+- free(cups_printer[i]);
+- }
+- if (cups_printer)
+- free(cups_printer);
+-#ifdef HAVE_LIBNETSNMP
+- /* Discover NW scanners using Bonjour*/
+- bytes_read = mdns_probe_nw_scanners(message, sizeof(message), &cnt);
+- token = strtok(message, ";");
+- while (token)
+- {
+- total += AddDevice(token);
+- token = strtok(NULL, ";");
+- }
+-#endif
+- if(!total)
+- {
+- SendScanEvent("hpaio:/net/HP_Scan_Devices?ip=1.1.1.1", EVENT_ERROR_NO_PROBED_DEVICES_FOUND);
+- }
+- }
+-
+ bugout:
+ return total;
+ }
--- /dev/null
+https://bugs.launchpad.net/hplip/+bug/1672256
+
+memcpy should never be used with overlapping memory regions
+
+--- a/io/hpmud/musb.c
++++ b/io/hpmud/musb.c
+@@ -775,7 +775,7 @@ static int device_id(int fd, unsigned char *buffer, int size)
+ len = size-1; /* leave byte for zero termination */
+ if (len > 2)
+ len -= 2;
+- memcpy(buffer, buffer+2, len); /* remove length */
++ memmove(buffer, buffer+2, len); /* remove length */
+ buffer[len]=0;
+ DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);
+
--- /dev/null
+https://bugs.launchpad.net/hplip/+bug/1778626
+
+--- a/prnt/hpcups/genPCLm.cpp
++++ b/prnt/hpcups/genPCLm.cpp
+@@ -171,7 +171,7 @@ Defines
+ #define rgb_2_gray(r,g,b) (ubyte)(0.299*(double)r+0.587*(double)g+0.114*(double)b)
+
+ // Note: this is required for debugging
+-boolean writeOutputFile(int numBytes, ubyte *ptr, char *user_name);
++bool writeOutputFile(int numBytes, ubyte *ptr, char *user_name);
+
+ /*
+ ********************************************* Helper Routines **************************
+@@ -343,7 +343,7 @@ bool PCLmGenerator::addKids(sint32 kidObj)
+ return(true);
+ }
+
+-boolean writeOutputFile(int numBytes, ubyte *ptr, char *user_name)
++bool writeOutputFile(int numBytes, ubyte *ptr, char *user_name)
+ {
+ FILE *outputFile;
+ char outFileName[MAX_FILE_PATH_LEN];
+@@ -1074,7 +1074,7 @@ void PCLmGenerator::writePDFGrammarPage(int imageWidth, int imageHeight, int num
+ * Limitations:
+ * -
+ *****************************************************************************************/
+-boolean prepImageForBacksideDuplex(ubyte *imagePtr, sint32 imageHeight, sint32 imageWidth, sint32 numComponents)
++bool prepImageForBacksideDuplex(ubyte *imagePtr, sint32 imageHeight, sint32 imageWidth, sint32 numComponents)
+ {
+ sint32 numBytes=imageHeight*imageWidth*numComponents;
+ ubyte *head, *tail, t0, t1, t2;
--- /dev/null
+diff --git a/scan/sane/OrbliteScan/LinuxCommon.h b/scan/sane/OrbliteScan/LinuxCommon.h
+index 6605dd9..55c7110 100644
+--- a/scan/sane/OrbliteScan/LinuxCommon.h
++++ b/scan/sane/OrbliteScan/LinuxCommon.h
+@@ -18,10 +18,8 @@ typedef u_int32_t UInt32;
+ typedef int32_t SInt32;\r
+ //typedef unsigned long UInt32;\r
+ //typedef signed long SInt32;\r
+-typedef __S64_TYPE SInt64;\r
+-typedef __U64_TYPE UInt64;\r
+-typedef __S64_TYPE int64_t;\r
+-typedef __U64_TYPE uint64_t;\r
++typedef int64_t SInt64;\r
++typedef uint64_t UInt64;\r
+ \r
+ //typedef unsigned long ULONG;\r
+ //typedef void* LPVOID;\r
PKG_VERSION:=3.1.2
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://dl.lm-sensors.org/i2c-tools/releases/ \
- http://fossies.org/linux/misc/
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=db5e69f2e2a6e3aa2ecdfe6a5f490b149c504468770f58921c8c5b8a7860a441
+PKG_SOURCE_URL:=@KERNEL/software/utils/i2c-tools
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_HASH:=6d6079153cd49a62d4addacef4c092db1a46ba60b2807070a3fbe050262aef87
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=PACKAGE_python-smbus:python
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=inotify-tools
+PKG_VERSION:=3.20.1
+PKG_HASH:=a433cc1dedba851078276db69b0e97f9fe41e4ba3336d2971adfca4b3a6242ac
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://codeload.github.com/rvoicilas/inotify-tools/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/inotify-tools/Default
+ URL:=https://github.com/rvoicilas/inotify-tools/wiki
+endef
+
+define Package/libinotifytools
+ $(call Package/inotify-tools/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE=libinotifytools
+endef
+
+define Package/inotifywait
+ $(call Package/inotify-tools/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+libinotifytools
+ TITLE=inotifywait tool
+endef
+
+define Package/inotifywatch
+ $(call Package/inotify-tools/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+libinotifytools
+ TITLE=inotifywatch tool
+endef
+
+define Package/inotify-tools/description
+inotify-tools is a C library and a set of command-line programs for
+Linux providing a simple interface to inotify. These programs can be
+used to monitor and act upon filesystem events. A more detailed
+description of the programs is further down the page. The programs are
+written in C and have no dependencies other than a Linux kernel
+supporting inotify.
+endef
+
+define Package/inotifywait/description
+ $(call Package/inotify-tools/description)
+
+ This package provides the inotifywait tool.
+endef
+
+define Package/inotifywatch/description
+ $(call Package/inotify-tools/description)
+
+ This package provides the inotifywatch tool.
+endef
+
+define Package/libinotifytools/description
+ $(call Package/inotify-tools/description)
+
+ This package provides the libinotifytools shared library.
+endef
+
+define Package/inotifywait/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/inotifywait $(1)/usr/bin/
+endef
+
+define Package/inotifywatch/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/inotifywatch $(1)/usr/bin/
+endef
+
+define Package/libinotifytools/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/inotifytools
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/inotifytools/* $(1)/usr/include/inotifytools/
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libinotifytools))
+$(eval $(call BuildPackage,inotifywait))
+$(eval $(call BuildPackage,inotifywatch))
--- /dev/null
+From b0f77c10fc4561463b59b12cba0bfd69d7c73934 Mon Sep 17 00:00:00 2001
+From: Timo Teräs <timo.teras@iki.fi>
+Date: Tue, 10 Jan 2017 09:51:32 +0200
+Subject: [PATCH] fix aarch64 compile error due to undefined variable
+
+fixes #36
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+
+--- a/procinterrupts.c
++++ b/procinterrupts.c
+@@ -148,6 +148,9 @@ GList* collect_full_irq_list()
+ char *line = NULL;
+ size_t size = 0;
+ char *irq_name, *irq_mod, *savedptr, *last_token, *p;
++#ifdef AARCH64
++ char *tmp;
++#endif
+
+ file = fopen("/proc/interrupts", "r");
+ if (!file)
include $(TOPDIR)/rules.mk
PKG_NAME:=joe
-PKG_VERSION:=4.4
+PKG_VERSION:=4.6
PKG_RELEASE:=1
-PKG_SOURCE_URL:=@SF/joe-editor
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=a5704828bbca29acb9e200414fef522c66cdf9ce28150f402d6767da43460979
-PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=@SF/joe-editor
+PKG_HASH:=495a0a61f26404070fe8a719d80406dc7f337623788e445b92a9f6de512ab9de
+
PKG_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
PKG_LICENCE:=GPL-2.0
CATEGORY:=Utilities
SUBMENU:=Editors
TITLE:=JOE - Joes own editor
- URL:=http://sourceforge.net/projects/joe-editor/
+ URL:=https://sourceforge.net/projects/joe-editor/
DEPENDS:=+libncurses
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=klish
-PKG_VERSION:=2.1.3
-PKG_RELEASE:=2
+PKG_VERSION:=2.1.4
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://libcode.org/attachments/download/66/
+PKG_SOURCE_URL:=http://libcode.org/attachments/download/70/
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENCE
PKG_MAINTAINER:=Takashi Umeno <umeno.takashi@gmail.com>
-PKG_HASH:=70528039da9c5fdfadaea325ab6243cdabef627da0398335312e08d90ab415f8
+PKG_HASH:=a89dd1027dce713407b6d68e836c8fdead56406dcfc650da84da8e0b92c9b2e5
PKG_INSTALL:=1
TARGET_LDFLAGS += -lxml2 -lz
TARGET_CFLAGS += -D_XOPEN_SOURCE=500
-define Build/Configure
- $(call Build/Configure/Default, \
- --with-libxml2 \
- )
-endef
+CONFIGURE_ARGS += --with-libxml2
define Package/klish/install
$(INSTALL_DIR) $(1)/usr/bin
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://www.kernel.org/pub/linux/utils/kernel/kmod/
+PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kmod/
PKG_HASH:=89c1a1a2193c31f9ebe582640bfa2bd401341dc24119f5a7f702588116fadaa0
PKG_MAINTAINER:=Jeff Waugh <jdub@bethesignal.org>
PKG_LICENSE:=LGPL-2.1+
include $(TOPDIR)/rules.mk
PKG_NAME:=less
-PKG_VERSION:=487
+PKG_VERSION:=530
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.greenwoodsoftware.com/less
-PKG_HASH:=f3dc8455cb0b2b66e0c6b816c00197a71bf6d1787078adeee0bcf2aea4b12706
+PKG_HASH:=503f91ab0af4846f34f0444ab71c4b286123f0044a4964f1ae781486c617f2e2
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=logrotate
-PKG_VERSION:=3.10.0
-PKG_RELEASE:=2
+PKG_VERSION:=3.14.0
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:= https://github.com/logrotate/logrotate/releases/download/$(PKG_VERSION)
-PKG_HASH:=dbc76cae5d4912455b5221654bb6114e43d91a3a0879ce3e20a62a157532912e
+PKG_HASH:=4703bdc0e2df3b322f9dff0aafc99aa9172c9e4acae28b7c924cc7d4e5b29d55
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=lsof
-PKG_VERSION:=4.89
-PKG_RELEASE:=2
+PKG_VERSION:=4.91
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof
-PKG_HASH:=81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718
+PKG_HASH:=c9da946a525fbf82ff80090b6d1879c38df090556f3fe0e6d782cb44172450a3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=Unique
include $(INCLUDE_DIR)/package.mk
-TARGET_LDFLAGS += $(LIBRPC)
-
define Package/lsof
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS:=$(LIBRPC_DEPENDS)
+ DEPENDS:=+libtirpc
TITLE:=LiSt Open Files - a diagnostic tool
URL:=http://people.freebsd.org/~abe/
endef
LINUX_CLIB_IPV6=
endif
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
+TARGET_LDFLAGS += -ltirpc
+
define Build/Prepare
$(PKG_UNPACK)
(cd $(PKG_BUILD_DIR) && tar -xf $(PKG_NAME)_$(PKG_VERSION)_src.tar && mv $(PKG_NAME)_$(PKG_VERSION)_src/* .)
endef
define Build/Configure
+ $(SED) 's/rpc\/rpc/\/tirpc\/rpc\/rpc/g' $(PKG_BUILD_DIR)/Configure
cd $(PKG_BUILD_DIR); \
LINUX_CLIB="-DGLIBCV=2 $(LINUX_CLIB_IPV6)" \
LSOF_CC="$(TARGET_CC)" \
LSOF_CFGL="$(TARGET_LDFLAGS)" \
LSOF_AR="$(TARGET_CROSS)ar cr" \
LSOF_RANLIB="$(TARGET_CROSS)ranlib" \
+ LSOF_INCLUDE="$(STAGING_DIR)/usr/include" \
./Configure -n linux
endef
#
# Copyright (C) 2009-2010 Stefan Monnier
-# Copyright (C) 2011-2014 OpenWrt.org
+# Copyright (C) 2011-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3+.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=LVM2
-PKG_VERSION:=2.02.177
+PKG_VERSION:=2.02.181
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0 LGPL-2.1
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2/releases \
- http://ftp.gwdg.de/pub/linux/sources.redhat.com/lvm2/
-PKG_HASH:=4025a23ec9b15c2cb7486d151c29dc953b75efc4d452cfe9dbbc7c0fac8e80f2
+PKG_SOURCE_URL:=https://sourceware.org/pub/lvm2
+PKG_HASH:=400fead33b3abc2d82bd631b63f644b646e83040699f2e8f91ff5779119bb89e
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
SECTION:=libs
CATEGORY:=Libraries
TITLE:=The Linux Kernel Device Mapper userspace library
- URL:=http://sourceware.org/dm/
+ URL:=https://sourceware.org/dm/
DEPENDS:=+kmod-dm +libpthread +libuuid +librt
endef
CATEGORY:=Utilities
SUBMENU:=Disc
TITLE:=The Linux Logical Volume Manager
- URL:=http://sourceware.org/lvm2/
- DEPENDS:=+libdevmapper +libblkid +libreadline +libncurses
+ URL:=https://sourceware.org/lvm2/
+ DEPENDS:=+libdevmapper +libblkid +libreadline +libncurses +libaio
endef
define Package/lvm2/description
LVM toolset.
endef
-CONFIGURE_ARGS += --disable-o_direct
+CONFIGURE_ARGS += \
+ --disable-o_direct \
+ --with-default-pid-dir=/var/run \
+ --with-default-dm-run-dir=/var/run \
+ --with-default-run-dir=/var/run/lvm \
+ --with-default-locking-dir=/var/lock/lvm
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
--- a/make.tmpl.in
+++ b/make.tmpl.in
-@@ -19,7 +19,7 @@ SHELL = @SHELL@
+@@ -25,7 +25,7 @@ SHELL = @SHELL@
# Allow environment to override any built-in default value for CC.
# If there is a built-in default, CC is NOT set to @CC@ here.
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
-@@ -22,7 +22,7 @@
+@@ -24,7 +24,7 @@
#include <ctype.h>
#ifdef BLKID_WIPING_SUPPORT
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
-@@ -1869,7 +1869,7 @@ struct cmd_context *create_toolcontext(u
+@@ -1860,7 +1860,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
/* FIXME Make this configurable? */
reset_lvm_errno(1);
-#ifndef VALGRIND_POOL
+#if defined(__GLIBC__) && !defined(VALGRIND_POOL)
/* Set in/out stream buffering before glibc */
- if (set_buffering) {
- /* Allocate 2 buffers */
-@@ -2249,7 +2249,7 @@ void destroy_toolcontext(struct cmd_cont
+ if (set_buffering
+ #ifdef SYS_gettid
+@@ -2254,7 +2254,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
if (cmd->libmem)
dm_pool_destroy(cmd->libmem);
if (is_valid_fd(STDIN_FILENO) &&
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
-@@ -3074,6 +3074,7 @@ int lvm_split(char *str, int *argc, char
+@@ -3109,6 +3109,7 @@ int lvm_split(char *str, int *argc, char **argv, int max)
/* Make sure we have always valid filedescriptors 0,1,2 */
static int _check_standard_fds(void)
{
int err = is_valid_fd(STDERR_FILENO);
if (!is_valid_fd(STDIN_FILENO) &&
-@@ -3100,6 +3101,12 @@ static int _check_standard_fds(void)
+@@ -3135,6 +3136,12 @@ static int _check_standard_fds(void)
strerror(errno));
return 0;
}
--- a/lib/mm/memlock.c
+++ b/lib/mm/memlock.c
-@@ -174,12 +174,15 @@ static void _allocate_memory(void)
+@@ -183,12 +183,15 @@ static void _allocate_memory(void)
* memory on free(), this is good enough for our purposes.
*/
while (missing > 0) {
inf = mallinfo();
if (hblks < inf.hblks) {
-@@ -189,9 +192,12 @@ static void _allocate_memory(void)
+@@ -198,9 +201,12 @@ static void _allocate_memory(void)
free(areas[area]);
_size_malloc_tmp /= 2;
} else {
if (area == max_areas && missing > 0) {
/* Too bad. Warn the user and proceed, as things are
-@@ -480,8 +486,13 @@ static void _lock_mem(struct cmd_context
+@@ -521,8 +527,13 @@ static void _lock_mem(struct cmd_context
* will not block memory locked thread
* Note: assuming _memlock_count_daemon is updated before _memlock_count
*/
--- a/lib/device/dev-io.c
+++ b/lib/device/dev-io.c
-@@ -529,7 +529,7 @@ int dev_open_flags(struct device *dev, i
+@@ -570,7 +570,7 @@ int dev_open_flags(struct device *dev, i
return 0;
}
PKG_NAME:=lxc
PKG_VERSION:=2.1.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
--- /dev/null
+From c8f05589644d6b719e5a2c7fc548604f248be9be Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Sun, 29 Jul 2018 17:44:06 +0200
+Subject: [PATCH] nl: avoid NULL pointer dereference
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It's a valid case to call nla_put() with NULL data and 0 len. It's done e.g. in
+the nla_put_attr().
+
+There has to be a check for data in nla_put() as passing NULL to the memcpy()
+is not allowed. Even if length is 0, both pointers have to be valid.
+
+For a reference see C99 standard (7.21.1/2), it says: "pointer arguments on
+such a call shall still have valid values".
+
+Reported-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+[christian.brauner@ubuntu.com: adapted commit message]
+Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
+---
+ src/lxc/nl.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/src/lxc/nl.c
++++ b/src/lxc/nl.c
+@@ -61,7 +61,8 @@ static int nla_put(struct nlmsg *nlmsg,
+ rta = NLMSG_TAIL(nlmsg->nlmsghdr);
+ rta->rta_type = attr;
+ rta->rta_len = rtalen;
+- memcpy(RTA_DATA(rta), data, len);
++ if (data && len)
++ memcpy(RTA_DATA(rta), data, len);
+ nlmsg->nlmsghdr->nlmsg_len = tlen;
+ return 0;
+ }
--- /dev/null
+#
+# Copyright (C) 2018 Sebastian Kemper <sebastian_ml@gmx.net>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mariadb
+PKG_VERSION:=10.2.17
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL := \
+ https://mirror.netcologne.de/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
+ https://mirror.lstn.net/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
+ https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
+ https://downloads.mariadb.org/interstitial/$(PKG_NAME)-$(PKG_VERSION)/source
+
+PKG_HASH:=e7b3078f8de874a4d451242a8a3eed49bf6f916dcd52fc3efa55886f5f35be27
+PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
+PKG_LICENSE:=GPL-2.0 LGPL-2.1
+PKG_LICENSE_FILES:=COPYING libmariadb/COPYING.LIB
+
+HOST_BUILD_PARALLEL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+HOST_BUILD_DEPENDS:=libxml2/host
+# Without libevent2 tests/async_queries sporadically fails on the bots
+PKG_BUILD_DEPENDS:=libevent2 mariadb/host
+
+CMAKE_INSTALL:=1
+
+PLUGIN_DIR:=/usr/lib/mysql/plugin
+
+MARIADB_SERVER_PLUGINS := \
+ adt_null \
+ auth_0x0100 \
+ auth_ed25519 \
+ auth_socket \
+ auth_test_plugin \
+ client_ed25519 \
+ debug_key_management \
+ dialog_examples \
+ disks \
+ example_key_management \
+ feedback \
+ file_key_management \
+ ha_archive \
+ ha_blackhole \
+ ha_connect \
+ ha_example \
+ ha_federated \
+ ha_federatedx \
+ ha_sequence \
+ ha_sphinx \
+ ha_spider \
+ ha_test_sql_discovery \
+ handlersocket \
+ libdaemon_example \
+ locales \
+ metadata_lock_info \
+ mypluglib \
+ qa_auth_client \
+ qa_auth_interface \
+ qa_auth_server \
+ query_cache_info \
+ query_response_time \
+ semisync_master \
+ semisync_slave \
+ server_audit \
+ simple_password_check \
+ sql_errlog \
+ wsrep_info
+
+PKG_CONFIG_DEPENDS := \
+ $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-server-plugin-%,$(subst _,-,$(MARIADB_SERVER_PLUGINS))) \
+ CONFIG_PACKAGE_mariadb-server
+
+plugin-adt_null := PLUGIN_AUDIT_NULL
+plugin-auth_0x0100 := PLUGIN_AUTH_0X0100
+plugin-auth_ed25519 := PLUGIN_AUTH_ED25519
+plugin-auth_socket := PLUGIN_AUTH_SOCKET
+plugin-auth_test_plugin := PLUGIN_AUTH_TEST_PLUGIN
+plugin-client_ed25519 := PLUGIN_CLIENT_ED25519
+plugin-debug_key_management := PLUGIN_DEBUG_KEY_MANAGEMENT
+plugin-dialog_examples := PLUGIN_DIALOG_EXAMPLES
+plugin-disks := PLUGIN_DISKS
+plugin-example_key_management := PLUGIN_EXAMPLE_KEY_MANAGEMENT
+plugin-feedback := PLUGIN_FEEDBACK
+plugin-file_key_management := PLUGIN_FILE_KEY_MANAGEMENT
+plugin-ha_archive := PLUGIN_ARCHIVE
+plugin-ha_blackhole := PLUGIN_BLACKHOLE
+plugin-ha_connect := PLUGIN_CONNECT
+plugin-ha_example := PLUGIN_EXAMPLE
+plugin-ha_federated := PLUGIN_FEDERATED
+plugin-ha_federatedx := PLUGIN_FEDERATEDX
+plugin-ha_sequence := PLUGIN_SEQUENCE
+plugin-ha_sphinx := PLUGIN_SPHINX
+plugin-ha_spider := PLUGIN_SPIDER
+plugin-ha_test_sql_discovery := PLUGIN_TEST_SQL_DISCOVERY
+plugin-handlersocket := PLUGIN_HANDLERSOCKET
+plugin-libdaemon_example := PLUGIN_DAEMON_EXAMPLE
+plugin-locales := PLUGIN_LOCALES
+plugin-metadata_lock_info := PLUGIN_METADATA_LOCK_INFO
+plugin-mypluglib := PLUGIN_FTEXAMPLE
+plugin-qa_auth_client := PLUGIN_QA_AUTH_CLIENT
+plugin-qa_auth_interface := PLUGIN_QA_AUTH_INTERFACE
+plugin-qa_auth_server := PLUGIN_QA_AUTH_SERVER
+plugin-query_cache_info := PLUGIN_QUERY_CACHE_INFO
+plugin-query_response_time := PLUGIN_QUERY_RESPONSE_TIME
+plugin-semisync_master := PLUGIN_SEMISYNC_MASTER
+plugin-semisync_slave := PLUGIN_SEMISYNC_SLAVE
+plugin-server_audit := PLUGIN_SERVER_AUDIT
+plugin-simple_password_check := PLUGIN_SIMPLE_PASSWORD_CHECK
+plugin-sql_errlog := PLUGIN_SQL_ERRLOG
+plugin-wsrep_info := PLUGIN_WSREP_INFO
+
+MARIADB_CLIENT := \
+ mysql \
+ mysqlcheck
+
+MARIADB_CLIENT_EXTRA := \
+ mysql_find_rows \
+ mysql_waitpid \
+ mysqlaccess \
+ mysqladmin \
+ mysqldump \
+ mysqlimport \
+ mysqlshow \
+ mysqlslap \
+ mytop
+
+MARIADB_SERVER := \
+ innochecksum \
+ my_print_defaults \
+ mysql_install_db \
+ mysql_upgrade \
+ mysqld
+
+MARIADB_SERVER_EXTRA := \
+ aria* \
+ mariabackup \
+ msql2mysql \
+ myisam_ftdump \
+ myisamchk \
+ myisamlog \
+ myisampack \
+ mysql_convert_table_format \
+ mysql_fix_extensions \
+ mysql_plugin \
+ mysql_secure_installation \
+ mysql_setpermission \
+ mysql_tzinfo_to_sql \
+ mysqlbinlog \
+ mysqld_multi \
+ mysqld_safe \
+ mysqld_safe_helper \
+ mysqldumpslow \
+ mysqlhotcopy \
+ perror \
+ replace \
+ resolve_stack_dump
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+include $(INCLUDE_DIR)/nls.mk
+
+MARIADB_COMMON_DEPENDS := \
+ $(ICONV_DEPENDS) \
+ +libatomic \
+ +libopenssl \
+ +libstdcpp \
+ +zlib
+
+# Pass CPPFLAGS in the CFLAGS as otherwise the build system will
+# ignore them.
+TARGET_CFLAGS+=$(TARGET_CPPFLAGS)
+
+define Package/mariadb/install/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin
+endef
+
+define Package/mariadb/description/Default
+MariaDB is a fast, stable and true multi-user, multi-threaded SQL
+database server. SQL (Structured Query Language) is the most popular
+database query language in the world. The main goals of MariaDB are
+speed, robustness and ease of use.
+endef
+
+define Package/libmariadb
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=$(MARIADB_COMMON_DEPENDS)
+ TITLE:=MariaDB database client library
+ URL:=https://mariadb.org/
+ PROVIDES:=libmariadbclient libmysqlclient libmysqlclient-r
+endef
+
+define Package/libmariadb/description
+$(call Package/mariadb/description/Default)
+
+This package includes the client library.
+
+endef
+
+define Package/mariadb/Default
+ SECTION:=utils
+ CATEGORY:=Utilities
+ URL:=https://mariadb.org/
+ SUBMENU:=database
+endef
+
+define Package/mariadb-client
+ $(call Package/mariadb/Default)
+ TITLE:=MariaDB database core client binaries
+ DEPENDS:= \
+ $(MARIADB_COMMON_DEPENDS) \
+ +libncursesw
+endef
+
+define Package/mariadb-client/description
+$(call Package/mariadb/description/Default)
+
+This package includes the following core client binaries:
+
+$(subst $(space),$(newline),$(MARIADB_CLIENT))
+
+endef
+
+define Package/mariadb-client-extra
+ $(call Package/mariadb/Default)
+ TITLE:=MariaDB database extra client binaries
+ DEPENDS:=mariadb-client
+endef
+
+define Package/mariadb-client-extra/description
+$(call Package/mariadb/description/Default)
+
+This package includes the following extra client binaries:
+
+$(subst $(space),$(newline),$(MARIADB_CLIENT_EXTRA))
+
+endef
+
+define Package/mariadb-extra-charsets
+ $(call Package/mariadb/Default)
+ TITLE:=MariaDB database extra character sets
+ DEPENDS:=mariadb-server
+endef
+
+define Package/mariadb-extra-charsets/description
+$(call Package/mariadb/description/Default)
+
+This package contains single Byte character sets and collations that can
+be added at run time.
+
+endef
+
+define Package/mariadb-server
+ $(call Package/mariadb/Default)
+ DEPENDS:= \
+ $(MARIADB_COMMON_DEPENDS) \
+ +!arc:libaio \
+ +liblzma \
+ +libpcre \
+ +resolveip
+ TITLE:=MariaDB database core server binaries
+ MENU:=1
+ PROVIDES:=mysql-server
+ USERID:=mariadb=376:mariadb=376
+endef
+
+define Package/mariadb-server/description
+$(call Package/mariadb/description/Default)
+
+This package includes the following core server binaries:
+
+$(subst $(space),$(newline),$(MARIADB_SERVER))
+
+endef
+
+define Package/mariadb-server-extra
+ $(call Package/mariadb/Default)
+ TITLE:=MariaDB database extra server binaries
+ DEPENDS:=mariadb-server
+endef
+
+define Package/mariadb-server-extra/description
+$(call Package/mariadb/description/Default)
+
+This package includes the following extra server binaries:
+
+$(subst $(space),$(newline),$(MARIADB_SERVER_EXTRA))
+
+endef
+
+# We won't need unit tests
+CMAKE_OPTIONS += -DWITH_UNIT_TESTS=0
+
+# This value is determined automatically during straight compile by compiling
+# and running a test code. You cannot do that during cross-compile. However the
+# stack grows downward in most if not all modern systems. The only exception
+# according to buildroot is PA-RISC which is not supported by OpenWrt as far as
+# I know. Therefore it makes sense to hardcode the value. If an arch is added
+# the stack of which grows up one should expect unpredictable behavior at run
+# time.
+CMAKE_OPTIONS += -DSTACK_DIRECTION=-1
+
+# Jemalloc was added for TokuDB. Since its configure script seems somewhat broken
+# when it comes to cross-compilation we shall disable it and also disable TokuDB.
+CMAKE_OPTIONS += -DWITH_JEMALLOC=no -DWITHOUT_TOKUDB=1
+
+# Make it explicit that we are cross-compiling
+CMAKE_OPTIONS += -DCMAKE_CROSSCOMPILING=1
+
+# Explicitly disable dtrace to avoid detection of a host version
+CMAKE_OPTIONS += -DENABLE_DTRACE=0
+
+# Prevent mariadb from messing with OpenWrt's C(XX)FLAGS
+CMAKE_OPTIONS += -DSECURITY_HARDENED=OFF
+
+ifeq ($(CONFIG_PACKAGE_mariadb-server),)
+CMAKE_OPTIONS += -DWITHOUT_SERVER=ON
+else
+CMAKE_OPTIONS += -DWITHOUT_SERVER=OFF
+endif
+
+CMAKE_OPTIONS += \
+ -DCONNECT_WITH_JDBC=NO \
+ -DCONNECT_WITH_LIBXML2=system \
+ -DCONNECT_WITH_ODBC=NO \
+ -DDEFAULT_CHARSET=utf8 \
+ -DDEFAULT_COLLATION=utf8_general_ci \
+ -DDISABLE_SHARED=NO \
+ -DENABLED_PROFILING=OFF \
+ -DENABLE_STATIC_LIBS=OFF \
+ -DINSTALL_DOCDIR=share/doc/mariadb \
+ -DINSTALL_DOCREADMEDIR=share/doc/mariadb \
+ -DINSTALL_MANDIR=share/man \
+ -DINSTALL_MYSQLSHAREDIR=share/mysql \
+ -DINSTALL_MYSQLTESTDIR="" \
+ -DINSTALL_PLUGINDIR=lib/mysql/plugin \
+ -DINSTALL_SBINDIR=bin \
+ -DINSTALL_SCRIPTDIR=bin \
+ -DINSTALL_SQLBENCHDIR="" \
+ -DINSTALL_SUPPORTFILESDIR=share/mysql \
+ -DINSTALL_UNIX_ADDRDIR=/var/run/mysqld/mysqld.sock \
+ -DMYSQLD_USER=mariadb \
+ -DMYSQL_DATADIR=/var/lib/mysql \
+ -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
+ -DSKIP_TESTS=ON \
+ -DWITH_ASAN=OFF \
+ -DWITH_EMBEDDED_SERVER=OFF \
+ -DWITH_EXTRA_CHARSETS=complex \
+ -DWITH_INNODB_BZIP2=OFF \
+ -DWITH_INNODB_LZ4=OFF \
+ -DWITH_INNODB_LZMA=ON \
+ -DWITH_INNODB_LZO=OFF \
+ -DWITH_INNODB_SNAPPY=OFF \
+ -DWITH_LIBEDIT=OFF \
+ -DWITH_LIBNUMA=NO \
+ -DWITH_LIBWRAP=OFF \
+ -DWITH_LIBWSEP=OFF \
+ -DWITH_MARIABACKUP=ON \
+ -DWITH_PCRE=system \
+ -DWITH_READLINE=OFF \
+ -DWITH_SAFEMALLOC=OFF \
+ -DWITH_SSL=system \
+ -DWITH_SYSTEMD=no \
+ -DWITH_VALGRIND=OFF \
+ -DWITH_ZLIB=system
+
+# Default-disable some modules
+CMAKE_OPTIONS += \
+ -DPLUGIN_CASSANDRA=NO \
+ -DPLUGIN_MROONGA=NO \
+ -DPLUGIN_OQGRAPH=NO \
+ -DPLUGIN_ROCKSDB=NO \
+ -DPLUGIN_TOKUDB=NO \
+ -DPLUGIN_AUTH_PAM=NO \
+ -DPLUGIN_AUTH_GSSAPI=NO \
+ -DPLUGIN_AUTH_GSSAPI_CLIENT=NO \
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=NO
+
+# Help MariaDB find the correct libiconv.
+# nls.mk sets it up so that with CONFIG_BUILD_NLS libiconv-full would be used,
+# otherwise libiconv-stub (independent of the selected libc). MariaDB needs a
+# leg up to find/pick the right lib.
+CMAKE_OPTIONS += \
+ -DICONV_INCLUDE_DIR=$(ICONV_PREFIX)/include \
+ -DICONV_LIBRARIES=$(ICONV_PREFIX)/lib/libiconv.$(if $(CONFIG_BUILD_NLS),so,a)
+
+CMAKE_OPTIONS += \
+ $(foreach p,$(MARIADB_SERVER_PLUGINS),-D$(plugin-$(p))=$(if $(CONFIG_PACKAGE_$(PKG_NAME)-server-plugin-$(subst _,-,$(p))),DYNAMIC,NO))
+
+# Set CMAKE_FIND_ROOT_PATH_MODE_INCLUDE and CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
+# to BOTH as otherwise the host build will not find some required dependencies
+# installed on the host machine, like ncurses.
+#
+# Add "$(STAGING_DIR_HOSTPKG)/lib" to the RPATH of the host helpers,
+# otherwise they might not find the location of a library at run time.
+CMAKE_HOST_OPTIONS += \
+ -DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE \
+ -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH \
+ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \
+ -DCMAKE_INSTALL_RPATH="$(STAGING_DIR_HOSTPKG)/lib" \
+ -DCMAKE_SKIP_RPATH=FALSE \
+ -DWITHOUT_SERVER=OFF \
+ -DWITHOUT_TOKUDB=1
+
+# Some helpers must be compiled for host in order to crosscompile mariadb for
+# the target. They are then included by import_executables.cmake which is
+# generated during the build of the host helpers. It is not necessary to build
+# the whole host package, only the "import_executables" target.
+# -DIMPORT_EXECUTABLES=$(HOST_BUILD_DIR)/import_executables.cmake
+# must then be passed to cmake during target build.
+# See also https://mariadb.com/kb/en/mariadb/cross-compiling-mariadb/
+
+CMAKE_OPTIONS += -DIMPORT_EXECUTABLES=$(STAGING_DIR_HOSTPKG)/share/mariadb/import_executables.cmake
+
+define Host/Compile
+ $(call Host/Compile/Default,import_executables)
+endef
+
+define Host/Install
+ $(SED) 's|$(HOST_BUILD_DIR)|$(STAGING_DIR_HOSTPKG)/share/mariadb|' $(HOST_BUILD_DIR)/import_executables.cmake
+ $(INSTALL_DIR) $(1)/share/mariadb/{dbug,extra,scripts,sql}
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/dbug/factorial $(1)/share/mariadb/dbug
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/extra/comp_err $(1)/share/mariadb/extra
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/scripts/comp_sql $(1)/share/mariadb/scripts
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/sql/{gen_lex_hash,gen_lex_token} $(1)/share/mariadb/sql
+ $(INSTALL_DATA) $(HOST_BUILD_DIR)/import_executables.cmake $(1)/share/mariadb
+endef
+
+# LIBICONV_PLUG is used in GNU's libiconv for redefinition of exports [e.g.
+# from libiconv_open() to iconv_open()]. But in OpenWrt this variable is not set
+# when building libiconv-full. So when mariadb sets LIBICONV_PLUG it expects
+# iconv_open() to be available for example, which is not the case - only
+# libiconv_open() is. To address this prevent the variable from being set.
+# libiconv-stub does not use this variable, so there is no harm in always doing
+# this.
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ $(SED) '/ADD_DEFINITIONS(-DLIBICONV_PLUG)/d' $(PKG_BUILD_DIR)/libmariadb/libmariadb/CMakeLists.txt
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib/mysql $(1)/usr/lib/pkgconfig $(1)/usr/share/aclocal
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(1)/usr/bin
+ $(LN) $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{mariadb,mysqlclient}*.so* $(1)/usr/lib
+ cd $(1)/usr/lib/mysql; $(LN) ../lib{mariadb,mysqlclient}*.so* .
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/mariadb.pc $(1)/usr/lib/pkgconfig
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/mysql.m4 $(1)/usr/share/aclocal
+endef
+
+define Package/libmariadb/install
+ $(INSTALL_DIR) $(1)$(PLUGIN_DIR)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{mariadb,mysqlclient}*.so* $(1)/usr/lib
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/dialog.so $(1)$(PLUGIN_DIR)
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/mysql_clear_password.so $(1)$(PLUGIN_DIR)
+endef
+
+define Package/mariadb-client/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(foreach b,$(MARIADB_CLIENT),$(call Package/mariadb/install/bin,$(1),$(b));)
+ # Install convenience links for mysqlcheck multi-call binary
+ cd $(1)/usr/bin; $(LN) mysqlcheck mysqlanalyze
+ cd $(1)/usr/bin; $(LN) mysqlcheck mysqlrepair
+ cd $(1)/usr/bin; $(LN) mysqlcheck mysqloptimize
+endef
+
+define Package/mariadb-client-extra/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(foreach b,$(MARIADB_CLIENT_EXTRA),$(call Package/mariadb/install/bin,$(1),$(b));)
+endef
+
+define Package/mariadb-extra-charsets/install
+ $(INSTALL_DIR) $(1)/usr/share/mysql/charsets
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/charsets/* $(1)/usr/share/mysql/charsets
+endef
+
+define Package/mariadb-server/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(foreach b,$(MARIADB_SERVER),$(call Package/mariadb/install/bin,$(1),$(b));)
+ $(INSTALL_DIR) $(1)/etc/default
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_DIR) $(1)/etc/mysql/conf.d
+ $(INSTALL_BIN) files/mysqld.init $(1)/etc/init.d/mysqld
+ $(INSTALL_CONF) conf/my.cnf $(1)/etc/mysql
+ $(INSTALL_CONF) conf/mysqld.default $(1)/etc/default/mysqld
+ $(INSTALL_DIR) $(1)$(PLUGIN_DIR)
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/daemon_example.ini $(1)$(PLUGIN_DIR)
+ $(INSTALL_DIR) $(1)/usr/share/mysql/english
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/english/errmsg.sys $(1)/usr/share/mysql/english
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/fill_help_tables.sql $(1)/usr/share/mysql
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/maria_add_gis_sp_bootstrap.sql $(1)/usr/share/mysql
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_performance_tables.sql $(1)/usr/share/mysql
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables.sql $(1)/usr/share/mysql
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables_data.sql $(1)/usr/share/mysql
+endef
+
+define Package/mariadb-server-extra/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(foreach b,$(MARIADB_SERVER_EXTRA),$(call Package/mariadb/install/bin,$(1),$(b));)
+endef
+
+define Package/mariadb-server/conffiles
+/etc/default/mysqld
+/etc/mysql/my.cnf
+$(PLUGIN_DIR)/daemon_example.ini
+endef
+
+define BuildPlugin
+ define Package/$(PKG_NAME)-server-plugin-$(subst _,-,$(1))
+ $$(call Package/mariadb/Default)
+ TITLE:=MariaDB database plugin
+ DEPENDS:=mariadb-server $(patsubst +%,+PACKAGE_$(PKG_NAME)-server-plugin-$(subst _,-,$(1)):%,$(2))
+ endef
+ define Package/$(PKG_NAME)-server-plugin-$(subst _,-,$(1))/description
+ $$(call Package/mariadb/description/Default)
+
+This package provides the $(1) plugin.
+
+ endef
+ define Package/$(PKG_NAME)-server-plugin-$(subst _,-,$(1))/install
+ $(INSTALL_DIR) $$(1)$(PLUGIN_DIR)
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/$(1).so \
+ $$(1)$(PLUGIN_DIR)
+ endef
+ $$(eval $$(call BuildPackage,$(PKG_NAME)-server-plugin-$(subst _,-,$(1))))
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,libmariadb))
+$(eval $(call BuildPackage,mariadb-client))
+$(eval $(call BuildPackage,mariadb-client-extra))
+$(eval $(call BuildPackage,mariadb-extra-charsets))
+$(eval $(call BuildPackage,mariadb-server))
+$(eval $(call BuildPackage,mariadb-server-extra))
+
+$(eval $(call BuildPlugin,adt_null,))
+$(eval $(call BuildPlugin,auth_0x0100,))
+$(eval $(call BuildPlugin,auth_ed25519,))
+$(eval $(call BuildPlugin,auth_socket,))
+$(eval $(call BuildPlugin,auth_test_plugin,))
+$(eval $(call BuildPlugin,client_ed25519,))
+$(eval $(call BuildPlugin,debug_key_management,))
+$(eval $(call BuildPlugin,dialog_examples,))
+$(eval $(call BuildPlugin,disks,))
+$(eval $(call BuildPlugin,example_key_management,))
+$(eval $(call BuildPlugin,feedback,))
+$(eval $(call BuildPlugin,file_key_management,))
+$(eval $(call BuildPlugin,ha_archive,))
+$(eval $(call BuildPlugin,ha_blackhole,))
+$(eval $(call BuildPlugin,ha_connect,+libxml2))
+$(eval $(call BuildPlugin,ha_example,))
+$(eval $(call BuildPlugin,ha_federated,))
+$(eval $(call BuildPlugin,ha_federatedx,))
+$(eval $(call BuildPlugin,ha_sequence,))
+$(eval $(call BuildPlugin,ha_sphinx,))
+$(eval $(call BuildPlugin,ha_spider,))
+$(eval $(call BuildPlugin,ha_test_sql_discovery,))
+$(eval $(call BuildPlugin,handlersocket,))
+$(eval $(call BuildPlugin,libdaemon_example,))
+$(eval $(call BuildPlugin,locales,))
+$(eval $(call BuildPlugin,metadata_lock_info,))
+$(eval $(call BuildPlugin,mypluglib,))
+$(eval $(call BuildPlugin,qa_auth_client,))
+$(eval $(call BuildPlugin,qa_auth_interface,))
+$(eval $(call BuildPlugin,qa_auth_server,))
+$(eval $(call BuildPlugin,query_cache_info,))
+$(eval $(call BuildPlugin,query_response_time,))
+$(eval $(call BuildPlugin,semisync_master,))
+$(eval $(call BuildPlugin,semisync_slave,))
+$(eval $(call BuildPlugin,server_audit,))
+$(eval $(call BuildPlugin,simple_password_check,))
+$(eval $(call BuildPlugin,sql_errlog,))
+$(eval $(call BuildPlugin,wsrep_info,))
--- /dev/null
+[client]
+port = 3306
+socket = /var/run/mysqld/mysqld.sock
+
+[mysqld]
+user = mariadb
+socket = /var/run/mysqld/mysqld.sock
+port = 3306
+basedir = /usr
+
+############ Don't put this on the NAND #############
+# Figure out where you are going to put the databases
+# And run mysql_install_db --force
+datadir = /mnt/data/mysql/
+
+######### This should also not go on the NAND #######
+tmpdir = /mnt/data/tmp/
+
+skip-external-locking
+
+bind-address = 127.0.0.1
+
+# Fine Tuning
+key_buffer_size = 16M
+max_allowed_packet = 16M
+thread_stack = 192K
+thread_cache_size = 8
+
+# Here you can see queries with especially long duration
+#log_slow_queries = /var/log/mysql/mysql-slow.log
+#long_query_time = 2
+#log-queries-not-using-indexes
+
+# The following can be used as easy to replay backup logs or for replication.
+#server-id = 1
+#log_bin = /var/log/mysql/mysql-bin.log
+#expire_logs_days = 10
+#max_binlog_size = 100M
+#binlog_do_db = include_database_name
+#binlog_ignore_db = include_database_name
+
+
+[mysqldump]
+quick
+quote-names
+max_allowed_packet = 16M
+
+[mysql]
+#no-auto-rehash # faster start of mysql but no tab completition
+
+[isamchk]
+key_buffer = 16M
+
+
--- /dev/null
+# The user and group that will run the MySQL server. The user mariadb is
+# automatically created by the mariadb-server package, hence that is the
+# default choice.
+
+#MY_USER=mariadb
+#MY_GROUP=mariadb
+
+# Additional arguments you want to pass to the MySQL server.
+
+#MY_ARGS=""
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010-2018 OpenWrt.org
+
+START=95
+STOP=10
+
+USE_PROCD=1
+
+#PROCD_DEBUG=1
+
+MYSQLD=mysqld
+
+DEFAULT=/etc/default/$MYSQLD
+LOGGER="/usr/bin/logger -p user.err -s -t $MYSQLD"
+PROG=/usr/bin/$MYSQLD
+
+unset MY_ARGS MY_GROUP MY_USER
+
+[ -f $DEFAULT ] && . $DEFAULT
+
+my_user="${MY_USER:-mariadb}"
+my_group="${MY_GROUP:-mariadb}"
+
+start_service() {
+ local conf='/etc/mysql/my.cnf'
+ local datadir="$( sed -nE "s/^\s*datadir\s*=\s*('([^']*)'|\x22([^\x22]*)\x22|(.*\S))\s*$/\2\3\4/p" "$conf" )"
+
+ [ -d "$datadir" ] || {
+ $LOGGER "datadir '$datadir' in '$conf' does not exist"
+ return 1
+ }
+
+ [ -f "$datadir/mysql/tables_priv.MYD" ] || {
+ $LOGGER "cannot detect privileges table, you might need to"
+ $LOGGER "run 'mysql_install_db --force' to initialize the system tables"
+ return 1
+ }
+
+ mkdir -p /var/lib/mysql
+ chown "$my_user":"$my_group" /var/lib/mysql
+
+ mkdir -p /var/run/mysqld
+ chown "$my_user":"$my_group" /var/run/mysqld
+
+ procd_open_instance
+
+ procd_set_param command $PROG $MY_ARGS
+ procd_set_param pidfile /var/run/mysqld.pid
+ # forward stderr to logd
+ procd_set_param stderr 1
+
+ procd_close_instance
+}
--- /dev/null
+--- a/scripts/mysql_install_db.sh
++++ b/scripts/mysql_install_db.sh
+@@ -388,7 +388,7 @@ fi
+
+
+ # Try to determine the hostname
+-hostname=`@HOSTNAME@`
++hostname=`cat /proc/sys/kernel/hostname`
+
+ # Check if hostname is valid
+ if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0
--- /dev/null
+--- a/cmake/pcre.cmake
++++ b/cmake/pcre.cmake
+@@ -14,6 +14,8 @@ MACRO (CHECK_PCRE)
+ return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256;
+ }" PCRE_STACK_SIZE_OK)
+ SET(CMAKE_REQUIRED_LIBRARIES)
++ ELSE()
++ SET(PCRE_STACK_SIZE_OK TRUE)
+ ENDIF()
+ ENDIF()
+ IF(NOT HAVE_PCRE_STACK_GUARD OR NOT PCRE_STACK_SIZE_OK OR
--- /dev/null
+--- a/configure.cmake
++++ b/configure.cmake
+@@ -1018,9 +1018,12 @@ CHECK_STRUCT_HAS_MEMBER("struct sockaddr
+
+ SET(CMAKE_EXTRA_INCLUDE_FILES)
+
+-CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H)
+-IF(NOT HAVE_UCONTEXT_H)
+- CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_H)
++CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_HEADER)
++IF(NOT HAVE_UCONTEXT_HEADER)
++ CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_HEADER)
++ENDIF()
++IF(HAVE_UCONTEXT_HEADER)
++ CHECK_FUNCTION_EXISTS(makecontext HAVE_UCONTEXT_H)
+ ENDIF()
+ IF(HAVE_UCONTEXT_H)
+ CHECK_FUNCTION_EXISTS(makecontext HAVE_UCONTEXT_H)
--- /dev/null
+Description: Fix mips missing atomics primitives
+ On mips we don't have native support for 64bit atomic operations. Make use
+ of libatomic to emulate them.
+Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
+
+--- a/configure.cmake
++++ b/configure.cmake
+@@ -128,7 +128,7 @@ IF(UNIX)
+ ENDIF()
+ FIND_PACKAGE(Threads)
+
+- SET(CMAKE_REQUIRED_LIBRARIES
++ LIST(APPEND CMAKE_REQUIRED_LIBRARIES
+ ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO})
+ # Need explicit pthread for gcc -fsanitize=address
+ IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
+@@ -952,7 +952,26 @@ ELSEIF(NOT WITH_ATOMIC_OPS)
+ long long int *ptr= &var;
+ return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
+ }"
+- HAVE_GCC_C11_ATOMICS)
++ HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
++ IF(HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
++ SET(HAVE_GCC_C11_ATOMICS True)
++ ELSE()
++ SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
++ LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
++ CHECK_CXX_SOURCE_COMPILES("
++ int main()
++ {
++ long long int var= 1;
++ long long int *ptr= &var;
++ return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
++ }"
++ HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ SET(HAVE_GCC_C11_ATOMICS True)
++ ELSE()
++ SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
++ ENDIF()
++ ENDIF()
+ ELSE()
+ MESSAGE(FATAL_ERROR "${WITH_ATOMIC_OPS} is not a valid value for WITH_ATOMIC_OPS!")
+ ENDIF()
+--- a/include/atomic/gcc_builtins.h
++++ b/include/atomic/gcc_builtins.h
+@@ -16,6 +16,7 @@
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
++#if defined (HAVE_GCC_ATOMIC_BUILTINS)
+ #define make_atomic_add_body(S) \
+ v= __sync_fetch_and_add(a, v);
+ #define make_atomic_fas_body(S) \
+@@ -26,6 +27,20 @@
+ sav= __sync_val_compare_and_swap(a, cmp_val, set);\
+ if (!(ret= (sav == cmp_val))) *cmp= sav
+
++#elif defined(HAVE_GCC_C11_ATOMICS)
++
++#define make_atomic_add_body(S) \
++ v= __atomic_fetch_add(a, v, __ATOMIC_SEQ_CST)
++#define make_atomic_fas_body(S) \
++ v= __atomic_exchange_n(a, v, __ATOMIC_SEQ_CST)
++#define make_atomic_cas_body(S) \
++ int ## S sav; \
++ ret= __atomic_compare_exchange_n(a, cmp, set, \
++ 0, \
++ __ATOMIC_SEQ_CST,\
++ __ATOMIC_SEQ_CST);
++#endif
++
+ #ifdef MY_ATOMIC_MODE_DUMMY
+ #define make_atomic_load_body(S) ret= *a
+ #define make_atomic_store_body(S) *a= v
+--- a/mysys/CMakeLists.txt
++++ b/mysys/CMakeLists.txt
+@@ -80,6 +80,10 @@ IF(HAVE_BFD_H)
+ TARGET_LINK_LIBRARIES(mysys bfd)
+ ENDIF(HAVE_BFD_H)
+
++IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ TARGET_LINK_LIBRARIES(mysys atomic)
++ENDIF()
++
+ IF (WIN32)
+ TARGET_LINK_LIBRARIES(mysys IPHLPAPI)
+ ENDIF(WIN32)
+--- a/sql/CMakeLists.txt
++++ b/sql/CMakeLists.txt
+@@ -170,6 +170,10 @@ TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATI
+ ${SSL_LIBRARIES}
+ ${LIBSYSTEMD})
+
++IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ TARGET_LINK_LIBRARIES(sql atomic)
++ENDIF()
++
+ IF(WIN32)
+ SET(MYSQLD_SOURCE main.cc nt_servc.cc message.rc)
+ TARGET_LINK_LIBRARIES(sql psapi)
+--- a/include/my_atomic.h
++++ b/include/my_atomic.h
+@@ -126,7 +126,7 @@
+ #include "atomic/generic-msvc.h"
+ #elif defined(HAVE_SOLARIS_ATOMIC)
+ #include "atomic/solaris.h"
+-#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
++#elif defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_C11_ATOMICS)
+ #include "atomic/gcc_builtins.h"
+ #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ #include "atomic/x86-gcc.h"
--- /dev/null
+Description: Handle unaligned buffers in connect's TYPBLK class
+ On MIPS platforms (and probably others) unaligned memory access results in a
+ bus error. In the connect storage engine, block data for some data formats is
+ stored packed in memory and the TYPBLK class is used to read values from it.
+ Since TYPBLK does not have special handling for this packed memory, it can
+ quite easily result in unaligned memory accesses.
+ .
+ The simple way to fix this is to perform all accesses to the main buffer
+ through memcpy. With GCC and optimizations turned on, this call to memcpy is
+ completely optimized away on architectures where unaligned accesses are ok
+ (like x86).
+Author: James Cowgill <jcowgill@debian.org>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/storage/connect/valblk.h
++++ b/storage/connect/valblk.h
+@@ -139,6 +139,7 @@ class VALBLK : public BLOCK {
+ int Prec; // Precision of float values
+ }; // end of class VALBLK
+
++
+ /***********************************************************************/
+ /* Class TYPBLK: represents a block of typed values. */
+ /***********************************************************************/
+@@ -151,40 +152,41 @@ class TYPBLK : public VALBLK {
+ // Implementation
+ virtual bool Init(PGLOBAL g, bool check);
+ virtual int GetVlen(void) {return sizeof(TYPE);}
+- virtual char GetTinyValue(int n) {return (char)Typp[n];}
+- virtual uchar GetUTinyValue(int n) {return (uchar)Typp[n];}
+- virtual short GetShortValue(int n) {return (short)Typp[n];}
+- virtual ushort GetUShortValue(int n) {return (ushort)Typp[n];}
+- virtual int GetIntValue(int n) {return (int)Typp[n];}
+- virtual uint GetUIntValue(int n) {return (uint)Typp[n];}
+- virtual longlong GetBigintValue(int n) {return (longlong)Typp[n];}
+- virtual ulonglong GetUBigintValue(int n) {return (ulonglong)Typp[n];}
+- virtual double GetFloatValue(int n) {return (double)Typp[n];}
++
++ virtual char GetTinyValue(int n) {return (char)UnalignedRead(n);}
++ virtual uchar GetUTinyValue(int n) {return (uchar)UnalignedRead(n);}
++ virtual short GetShortValue(int n) {return (short)UnalignedRead(n);}
++ virtual ushort GetUShortValue(int n) {return (ushort)UnalignedRead(n);}
++ virtual int GetIntValue(int n) {return (int)UnalignedRead(n);}
++ virtual uint GetUIntValue(int n) {return (uint)UnalignedRead(n);}
++ virtual longlong GetBigintValue(int n) {return (longlong)UnalignedRead(n);}
++ virtual ulonglong GetUBigintValue(int n) {return (ulonglong)UnalignedRead(n);}
++ virtual double GetFloatValue(int n) {return (double)UnalignedRead(n);}
+ virtual char *GetCharString(char *p, int n);
+- virtual void Reset(int n) {Typp[n] = 0;}
++ virtual void Reset(int n) {UnalignedWrite(n, 0);}
+
+ // Methods
+ using VALBLK::SetValue;
+ virtual void SetValue(PCSZ sp, int n);
+ virtual void SetValue(const char *sp, uint len, int n);
+ virtual void SetValue(short sval, int n)
+- {Typp[n] = (TYPE)sval; SetNull(n, false);}
++ {UnalignedWrite(n, (TYPE)sval); SetNull(n, false);}
+ virtual void SetValue(ushort sval, int n)
+- {Typp[n] = (TYPE)sval; SetNull(n, false);}
++ {UnalignedWrite(n, (TYPE)sval); SetNull(n, false);}
+ virtual void SetValue(int lval, int n)
+- {Typp[n] = (TYPE)lval; SetNull(n, false);}
++ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
+ virtual void SetValue(uint lval, int n)
+- {Typp[n] = (TYPE)lval; SetNull(n, false);}
++ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
+ virtual void SetValue(longlong lval, int n)
+- {Typp[n] = (TYPE)lval; SetNull(n, false);}
++ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
+ virtual void SetValue(ulonglong lval, int n)
+- {Typp[n] = (TYPE)lval; SetNull(n, false);}
++ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
+ virtual void SetValue(double fval, int n)
+- {Typp[n] = (TYPE)fval; SetNull(n, false);}
++ {UnalignedWrite(n, (TYPE)fval); SetNull(n, false);}
+ virtual void SetValue(char cval, int n)
+- {Typp[n] = (TYPE)cval; SetNull(n, false);}
++ {UnalignedWrite(n, (TYPE)cval); SetNull(n, false);}
+ virtual void SetValue(uchar cval, int n)
+- {Typp[n] = (TYPE)cval; SetNull(n, false);}
++ {UnalignedWrite(n, (TYPE)cval); SetNull(n, false);}
+ virtual void SetValue(PVAL valp, int n);
+ virtual void SetValue(PVBLK pv, int n1, int n2);
+ virtual void SetMin(PVAL valp, int n);
+@@ -206,6 +208,17 @@ class TYPBLK : public VALBLK {
+ // Members
+ TYPE* const &Typp;
+ const char *Fmt;
++
++ // Unaligned access
++ TYPE UnalignedRead(int n) const {
++ TYPE result;
++ memcpy(&result, Typp + n, sizeof(TYPE));
++ return result;
++ }
++
++ void UnalignedWrite(int n, TYPE value) {
++ memcpy(Typp + n, &value, sizeof(TYPE));
++ }
+ }; // end of class TYPBLK
+
+ /***********************************************************************/
+--- a/storage/connect/valblk.cpp
++++ b/storage/connect/valblk.cpp
+@@ -266,14 +266,14 @@ bool TYPBLK<TYPE>::Init(PGLOBAL g, bool
+ template <class TYPE>
+ char *TYPBLK<TYPE>::GetCharString(char *p, int n)
+ {
+- sprintf(p, Fmt, Typp[n]);
++ sprintf(p, Fmt, UnalignedRead(n));
+ return p;
+ } // end of GetCharString
+
+ template <>
+ char *TYPBLK<double>::GetCharString(char *p, int n)
+ {
+- sprintf(p, Fmt, Prec, Typp[n]);
++ sprintf(p, Fmt, Prec, UnalignedRead(n));
+ return p;
+ } // end of GetCharString
+
+@@ -289,7 +289,7 @@ void TYPBLK<TYPE>::SetValue(PVAL valp, i
+ ChkTyp(valp);
+
+ if (!(b = valp->IsNull()))
+- Typp[n] = GetTypedValue(valp);
++ UnalignedWrite(n, GetTypedValue(valp));
+ else
+ Reset(n);
+
+@@ -351,9 +351,9 @@ void TYPBLK<TYPE>::SetValue(PCSZ p, int
+ ulonglong val = CharToNumber(p, strlen(p), maxval, Unsigned, &minus);
+
+ if (minus && val < maxval)
+- Typp[n] = (TYPE)(-(signed)val);
++ UnalignedWrite(n, (TYPE)(-(signed)val));
+ else
+- Typp[n] = (TYPE)val;
++ UnalignedWrite(n, (TYPE)val);
+
+ SetNull(n, false);
+ } // end of SetValue
+@@ -396,7 +396,7 @@ void TYPBLK<double>::SetValue(PCSZ p, in
+ throw Type;
+ } // endif Check
+
+- Typp[n] = atof(p);
++ UnalignedWrite(n, atof(p));
+ SetNull(n, false);
+ } // end of SetValue
+
+@@ -428,7 +428,7 @@ void TYPBLK<TYPE>::SetValue(PVBLK pv, in
+ ChkTyp(pv);
+
+ if (!(b = pv->IsNull(n2) && Nullable))
+- Typp[n1] = GetTypedValue(pv, n2);
++ UnalignedWrite(n1, GetTypedValue(pv, n2));
+ else
+ Reset(n1);
+
+@@ -479,10 +479,10 @@ void TYPBLK<TYPE>::SetMin(PVAL valp, int
+ {
+ CheckParms(valp, n)
+ TYPE tval = GetTypedValue(valp);
+- TYPE& tmin = Typp[n];
++ TYPE tmin = UnalignedRead(n);
+
+ if (tval < tmin)
+- tmin = tval;
++ UnalignedWrite(n, tval);
+
+ } // end of SetMin
+
+@@ -494,10 +494,10 @@ void TYPBLK<TYPE>::SetMax(PVAL valp, int
+ {
+ CheckParms(valp, n)
+ TYPE tval = GetTypedValue(valp);
+- TYPE& tmin = Typp[n];
++ TYPE tmin = UnalignedRead(n);
+
+ if (tval > tmin)
+- tmin = tval;
++ UnalignedWrite(n, tval);
+
+ } // end of SetMax
+
+@@ -511,8 +511,7 @@ void TYPBLK<TYPE>::SetValues(PVBLK pv, i
+ CheckType(pv)
+ TYPE *lp = ((TYPBLK*)pv)->Typp;
+
+- for (register int i = k; i < n; i++) // TODO
+- Typp[i] = lp[i];
++ memcpy(Typp + k, lp + k, sizeof(TYPE) * n);
+
+ } // end of SetValues
+ #endif // 0
+@@ -523,7 +522,7 @@ void TYPBLK<TYPE>::SetValues(PVBLK pv, i
+ template <class TYPE>
+ void TYPBLK<TYPE>::Move(int i, int j)
+ {
+- Typp[j] = Typp[i];
++ UnalignedWrite(j, UnalignedRead(i));
+ MoveNull(i, j);
+ } // end of Move
+
+@@ -537,7 +536,7 @@ int TYPBLK<TYPE>::CompVal(PVAL vp, int n
+ ChkIndx(n);
+ ChkTyp(vp);
+ #endif // _DEBUG
+- TYPE mlv = Typp[n];
++ TYPE mlv = UnalignedRead(n);
+ TYPE vlv = GetTypedValue(vp);
+
+ return (vlv > mlv) ? 1 : (vlv < mlv) ? (-1) : 0;
+@@ -549,8 +548,8 @@ int TYPBLK<TYPE>::CompVal(PVAL vp, int n
+ template <class TYPE>
+ int TYPBLK<TYPE>::CompVal(int i1, int i2)
+ {
+- TYPE lv1 = Typp[i1];
+- TYPE lv2 = Typp[i2];
++ TYPE lv1 = UnalignedRead(i1);
++ TYPE lv2 = UnalignedRead(i2);
+
+ return (lv1 > lv2) ? 1 : (lv1 < lv2) ? (-1) : 0;
+ } // end of CompVal
+@@ -587,7 +586,7 @@ int TYPBLK<TYPE>::Find(PVAL vp)
+ TYPE n = GetTypedValue(vp);
+
+ for (i = 0; i < Nval; i++)
+- if (n == Typp[i])
++ if (n == UnalignedRead(i))
+ break;
+
+ return (i < Nval) ? i : (-1);
+@@ -603,7 +602,7 @@ int TYPBLK<TYPE>::GetMaxLength(void)
+ int i, n, m;
+
+ for (i = n = 0; i < Nval; i++) {
+- m = sprintf(buf, Fmt, Typp[i]);
++ m = sprintf(buf, Fmt, UnalignedRead(i));
+ n = MY_MAX(n, m);
+ } // endfor i
+
+@@ -1333,7 +1332,7 @@ char *DATBLK::GetCharString(char *p, int
+ char *vp;
+
+ if (Dvalp) {
+- Dvalp->SetValue(Typp[n]);
++ Dvalp->SetValue(UnalignedRead(n));
+ vp = Dvalp->GetCharString(p);
+ } else
+ vp = TYPBLK<int>::GetCharString(p, n);
+@@ -1349,7 +1348,7 @@ void DATBLK::SetValue(PCSZ p, int n)
+ if (Dvalp) {
+ // Decode the string according to format
+ Dvalp->SetValue_psz(p);
+- Typp[n] = Dvalp->GetIntValue();
++ UnalignedWrite(n, Dvalp->GetIntValue());
+ } else
+ TYPBLK<int>::SetValue(p, n);
+
--- /dev/null
+Description: Fix DEFAULT_MACHINE on mips
+ The DEFAULT_MACHINE constant is calculated from the CMAKE_SYSTEM_PROCESSOR
+ variable which contains the processor which built mariadb. Since most Debian
+ buildds run on 64-bit hardware even though they build 32-bit binaries,
+ DEFAULT_MACHINE previously contained "mips64" on 32-bit builds. This confuses
+ some mroonga tests which rely on DEFAULT_MACHINE to detect 64-bitness.
+ .
+ This patch fixes the value of DEFAULT_MACHINE so it always contains just "mips"
+ on 32-bit mips builds.
+Author: James Cowgill <jcowgill@debian.org>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- mariadb-10.1.orig/cmake/package_name.cmake
++++ mariadb-10.1/cmake/package_name.cmake
+@@ -34,6 +34,10 @@ IF(NOT VERSION)
+ SET(DEFAULT_MACHINE "mips")
+ ENDIF()
+
++ IF(NOT 64BIT AND CMAKE_SYSTEM_PROCESSOR MATCHES "^mips64")
++ SET(DEFAULT_MACHINE "mips")
++ ENDIF()
++
+ IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
+ SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 0)
+ SET(DEFAULT_PLATFORM "win")
--- /dev/null
+From f5cf70d9d1dc7f4cbeffb7fb75cbbe08720e3873 Mon Sep 17 00:00:00 2001
+From: Gustavo Romero <gromero@br.ibm.com>
+Date: Sun, 26 Mar 2017 15:08:15 +0000
+Subject: [PATCH] Remove dependency on glibc on PPC
+
+Remove dependency on glibc by using gcc builtin function and no glibc
+wrappers.
+
+Currently there are no surrogates in musl for:
+
+ __ppc_get_timebase()
+ __ppc_set_ppr_low()
+ __ppc_set_ppr_med()
+
+however glibc __ppc_get_timebase() is just a wrapper for GCC builtin
+__builtin_get_timebase() available since GCC 4.8 [1], so assuming that
+aports on ppc64le will never be built using GCC < 4.8 we can just
+switch directly to the GCC builtin function.
+
+Also __ppc_set_ppr_{low,med}() are not available on musl but both
+are simple glibc wrappers on a single asm instruction, hence there
+is no harm in using asm directly instead. Actually, using asm
+directly was the first solution adopted in MariaDB [2].
+
+[1] https://goo.gl/jxLV6O
+[2] https://goo.gl/9bjuVC
+
+--- a/storage/xtradb/include/ut0ut.h
++++ b/storage/xtradb/include/ut0ut.h
+@@ -85,9 +85,8 @@ private:
+ the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
+ independent way by using YieldProcessor. */
+ # define UT_RELAX_CPU() YieldProcessor()
+-# elif defined(__powerpc__) && defined __GLIBC__
+-#include <sys/platform/ppc.h>
+-# define UT_RELAX_CPU() __ppc_get_timebase()
++# elif defined(__powerpc__)
++# define UT_RELAX_CPU() __builtin_ppc_get_timebase()
+ # else
+ # define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */
+ # endif
+@@ -101,9 +100,8 @@ private:
+ #endif
+
+ # if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
+-#include <sys/platform/ppc.h>
+-# define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low()
+-# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med()
++# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1")
++# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2")
+ # else
+ # define UT_LOW_PRIORITY_CPU() ((void)0)
+ # define UT_RESUME_PRIORITY_CPU() ((void)0)
+--- a/storage/innobase/include/ut0ut.h
++++ b/storage/innobase/include/ut0ut.h
+@@ -70,9 +70,8 @@ typedef time_t ib_time_t;
+ the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
+ independent way by using YieldProcessor. */
+ # define UT_RELAX_CPU() YieldProcessor()
+-#elif defined(__powerpc__) && defined __GLIBC__
+-# include <sys/platform/ppc.h>
+-# define UT_RELAX_CPU() __ppc_get_timebase()
++#elif defined(__powerpc__)
++# define UT_RELAX_CPU() __builtin_ppc_get_timebase()
+ #else
+ # define UT_RELAX_CPU() do { \
+ volatile int32 volatile_var; \
+@@ -90,9 +89,8 @@ typedef time_t ib_time_t;
+ #endif
+
+ #if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
+-# include <sys/platform/ppc.h>
+-# define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low()
+-# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med()
++# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1")
++# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2")
+ #else
+ # define UT_LOW_PRIORITY_CPU() ((void)0)
+ # define UT_RESUME_PRIORITY_CPU() ((void)0)
config MC_VFS
bool "Enable virtual filesystem support"
- default n
+ default y
help
This option enables the Virtual File System switch code to get
transparent access to the following file systems:
- cpio, tar, fish, sfs, ftp, sftp, extfs, smb.
- Disabled by default.
+ cpio, tar, fish, sfs, ftp, sftp, extfs.
+ Enabled by default.
endmenu
include $(TOPDIR)/rules.mk
PKG_NAME:=mc
-PKG_VERSION:=4.8.20
-PKG_RELEASE:=2
+PKG_VERSION:=4.8.21
+PKG_RELEASE:=3
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
PKG_LICENSE:=GPL-3.0+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
-PKG_HASH:=017ee7f4f8ae420a04f4d6fcebaabe5b494661075c75442c76e9c8b1923d501c
+PKG_HASH:=8f37e546ac7c31c9c203a03b1c1d6cb2d2f623a300b86badfd367e5559fe148c
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf gettext-version
+PKG_BUILD_DEPENDS:=MC_VFS:libtirpc
PKG_CONFIG_DEPENDS := \
CONFIG_PACKAGE_MC \
define Package/mc
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS:=+glib2 +libncurses +libmount +MC_VFS:libssh2 $(LIBRPC_DEPENDS) $(ICONV_DEPENDS)
+ DEPENDS:=+glib2 +libncurses +libmount +MC_VFS:libssh2 $(ICONV_DEPENDS)
TITLE:=Midnight Commander - a powerful visual file manager
URL:=https://www.midnight-commander.org/
MENU:=1
--disable-doxygen-doc \
--with-homedir=/etc/mc \
--with-screen=ncurses \
- --without-gpm-mouse \
--without-x \
CONFIGURE_VARS += \
ifeq ($(CONFIG_MC_VFS),)
CONFIGURE_ARGS += --disable-vfs
+else
+TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
endif
define Package/mc/install
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git
-PKG_SOURCE_DATE:=2017-03-20
-PKG_SOURCE_VERSION:=37c86e60c0442fef570b75cd81aeb1db4d0cbafd
-PKG_MIRROR_HASH:=652958e818d984804be6846ba504961f31c6e98414d0d34ec7a0d76d0844584a
+PKG_SOURCE_DATE:=2018-03-27
+PKG_SOURCE_VERSION:=b4fe0c8c0e57a74c01755fa9362703b60d7ee49d
+PKG_MIRROR_HASH:=ce7018d6ba6f2cccc64a40103cfb64f8905c96262140cdc8bf5f7674f192b81b
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=
+++ /dev/null
-Sent already upstream, no response yet.
-
---- a/mmc.h 2016-09-11 18:01:53.000000000 +0200
-+++ b/mmc.h 2016-09-23 23:41:02.462632858 +0200
-@@ -17,7 +17,6 @@
- * those modifications are Copyright (c) 2016 SanDisk Corp.
- */
-
--#include <asm-generic/int-ll64.h>
- #include <linux/mmc/ioctl.h>
- #include <stdio.h>
-
+++ /dev/null
-#
-# Copyright (C) 2006-2018 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/uclibc++.mk
-
-PKG_NAME:=mysql
-PKG_VERSION:=5.1.73
-PKG_RELEASE:=3
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=\
- http://mysql.he.net/Downloads/MySQL-5.1/ \
- http://www.linorg.usp.br/mysql/Downloads/MySQL-5.1/ \
- http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.1/ \
- http://mirror.switch.ch/ftp/mirror/mysql/Downloads/MySQL-5.1/
-
-PKG_HASH:=05ebe21305408b24407d14b77607a3e5ffa3c300e03f1359d3066f301989dcb5
-PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_LICENSE:=GPL-2.0
-
-PKG_BUILD_PARALLEL:=1
-PKG_USE_MIPS16:=0
-
-PKG_FIXUP:=libtool
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/libmysqlclient/Default
- SECTION:=libs
- CATEGORY:=Libraries
- DEPENDS:=$(CXX_DEPENDS) +zlib
- TITLE:=MySQL client library
- URL:=http://dev.mysql.com/
-endef
-
-define Package/mysql-server
- SECTION:=utils
- CATEGORY:=Utilities
- DEPENDS:=+libmysqlclient +libpthread +libncurses +libreadline
- TITLE:=MySQL Server
- URL:=http://dev.mysql.com/
- SUBMENU:=database
-endef
-
-define Package/libmysqlclient
- $(call Package/libmysqlclient/Default)
-endef
-
-define Package/libmysqlclient-r
- $(call Package/libmysqlclient/Default)
- TITLE += threadsafe
- DEPENDS+= +libpthread
-endef
-
-ifneq ($(CONFIG_USE_UCLIBCXX),)
- TARGET_CXX=g++-uc
-endif
-
-CONFIGURE_ARGS += \
- --enable-shared \
- --enable-static \
- --enable-thread-safe-client \
- --disable-assembler \
- --with-pthread \
- --with-server \
- --without-mysqlmanager \
- --with-mysqld-user=root \
- --with-unix-socket-path=/tmp \
- --without-libwrap \
- --with-low-memory \
- --without-embedded-server \
- --without-query-cache \
- --without-ssl \
- --without-docs \
- --without-man \
- --without-readline \
- --without-debug \
- --with-named-thread-libs=-lpthread
-
-CONFIGURE_VARS += \
- mysql_cv_compress=yes \
- mysql_cv_gethostname_style=glibc2 \
- mysql_cv_gcc_atomic_builtins=yes \
- mysql_cv_gcc_atomic_builtins_pthread_t=yes \
- ac_cv_c_stack_direction=-1
-
-define Build/Compile
- +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
- SUBDIRS="include" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all
- $(MAKE) -C "$(PKG_BUILD_DIR)" \
- SUBDIRS="include" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- install
- g++ -I $(PKG_BUILD_DIR)/include \
- -o $(PKG_BUILD_DIR)/sql/gen_lex_hash \
- $(PKG_BUILD_DIR)/sql/gen_lex_hash.cc
- +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)/libmysql" \
- CC="g++" \
- CFLAGS="$(HOST_CFLAGS)" \
- CPPFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- conf_to_src
- +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
- SUBDIRS="libmysql" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all
- $(MAKE) -C "$(PKG_BUILD_DIR)" \
- SUBDIRS="libmysql" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- install
- +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
- SUBDIRS="libmysql_r" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all
- $(MAKE) -C "$(PKG_BUILD_DIR)" \
- SUBDIRS="libmysql_r" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- install
- $(MAKE) -C "$(PKG_BUILD_DIR)" \
- SUBDIRS="scripts" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- bin_SCRIPTS="mysql_config" \
- install
- +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all
- $(MAKE) -C "$(PKG_BUILD_DIR)" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- install
-endef
-
-
-define Build/InstallDev
- $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(1)/usr/bin/
- ln -sf $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin/
- $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include/
- # NOTE: needed for MySQL-Python
- $(CP) $(PKG_BUILD_DIR)/include/mysqld_error.h $(1)/usr/include/mysql/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql $(1)/usr/lib/
- rm -f $(1)/usr/lib/mysql/libmysqlclient.la
-endef
-
-define Package/libmysqlclient/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient.so.* $(1)/usr/lib/
-endef
-define Package/libmysqlclient-r/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient_r.so.* $(1)/usr/lib/
-endef
-
-define Package/mysql-server/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/mysqld $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/myisamchk $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysqladmin $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysqldump $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_install_db $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/my_print_defaults $(1)/usr/bin/
- $(INSTALL_DIR) $(1)/etc/init.d/
- $(INSTALL_BIN) files/mysqld.init $(1)/etc/init.d/mysqld
- $(INSTALL_CONF) conf/my.cnf $(1)/etc/
- $(INSTALL_DIR) $(1)/usr/share/mysql
- $(INSTALL_DIR) $(1)/usr/share/mysql/english
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/english/errmsg.sys $(1)/usr/share/mysql/english
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/fill_help_tables.sql $(1)/usr/share/mysql/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables.sql $(1)/usr/share/mysql/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables_data.sql $(1)/usr/share/mysql/
-endef
-
-define Package/mysql-server/conffiles
-/etc/my.cnf
-endef
-
-$(eval $(call BuildPackage,mysql-server))
-$(eval $(call BuildPackage,libmysqlclient))
-$(eval $(call BuildPackage,libmysqlclient-r))
+++ /dev/null
-[client]
-port = 3306
-socket = /var/run/mysqld.sock
-
-[mysqld]
-user = root
-socket = /var/run/mysqld.sock
-port = 3306
-basedir = /usr
-
-############ Don't put this on the NAND #############
-# Figure out where you are going to put the databases
-# And run mysql_install_db --force
-datadir = /mnt/data/mysql/
-
-######### This should also not go on the NAND #######
-tmpdir = /mnt/data/tmp/
-
-skip-external-locking
-
-bind-address = 127.0.0.1
-
-# Fine Tuning
-key_buffer = 16M
-max_allowed_packet = 16M
-thread_stack = 192K
-thread_cache_size = 8
-
-# Here you can see queries with especially long duration
-#log_slow_queries = /var/log/mysql/mysql-slow.log
-#long_query_time = 2
-#log-queries-not-using-indexes
-
-# The following can be used as easy to replay backup logs or for replication.
-#server-id = 1
-#log_bin = /var/log/mysql/mysql-bin.log
-#expire_logs_days = 10
-#max_binlog_size = 100M
-#binlog_do_db = include_database_name
-#binlog_ignore_db = include_database_name
-
-
-[mysqldump]
-quick
-quote-names
-max_allowed_packet = 16M
-
-[mysql]
-#no-auto-rehash # faster start of mysql but no tab completition
-
-[isamchk]
-key_buffer = 16M
-
-
+++ /dev/null
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2010-2011 OpenWrt.org
-
-START=95
-STOP=10
-
-SERVICE_DAEMONIZE=1
-SERVICE_WRITE_PID=1
-SERVICE_STOP_TIME=9
-PROG='/usr/bin/mysqld'
-
-start() {
- local conf='/etc/my.cnf'
- local datadir="$( sed -nE "s/^\s*datadir\s*=\s*('([^']*)'|\x22([^\x22]*)\x22|(.*\S))\s*$/\2\3\4/p" "$conf" )"
-
- [ -d "$datadir" ] || {
- logger -s "[ERROR] datadir '$datadir' in '$conf' does not exist"
- return 1
- }
-
- [ -f "$datadir/mysql/tables_priv.MYD" ] || {
- logger -s "[ERROR] can not detect privileges table, you might need to"
- logger -s "run 'mysql_install_db --force' to initialize the system tables"
- return 1
- }
-
- service_start "$PROG"
-}
-
-stop() {
- service_stop "$PROG"
-}
+++ /dev/null
---- a/scripts/mysql_install_db.sh
-+++ b/scripts/mysql_install_db.sh
-@@ -322,7 +322,7 @@ then
- fi
-
- # Try to determine the hostname
--hostname=`@HOSTNAME@`
-+hostname=`cat /proc/sys/kernel/hostname`
-
- # Check if hostname is valid
- if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0
+++ /dev/null
---- a/storage/innodb_plugin/plug.in
-+++ b/storage/innodb_plugin/plug.in
-@@ -56,10 +56,8 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [
- esac
- AC_SUBST(INNODB_DYNAMIC_CFLAGS)
-
-- AC_MSG_CHECKING(whether GCC atomic builtins are available)
-- # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
-- AC_TRY_RUN(
-- [
-+ AC_CACHE_CHECK([whether GCC atomic builtins are available],
-+ [mysql_cv_gcc_atomic_builtins], [AC_TRY_RUN([
- int main()
- {
- long x;
-@@ -96,21 +94,18 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [
-
- return(0);
- }
-- ],
-- [
-- AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
-- [GCC atomic builtins are available])
-- AC_MSG_RESULT(yes)
-- ],
-- [
-- AC_MSG_RESULT(no)
-- ]
-- )
-+ ], [mysql_cv_gcc_atomic_builtins=yes],
-+ [mysql_cv_gcc_atomic_builtins=no],
-+ [mysql_cv_gcc_atomic_builtins=no])])
-+
-+ if test "x$mysql_cv_gcc_atomic_builtins" = xyes; then
-+ AC_DEFINE(HAVE_IB_GCC_ATOMIC_BUILTINS, 1,
-+ [Define to 1 if compiler provides atomic builtins.])
-+ fi
-
-- AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
-- # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
-- AC_TRY_RUN(
-- [
-+
-+ AC_CACHE_CHECK([whether pthread_t can be used by GCC atomic builtins],
-+ [mysql_cv_gcc_atomic_builtins_pthread_t], [AC_TRY_RUN([
- #include <pthread.h>
- #include <string.h>
-
-@@ -127,16 +122,14 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [
-
- return(0);
- }
-- ],
-- [
-- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
-- [pthread_t can be used by GCC atomic builtins])
-- AC_MSG_RESULT(yes)
-- ],
-- [
-- AC_MSG_RESULT(no)
-- ]
-- )
-+ ], [mysql_cv_gcc_atomic_builtins_pthread_t=yes],
-+ [mysql_cv_gcc_atomic_builtins_pthread_t=no],
-+ [mysql_cv_gcc_atomic_builtins_pthread_t=no])])
-+
-+ if test "x$mysql_cv_gcc_atomic_builtins_pthread_t" = xyes; then
-+ AC_DEFINE(HAVE_IB_ATOMIC_PTHREAD_T_GCC, 1,
-+ [Define to 1 if pthread_t can be used by GCC atomic builtins])
-+ fi
-
- AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
- # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following
-@@ -156,7 +149,6 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [
- AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1],
- [Define to 1 if Solaris libc atomic functions are available]
- )
-- fi
-
- AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
- # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
-@@ -230,6 +222,8 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [
- AC_MSG_RESULT(no)
- ]
- )
-+ fi
-+
- ])
-
- # vim: set ft=config:
---- a/sql/gen_lex_hash.cc
-+++ b/sql/gen_lex_hash.cc
-@@ -344,55 +344,6 @@ void print_find_structs()
- }
-
-
--static void usage(int version)
--{
-- printf("%s Ver 3.6 Distrib %s, for %s (%s)\n",
-- my_progname, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
-- if (version)
-- return;
-- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
-- puts("This program generates a perfect hashing function for the sql_lex.cc");
-- printf("Usage: %s [OPTIONS]\n\n", my_progname);
-- my_print_help(my_long_options);
--}
--
--
--extern "C" my_bool
--get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
-- char *argument __attribute__((unused)))
--{
-- switch(optid) {
-- case 'V':
-- usage(1);
-- exit(0);
-- case 'I':
-- case '?':
-- usage(0);
-- exit(0);
-- case '#':
-- DBUG_PUSH(argument ? argument : default_dbug_option);
-- break;
-- }
-- return 0;
--}
--
--
--static int get_options(int argc, char **argv)
--{
-- int ho_error;
--
-- if ((ho_error= handle_options(&argc, &argv, my_long_options, get_one_option)))
-- exit(ho_error);
--
-- if (argc >= 1)
-- {
-- usage(0);
-- exit(1);
-- }
-- return(0);
--}
--
--
- int check_dup_symbols(SYMBOL *s1, SYMBOL *s2)
- {
- if (s1->length!=s2->length || strncmp(s1->name,s2->name,s1->length))
-@@ -443,12 +394,6 @@ int check_duplicates()
-
- int main(int argc,char **argv)
- {
-- MY_INIT(argv[0]);
-- DBUG_PROCESS(argv[0]);
--
-- if (get_options(argc,(char **) argv))
-- exit(1);
--
- /* Broken up to indicate that it's not advice to you, gentle reader. */
- printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
-
-@@ -549,7 +494,6 @@ static SYMBOL *get_hash_symbol(const cha
- }\n\
- }\n"
- );
-- my_end(0);
- exit(0);
- }
-
---- a/sql/Makefile.am
-+++ b/sql/Makefile.am
-@@ -26,7 +26,6 @@ INCLUDES = @ZLIB_INCLUDES@ \
- WRAPLIBS= @WRAPLIBS@
- SUBDIRS = share
- libexec_PROGRAMS = mysqld
--EXTRA_PROGRAMS = gen_lex_hash
- bin_PROGRAMS = mysql_tzinfo_to_sql
-
- noinst_LTLIBRARIES= libndb.la \
+++ /dev/null
---- a/sql/sql_lex.cc
-+++ b/sql/sql_lex.cc
-@@ -775,14 +775,13 @@ bool consume_comment(Lex_input_stream *l
- (which can't be followed by a signed number)
- */
-
--int MYSQLlex(void *arg, void *yythd)
-+int MYSQLlex(void *arg, THD *thd)
- {
- reg1 uchar c= 0;
- bool comment_closed;
- int tokval, result_state;
- uint length;
- enum my_lex_states state;
-- THD *thd= (THD *)yythd;
- Lex_input_stream *lip= & thd->m_parser_state->m_lip;
- LEX *lex= thd->lex;
- YYSTYPE *yylval=(YYSTYPE*) arg;
---- a/sql/sql_lex.h
-+++ b/sql/sql_lex.h
-@@ -2072,7 +2072,7 @@ extern void lex_init(void);
- extern void lex_free(void);
- extern void lex_start(THD *thd);
- extern void lex_end(LEX *lex);
--extern int MYSQLlex(void *arg, void *yythd);
-+extern int MYSQLlex(void *arg, THD *thd);
-
- extern void trim_whitespace(CHARSET_INFO *cs, LEX_STRING *str);
-
---- a/sql/sql_parse.cc
-+++ b/sql/sql_parse.cc
-@@ -8012,7 +8012,7 @@ bool check_host_name(LEX_STRING *str)
- }
-
-
--extern int MYSQLparse(void *thd); // from sql_yacc.cc
-+extern int MYSQLparse(THD *thd); // from sql_yacc.cc
-
-
- /**
---- a/sql/sql_yacc.yy
-+++ b/sql/sql_yacc.yy
-@@ -25,17 +25,15 @@
- %{
- /* thd is passed as an argument to yyparse(), and subsequently to yylex().
- ** The type will be void*, so it must be cast to (THD*) when used.
--** Use the YYTHD macro for this.
-+** Use the thd macro for this.
- */
--#define YYPARSE_PARAM yythd
--#define YYLEX_PARAM yythd
--#define YYTHD ((THD *)yythd)
--#define YYLIP (& YYTHD->m_parser_state->m_lip)
-+#define YYLIP (& thd->m_parser_state->m_lip)
-+#define YYPS (& thd->m_parser_state->m_yacc)
-
- #define MYSQL_YACC
- #define YYINITDEPTH 100
- #define YYMAXDEPTH 3200 /* Because of 64K stack */
--#define Lex (YYTHD->lex)
-+#define Lex (thd->lex)
- #define Select Lex->current_select
- #include "mysql_priv.h"
- #include "slave.h"
-@@ -64,7 +62,7 @@ const LEX_STRING null_lex_str= {0,0};
- ulong val= *(F); \
- if (my_yyoverflow((B), (D), &val)) \
- { \
-- yyerror((char*) (A)); \
-+ yyerror(current_thd, (char*) (A)); \
- return 2; \
- } \
- else \
-@@ -76,7 +74,7 @@ const LEX_STRING null_lex_str= {0,0};
- #define MYSQL_YYABORT \
- do \
- { \
-- LEX::cleanup_lex_after_parse_error(YYTHD);\
-+ LEX::cleanup_lex_after_parse_error(thd); \
- YYABORT; \
- } while (0)
-
-@@ -159,10 +157,8 @@ void my_parse_error(const char *s)
- to abort from the parser.
- */
-
--void MYSQLerror(const char *s)
-+void MYSQLerror(THD *thd, const char *s)
- {
-- THD *thd= current_thd;
--
- /*
- Restore the original LEX if it was replaced when parsing
- a stored procedure. We must ensure that a parsing error
-@@ -675,7 +671,10 @@ static bool add_create_index (LEX *lex,
- bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
- %}
-
--%pure_parser /* We have threads */
-+/* We have threads */
-+%define api.pure
-+%parse-param { THD *thd }
-+%lex-param { THD *thd }
- /*
- Currently there are 169 shift/reduce conflicts.
- We should not introduce new conflicts any more.
-@@ -1516,7 +1515,6 @@ rule: <-- starts at col 1
- query:
- END_OF_INPUT
- {
-- THD *thd= YYTHD;
- if (!thd->bootstrap &&
- (!(thd->lex->select_lex.options & OPTION_FOUND_COMMENT)))
- {
-@@ -1530,7 +1528,7 @@ query:
- {
- Lex_input_stream *lip = YYLIP;
-
-- if ((YYTHD->client_capabilities & CLIENT_MULTI_QUERIES) &&
-+ if ((thd->client_capabilities & CLIENT_MULTI_QUERIES) &&
- ! lip->stmt_prepare_mode &&
- ! lip->eof())
- {
-@@ -1626,7 +1624,6 @@ statement:
- deallocate:
- deallocate_or_drop PREPARE_SYM ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- lex->sql_command= SQLCOM_DEALLOCATE_PREPARE;
- lex->prepared_stmt_name= $3;
-@@ -1641,7 +1638,6 @@ deallocate_or_drop:
- prepare:
- PREPARE_SYM ident FROM prepare_src
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- lex->sql_command= SQLCOM_PREPARE;
- lex->prepared_stmt_name= $2;
-@@ -1651,14 +1647,12 @@ prepare:
- prepare_src:
- TEXT_STRING_sys
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- lex->prepared_stmt_code= $1;
- lex->prepared_stmt_code_is_varref= FALSE;
- }
- | '@' ident_or_text
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- lex->prepared_stmt_code= $2;
- lex->prepared_stmt_code_is_varref= TRUE;
-@@ -1668,7 +1662,6 @@ prepare_src:
- execute:
- EXECUTE_SYM ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- lex->sql_command= SQLCOM_EXECUTE;
- lex->prepared_stmt_name= $2;
-@@ -1826,7 +1819,6 @@ master_file_def:
- create:
- CREATE opt_table_options TABLE_SYM opt_if_not_exists table_ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- lex->sql_command= SQLCOM_CREATE_TABLE;
- if (!lex->select_lex.add_table_to_list(thd, $5, NULL,
-@@ -1844,13 +1836,13 @@ create:
- }
- create2
- {
-- LEX *lex= YYTHD->lex;
-+ LEX *lex= thd->lex;
- lex->current_select= &lex->select_lex;
- if ((lex->create_info.used_fields & HA_CREATE_USED_ENGINE) &&
- !lex->create_info.db_type)
- {
-- lex->create_info.db_type= ha_default_handlerton(YYTHD);
-- push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN,
-+ lex->create_info.db_type= ha_default_handlerton(thd);
-+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_WARN_USING_OTHER_HANDLER,
- ER(ER_WARN_USING_OTHER_HANDLER),
- ha_resolve_storage_engine_name(lex->create_info.db_type),
-@@ -1979,7 +1971,6 @@ server_option:
- event_tail:
- remember_name EVENT_SYM opt_if_not_exists sp_name
- {
-- THD *thd= YYTHD;
- LEX *lex=Lex;
-
- lex->stmt_definition_begin= $1;
-@@ -2046,7 +2037,7 @@ opt_ev_status:
- ev_starts:
- /* empty */
- {
-- Item *item= new (YYTHD->mem_root) Item_func_now_local();
-+ Item *item= new (thd->mem_root) Item_func_now_local();
- if (item == NULL)
- MYSQL_YYABORT;
- Lex->event_parse_data->item_starts= item;
-@@ -2096,7 +2087,6 @@ opt_ev_comment:
-
- ev_sql_stmt:
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
-
-@@ -2139,7 +2129,6 @@ ev_sql_stmt:
- }
- ev_sql_stmt_inner
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
-
- /* return back to the original memory root ASAP */
-@@ -2198,11 +2187,10 @@ sp_name:
- $$= new sp_name($1, $3, true);
- if ($$ == NULL)
- MYSQL_YYABORT;
-- $$->init_qname(YYTHD);
-+ $$->init_qname(thd);
- }
- | ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- LEX_STRING db;
- if (check_routine_name(&$1))
-@@ -2272,7 +2260,7 @@ call:
- lex->sql_command= SQLCOM_CALL;
- lex->spname= $2;
- lex->value_list.empty();
-- sp_add_used_routine(lex, YYTHD, $2, TYPE_ENUM_PROCEDURE);
-+ sp_add_used_routine(lex, thd, $2, TYPE_ENUM_PROCEDURE);
- }
- opt_sp_cparam_list {}
- ;
-@@ -2345,7 +2333,7 @@ sp_fdparam:
- (enum enum_field_types)$3,
- sp_param_in);
-
-- if (lex->sphead->fill_field_definition(YYTHD, lex,
-+ if (lex->sphead->fill_field_definition(thd, lex,
- (enum enum_field_types) $3,
- &spvar->field_def))
- {
-@@ -2382,7 +2370,7 @@ sp_pdparam:
- (enum enum_field_types)$4,
- (sp_param_mode_t)$1);
-
-- if (lex->sphead->fill_field_definition(YYTHD, lex,
-+ if (lex->sphead->fill_field_definition(thd, lex,
- (enum enum_field_types) $4,
- &spvar->field_def))
- {
-@@ -2445,13 +2433,12 @@ sp_decl:
- {
- LEX *lex= Lex;
-
-- lex->sphead->reset_lex(YYTHD);
-+ lex->sphead->reset_lex(thd);
- lex->spcont->declare_var_boundary($2);
- }
- type
- sp_opt_default
- {
-- THD *thd= YYTHD;
- LEX *lex= Lex;
- sp_pcontext *pctx= lex->spcont;
- uint num_vars= pctx->context_var_count();
-@@ -2477,7 +2464,7 @@ sp_decl:
- spvar->type= var_type;
- spvar->dflt= dflt_value_item;
-
-- if (lex->sphead->fill_field_definition(YYTHD, lex, var_type,
-+ if (lex->sphead->fill_field_definition(thd, lex, var_type,
- &spvar->field_def))
- {
- MYSQL_YYABORT;
-@@ -2501,7 +2488,7 @@ sp_decl:
- }
-
- pctx->declare_var_boundary(0);
-- if (lex->sphead->restore_lex(YYTHD))
-+ if (lex->sphead->restore_lex(thd))
- MYSQL_YYABORT;
- $$.vars= $2;
- $$.conds= $$.hndlrs= $$.curs= 0;
-@@ -2516,7 +2503,7 @@ sp_decl:
- my_error(ER_SP_DUP_COND, MYF(0), $2.str);
- MYSQL_YYABORT;
- }
-- if(YYTHD->lex->spcont->push_cond(&$2, $5))
-+ if(thd->lex->spcont->push_cond(&$2, $5))
- MYSQL_YYABORT;
- $$.vars= $$.hndlrs= $$.curs= 0;
- $$.conds= 1;
-@@ -2602,7 +2589,7 @@ sp_decl:
-
- sp_cursor_stmt:
- {
-- Lex->sphead->reset_lex(YYTHD);
-+ Lex->sphead->reset_lex(thd);
- }
- select
- {
-@@ -2618,7 +2605,7 @@ sp_cursor_stmt:
- }
- lex->sp_lex_in_use= TRUE;
- $$= lex;
-- if (lex->sphead->restore_lex(YYTHD))
-+ if (lex->sphead->restore_lex(thd))
- MYSQL_YYABORT;
- }
- ;
-@@ -2662,7 +2649,7 @@ sp_hcond_element:
- sp_cond:
- ulong_num
- { /* mysql errno */
-- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t));
-+ $$= (sp_cond_type_t *)thd->alloc(sizeof(sp_cond_type_t));
- if ($$ == NULL)
- MYSQL_YYABORT;
- $$->type= sp_cond_type_t::number;
-@@ -2675,7 +2662,7 @@ sp_cond:
- my_error(ER_SP_BAD_SQLSTATE, MYF(0), $3.str);
- MYSQL_YYABORT;
- }
-- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t));
-+ $$= (sp_cond_type_t *) thd->alloc(sizeof(sp_cond_type_t));
- if ($$ == NULL)
- MYSQL_YYABORT;
- $$->type= sp_cond_type_t::state;
-@@ -2705,21 +2692,21 @@ sp_hcond:
- }
- | SQLWARNING_SYM /* SQLSTATEs 01??? */
- {
-- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t));
-+ $$= (sp_cond_type_t *) thd->alloc(sizeof(sp_cond_type_t));
- if ($$ == NULL)
- MYSQL_YYABORT;
- $$->type= sp_cond_type_t::warning;
- }
- | not FOUND_SYM /* SQLSTATEs 02??? */
- {
-- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t));
-+ $$= (sp_cond_type_t *) thd->alloc(sizeof(sp_cond_type_t));
- if ($$ == NULL)
- MYSQL_YYABORT;
- $$->type= sp_cond_type_t::notfound;
- }
- | SQLEXCEPTION_SYM /* All other SQLSTATEs */
- {
-- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t));
-+ $$= (sp_cond_type_t *) thd->alloc(sizeof(sp_cond_type_t));
- if ($$ == NULL)
- MYSQL_YYABORT;
- $$->type= sp_cond_type_t::exception;
-@@ -2789,7 +2776,6 @@ sp_proc_stmt_if:
-
- sp_proc_stmt_statement:
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
-
-@@ -2798,7 +2784,6 @@ sp_proc_stmt_statement:
- }
- statement
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
- sp_head *sp= lex->sphead;
-@@ -2845,7 +2830,7 @@ sp_proc_stmt_statement:
-
- sp_proc_stmt_return:
- RETURN_SYM
-- { Lex->sphead->reset_lex(YYTHD); }
-+ { Lex->sphead->reset_lex(thd); }
- expr
- {
- LEX *lex= Lex;
-@@ -2867,7 +2852,7 @@ sp_proc_stmt_return:
- MYSQL_YYABORT;
- sp->m_flags|= sp_head::HAS_RETURN;
- }
-- if (sp->restore_lex(YYTHD))
-+ if (sp->restore_lex(thd))
- MYSQL_YYABORT;
- }
- ;
-@@ -3094,7 +3079,7 @@ sp_fetch_list:
- ;
-
- sp_if:
-- { Lex->sphead->reset_lex(YYTHD); }
-+ { Lex->sphead->reset_lex(thd); }
- expr THEN_SYM
- {
- LEX *lex= Lex;
-@@ -3108,7 +3093,7 @@ sp_if:
- sp->add_cont_backpatch(i) ||
- sp->add_instr(i))
- MYSQL_YYABORT;
-- if (sp->restore_lex(YYTHD))
-+ if (sp->restore_lex(thd))
- MYSQL_YYABORT;
- }
- sp_proc_stmts1
-@@ -3147,7 +3132,7 @@ simple_case_stmt:
- {
- LEX *lex= Lex;
- case_stmt_action_case(lex);
-- lex->sphead->reset_lex(YYTHD); /* For expr $3 */
-+ lex->sphead->reset_lex(thd); /* For expr $3 */
- }
- expr
- {
-@@ -3156,7 +3141,7 @@ simple_case_stmt:
- MYSQL_YYABORT;
-
- /* For expr $3 */
-- if (lex->sphead->restore_lex(YYTHD))
-+ if (lex->sphead->restore_lex(thd))
- MYSQL_YYABORT;
- }
- simple_when_clause_list
-@@ -3198,7 +3183,7 @@ searched_when_clause_list:
- simple_when_clause:
- WHEN_SYM
- {
-- Lex->sphead->reset_lex(YYTHD); /* For expr $3 */
-+ Lex->sphead->reset_lex(thd); /* For expr $3 */
- }
- expr
- {
-@@ -3208,7 +3193,7 @@ simple_when_clause:
- if (case_stmt_action_when(lex, $3, true))
- MYSQL_YYABORT;
- /* For expr $3 */
-- if (lex->sphead->restore_lex(YYTHD))
-+ if (lex->sphead->restore_lex(thd))
- MYSQL_YYABORT;
- }
- THEN_SYM
-@@ -3223,7 +3208,7 @@ simple_when_clause:
- searched_when_clause:
- WHEN_SYM
- {
-- Lex->sphead->reset_lex(YYTHD); /* For expr $3 */
-+ Lex->sphead->reset_lex(thd); /* For expr $3 */
- }
- expr
- {
-@@ -3231,7 +3216,7 @@ searched_when_clause:
- if (case_stmt_action_when(lex, $3, false))
- MYSQL_YYABORT;
- /* For expr $3 */
-- if (lex->sphead->restore_lex(YYTHD))
-+ if (lex->sphead->restore_lex(thd))
- MYSQL_YYABORT;
- }
- THEN_SYM
-@@ -3395,7 +3380,7 @@ sp_unlabeled_control:
- MYSQL_YYABORT;
- }
- | WHILE_SYM
-- { Lex->sphead->reset_lex(YYTHD); }
-+ { Lex->sphead->reset_lex(thd); }
- expr DO_SYM
- {
- LEX *lex= Lex;
-@@ -3409,7 +3394,7 @@ sp_unlabeled_control:
- sp->new_cont_backpatch(i) ||
- sp->add_instr(i))
- MYSQL_YYABORT;
-- if (sp->restore_lex(YYTHD))
-+ if (sp->restore_lex(thd))
- MYSQL_YYABORT;
- }
- sp_proc_stmts1 END WHILE_SYM
-@@ -3424,7 +3409,7 @@ sp_unlabeled_control:
- lex->sphead->do_cont_backpatch();
- }
- | REPEAT_SYM sp_proc_stmts1 UNTIL_SYM
-- { Lex->sphead->reset_lex(YYTHD); }
-+ { Lex->sphead->reset_lex(thd); }
- expr END REPEAT_SYM
- {
- LEX *lex= Lex;
-@@ -3436,7 +3421,7 @@ sp_unlabeled_control:
- if (i == NULL ||
- lex->sphead->add_instr(i))
- MYSQL_YYABORT;
-- if (lex->sphead->restore_lex(YYTHD))
-+ if (lex->sphead->restore_lex(thd))
- MYSQL_YYABORT;
- /* We can shortcut the cont_backpatch here */
- i->m_cont_dest= ip+1;
-@@ -3859,7 +3844,6 @@ create2:
- create3 {}
- | LIKE table_ident
- {
-- THD *thd= YYTHD;
- TABLE_LIST *src_table;
- LEX *lex= thd->lex;
-
-@@ -3873,7 +3857,6 @@ create2:
- }
- | '(' LIKE table_ident ')'
- {
-- THD *thd= YYTHD;
- TABLE_LIST *src_table;
- LEX *lex= thd->lex;
-
-@@ -4342,7 +4325,6 @@ part_bit_expr:
- bit_expr
- {
- Item *part_expr= $1;
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Name_resolution_context *context= &lex->current_select->context;
- TABLE_LIST *save_list= context->table_list;
-@@ -4364,7 +4346,7 @@ part_bit_expr:
- my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0));
- MYSQL_YYABORT;
- }
-- if (part_expr->fix_fields(YYTHD, (Item**)0) ||
-+ if (part_expr->fix_fields(thd, (Item**)0) ||
- ((context->table_list= save_list), FALSE) ||
- (!part_expr->const_item()) ||
- (!lex->safe_to_cache_query))
-@@ -4629,7 +4611,7 @@ create_table_option:
- | TYPE_SYM opt_equal storage_engines
- {
- Lex->create_info.db_type= $3;
-- WARN_DEPRECATED(yythd, "6.0", "TYPE=storage_engine",
-+ WARN_DEPRECATED(thd, "6.0", "TYPE=storage_engine",
- "'ENGINE=storage_engine'");
- Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE;
- }
-@@ -4791,19 +4773,19 @@ default_collation:
- storage_engines:
- ident_or_text
- {
-- plugin_ref plugin= ha_resolve_by_name(YYTHD, &$1);
-+ plugin_ref plugin= ha_resolve_by_name(thd, &$1);
-
- if (plugin)
- $$= plugin_data(plugin, handlerton*);
- else
- {
-- if (YYTHD->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION)
-+ if (thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION)
- {
- my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), $1.str);
- MYSQL_YYABORT;
- }
- $$= 0;
-- push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN,
-+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_UNKNOWN_STORAGE_ENGINE,
- ER(ER_UNKNOWN_STORAGE_ENGINE),
- $1.str);
-@@ -4815,7 +4797,7 @@ known_storage_engines:
- ident_or_text
- {
- plugin_ref plugin;
-- if ((plugin= ha_resolve_by_name(YYTHD, &$1)))
-+ if ((plugin= ha_resolve_by_name(thd, &$1)))
- $$= plugin_data(plugin, handlerton*);
- else
- {
-@@ -5043,7 +5025,7 @@ type:
- {
- char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1];
- my_snprintf(buff, sizeof(buff), "YEAR(%lu)", length);
-- push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_NOTE,
-+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
- ER_WARN_DEPRECATED_SYNTAX,
- ER(ER_WARN_DEPRECATED_SYNTAX),
- buff, "YEAR(4)");
-@@ -5057,7 +5039,7 @@ type:
- { $$=MYSQL_TYPE_TIME; }
- | TIMESTAMP opt_field_length
- {
-- if (YYTHD->variables.sql_mode & MODE_MAXDB)
-+ if (thd->variables.sql_mode & MODE_MAXDB)
- $$=MYSQL_TYPE_DATETIME;
- else
- {
-@@ -5189,7 +5171,7 @@ int_type:
- real_type:
- REAL
- {
-- $$= YYTHD->variables.sql_mode & MODE_REAL_AS_FLOAT ?
-+ $$= thd->variables.sql_mode & MODE_REAL_AS_FLOAT ?
- MYSQL_TYPE_FLOAT : MYSQL_TYPE_DOUBLE;
- }
- | DOUBLE_SYM
-@@ -5263,7 +5245,7 @@ attribute:
- | DEFAULT now_or_signed_literal { Lex->default_value=$2; }
- | ON UPDATE_SYM NOW_SYM optional_braces
- {
-- Item *item= new (YYTHD->mem_root) Item_func_now_local();
-+ Item *item= new (thd->mem_root) Item_func_now_local();
- if (item == NULL)
- MYSQL_YYABORT;
- Lex->on_update_value= item;
-@@ -5312,7 +5294,7 @@ attribute:
- now_or_signed_literal:
- NOW_SYM optional_braces
- {
-- $$= new (YYTHD->mem_root) Item_func_now_local();
-+ $$= new (thd->mem_root) Item_func_now_local();
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -5673,7 +5655,6 @@ string_list:
- alter:
- ALTER opt_ignore TABLE_SYM table_ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- lex->name.str= 0;
- lex->name.length= 0;
-@@ -5799,7 +5780,7 @@ alter:
- Event_parse_data.
- */
-
-- if (!(Lex->event_parse_data= Event_parse_data::new_instance(YYTHD)))
-+ if (!(Lex->event_parse_data= Event_parse_data::new_instance(thd)))
- MYSQL_YYABORT;
- Lex->event_parse_data->identifier= $4;
-
-@@ -6192,7 +6173,6 @@ alter_list_item:
- {
- if (!$4)
- {
-- THD *thd= YYTHD;
- $4= thd->variables.collation_database;
- }
- $5= $5 ? $5 : $4;
-@@ -6556,7 +6536,7 @@ keycache_list:
- assign_to_keycache:
- table_ident cache_keys_spec
- {
-- if (!Select->add_table_to_list(YYTHD, $1, NULL, 0, TL_READ,
-+ if (!Select->add_table_to_list(thd, $1, NULL, 0, TL_READ,
- Select->pop_index_hints()))
- MYSQL_YYABORT;
- }
-@@ -6585,7 +6565,7 @@ preload_list:
- preload_keys:
- table_ident cache_keys_spec opt_ignore_leaves
- {
-- if (!Select->add_table_to_list(YYTHD, $1, NULL, $3, TL_READ,
-+ if (!Select->add_table_to_list(thd, $1, NULL, $3, TL_READ,
- Select->pop_index_hints()))
- MYSQL_YYABORT;
- }
-@@ -6593,7 +6573,7 @@ preload_keys:
-
- cache_keys_spec:
- {
-- Lex->select_lex.alloc_index_hints(YYTHD);
-+ Lex->select_lex.alloc_index_hints(thd);
- Select->set_index_hint_type(INDEX_HINT_USE,
- global_system_variables.old_mode ?
- INDEX_HINT_MASK_JOIN :
-@@ -6813,7 +6793,6 @@ select_item_list:
- | select_item
- | '*'
- {
-- THD *thd= YYTHD;
- Item *item= new (thd->mem_root)
- Item_field(&thd->lex->current_select->context,
- NULL, NULL, "*");
-@@ -6828,7 +6807,6 @@ select_item_list:
- select_item:
- remember_name select_item2 remember_end select_alias
- {
-- THD *thd= YYTHD;
- DBUG_ASSERT($1 < $3);
-
- if (add_item_to_list(thd, $2))
-@@ -6929,7 +6907,7 @@ expr:
- else
- {
- /* X OR Y */
-- $$ = new (YYTHD->mem_root) Item_cond_or($1, $3);
-+ $$ = new (thd->mem_root) Item_cond_or($1, $3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -6937,7 +6915,7 @@ expr:
- | expr XOR expr %prec XOR
- {
- /* XOR is a proprietary extension */
-- $$ = new (YYTHD->mem_root) Item_cond_xor($1, $3);
-+ $$ = new (thd->mem_root) Item_cond_xor($1, $3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -6979,50 +6957,50 @@ expr:
- else
- {
- /* X AND Y */
-- $$ = new (YYTHD->mem_root) Item_cond_and($1, $3);
-+ $$ = new (thd->mem_root) Item_cond_and($1, $3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- }
- | NOT_SYM expr %prec NOT_SYM
- {
-- $$= negate_expression(YYTHD, $2);
-+ $$= negate_expression(thd, $2);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bool_pri IS TRUE_SYM %prec IS
- {
-- $$= new (YYTHD->mem_root) Item_func_istrue($1);
-+ $$= new (thd->mem_root) Item_func_istrue($1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bool_pri IS not TRUE_SYM %prec IS
- {
-- $$= new (YYTHD->mem_root) Item_func_isnottrue($1);
-+ $$= new (thd->mem_root) Item_func_isnottrue($1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bool_pri IS FALSE_SYM %prec IS
- {
-- $$= new (YYTHD->mem_root) Item_func_isfalse($1);
-+ $$= new (thd->mem_root) Item_func_isfalse($1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bool_pri IS not FALSE_SYM %prec IS
- {
-- $$= new (YYTHD->mem_root) Item_func_isnotfalse($1);
-+ $$= new (thd->mem_root) Item_func_isnotfalse($1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bool_pri IS UNKNOWN_SYM %prec IS
- {
-- $$= new (YYTHD->mem_root) Item_func_isnull($1);
-+ $$= new (thd->mem_root) Item_func_isnull($1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bool_pri IS not UNKNOWN_SYM %prec IS
- {
-- $$= new (YYTHD->mem_root) Item_func_isnotnull($1);
-+ $$= new (thd->mem_root) Item_func_isnotnull($1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7032,19 +7010,19 @@ expr:
- bool_pri:
- bool_pri IS NULL_SYM %prec IS
- {
-- $$= new (YYTHD->mem_root) Item_func_isnull($1);
-+ $$= new (thd->mem_root) Item_func_isnull($1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bool_pri IS not NULL_SYM %prec IS
- {
-- $$= new (YYTHD->mem_root) Item_func_isnotnull($1);
-+ $$= new (thd->mem_root) Item_func_isnotnull($1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bool_pri EQUAL_SYM predicate %prec EQUAL_SYM
- {
-- $$= new (YYTHD->mem_root) Item_func_equal($1,$3);
-+ $$= new (thd->mem_root) Item_func_equal($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7066,13 +7044,12 @@ bool_pri:
- predicate:
- bit_expr IN_SYM '(' subselect ')'
- {
-- $$= new (YYTHD->mem_root) Item_in_subselect($1, $4);
-+ $$= new (thd->mem_root) Item_in_subselect($1, $4);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr not IN_SYM '(' subselect ')'
- {
-- THD *thd= YYTHD;
- Item *item= new (thd->mem_root) Item_in_subselect($1, $5);
- if (item == NULL)
- MYSQL_YYABORT;
-@@ -7082,7 +7059,7 @@ predicate:
- }
- | bit_expr IN_SYM '(' expr ')'
- {
-- $$= handle_sql2003_note184_exception(YYTHD, $1, true, $4);
-+ $$= handle_sql2003_note184_exception(thd, $1, true, $4);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7090,13 +7067,13 @@ predicate:
- {
- $6->push_front($4);
- $6->push_front($1);
-- $$= new (YYTHD->mem_root) Item_func_in(*$6);
-+ $$= new (thd->mem_root) Item_func_in(*$6);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr not IN_SYM '(' expr ')'
- {
-- $$= handle_sql2003_note184_exception(YYTHD, $1, false, $5);
-+ $$= handle_sql2003_note184_exception(thd, $1, false, $5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7104,7 +7081,7 @@ predicate:
- {
- $7->push_front($5);
- $7->push_front($1);
-- Item_func_in *item = new (YYTHD->mem_root) Item_func_in(*$7);
-+ Item_func_in *item = new (thd->mem_root) Item_func_in(*$7);
- if (item == NULL)
- MYSQL_YYABORT;
- item->negate();
-@@ -7112,14 +7089,14 @@ predicate:
- }
- | bit_expr BETWEEN_SYM bit_expr AND_SYM predicate
- {
-- $$= new (YYTHD->mem_root) Item_func_between($1,$3,$5);
-+ $$= new (thd->mem_root) Item_func_between($1,$3,$5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr not BETWEEN_SYM bit_expr AND_SYM predicate
- {
- Item_func_between *item;
-- item= new (YYTHD->mem_root) Item_func_between($1,$4,$6);
-+ item= new (thd->mem_root) Item_func_between($1,$4,$6);
- if (item == NULL)
- MYSQL_YYABORT;
- item->negate();
-@@ -7127,42 +7104,42 @@ predicate:
- }
- | bit_expr SOUNDS_SYM LIKE bit_expr
- {
-- Item *item1= new (YYTHD->mem_root) Item_func_soundex($1);
-- Item *item4= new (YYTHD->mem_root) Item_func_soundex($4);
-+ Item *item1= new (thd->mem_root) Item_func_soundex($1);
-+ Item *item4= new (thd->mem_root) Item_func_soundex($4);
- if ((item1 == NULL) || (item4 == NULL))
- MYSQL_YYABORT;
-- $$= new (YYTHD->mem_root) Item_func_eq(item1, item4);
-+ $$= new (thd->mem_root) Item_func_eq(item1, item4);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr LIKE simple_expr opt_escape
- {
-- $$= new (YYTHD->mem_root) Item_func_like($1,$3,$4,Lex->escape_used);
-+ $$= new (thd->mem_root) Item_func_like($1,$3,$4,Lex->escape_used);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr not LIKE simple_expr opt_escape
- {
-- Item *item= new (YYTHD->mem_root) Item_func_like($1,$4,$5,
-+ Item *item= new (thd->mem_root) Item_func_like($1,$4,$5,
- Lex->escape_used);
- if (item == NULL)
- MYSQL_YYABORT;
-- $$= new (YYTHD->mem_root) Item_func_not(item);
-+ $$= new (thd->mem_root) Item_func_not(item);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr REGEXP bit_expr
- {
-- $$= new (YYTHD->mem_root) Item_func_regex($1,$3);
-+ $$= new (thd->mem_root) Item_func_regex($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr not REGEXP bit_expr
- {
-- Item *item= new (YYTHD->mem_root) Item_func_regex($1,$4);
-+ Item *item= new (thd->mem_root) Item_func_regex($1,$4);
- if (item == NULL)
- MYSQL_YYABORT;
-- $$= negate_expression(YYTHD, item);
-+ $$= negate_expression(thd, item);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7172,85 +7149,85 @@ predicate:
- bit_expr:
- bit_expr '|' bit_expr %prec '|'
- {
-- $$= new (YYTHD->mem_root) Item_func_bit_or($1,$3);
-+ $$= new (thd->mem_root) Item_func_bit_or($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr '&' bit_expr %prec '&'
- {
-- $$= new (YYTHD->mem_root) Item_func_bit_and($1,$3);
-+ $$= new (thd->mem_root) Item_func_bit_and($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr SHIFT_LEFT bit_expr %prec SHIFT_LEFT
- {
-- $$= new (YYTHD->mem_root) Item_func_shift_left($1,$3);
-+ $$= new (thd->mem_root) Item_func_shift_left($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr SHIFT_RIGHT bit_expr %prec SHIFT_RIGHT
- {
-- $$= new (YYTHD->mem_root) Item_func_shift_right($1,$3);
-+ $$= new (thd->mem_root) Item_func_shift_right($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr '+' bit_expr %prec '+'
- {
-- $$= new (YYTHD->mem_root) Item_func_plus($1,$3);
-+ $$= new (thd->mem_root) Item_func_plus($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr '-' bit_expr %prec '-'
- {
-- $$= new (YYTHD->mem_root) Item_func_minus($1,$3);
-+ $$= new (thd->mem_root) Item_func_minus($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr '+' INTERVAL_SYM expr interval %prec '+'
- {
-- $$= new (YYTHD->mem_root) Item_date_add_interval($1,$4,$5,0);
-+ $$= new (thd->mem_root) Item_date_add_interval($1,$4,$5,0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr '-' INTERVAL_SYM expr interval %prec '-'
- {
-- $$= new (YYTHD->mem_root) Item_date_add_interval($1,$4,$5,1);
-+ $$= new (thd->mem_root) Item_date_add_interval($1,$4,$5,1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr '*' bit_expr %prec '*'
- {
-- $$= new (YYTHD->mem_root) Item_func_mul($1,$3);
-+ $$= new (thd->mem_root) Item_func_mul($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr '/' bit_expr %prec '/'
- {
-- $$= new (YYTHD->mem_root) Item_func_div($1,$3);
-+ $$= new (thd->mem_root) Item_func_div($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr '%' bit_expr %prec '%'
- {
-- $$= new (YYTHD->mem_root) Item_func_mod($1,$3);
-+ $$= new (thd->mem_root) Item_func_mod($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr DIV_SYM bit_expr %prec DIV_SYM
- {
-- $$= new (YYTHD->mem_root) Item_func_int_div($1,$3);
-+ $$= new (thd->mem_root) Item_func_int_div($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr MOD_SYM bit_expr %prec MOD_SYM
- {
-- $$= new (YYTHD->mem_root) Item_func_mod($1,$3);
-+ $$= new (thd->mem_root) Item_func_mod($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | bit_expr '^' bit_expr
- {
-- $$= new (YYTHD->mem_root) Item_func_bit_xor($1,$3);
-+ $$= new (thd->mem_root) Item_func_bit_xor($1,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7299,7 +7276,6 @@ simple_expr:
- | function_call_conflict
- | simple_expr COLLATE_SYM ident_or_text %prec NEG
- {
-- THD *thd= YYTHD;
- Item *i1= new (thd->mem_root) Item_string($3.str,
- $3.length,
- thd->charset());
-@@ -7315,7 +7291,7 @@ simple_expr:
- | sum_expr
- | simple_expr OR_OR_SYM simple_expr
- {
-- $$= new (YYTHD->mem_root) Item_func_concat($1, $3);
-+ $$= new (thd->mem_root) Item_func_concat($1, $3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7325,25 +7301,25 @@ simple_expr:
- }
- | '-' simple_expr %prec NEG
- {
-- $$= new (YYTHD->mem_root) Item_func_neg($2);
-+ $$= new (thd->mem_root) Item_func_neg($2);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | '~' simple_expr %prec NEG
- {
-- $$= new (YYTHD->mem_root) Item_func_bit_neg($2);
-+ $$= new (thd->mem_root) Item_func_bit_neg($2);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | not2 simple_expr %prec NEG
- {
-- $$= negate_expression(YYTHD, $2);
-+ $$= negate_expression(thd, $2);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | '(' subselect ')'
- {
-- $$= new (YYTHD->mem_root) Item_singlerow_subselect($2);
-+ $$= new (thd->mem_root) Item_singlerow_subselect($2);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7352,20 +7328,20 @@ simple_expr:
- | '(' expr ',' expr_list ')'
- {
- $4->push_front($2);
-- $$= new (YYTHD->mem_root) Item_row(*$4);
-+ $$= new (thd->mem_root) Item_row(*$4);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | ROW_SYM '(' expr ',' expr_list ')'
- {
- $5->push_front($3);
-- $$= new (YYTHD->mem_root) Item_row(*$5);
-+ $$= new (thd->mem_root) Item_row(*$5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | EXISTS '(' subselect ')'
- {
-- $$= new (YYTHD->mem_root) Item_exists_subselect($3);
-+ $$= new (thd->mem_root) Item_exists_subselect($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7374,7 +7350,7 @@ simple_expr:
- | MATCH ident_list_arg AGAINST '(' bit_expr fulltext_options ')'
- {
- $2->push_front($5);
-- Item_func_match *i1= new (YYTHD->mem_root) Item_func_match(*$2, $6);
-+ Item_func_match *i1= new (thd->mem_root) Item_func_match(*$2, $6);
- if (i1 == NULL)
- MYSQL_YYABORT;
- Select->add_ftfunc_to_list(i1);
-@@ -7382,7 +7358,7 @@ simple_expr:
- }
- | BINARY simple_expr %prec NEG
- {
-- $$= create_func_cast(YYTHD, $2, ITEM_CAST_CHAR, NULL, NULL,
-+ $$= create_func_cast(thd, $2, ITEM_CAST_CHAR, NULL, NULL,
- &my_charset_bin);
- if ($$ == NULL)
- MYSQL_YYABORT;
-@@ -7390,27 +7366,27 @@ simple_expr:
- | CAST_SYM '(' expr AS cast_type ')'
- {
- LEX *lex= Lex;
-- $$= create_func_cast(YYTHD, $3, $5, lex->length, lex->dec,
-+ $$= create_func_cast(thd, $3, $5, lex->length, lex->dec,
- lex->charset);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | CASE_SYM opt_expr when_list opt_else END
- {
-- $$= new (YYTHD->mem_root) Item_func_case(* $3, $2, $4 );
-+ $$= new (thd->mem_root) Item_func_case(* $3, $2, $4 );
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | CONVERT_SYM '(' expr ',' cast_type ')'
- {
-- $$= create_func_cast(YYTHD, $3, $5, Lex->length, Lex->dec,
-+ $$= create_func_cast(thd, $3, $5, Lex->length, Lex->dec,
- Lex->charset);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | CONVERT_SYM '(' expr USING charset_name ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_conv_charset($3,$5);
-+ $$= new (thd->mem_root) Item_func_conv_charset($3,$5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7423,14 +7399,14 @@ simple_expr:
- my_error(ER_WRONG_COLUMN_NAME, MYF(0), il->my_name()->str);
- MYSQL_YYABORT;
- }
-- $$= new (YYTHD->mem_root) Item_default_value(Lex->current_context(),
-+ $$= new (thd->mem_root) Item_default_value(Lex->current_context(),
- $3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | VALUES '(' simple_ident_nospvar ')'
- {
-- $$= new (YYTHD->mem_root) Item_insert_value(Lex->current_context(),
-+ $$= new (thd->mem_root) Item_insert_value(Lex->current_context(),
- $3);
- if ($$ == NULL)
- MYSQL_YYABORT;
-@@ -7438,7 +7414,7 @@ simple_expr:
- | INTERVAL_SYM expr interval '+' expr %prec INTERVAL_SYM
- /* we cannot put interval before - */
- {
-- $$= new (YYTHD->mem_root) Item_date_add_interval($5,$2,$3,0);
-+ $$= new (thd->mem_root) Item_date_add_interval($5,$2,$3,0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7453,19 +7429,19 @@ simple_expr:
- function_call_keyword:
- CHAR_SYM '(' expr_list ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_char(*$3);
-+ $$= new (thd->mem_root) Item_func_char(*$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | CHAR_SYM '(' expr_list USING charset_name ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_char(*$3, $5);
-+ $$= new (thd->mem_root) Item_func_char(*$3, $5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | CURRENT_USER optional_braces
- {
-- $$= new (YYTHD->mem_root) Item_func_current_user(Lex->current_context());
-+ $$= new (thd->mem_root) Item_func_current_user(Lex->current_context());
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->set_stmt_unsafe();
-@@ -7473,31 +7449,30 @@ function_call_keyword:
- }
- | DATE_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_date_typecast($3);
-+ $$= new (thd->mem_root) Item_date_typecast($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | DAY_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_dayofmonth($3);
-+ $$= new (thd->mem_root) Item_func_dayofmonth($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | HOUR_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_hour($3);
-+ $$= new (thd->mem_root) Item_func_hour($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | INSERT '(' expr ',' expr ',' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_insert($3,$5,$7,$9);
-+ $$= new (thd->mem_root) Item_func_insert($3,$5,$7,$9);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | INTERVAL_SYM '(' expr ',' expr ')' %prec INTERVAL_SYM
- {
-- THD *thd= YYTHD;
- List<Item> *list= new (thd->mem_root) List<Item>;
- if (list == NULL)
- MYSQL_YYABORT;
-@@ -7512,7 +7487,6 @@ function_call_keyword:
- }
- | INTERVAL_SYM '(' expr ',' expr ',' expr_list ')' %prec INTERVAL_SYM
- {
-- THD *thd= YYTHD;
- $7->push_front($5);
- $7->push_front($3);
- Item_row *item= new (thd->mem_root) Item_row(*$7);
-@@ -7524,103 +7498,103 @@ function_call_keyword:
- }
- | LEFT '(' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_left($3,$5);
-+ $$= new (thd->mem_root) Item_func_left($3,$5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | MINUTE_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_minute($3);
-+ $$= new (thd->mem_root) Item_func_minute($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | MONTH_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_month($3);
-+ $$= new (thd->mem_root) Item_func_month($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | RIGHT '(' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_right($3,$5);
-+ $$= new (thd->mem_root) Item_func_right($3,$5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | SECOND_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_second($3);
-+ $$= new (thd->mem_root) Item_func_second($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TIME_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_time_typecast($3);
-+ $$= new (thd->mem_root) Item_time_typecast($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TIMESTAMP '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_datetime_typecast($3);
-+ $$= new (thd->mem_root) Item_datetime_typecast($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TIMESTAMP '(' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_add_time($3, $5, 1, 0);
-+ $$= new (thd->mem_root) Item_func_add_time($3, $5, 1, 0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TRIM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_trim($3);
-+ $$= new (thd->mem_root) Item_func_trim($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TRIM '(' LEADING expr FROM expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_ltrim($6,$4);
-+ $$= new (thd->mem_root) Item_func_ltrim($6,$4);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TRIM '(' TRAILING expr FROM expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_rtrim($6,$4);
-+ $$= new (thd->mem_root) Item_func_rtrim($6,$4);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TRIM '(' BOTH expr FROM expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_trim($6,$4);
-+ $$= new (thd->mem_root) Item_func_trim($6,$4);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TRIM '(' LEADING FROM expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_ltrim($5);
-+ $$= new (thd->mem_root) Item_func_ltrim($5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TRIM '(' TRAILING FROM expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_rtrim($5);
-+ $$= new (thd->mem_root) Item_func_rtrim($5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TRIM '(' BOTH FROM expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_trim($5);
-+ $$= new (thd->mem_root) Item_func_trim($5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TRIM '(' expr FROM expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_trim($5,$3);
-+ $$= new (thd->mem_root) Item_func_trim($5,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | USER '(' ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_user();
-+ $$= new (thd->mem_root) Item_func_user();
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->set_stmt_unsafe();
-@@ -7628,7 +7602,7 @@ function_call_keyword:
- }
- | YEAR_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_year($3);
-+ $$= new (thd->mem_root) Item_func_year($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7649,34 +7623,34 @@ function_call_keyword:
- function_call_nonkeyword:
- ADDDATE_SYM '(' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $5,
-+ $$= new (thd->mem_root) Item_date_add_interval($3, $5,
- INTERVAL_DAY, 0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | ADDDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')'
- {
-- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $6, $7, 0);
-+ $$= new (thd->mem_root) Item_date_add_interval($3, $6, $7, 0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | CURDATE optional_braces
- {
-- $$= new (YYTHD->mem_root) Item_func_curdate_local();
-+ $$= new (thd->mem_root) Item_func_curdate_local();
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->safe_to_cache_query=0;
- }
- | CURTIME optional_braces
- {
-- $$= new (YYTHD->mem_root) Item_func_curtime_local();
-+ $$= new (thd->mem_root) Item_func_curtime_local();
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->safe_to_cache_query=0;
- }
- | CURTIME '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_curtime_local($3);
-+ $$= new (thd->mem_root) Item_func_curtime_local($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->safe_to_cache_query=0;
-@@ -7684,83 +7658,83 @@ function_call_nonkeyword:
- | DATE_ADD_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')'
- %prec INTERVAL_SYM
- {
-- $$= new (YYTHD->mem_root) Item_date_add_interval($3,$6,$7,0);
-+ $$= new (thd->mem_root) Item_date_add_interval($3,$6,$7,0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | DATE_SUB_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')'
- %prec INTERVAL_SYM
- {
-- $$= new (YYTHD->mem_root) Item_date_add_interval($3,$6,$7,1);
-+ $$= new (thd->mem_root) Item_date_add_interval($3,$6,$7,1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | EXTRACT_SYM '(' interval FROM expr ')'
- {
-- $$=new (YYTHD->mem_root) Item_extract( $3, $5);
-+ $$=new (thd->mem_root) Item_extract( $3, $5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | GET_FORMAT '(' date_time_type ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_get_format($3, $5);
-+ $$= new (thd->mem_root) Item_func_get_format($3, $5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | NOW_SYM optional_braces
- {
-- $$= new (YYTHD->mem_root) Item_func_now_local();
-+ $$= new (thd->mem_root) Item_func_now_local();
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->safe_to_cache_query=0;
- }
- | NOW_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_now_local($3);
-+ $$= new (thd->mem_root) Item_func_now_local($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->safe_to_cache_query=0;
- }
- | POSITION_SYM '(' bit_expr IN_SYM expr ')'
- {
-- $$ = new (YYTHD->mem_root) Item_func_locate($5,$3);
-+ $$ = new (thd->mem_root) Item_func_locate($5,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | SUBDATE_SYM '(' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $5,
-+ $$= new (thd->mem_root) Item_date_add_interval($3, $5,
- INTERVAL_DAY, 1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | SUBDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')'
- {
-- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $6, $7, 1);
-+ $$= new (thd->mem_root) Item_date_add_interval($3, $6, $7, 1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | SUBSTRING '(' expr ',' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_substr($3,$5,$7);
-+ $$= new (thd->mem_root) Item_func_substr($3,$5,$7);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | SUBSTRING '(' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_substr($3,$5);
-+ $$= new (thd->mem_root) Item_func_substr($3,$5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | SUBSTRING '(' expr FROM expr FOR_SYM expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_substr($3,$5,$7);
-+ $$= new (thd->mem_root) Item_func_substr($3,$5,$7);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | SUBSTRING '(' expr FROM expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_substr($3,$5);
-+ $$= new (thd->mem_root) Item_func_substr($3,$5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7775,9 +7749,9 @@ function_call_nonkeyword:
- */
- Lex->set_stmt_unsafe();
- if (global_system_variables.sysdate_is_now == 0)
-- $$= new (YYTHD->mem_root) Item_func_sysdate_local();
-+ $$= new (thd->mem_root) Item_func_sysdate_local();
- else
-- $$= new (YYTHD->mem_root) Item_func_now_local();
-+ $$= new (thd->mem_root) Item_func_now_local();
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->safe_to_cache_query=0;
-@@ -7785,42 +7759,42 @@ function_call_nonkeyword:
- | SYSDATE '(' expr ')'
- {
- if (global_system_variables.sysdate_is_now == 0)
-- $$= new (YYTHD->mem_root) Item_func_sysdate_local($3);
-+ $$= new (thd->mem_root) Item_func_sysdate_local($3);
- else
-- $$= new (YYTHD->mem_root) Item_func_now_local($3);
-+ $$= new (thd->mem_root) Item_func_now_local($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->safe_to_cache_query=0;
- }
- | TIMESTAMP_ADD '(' interval_time_stamp ',' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_date_add_interval($7,$5,$3,0);
-+ $$= new (thd->mem_root) Item_date_add_interval($7,$5,$3,0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TIMESTAMP_DIFF '(' interval_time_stamp ',' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_timestamp_diff($5,$7,$3);
-+ $$= new (thd->mem_root) Item_func_timestamp_diff($5,$7,$3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | UTC_DATE_SYM optional_braces
- {
-- $$= new (YYTHD->mem_root) Item_func_curdate_utc();
-+ $$= new (thd->mem_root) Item_func_curdate_utc();
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->safe_to_cache_query=0;
- }
- | UTC_TIME_SYM optional_braces
- {
-- $$= new (YYTHD->mem_root) Item_func_curtime_utc();
-+ $$= new (thd->mem_root) Item_func_curtime_utc();
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->safe_to_cache_query=0;
- }
- | UTC_TIMESTAMP_SYM optional_braces
- {
-- $$= new (YYTHD->mem_root) Item_func_now_utc();
-+ $$= new (thd->mem_root) Item_func_now_utc();
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->safe_to_cache_query=0;
-@@ -7835,62 +7809,61 @@ function_call_nonkeyword:
- function_call_conflict:
- ASCII_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_ascii($3);
-+ $$= new (thd->mem_root) Item_func_ascii($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | CHARSET '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_charset($3);
-+ $$= new (thd->mem_root) Item_func_charset($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | COALESCE '(' expr_list ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_coalesce(* $3);
-+ $$= new (thd->mem_root) Item_func_coalesce(* $3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | COLLATION_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_collation($3);
-+ $$= new (thd->mem_root) Item_func_collation($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | DATABASE '(' ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_database();
-+ $$= new (thd->mem_root) Item_func_database();
- if ($$ == NULL)
- MYSQL_YYABORT;
- Lex->safe_to_cache_query=0;
- }
- | IF '(' expr ',' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_if($3,$5,$7);
-+ $$= new (thd->mem_root) Item_func_if($3,$5,$7);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | MICROSECOND_SYM '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_microsecond($3);
-+ $$= new (thd->mem_root) Item_func_microsecond($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | MOD_SYM '(' expr ',' expr ')'
- {
-- $$ = new (YYTHD->mem_root) Item_func_mod($3, $5);
-+ $$ = new (thd->mem_root) Item_func_mod($3, $5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | OLD_PASSWORD '(' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_old_password($3);
-+ $$= new (thd->mem_root) Item_func_old_password($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | PASSWORD '(' expr ')'
- {
-- THD *thd= YYTHD;
- Item* i1;
- if (thd->variables.old_passwords)
- i1= new (thd->mem_root) Item_func_old_password($3);
-@@ -7902,31 +7875,30 @@ function_call_conflict:
- }
- | QUARTER_SYM '(' expr ')'
- {
-- $$ = new (YYTHD->mem_root) Item_func_quarter($3);
-+ $$ = new (thd->mem_root) Item_func_quarter($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | REPEAT_SYM '(' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_repeat($3,$5);
-+ $$= new (thd->mem_root) Item_func_repeat($3,$5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | REPLACE '(' expr ',' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_replace($3,$5,$7);
-+ $$= new (thd->mem_root) Item_func_replace($3,$5,$7);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TRUNCATE_SYM '(' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_round($3,$5,1);
-+ $$= new (thd->mem_root) Item_func_round($3,$5,1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | WEEK_SYM '(' expr ')'
- {
-- THD *thd= YYTHD;
- Item *i1= new (thd->mem_root) Item_int((char*) "0",
- thd->variables.default_week_format,
- 1);
-@@ -7938,7 +7910,7 @@ function_call_conflict:
- }
- | WEEK_SYM '(' expr ',' expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_func_week($3,$5);
-+ $$= new (thd->mem_root) Item_func_week($3,$5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -7960,52 +7932,52 @@ function_call_conflict:
- geometry_function:
- CONTAINS_SYM '(' expr ',' expr ')'
- {
-- $$= GEOM_NEW(YYTHD,
-+ $$= GEOM_NEW(thd,
- Item_func_spatial_rel($3, $5,
- Item_func::SP_CONTAINS_FUNC));
- }
- | GEOMETRYCOLLECTION '(' expr_list ')'
- {
-- $$= GEOM_NEW(YYTHD,
-+ $$= GEOM_NEW(thd,
- Item_func_spatial_collection(* $3,
- Geometry::wkb_geometrycollection,
- Geometry::wkb_point));
- }
- | LINESTRING '(' expr_list ')'
- {
-- $$= GEOM_NEW(YYTHD,
-+ $$= GEOM_NEW(thd,
- Item_func_spatial_collection(* $3,
- Geometry::wkb_linestring,
- Geometry::wkb_point));
- }
- | MULTILINESTRING '(' expr_list ')'
- {
-- $$= GEOM_NEW(YYTHD,
-+ $$= GEOM_NEW(thd,
- Item_func_spatial_collection(* $3,
- Geometry::wkb_multilinestring,
- Geometry::wkb_linestring));
- }
- | MULTIPOINT '(' expr_list ')'
- {
-- $$= GEOM_NEW(YYTHD,
-+ $$= GEOM_NEW(thd,
- Item_func_spatial_collection(* $3,
- Geometry::wkb_multipoint,
- Geometry::wkb_point));
- }
- | MULTIPOLYGON '(' expr_list ')'
- {
-- $$= GEOM_NEW(YYTHD,
-+ $$= GEOM_NEW(thd,
- Item_func_spatial_collection(* $3,
- Geometry::wkb_multipolygon,
- Geometry::wkb_polygon));
- }
- | POINT_SYM '(' expr ',' expr ')'
- {
-- $$= GEOM_NEW(YYTHD, Item_func_point($3,$5));
-+ $$= GEOM_NEW(thd, Item_func_point($3,$5));
- }
- | POLYGON '(' expr_list ')'
- {
-- $$= GEOM_NEW(YYTHD,
-+ $$= GEOM_NEW(thd,
- Item_func_spatial_collection(* $3,
- Geometry::wkb_polygon,
- Geometry::wkb_linestring));
-@@ -8043,7 +8015,6 @@ function_call_generic:
- }
- opt_udf_expr_list ')'
- {
-- THD *thd= YYTHD;
- Create_func *builder;
- Item *item= NULL;
-
-@@ -8097,7 +8068,6 @@ function_call_generic:
- }
- | ident '.' ident '(' opt_expr_list ')'
- {
-- THD *thd= YYTHD;
- Create_qfunc *builder;
- Item *item= NULL;
-
-@@ -8161,7 +8131,7 @@ opt_udf_expr_list:
- udf_expr_list:
- udf_expr
- {
-- $$= new (YYTHD->mem_root) List<Item>;
-+ $$= new (thd->mem_root) List<Item>;
- if ($$ == NULL)
- MYSQL_YYABORT;
- $$->push_back($1);
-@@ -8194,7 +8164,7 @@ udf_expr:
- remember_name we may get quoted or escaped names.
- */
- else if ($2->type() != Item::FIELD_ITEM)
-- $2->set_name($1, (uint) ($3 - $1), YYTHD->charset());
-+ $2->set_name($1, (uint) ($3 - $1), thd->charset());
- $$= $2;
- }
- ;
-@@ -8202,46 +8172,46 @@ udf_expr:
- sum_expr:
- AVG_SYM '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_avg($3);
-+ $$= new (thd->mem_root) Item_sum_avg($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | AVG_SYM '(' DISTINCT in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_avg_distinct($4);
-+ $$= new (thd->mem_root) Item_sum_avg_distinct($4);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | BIT_AND '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_and($3);
-+ $$= new (thd->mem_root) Item_sum_and($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | BIT_OR '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_or($3);
-+ $$= new (thd->mem_root) Item_sum_or($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | BIT_XOR '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_xor($3);
-+ $$= new (thd->mem_root) Item_sum_xor($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | COUNT_SYM '(' opt_all '*' ')'
- {
-- Item *item= new (YYTHD->mem_root) Item_int((int32) 0L,1);
-+ Item *item= new (thd->mem_root) Item_int((int32) 0L,1);
- if (item == NULL)
- MYSQL_YYABORT;
-- $$= new (YYTHD->mem_root) Item_sum_count(item);
-+ $$= new (thd->mem_root) Item_sum_count(item);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | COUNT_SYM '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_count($3);
-+ $$= new (thd->mem_root) Item_sum_count($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -8251,13 +8221,13 @@ sum_expr:
- { Select->in_sum_expr--; }
- ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_count_distinct(* $5);
-+ $$= new (thd->mem_root) Item_sum_count_distinct(* $5);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | MIN_SYM '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_min($3);
-+ $$= new (thd->mem_root) Item_sum_min($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -8268,55 +8238,55 @@ sum_expr:
- */
- | MIN_SYM '(' DISTINCT in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_min($4);
-+ $$= new (thd->mem_root) Item_sum_min($4);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | MAX_SYM '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_max($3);
-+ $$= new (thd->mem_root) Item_sum_max($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | MAX_SYM '(' DISTINCT in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_max($4);
-+ $$= new (thd->mem_root) Item_sum_max($4);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | STD_SYM '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_std($3, 0);
-+ $$= new (thd->mem_root) Item_sum_std($3, 0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | VARIANCE_SYM '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_variance($3, 0);
-+ $$= new (thd->mem_root) Item_sum_variance($3, 0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | STDDEV_SAMP_SYM '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_std($3, 1);
-+ $$= new (thd->mem_root) Item_sum_std($3, 1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | VAR_SAMP_SYM '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_variance($3, 1);
-+ $$= new (thd->mem_root) Item_sum_variance($3, 1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | SUM_SYM '(' in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_sum($3);
-+ $$= new (thd->mem_root) Item_sum_sum($3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | SUM_SYM '(' DISTINCT in_sum_expr ')'
- {
-- $$= new (YYTHD->mem_root) Item_sum_sum_distinct($4);
-+ $$= new (thd->mem_root) Item_sum_sum_distinct($4);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -8328,7 +8298,7 @@ sum_expr:
- {
- SELECT_LEX *sel= Select;
- sel->in_sum_expr--;
-- $$= new (YYTHD->mem_root)
-+ $$= new (thd->mem_root)
- Item_func_group_concat(Lex->current_context(), $3, $5,
- sel->gorder_list, $7);
- if ($$ == NULL)
-@@ -8357,7 +8327,7 @@ variable_aux:
- ident_or_text SET_VAR expr
- {
- Item_func_set_user_var *item;
-- $$= item= new (YYTHD->mem_root) Item_func_set_user_var($1, $3);
-+ $$= item= new (thd->mem_root) Item_func_set_user_var($1, $3);
- if ($$ == NULL)
- MYSQL_YYABORT;
- LEX *lex= Lex;
-@@ -8366,7 +8336,7 @@ variable_aux:
- }
- | ident_or_text
- {
-- $$= new (YYTHD->mem_root) Item_func_get_user_var($1);
-+ $$= new (thd->mem_root) Item_func_get_user_var($1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- LEX *lex= Lex;
-@@ -8380,7 +8350,7 @@ variable_aux:
- my_parse_error(ER(ER_SYNTAX_ERROR));
- MYSQL_YYABORT;
- }
-- if (!($$= get_system_var(YYTHD, $2, $3, $4)))
-+ if (!($$= get_system_var(thd, $2, $3, $4)))
- MYSQL_YYABORT;
- if (!((Item_func_get_system_var*) $$)->is_written_to_binlog())
- Lex->set_stmt_unsafe();
-@@ -8395,7 +8365,7 @@ opt_distinct:
- opt_gconcat_separator:
- /* empty */
- {
-- $$= new (YYTHD->mem_root) String(",", 1, &my_charset_latin1);
-+ $$= new (thd->mem_root) String(",", 1, &my_charset_latin1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -8422,9 +8392,9 @@ opt_gorder_clause:
-
- gorder_list:
- gorder_list ',' order_ident order_dir
-- { if (add_gorder_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; }
-+ { if (add_gorder_to_list(thd, $3,(bool) $4)) MYSQL_YYABORT; }
- | order_ident order_dir
-- { if (add_gorder_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; }
-+ { if (add_gorder_to_list(thd, $1,(bool) $2)) MYSQL_YYABORT; }
- ;
-
- in_sum_expr:
-@@ -8477,7 +8447,7 @@ opt_expr_list:
- expr_list:
- expr
- {
-- $$= new (YYTHD->mem_root) List<Item>;
-+ $$= new (thd->mem_root) List<Item>;
- if ($$ == NULL)
- MYSQL_YYABORT;
- $$->push_back($1);
-@@ -8497,7 +8467,7 @@ ident_list_arg:
- ident_list:
- simple_ident
- {
-- $$= new (YYTHD->mem_root) List<Item>;
-+ $$= new (thd->mem_root) List<Item>;
- if ($$ == NULL)
- MYSQL_YYABORT;
- $$->push_back($1);
-@@ -8595,7 +8565,7 @@ join_table:
- {
- MYSQL_YYABORT_UNLESS($1 && $3);
- /* Change the current name resolution context to a local context. */
-- if (push_new_name_resolution_context(YYTHD, $1, $3))
-+ if (push_new_name_resolution_context(thd, $1, $3))
- MYSQL_YYABORT;
- Select->parsing_place= IN_ON;
- }
-@@ -8610,7 +8580,7 @@ join_table:
- {
- MYSQL_YYABORT_UNLESS($1 && $3);
- /* Change the current name resolution context to a local context. */
-- if (push_new_name_resolution_context(YYTHD, $1, $3))
-+ if (push_new_name_resolution_context(thd, $1, $3))
- MYSQL_YYABORT;
- Select->parsing_place= IN_ON;
- }
-@@ -8640,7 +8610,7 @@ join_table:
- {
- MYSQL_YYABORT_UNLESS($1 && $5);
- /* Change the current name resolution context to a local context. */
-- if (push_new_name_resolution_context(YYTHD, $1, $5))
-+ if (push_new_name_resolution_context(thd, $1, $5))
- MYSQL_YYABORT;
- Select->parsing_place= IN_ON;
- }
-@@ -8676,7 +8646,7 @@ join_table:
- {
- MYSQL_YYABORT_UNLESS($1 && $5);
- /* Change the current name resolution context to a local context. */
-- if (push_new_name_resolution_context(YYTHD, $1, $5))
-+ if (push_new_name_resolution_context(thd, $1, $5))
- MYSQL_YYABORT;
- Select->parsing_place= IN_ON;
- }
-@@ -8724,7 +8694,7 @@ table_factor:
- }
- table_ident opt_table_alias opt_key_definition
- {
-- if (!($$= Select->add_table_to_list(YYTHD, $2, $3,
-+ if (!($$= Select->add_table_to_list(thd, $2, $3,
- Select->get_table_join_options(),
- Lex->lock_option,
- Select->pop_index_hints())))
-@@ -8922,7 +8892,7 @@ index_hints_list:
-
- opt_index_hints_list:
- /* empty */
-- | { Select->alloc_index_hints(YYTHD); } index_hints_list
-+ | { Select->alloc_index_hints(thd); } index_hints_list
- ;
-
- opt_key_definition:
-@@ -8931,15 +8901,15 @@ opt_key_definition:
- ;
-
- opt_key_usage_list:
-- /* empty */ { Select->add_index_hint(YYTHD, NULL, 0); }
-+ /* empty */ { Select->add_index_hint(thd, NULL, 0); }
- | key_usage_list {}
- ;
-
- key_usage_element:
- ident
-- { Select->add_index_hint(YYTHD, $1.str, $1.length); }
-+ { Select->add_index_hint(thd, $1.str, $1.length); }
- | PRIMARY_SYM
-- { Select->add_index_hint(YYTHD, (char *)"PRIMARY", 7); }
-+ { Select->add_index_hint(thd, (char *)"PRIMARY", 7); }
- ;
-
- key_usage_list:
-@@ -8952,7 +8922,7 @@ using_list:
- {
- if (!($$= new List<String>))
- MYSQL_YYABORT;
-- String *s= new (YYTHD->mem_root) String((const char *) $1.str,
-+ String *s= new (thd->mem_root) String((const char *) $1.str,
- $1.length,
- system_charset_info);
- if (s == NULL)
-@@ -8961,7 +8931,7 @@ using_list:
- }
- | using_list ',' ident
- {
-- String *s= new (YYTHD->mem_root) String((const char *) $3.str,
-+ String *s= new (thd->mem_root) String((const char *) $3.str,
- $3.length,
- system_charset_info);
- if (s == NULL)
-@@ -9002,7 +8972,7 @@ interval_time_stamp:
- implementation without changing its
- resolution.
- */
-- WARN_DEPRECATED(yythd, VER_CELOSIA, "FRAC_SECOND", "MICROSECOND");
-+ WARN_DEPRECATED(thd, VER_CELOSIA, "FRAC_SECOND", "MICROSECOND");
- }
- ;
-
-@@ -9086,7 +9056,6 @@ opt_escape:
- }
- | /* empty */
- {
-- THD *thd= YYTHD;
- Lex->escape_used= FALSE;
- $$= ((thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) ?
- new (thd->mem_root) Item_string("", 0, &my_charset_latin1) :
-@@ -9107,9 +9076,9 @@ group_clause:
-
- group_list:
- group_list ',' order_ident order_dir
-- { if (add_group_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; }
-+ { if (add_group_to_list(thd, $3,(bool) $4)) MYSQL_YYABORT; }
- | order_ident order_dir
-- { if (add_group_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; }
-+ { if (add_group_to_list(thd, $1,(bool) $2)) MYSQL_YYABORT; }
- ;
-
- olap_opt:
-@@ -9156,7 +9125,6 @@ alter_order_list:
- alter_order_item:
- simple_ident_nospvar order_dir
- {
-- THD *thd= YYTHD;
- bool ascending= ($2 == 1) ? true : false;
- if (add_order_to_list(thd, $1, ascending))
- MYSQL_YYABORT;
-@@ -9209,9 +9177,9 @@ order_clause:
-
- order_list:
- order_list ',' order_ident order_dir
-- { if (add_order_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; }
-+ { if (add_order_to_list(thd, $3,(bool) $4)) MYSQL_YYABORT; }
- | order_ident order_dir
-- { if (add_order_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; }
-+ { if (add_order_to_list(thd, $1,(bool) $2)) MYSQL_YYABORT; }
- ;
-
- order_dir:
-@@ -9271,19 +9239,19 @@ limit_option:
- }
- | ULONGLONG_NUM
- {
-- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length);
-+ $$= new (thd->mem_root) Item_uint($1.str, $1.length);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | LONG_NUM
- {
-- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length);
-+ $$= new (thd->mem_root) Item_uint($1.str, $1.length);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | NUM
- {
-- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length);
-+ $$= new (thd->mem_root) Item_uint($1.str, $1.length);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -9365,7 +9333,7 @@ procedure_clause:
- lex->proc_list.elements=0;
- lex->proc_list.first=0;
- lex->proc_list.next= &lex->proc_list.first;
-- Item_field *item= new (YYTHD->mem_root)
-+ Item_field *item= new (thd->mem_root)
- Item_field(&lex->current_select->context,
- NULL, NULL, $2.str);
- if (item == NULL)
-@@ -9390,8 +9358,6 @@ procedure_list2:
- procedure_item:
- remember_name expr remember_end
- {
-- THD *thd= YYTHD;
--
- if (add_proc_to_list(thd, $2))
- MYSQL_YYABORT;
- if (!$2->name)
-@@ -9560,7 +9526,6 @@ drop:
- }
- | DROP FUNCTION_SYM if_exists ident '.' ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- sp_name *spname;
- if ($4.str && check_db_name(&$4))
-@@ -9583,7 +9548,6 @@ drop:
- }
- | DROP FUNCTION_SYM if_exists ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- LEX_STRING db= {0, 0};
- sp_name *spname;
-@@ -9664,7 +9628,7 @@ table_list:
- table_name:
- table_ident
- {
-- if (!Select->add_table_to_list(YYTHD, $1, NULL, TL_OPTION_UPDATING))
-+ if (!Select->add_table_to_list(thd, $1, NULL, TL_OPTION_UPDATING))
- MYSQL_YYABORT;
- }
- ;
-@@ -9677,7 +9641,7 @@ table_alias_ref_list:
- table_alias_ref:
- table_ident_opt_wild
- {
-- if (!Select->add_table_to_list(YYTHD, $1, NULL,
-+ if (!Select->add_table_to_list(thd, $1, NULL,
- TL_OPTION_UPDATING | TL_OPTION_ALIAS,
- Lex->lock_option ))
- MYSQL_YYABORT;
-@@ -9868,7 +9832,7 @@ expr_or_default:
- expr { $$= $1;}
- | DEFAULT
- {
-- $$= new (YYTHD->mem_root) Item_default_value(Lex->current_context());
-+ $$= new (thd->mem_root) Item_default_value(Lex->current_context());
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -9922,7 +9886,7 @@ update_list:
- update_elem:
- simple_ident_nospvar equal expr_or_default
- {
-- if (add_item_to_list(YYTHD, $1) || add_value_to_list(YYTHD, $3))
-+ if (add_item_to_list(thd, $1) || add_value_to_list(thd, $3))
- MYSQL_YYABORT;
- }
- ;
-@@ -9965,7 +9929,7 @@ delete:
- single_multi:
- FROM table_ident
- {
-- if (!Select->add_table_to_list(YYTHD, $2, NULL, TL_OPTION_UPDATING,
-+ if (!Select->add_table_to_list(thd, $2, NULL, TL_OPTION_UPDATING,
- Lex->lock_option))
- MYSQL_YYABORT;
- }
-@@ -9998,7 +9962,7 @@ table_wild_one:
- Table_ident *ti= new Table_ident($1);
- if (ti == NULL)
- MYSQL_YYABORT;
-- if (!Select->add_table_to_list(YYTHD,
-+ if (!Select->add_table_to_list(thd,
- ti,
- $3,
- TL_OPTION_UPDATING | TL_OPTION_ALIAS,
-@@ -10007,10 +9971,10 @@ table_wild_one:
- }
- | ident '.' ident opt_wild opt_table_alias
- {
-- Table_ident *ti= new Table_ident(YYTHD, $1, $3, 0);
-+ Table_ident *ti= new Table_ident(thd, $1, $3, 0);
- if (ti == NULL)
- MYSQL_YYABORT;
-- if (!Select->add_table_to_list(YYTHD,
-+ if (!Select->add_table_to_list(thd,
- ti,
- $5,
- TL_OPTION_UPDATING | TL_OPTION_ALIAS,
-@@ -10130,7 +10094,7 @@ show_param:
- {
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_DATABASES;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_SCHEMATA))
-+ if (prepare_schema_table(thd, lex, 0, SCH_SCHEMATA))
- MYSQL_YYABORT;
- }
- | opt_full TABLES opt_db wild_and_where
-@@ -10138,7 +10102,7 @@ show_param:
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_TABLES;
- lex->select_lex.db= $3;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLE_NAMES))
-+ if (prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES))
- MYSQL_YYABORT;
- }
- | opt_full TRIGGERS_SYM opt_db wild_and_where
-@@ -10146,7 +10110,7 @@ show_param:
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_TRIGGERS;
- lex->select_lex.db= $3;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_TRIGGERS))
-+ if (prepare_schema_table(thd, lex, 0, SCH_TRIGGERS))
- MYSQL_YYABORT;
- }
- | EVENTS_SYM opt_db wild_and_where
-@@ -10154,7 +10118,7 @@ show_param:
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_EVENTS;
- lex->select_lex.db= $2;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_EVENTS))
-+ if (prepare_schema_table(thd, lex, 0, SCH_EVENTS))
- MYSQL_YYABORT;
- }
- | TABLE_SYM STATUS_SYM opt_db wild_and_where
-@@ -10162,7 +10126,7 @@ show_param:
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
- lex->select_lex.db= $3;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLES))
-+ if (prepare_schema_table(thd, lex, 0, SCH_TABLES))
- MYSQL_YYABORT;
- }
- | OPEN_SYM TABLES opt_db wild_and_where
-@@ -10170,22 +10134,22 @@ show_param:
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
- lex->select_lex.db= $3;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_OPEN_TABLES))
-+ if (prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES))
- MYSQL_YYABORT;
- }
- | opt_full PLUGIN_SYM
- {
- LEX *lex= Lex;
-- WARN_DEPRECATED(yythd, "6.0", "SHOW PLUGIN", "'SHOW PLUGINS'");
-+ WARN_DEPRECATED(thd, "6.0", "SHOW PLUGIN", "'SHOW PLUGINS'");
- lex->sql_command= SQLCOM_SHOW_PLUGINS;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_PLUGINS))
-+ if (prepare_schema_table(thd, lex, 0, SCH_PLUGINS))
- MYSQL_YYABORT;
- }
- | PLUGINS_SYM
- {
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_PLUGINS;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_PLUGINS))
-+ if (prepare_schema_table(thd, lex, 0, SCH_PLUGINS))
- MYSQL_YYABORT;
- }
- | ENGINE_SYM known_storage_engines show_engine_param
-@@ -10198,7 +10162,7 @@ show_param:
- lex->sql_command= SQLCOM_SHOW_FIELDS;
- if ($5)
- $4->change_db($5);
-- if (prepare_schema_table(YYTHD, lex, $4, SCH_COLUMNS))
-+ if (prepare_schema_table(thd, lex, $4, SCH_COLUMNS))
- MYSQL_YYABORT;
- }
- | NEW_SYM MASTER_SYM FOR_SYM SLAVE
-@@ -10233,7 +10197,7 @@ show_param:
- lex->sql_command= SQLCOM_SHOW_KEYS;
- if ($4)
- $3->change_db($4);
-- if (prepare_schema_table(YYTHD, lex, $3, SCH_STATISTICS))
-+ if (prepare_schema_table(thd, lex, $3, SCH_STATISTICS))
- MYSQL_YYABORT;
- }
- | COLUMN_SYM TYPES_SYM
-@@ -10245,15 +10209,15 @@ show_param:
- {
- LEX *lex=Lex;
- lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
-- WARN_DEPRECATED(yythd, "6.0", "SHOW TABLE TYPES", "'SHOW [STORAGE] ENGINES'");
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_ENGINES))
-+ WARN_DEPRECATED(thd, "6.0", "SHOW TABLE TYPES", "'SHOW [STORAGE] ENGINES'");
-+ if (prepare_schema_table(thd, lex, 0, SCH_ENGINES))
- MYSQL_YYABORT;
- }
- | opt_storage ENGINES_SYM
- {
- LEX *lex=Lex;
- lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_ENGINES))
-+ if (prepare_schema_table(thd, lex, 0, SCH_ENGINES))
- MYSQL_YYABORT;
- }
- | AUTHORS_SYM
-@@ -10285,7 +10249,7 @@ show_param:
- {
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_PROFILE;
-- if (prepare_schema_table(YYTHD, lex, NULL, SCH_PROFILES) != 0)
-+ if (prepare_schema_table(thd, lex, NULL, SCH_PROFILES) != 0)
- YYABORT;
- }
- | opt_var_type STATUS_SYM wild_and_where
-@@ -10293,7 +10257,7 @@ show_param:
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_STATUS;
- lex->option_type= $1;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_STATUS))
-+ if (prepare_schema_table(thd, lex, 0, SCH_STATUS))
- MYSQL_YYABORT;
- }
- | INNOBASE_SYM STATUS_SYM
-@@ -10301,24 +10265,24 @@ show_param:
- LEX *lex= Lex;
- lex->sql_command = SQLCOM_SHOW_ENGINE_STATUS;
- if (!(lex->create_info.db_type=
-- ha_resolve_by_legacy_type(YYTHD, DB_TYPE_INNODB)))
-+ ha_resolve_by_legacy_type(thd, DB_TYPE_INNODB)))
- {
- my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "InnoDB");
- MYSQL_YYABORT;
- }
-- WARN_DEPRECATED(yythd, "6.0", "SHOW INNODB STATUS", "'SHOW ENGINE INNODB STATUS'");
-+ WARN_DEPRECATED(thd, "6.0", "SHOW INNODB STATUS", "'SHOW ENGINE INNODB STATUS'");
- }
- | MUTEX_SYM STATUS_SYM
- {
- LEX *lex= Lex;
- lex->sql_command = SQLCOM_SHOW_ENGINE_MUTEX;
- if (!(lex->create_info.db_type=
-- ha_resolve_by_legacy_type(YYTHD, DB_TYPE_INNODB)))
-+ ha_resolve_by_legacy_type(thd, DB_TYPE_INNODB)))
- {
- my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "InnoDB");
- MYSQL_YYABORT;
- }
-- WARN_DEPRECATED(yythd, "6.0", "SHOW MUTEX STATUS", "'SHOW ENGINE INNODB MUTEX'");
-+ WARN_DEPRECATED(thd, "6.0", "SHOW MUTEX STATUS", "'SHOW ENGINE INNODB MUTEX'");
- }
- | opt_full PROCESSLIST_SYM
- { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
-@@ -10327,21 +10291,21 @@ show_param:
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_VARIABLES;
- lex->option_type= $1;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_VARIABLES))
-+ if (prepare_schema_table(thd, lex, 0, SCH_VARIABLES))
- MYSQL_YYABORT;
- }
- | charset wild_and_where
- {
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_CHARSETS;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_CHARSETS))
-+ if (prepare_schema_table(thd, lex, 0, SCH_CHARSETS))
- MYSQL_YYABORT;
- }
- | COLLATION_SYM wild_and_where
- {
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_COLLATIONS;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_COLLATIONS))
-+ if (prepare_schema_table(thd, lex, 0, SCH_COLLATIONS))
- MYSQL_YYABORT;
- }
- | GRANTS
-@@ -10371,7 +10335,7 @@ show_param:
- {
- LEX *lex= Lex;
- lex->sql_command = SQLCOM_SHOW_CREATE;
-- if (!lex->select_lex.add_table_to_list(YYTHD, $3, NULL,0))
-+ if (!lex->select_lex.add_table_to_list(thd, $3, NULL,0))
- MYSQL_YYABORT;
- lex->only_view= 0;
- lex->create_info.storage_media= HA_SM_DEFAULT;
-@@ -10380,7 +10344,7 @@ show_param:
- {
- LEX *lex= Lex;
- lex->sql_command = SQLCOM_SHOW_CREATE;
-- if (!lex->select_lex.add_table_to_list(YYTHD, $3, NULL, 0))
-+ if (!lex->select_lex.add_table_to_list(thd, $3, NULL, 0))
- MYSQL_YYABORT;
- lex->only_view= 1;
- }
-@@ -10416,14 +10380,14 @@ show_param:
- {
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_STATUS_PROC;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_PROCEDURES))
-+ if (prepare_schema_table(thd, lex, 0, SCH_PROCEDURES))
- MYSQL_YYABORT;
- }
- | FUNCTION_SYM STATUS_SYM wild_and_where
- {
- LEX *lex= Lex;
- lex->sql_command= SQLCOM_SHOW_STATUS_FUNC;
-- if (prepare_schema_table(YYTHD, lex, 0, SCH_PROCEDURES))
-+ if (prepare_schema_table(thd, lex, 0, SCH_PROCEDURES))
- MYSQL_YYABORT;
- }
- | PROCEDURE CODE_SYM sp_name
-@@ -10501,7 +10465,7 @@ wild_and_where:
- /* empty */
- | LIKE TEXT_STRING_sys
- {
-- Lex->wild= new (YYTHD->mem_root) String($2.str, $2.length,
-+ Lex->wild= new (thd->mem_root) String($2.str, $2.length,
- system_charset_info);
- if (Lex->wild == NULL)
- MYSQL_YYABORT;
-@@ -10525,7 +10489,7 @@ describe:
- lex->sql_command= SQLCOM_SHOW_FIELDS;
- lex->select_lex.db= 0;
- lex->verbose= 0;
-- if (prepare_schema_table(YYTHD, lex, $2, SCH_COLUMNS))
-+ if (prepare_schema_table(thd, lex, $2, SCH_COLUMNS))
- MYSQL_YYABORT;
- }
- opt_describe_column {}
-@@ -10554,7 +10518,7 @@ opt_describe_column:
- | text_string { Lex->wild= $1; }
- | ident
- {
-- Lex->wild= new (YYTHD->mem_root) String((const char*) $1.str,
-+ Lex->wild= new (thd->mem_root) String((const char*) $1.str,
- $1.length,
- system_charset_info);
- if (Lex->wild == NULL)
-@@ -10697,7 +10661,6 @@ use:
- load:
- LOAD DATA_SYM
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
-
- if (lex->sphead)
-@@ -10711,7 +10674,7 @@ load:
- | LOAD TABLE_SYM table_ident FROM MASTER_SYM
- {
- LEX *lex=Lex;
-- WARN_DEPRECATED(yythd, "6.0", "LOAD TABLE FROM MASTER",
-+ WARN_DEPRECATED(thd, "6.0", "LOAD TABLE FROM MASTER",
- "MySQL Administrator (mysqldump, mysql)");
- if (lex->sphead)
- {
-@@ -10719,7 +10682,7 @@ load:
- MYSQL_YYABORT;
- }
- lex->sql_command = SQLCOM_LOAD_MASTER_TABLE;
-- if (!Select->add_table_to_list(YYTHD, $3, NULL, TL_OPTION_UPDATING))
-+ if (!Select->add_table_to_list(thd, $3, NULL, TL_OPTION_UPDATING))
- MYSQL_YYABORT;
- }
- ;
-@@ -10739,7 +10702,7 @@ load_data:
- opt_duplicate INTO TABLE_SYM table_ident
- {
- LEX *lex=Lex;
-- if (!Select->add_table_to_list(YYTHD, $9, NULL, TL_OPTION_UPDATING,
-+ if (!Select->add_table_to_list(thd, $9, NULL, TL_OPTION_UPDATING,
- lex->lock_option))
- MYSQL_YYABORT;
- lex->field_list.empty();
-@@ -10754,7 +10717,7 @@ load_data:
- | FROM MASTER_SYM
- {
- Lex->sql_command = SQLCOM_LOAD_MASTER_DATA;
-- WARN_DEPRECATED(yythd, "6.0", "LOAD DATA FROM MASTER",
-+ WARN_DEPRECATED(thd, "6.0", "LOAD DATA FROM MASTER",
- "mysqldump or future "
- "BACKUP/RESTORE DATABASE facility");
- }
-@@ -10872,7 +10835,7 @@ field_or_var:
- simple_ident_nospvar {$$= $1;}
- | '@' ident_or_text
- {
-- $$= new (YYTHD->mem_root) Item_user_var_as_out_param($2);
-+ $$= new (thd->mem_root) Item_user_var_as_out_param($2);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -10889,7 +10852,6 @@ text_literal:
- TEXT_STRING
- {
- LEX_STRING tmp;
-- THD *thd= YYTHD;
- CHARSET_INFO *cs_con= thd->variables.collation_connection;
- CHARSET_INFO *cs_cli= thd->variables.character_set_client;
- uint repertoire= thd->lex->text_string_is_7bit &&
-@@ -10915,7 +10877,7 @@ text_literal:
- uint repertoire= Lex->text_string_is_7bit ?
- MY_REPERTOIRE_ASCII : MY_REPERTOIRE_UNICODE30;
- DBUG_ASSERT(my_charset_is_ascii_based(national_charset_info));
-- $$= new (YYTHD->mem_root) Item_string($1.str, $1.length,
-+ $$= new (thd->mem_root) Item_string($1.str, $1.length,
- national_charset_info,
- DERIVATION_COERCIBLE,
- repertoire);
-@@ -10924,7 +10886,7 @@ text_literal:
- }
- | UNDERSCORE_CHARSET TEXT_STRING
- {
-- Item_string *str= new (YYTHD->mem_root) Item_string($2.str,
-+ Item_string *str= new (thd->mem_root) Item_string($2.str,
- $2.length, $1);
- if (str == NULL)
- MYSQL_YYABORT;
-@@ -10943,7 +10905,7 @@ text_literal:
- If the string has been pure ASCII so far,
- check the new part.
- */
-- CHARSET_INFO *cs= YYTHD->variables.collation_connection;
-+ CHARSET_INFO *cs= thd->variables.collation_connection;
- item->collation.repertoire|= my_string_repertoire(cs,
- $2.str,
- $2.length);
-@@ -10954,15 +10916,15 @@ text_literal:
- text_string:
- TEXT_STRING_literal
- {
-- $$= new (YYTHD->mem_root) String($1.str,
-+ $$= new (thd->mem_root) String($1.str,
- $1.length,
-- YYTHD->variables.collation_connection);
-+ thd->variables.collation_connection);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | HEX_NUM
- {
-- Item *tmp= new (YYTHD->mem_root) Item_hex_string($1.str, $1.length);
-+ Item *tmp= new (thd->mem_root) Item_hex_string($1.str, $1.length);
- if (tmp == NULL)
- MYSQL_YYABORT;
- /*
-@@ -10974,7 +10936,7 @@ text_string:
- }
- | BIN_NUM
- {
-- Item *tmp= new (YYTHD->mem_root) Item_bin_string($1.str, $1.length);
-+ Item *tmp= new (thd->mem_root) Item_bin_string($1.str, $1.length);
- if (tmp == NULL)
- MYSQL_YYABORT;
- /*
-@@ -10989,7 +10951,6 @@ text_string:
- param_marker:
- PARAM_MARKER
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
- Item_param *item;
-@@ -11022,38 +10983,38 @@ literal:
- | NUM_literal { $$ = $1; }
- | NULL_SYM
- {
-- $$ = new (YYTHD->mem_root) Item_null();
-+ $$ = new (thd->mem_root) Item_null();
- if ($$ == NULL)
- MYSQL_YYABORT;
- YYLIP->next_state= MY_LEX_OPERATOR_OR_IDENT;
- }
- | FALSE_SYM
- {
-- $$= new (YYTHD->mem_root) Item_int((char*) "FALSE",0,1);
-+ $$= new (thd->mem_root) Item_int((char*) "FALSE",0,1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | TRUE_SYM
- {
-- $$= new (YYTHD->mem_root) Item_int((char*) "TRUE",1,1);
-+ $$= new (thd->mem_root) Item_int((char*) "TRUE",1,1);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | HEX_NUM
- {
-- $$ = new (YYTHD->mem_root) Item_hex_string($1.str, $1.length);
-+ $$ = new (thd->mem_root) Item_hex_string($1.str, $1.length);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | BIN_NUM
- {
-- $$= new (YYTHD->mem_root) Item_bin_string($1.str, $1.length);
-+ $$= new (thd->mem_root) Item_bin_string($1.str, $1.length);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | UNDERSCORE_CHARSET HEX_NUM
- {
-- Item *tmp= new (YYTHD->mem_root) Item_hex_string($2.str, $2.length);
-+ Item *tmp= new (thd->mem_root) Item_hex_string($2.str, $2.length);
- if (tmp == NULL)
- MYSQL_YYABORT;
- /*
-@@ -11064,7 +11025,7 @@ literal:
- String *str= tmp->val_str((String*) 0);
-
- Item_string *item_str;
-- item_str= new (YYTHD->mem_root)
-+ item_str= new (thd->mem_root)
- Item_string(NULL, /* name will be set in select_item */
- str ? str->ptr() : "",
- str ? str->length() : 0,
-@@ -11082,7 +11043,7 @@ literal:
- }
- | UNDERSCORE_CHARSET BIN_NUM
- {
-- Item *tmp= new (YYTHD->mem_root) Item_bin_string($2.str, $2.length);
-+ Item *tmp= new (thd->mem_root) Item_bin_string($2.str, $2.length);
- if (tmp == NULL)
- MYSQL_YYABORT;
- /*
-@@ -11093,7 +11054,7 @@ literal:
- String *str= tmp->val_str((String*) 0);
-
- Item_string *item_str;
-- item_str= new (YYTHD->mem_root)
-+ item_str= new (thd->mem_root)
- Item_string(NULL, /* name will be set in select_item */
- str ? str->ptr() : "",
- str ? str->length() : 0,
-@@ -11117,7 +11078,7 @@ NUM_literal:
- NUM
- {
- int error;
-- $$= new (YYTHD->mem_root)
-+ $$= new (thd->mem_root)
- Item_int($1.str,
- (longlong) my_strtoll10($1.str, NULL, &error),
- $1.length);
-@@ -11127,7 +11088,7 @@ NUM_literal:
- | LONG_NUM
- {
- int error;
-- $$= new (YYTHD->mem_root)
-+ $$= new (thd->mem_root)
- Item_int($1.str,
- (longlong) my_strtoll10($1.str, NULL, &error),
- $1.length);
-@@ -11136,23 +11097,23 @@ NUM_literal:
- }
- | ULONGLONG_NUM
- {
-- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length);
-+ $$= new (thd->mem_root) Item_uint($1.str, $1.length);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | DECIMAL_NUM
- {
-- $$= new (YYTHD->mem_root) Item_decimal($1.str, $1.length,
-- YYTHD->charset());
-- if (($$ == NULL) || (YYTHD->is_error()))
-+ $$= new (thd->mem_root) Item_decimal($1.str, $1.length,
-+ thd->charset());
-+ if (($$ == NULL) || (thd->is_error()))
- {
- MYSQL_YYABORT;
- }
- }
- | FLOAT_NUM
- {
-- $$= new (YYTHD->mem_root) Item_float($1.str, $1.length);
-- if (($$ == NULL) || (YYTHD->is_error()))
-+ $$= new (thd->mem_root) Item_float($1.str, $1.length);
-+ if (($$ == NULL) || (thd->is_error()))
- {
- MYSQL_YYABORT;
- }
-@@ -11172,7 +11133,7 @@ table_wild:
- ident '.' '*'
- {
- SELECT_LEX *sel= Select;
-- $$= new (YYTHD->mem_root) Item_field(Lex->current_context(),
-+ $$= new (thd->mem_root) Item_field(Lex->current_context(),
- NullS, $1.str, "*");
- if ($$ == NULL)
- MYSQL_YYABORT;
-@@ -11180,7 +11141,6 @@ table_wild:
- }
- | ident '.' ident '.' '*'
- {
-- THD *thd= YYTHD;
- SELECT_LEX *sel= Select;
- const char* schema= thd->client_capabilities & CLIENT_NO_SCHEMA ?
- NullS : $1.str;
-@@ -11200,7 +11160,6 @@ order_ident:
- simple_ident:
- ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
- sp_variable_t *spv;
-@@ -11251,7 +11210,6 @@ simple_ident:
- simple_ident_nospvar:
- ident
- {
-- THD *thd= YYTHD;
- SELECT_LEX *sel=Select;
- if ((sel->parsing_place != IN_HAVING) ||
- (sel->get_in_sum_expr() > 0))
-@@ -11273,7 +11231,6 @@ simple_ident_nospvar:
- simple_ident_q:
- ident '.' ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
-
- /*
-@@ -11352,7 +11309,6 @@ simple_ident_q:
- }
- | '.' ident '.' ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- SELECT_LEX *sel= lex->current_select;
- if (sel->no_table_names_allowed)
-@@ -11377,7 +11333,6 @@ simple_ident_q:
- }
- | ident '.' ident '.' ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- SELECT_LEX *sel= lex->current_select;
- const char* schema= (thd->client_capabilities & CLIENT_NO_SCHEMA ?
-@@ -11445,7 +11400,7 @@ table_ident:
- }
- | ident '.' ident
- {
-- $$= new Table_ident(YYTHD, $1,$3,0);
-+ $$= new Table_ident(thd, $1,$3,0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -11467,7 +11422,7 @@ table_ident_opt_wild:
- }
- | ident '.' ident opt_wild
- {
-- $$= new Table_ident(YYTHD, $1,$3,0);
-+ $$= new Table_ident(thd, $1,$3,0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -11477,7 +11432,7 @@ table_ident_nodb:
- ident
- {
- LEX_STRING db={(char*) any_db,3};
-- $$= new Table_ident(YYTHD, db,$1,0);
-+ $$= new Table_ident(thd, db,$1,0);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -11487,8 +11442,6 @@ IDENT_sys:
- IDENT { $$= $1; }
- | IDENT_QUOTED
- {
-- THD *thd= YYTHD;
--
- if (thd->charset_is_system_charset)
- {
- CHARSET_INFO *cs= system_charset_info;
-@@ -11516,8 +11469,6 @@ IDENT_sys:
- TEXT_STRING_sys:
- TEXT_STRING
- {
-- THD *thd= YYTHD;
--
- if (thd->charset_is_system_charset)
- $$= $1;
- else
-@@ -11532,8 +11483,6 @@ TEXT_STRING_sys:
- TEXT_STRING_literal:
- TEXT_STRING
- {
-- THD *thd= YYTHD;
--
- if (thd->charset_is_collation_connection)
- $$= $1;
- else
-@@ -11548,8 +11497,6 @@ TEXT_STRING_literal:
- TEXT_STRING_filesystem:
- TEXT_STRING
- {
-- THD *thd= YYTHD;
--
- if (thd->charset_is_character_set_filesystem)
- $$= $1;
- else
-@@ -11566,7 +11513,6 @@ ident:
- IDENT_sys { $$=$1; }
- | keyword
- {
-- THD *thd= YYTHD;
- $$.str= thd->strmake($1.str, $1.length);
- if ($$.str == NULL)
- MYSQL_YYABORT;
-@@ -11578,7 +11524,6 @@ label_ident:
- IDENT_sys { $$=$1; }
- | keyword_sp
- {
-- THD *thd= YYTHD;
- $$.str= thd->strmake($1.str, $1.length);
- if ($$.str == NULL)
- MYSQL_YYABORT;
-@@ -11595,7 +11540,6 @@ ident_or_text:
- user:
- ident_or_text
- {
-- THD *thd= YYTHD;
- if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
- MYSQL_YYABORT;
- $$->user = $1;
-@@ -11609,7 +11553,6 @@ user:
- }
- | ident_or_text '@' ident_or_text
- {
-- THD *thd= YYTHD;
- if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
- MYSQL_YYABORT;
- $$->user = $1; $$->host=$3;
-@@ -11628,7 +11571,7 @@ user:
- }
- | CURRENT_USER optional_braces
- {
-- if (!($$=(LEX_USER*) YYTHD->alloc(sizeof(st_lex_user))))
-+ if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
- MYSQL_YYABORT;
- /*
- empty LEX_USER means current_user and
-@@ -11991,7 +11934,6 @@ option_value_list:
-
- option_type_value:
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
-
-@@ -12022,7 +11964,6 @@ option_type_value:
- }
- ext_option_value
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
-
-@@ -12105,7 +12046,6 @@ ext_option_value:
- sys_option_value:
- option_type internal_variable_name equal set_expr_or_default
- {
-- THD *thd= YYTHD;
- LEX *lex= Lex;
- LEX_STRING *name= &$2.base_name;
-
-@@ -12117,7 +12057,7 @@ sys_option_value:
- my_parse_error(ER(ER_SYNTAX_ERROR));
- MYSQL_YYABORT;
- }
-- if (set_trigger_new_row(YYTHD, name, $4))
-+ if (set_trigger_new_row(thd, name, $4))
- MYSQL_YYABORT;
- }
- else if ($2.var)
-@@ -12147,7 +12087,6 @@ sys_option_value:
- }
- | option_type TRANSACTION_SYM ISOLATION LEVEL_SYM isolation_types
- {
-- THD *thd= YYTHD;
- LEX *lex=Lex;
- lex->option_type= $1;
- Item *item= new (thd->mem_root) Item_int((int32) $5);
-@@ -12167,7 +12106,7 @@ option_value:
- '@' ident_or_text equal expr
- {
- Item_func_set_user_var *item;
-- item= new (YYTHD->mem_root) Item_func_set_user_var($2, $4);
-+ item= new (thd->mem_root) Item_func_set_user_var($2, $4);
- if (item == NULL)
- MYSQL_YYABORT;
- set_var_user *var= new set_var_user(item);
-@@ -12177,7 +12116,6 @@ option_value:
- }
- | '@' '@' opt_var_ident_type internal_variable_name equal set_expr_or_default
- {
-- THD *thd= YYTHD;
- struct sys_var_with_base tmp= $4;
- /* Lookup if necessary: must be a system variable. */
- if (tmp.var == NULL)
-@@ -12190,7 +12128,6 @@ option_value:
- }
- | charset old_or_new_charset_name_or_default
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- CHARSET_INFO *cs2;
- cs2= $2 ? $2: global_system_variables.character_set_client;
-@@ -12238,7 +12175,6 @@ option_value:
- }
- | PASSWORD equal text_or_password
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- LEX_USER *user;
- sp_pcontext *spc= lex->spcont;
-@@ -12278,7 +12214,6 @@ option_value:
- internal_variable_name:
- ident
- {
-- THD *thd= YYTHD;
- sp_pcontext *spc= thd->lex->spcont;
- sp_variable_t *spv;
-
-@@ -12337,7 +12272,7 @@ internal_variable_name:
- }
- else
- {
-- sys_var *tmp=find_sys_var(YYTHD, $3.str, $3.length);
-+ sys_var *tmp=find_sys_var(thd, $3.str, $3.length);
- if (!tmp)
- MYSQL_YYABORT;
- if (!tmp->is_struct())
-@@ -12348,7 +12283,7 @@ internal_variable_name:
- }
- | DEFAULT '.' ident
- {
-- sys_var *tmp=find_sys_var(YYTHD, $3.str, $3.length);
-+ sys_var *tmp=find_sys_var(thd, $3.str, $3.length);
- if (!tmp)
- MYSQL_YYABORT;
- if (!tmp->is_struct())
-@@ -12370,16 +12305,16 @@ text_or_password:
- TEXT_STRING { $$=$1.str;}
- | PASSWORD '(' TEXT_STRING ')'
- {
-- $$= $3.length ? YYTHD->variables.old_passwords ?
-- Item_func_old_password::alloc(YYTHD, $3.str, $3.length) :
-- Item_func_password::alloc(YYTHD, $3.str, $3.length) :
-+ $$= $3.length ? thd->variables.old_passwords ?
-+ Item_func_old_password::alloc(thd, $3.str, $3.length) :
-+ Item_func_password::alloc(thd, $3.str, $3.length) :
- $3.str;
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | OLD_PASSWORD '(' TEXT_STRING ')'
- {
-- $$= $3.length ? Item_func_old_password::alloc(YYTHD, $3.str,
-+ $$= $3.length ? Item_func_old_password::alloc(thd, $3.str,
- $3.length) :
- $3.str;
- if ($$ == NULL)
-@@ -12393,19 +12328,19 @@ set_expr_or_default:
- | DEFAULT { $$=0; }
- | ON
- {
-- $$=new (YYTHD->mem_root) Item_string("ON", 2, system_charset_info);
-+ $$=new (thd->mem_root) Item_string("ON", 2, system_charset_info);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | ALL
- {
-- $$=new (YYTHD->mem_root) Item_string("ALL", 3, system_charset_info);
-+ $$=new (thd->mem_root) Item_string("ALL", 3, system_charset_info);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
- | BINARY
- {
-- $$=new (YYTHD->mem_root) Item_string("binary", 6, system_charset_info);
-+ $$=new (thd->mem_root) Item_string("binary", 6, system_charset_info);
- if ($$ == NULL)
- MYSQL_YYABORT;
- }
-@@ -12443,7 +12378,7 @@ table_lock:
- table_ident opt_table_alias lock_option
- {
- thr_lock_type lock_type= (thr_lock_type) $3;
-- if (!Select->add_table_to_list(YYTHD, $1, $2, 0, lock_type))
-+ if (!Select->add_table_to_list(thd, $1, $2, 0, lock_type))
- MYSQL_YYABORT;
- /* If table is to be write locked, protect from a impending GRL. */
- if (lock_type >= TL_WRITE_ALLOW_WRITE)
-@@ -12514,7 +12449,7 @@ handler:
- lex->expr_allows_subselect= FALSE;
- lex->sql_command = SQLCOM_HA_READ;
- lex->ha_rkey_mode= HA_READ_KEY_EXACT; /* Avoid purify warnings */
-- Item *one= new (YYTHD->mem_root) Item_int((int32) 1);
-+ Item *one= new (thd->mem_root) Item_int((int32) 1);
- if (one == NULL)
- MYSQL_YYABORT;
- lex->current_select->select_limit= one;
-@@ -12836,10 +12771,10 @@ grant_user:
- $$=$1; $1->password=$4;
- if ($4.length)
- {
-- if (YYTHD->variables.old_passwords)
-+ if (thd->variables.old_passwords)
- {
- char *buff=
-- (char *) YYTHD->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH_323+1);
-+ (char *) thd->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH_323+1);
- if (buff == NULL)
- MYSQL_YYABORT;
- my_make_scrambled_password_323(buff, $4.str, $4.length);
-@@ -12849,7 +12784,7 @@ grant_user:
- else
- {
- char *buff=
-- (char *) YYTHD->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH+1);
-+ (char *) thd->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH+1);
- if (buff == NULL)
- MYSQL_YYABORT;
- my_make_scrambled_password(buff, $4.str, $4.length);
-@@ -12881,7 +12816,7 @@ column_list:
- column_list_id:
- ident
- {
-- String *new_str = new (YYTHD->mem_root) String((const char*) $1.str,$1.length,system_charset_info);
-+ String *new_str = new (thd->mem_root) String((const char*) $1.str,$1.length,system_charset_info);
- if (new_str == NULL)
- MYSQL_YYABORT;
- List_iterator <LEX_COLUMN> iter(Lex->columns);
-@@ -12981,14 +12916,14 @@ opt_work:
-
- opt_chain:
- /* empty */
-- { $$= (YYTHD->variables.completion_type == 1); }
-+ { $$= (thd->variables.completion_type == 1); }
- | AND_SYM NO_SYM CHAIN_SYM { $$=0; }
- | AND_SYM CHAIN_SYM { $$=1; }
- ;
-
- opt_release:
- /* empty */
-- { $$= (YYTHD->variables.completion_type == 2); }
-+ { $$= (thd->variables.completion_type == 2); }
- | RELEASE_SYM { $$=1; }
- | NO_SYM RELEASE_SYM { $$=0; }
- ;
-@@ -13102,7 +13037,6 @@ union_opt:
-
- union_order_or_limit:
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE);
- SELECT_LEX *sel= lex->current_select;
-@@ -13118,7 +13052,6 @@ union_order_or_limit:
- }
- order_or_limit
- {
-- THD *thd= YYTHD;
- thd->lex->current_select->no_table_names_allowed= 0;
- thd->where= "";
- }
-@@ -13255,14 +13188,14 @@ no_definer:
- from older master servers (i.e. to create non-suid trigger in this
- case).
- */
-- YYTHD->lex->definer= 0;
-+ thd->lex->definer= 0;
- }
- ;
-
- definer:
- DEFINER_SYM EQ user
- {
-- YYTHD->lex->definer= get_current_user(YYTHD, $3);
-+ thd->lex->definer= get_current_user(thd, $3);
- }
- ;
-
-@@ -13307,7 +13240,6 @@ view_suid:
- view_tail:
- view_suid VIEW_SYM table_ident
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- lex->sql_command= SQLCOM_CREATE_VIEW;
- /* first table in list is target VIEW name */
-@@ -13347,7 +13279,6 @@ view_select:
- }
- view_select_aux view_check_option
- {
-- THD *thd= YYTHD;
- LEX *lex= Lex;
- uint len= YYLIP->get_cpp_ptr() - lex->create_view_select.str;
- void *create_view_select= thd->memdup(lex->create_view_select.str, len);
-@@ -13403,7 +13334,6 @@ trigger_tail:
- EACH_SYM
- ROW_SYM
- { /* $15 */
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
- sp_head *sp;
-@@ -13437,8 +13367,8 @@ trigger_tail:
- sp_head *sp= lex->sphead;
-
- lex->sql_command= SQLCOM_CREATE_TRIGGER;
-- sp->set_stmt_end(YYTHD);
-- sp->restore_thd_mem_root(YYTHD);
-+ sp->set_stmt_end(thd);
-+ sp->restore_thd_mem_root(thd);
-
- if (sp->is_not_allowed_in_function("trigger"))
- MYSQL_YYABORT;
-@@ -13448,7 +13378,7 @@ trigger_tail:
- sp_proc_stmt alternatives are not saving/restoring LEX, so
- lex->query_tables can be wiped out.
- */
-- if (!lex->select_lex.add_table_to_list(YYTHD, $9,
-+ if (!lex->select_lex.add_table_to_list(thd, $9,
- (LEX_STRING*) 0,
- TL_OPTION_UPDATING,
- TL_IGNORE))
-@@ -13466,7 +13396,6 @@ udf_tail:
- AGGREGATE_SYM remember_name FUNCTION_SYM ident
- RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- if (is_native_function(thd, & $4))
- {
-@@ -13484,7 +13413,6 @@ udf_tail:
- | remember_name FUNCTION_SYM ident
- RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- if (is_native_function(thd, & $3))
- {
-@@ -13507,7 +13435,6 @@ sf_tail:
- sp_name /* $3 */
- '(' /* $4 */
- { /* $5 */
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
- sp_head *sp;
-@@ -13565,7 +13492,7 @@ sf_tail:
- MYSQL_YYABORT;
- }
-
-- if (sp->fill_field_definition(YYTHD, lex,
-+ if (sp->fill_field_definition(thd, lex,
- (enum enum_field_types) $11,
- &sp->m_return_field_def))
- MYSQL_YYABORT;
-@@ -13574,7 +13501,6 @@ sf_tail:
- }
- sp_c_chistics /* $13 */
- { /* $14 */
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- Lex_input_stream *lip= YYLIP;
-
-@@ -13583,7 +13509,6 @@ sf_tail:
- }
- sp_proc_stmt /* $15 */
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
- sp_head *sp= lex->sphead;
-
-@@ -13654,10 +13579,10 @@ sp_tail:
- sp= new sp_head();
- if (sp == NULL)
- MYSQL_YYABORT;
-- sp->reset_thd_mem_root(YYTHD);
-+ sp->reset_thd_mem_root(thd);
- sp->init(lex);
- sp->m_type= TYPE_ENUM_PROCEDURE;
-- sp->init_sp_name(YYTHD, $3);
-+ sp->init_sp_name(thd, $3);
-
- lex->sphead= sp;
- }
-@@ -13672,7 +13597,6 @@ sp_tail:
- sp_pdparam_list
- ')'
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
-
- lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
-@@ -13680,7 +13604,6 @@ sp_tail:
- }
- sp_c_chistics
- {
-- THD *thd= YYTHD;
- LEX *lex= thd->lex;
-
- lex->sphead->m_chistics= &lex->sp_chistics;
-@@ -13691,9 +13614,9 @@ sp_tail:
- LEX *lex= Lex;
- sp_head *sp= lex->sphead;
-
-- sp->set_stmt_end(YYTHD);
-+ sp->set_stmt_end(thd);
- lex->sql_command= SQLCOM_CREATE_PROCEDURE;
-- sp->restore_thd_mem_root(YYTHD);
-+ sp->restore_thd_mem_root(thd);
- }
- ;
-
-@@ -13730,21 +13653,21 @@ xid:
- text_string
- {
- MYSQL_YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE);
-- if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID))))
-+ if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
- MYSQL_YYABORT;
- Lex->xid->set(1L, $1->ptr(), $1->length(), 0, 0);
- }
- | text_string ',' text_string
- {
- MYSQL_YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE && $3->length() <= MAXBQUALSIZE);
-- if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID))))
-+ if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
- MYSQL_YYABORT;
- Lex->xid->set(1L, $1->ptr(), $1->length(), $3->ptr(), $3->length());
- }
- | text_string ',' text_string ',' ulong_num
- {
- MYSQL_YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE && $3->length() <= MAXBQUALSIZE);
-- if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID))))
-+ if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
- MYSQL_YYABORT;
- Lex->xid->set($5, $1->ptr(), $1->length(), $3->ptr(), $3->length());
- }
include $(TOPDIR)/rules.mk
PKG_NAME:=nano
-PKG_VERSION:=2.9.5
+PKG_VERSION:=3.1
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/nano
-PKG_HASH:=7b8d181cb57f42fa86a380bb9ad46abab859b60383607f731b65a9077f4b4e19
+PKG_HASH:=14c02ca40a5bc61c580ce2f9cb7f9fc72d5ccc9da17ad044f78f6fb3fdb7719e
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
--- /dev/null
+From 368ec04870a366b19f1c5801a6868786547968b0 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Wed, 19 Sep 2018 20:36:39 +0200
+Subject: build: fix compilation again when configured with --enable-tiny
+
+Reported-by: Jordi Mallach <jordi@mallach.net>
+---
+ src/nano.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/nano.c b/src/nano.c
+index ebb1f11..01f92a1 100644
+--- a/src/nano.c
++++ b/src/nano.c
+@@ -1756,7 +1756,10 @@ int do_input(bool allow_funcs)
+ if (shortcut == NULL)
+ pletion_line = NULL;
+ else {
+- if (ISSET(VIEW_MODE) && shortcut->func != do_toggle_void &&
++ if (ISSET(VIEW_MODE) &&
++#ifndef NANO_TINY
++ shortcut->func != do_toggle_void &&
++#endif
+ !okay_for_view(shortcut)) {
+ print_view_warning();
+ return ERR;
+--
+cgit v1.0-41-gc330
+
include $(TOPDIR)/rules.mk
PKG_NAME:=ncdu
-PKG_VERSION:=1.12
+PKG_VERSION:=1.13
PKG_RELEASE=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dev.yorhel.nl/download
-PKG_HASH:=820e4e4747a2a2ec7a2e9f06d2f5a353516362c22496a10a9834f871b877499a
+PKG_HASH:=f4d9285c38292c2de05e444d0ba271cbfe1a705eee37c2b23ea7c448ab37255a
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=opensc
-PKG_VERSION:=0.17.0
+PKG_VERSION:=0.18.0
PKG_RELEASE:=1
-PKG_HASH:=be73c6816867ab4721e6a9ae7dba8e890c5f169f0a2cbb4bf354e0f30a948300
+PKG_HASH:=9bc0ff030dd1c10f646d54415eae1bb2b1c72dda710378343f027e17cd8c3757
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
TITLE:=Open-ZWave Device Configs
endef
+TARGET_CPPFLAGS+=-Wno-format -Wno-format-security
+
MAKE_FLAGS += \
LD="$(TARGET_CROSS)g++" \
LIBDIR="$(PKG_BUILD_DIR)" \
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -18,15 +18,12 @@
-
- all:
- CPPFLAGS=$(CPPFLAGS) $(MAKE) -C $(top_srcdir)/cpp/build/ -$(MAKEFLAGS)
-- CPPFLAGS=$(CPPFLAGS) $(MAKE) -C $(top_srcdir)/cpp/examples/MinOZW/ -$(MAKEFLAGS)
-
- install:
- $(MAKE) -C $(top_srcdir)/cpp/build/ -$(MAKEFLAGS) $(MAKECMDGOALS)
-- $(MAKE) -C $(top_srcdir)/cpp/examples/MinOZW/ -$(MAKEFLAGS) $(MAKECMDGOALS)
-
- clean:
- $(MAKE) -C $(top_srcdir)/cpp/build/ -$(MAKEFLAGS) $(MAKECMDGOALS)
-- $(MAKE) -C $(top_srcdir)/cpp/examples/MinOZW/ -$(MAKEFLAGS) $(MAKECMDGOALS)
-
- cpp/src/vers.cpp:
- CPPFLAGS=$(CPPFLAGS) $(MAKE) -C $(top_srcdir)/cpp/build/ -$(MAKEFLAGS) cpp/src/vers.cpp
include $(TOPDIR)/rules.mk
PKG_NAME:=owfs
-PKG_VERSION:=2.9p5
+PKG_VERSION:=3.2p2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=f7e11bae6cd29d58726e6d29b297834e5656d6069a407d798067ae25cb0812ea
+PKG_SOURCE_URL:=https://codeload.github.com/owfs/owfs/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=904ee3ab1d80e9d3461b310f0cc78b2175e24aa0075edc4f7f92371c667d0bb6
+
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=GPL-2.0
define Package/owfs/Default
TITLE:=OWFS (1-Wire File System)
- URL:=http://owfs.sourceforge.net/
+ URL:=https://github.com/owfs/owfs
SECTION:=net
CATEGORY:=Network
SUBMENU:=Filesystem
DEPENDS:= \
+libpthread \
+LIBOW_MASTER_USB:libusb-compat \
- +LIBOW_MASTER_W1:kmod-w1
+ +LIBOW_MASTER_W1:kmod-w1 \
+ +libavahi-client
TITLE:=OWFS - common shared library
endef
define Package/owshell
$(call Package/owfs/Utility)
TITLE:=OWFS - shell utilities
- DEPENDS+= +USE_UCLIBC:librpc
endef
define Package/owshell/description
+++ /dev/null
-AaAA
---- a/module/owlib/src/c/ow_w1_parse.c
-+++ b/module/owlib/src/c/ow_w1_parse.c
-@@ -237,7 +237,7 @@ enum Netlink_Read_Status W1_Process_Resp
- owfree(nlp.nlm) ;
- return nrs_nodev ;
- }
-- if ( nrs_callback == NULL ) { // status message
-+ if ( nrs_callback == NULL ) { // bus reset
- owfree(nlp.nlm) ;
- return nrs_complete ;
- }
-@@ -246,7 +246,7 @@ enum Netlink_Read_Status W1_Process_Resp
- nrs_callback( &nlp, v, pn ) ;
- LEVEL_DEBUG("Called nrs_callback");
- owfree(nlp.nlm) ;
-- if ( nlp.cn->ack != 0 ) {
-+ if ( nlp.cn->seq != nlp.cn->ack ) {
- if ( nlp.w1m->type == W1_LIST_MASTERS ) {
- continue ; // look for more data
- }
-@@ -254,7 +254,7 @@ enum Netlink_Read_Status W1_Process_Resp
- continue ; // look for more data
- }
- }
-- nrs_callback = NULL ; // now look for status message
-+ return nrs_complete ; // status message
- }
- return nrs_timeout ;
- }
+++ /dev/null
---- a/module/owlib/src/c/ow_reset.c
-+++ b/module/owlib/src/c/ow_reset.c
-@@ -21,6 +21,10 @@ RESET_TYPE BUS_reset(const struct parsed
- struct connection_in * in = pn->selected_connection ;
- STAT_ADD1_BUS(e_bus_resets, in);
-
-+ if ( in->iroutines.reset == NO_RESET_ROUTINE ) {
-+ return BUS_RESET_OK;
-+ }
-+
- switch ( (in->iroutines.reset) (pn) ) {
- case BUS_RESET_OK:
- in->reconnect_state = reconnect_ok; // Flag as good!
include $(TOPDIR)/rules.mk
PKG_NAME:=pciutils
-PKG_VERSION:=3.5.6
+PKG_VERSION:=3.6.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
-PKG_HASH:=f346eeb90cce0910c05b877fe49eadc760fa084c0455fd313e39d4b2c2d4bb21
+PKG_HASH:=fcc0431cc951c3563f1e4f946d27c8e2161cfd81f25316e6bd783fa6118469e0
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=GPL-2.0
of PCI devices
endef
-PCI_IDS_REV:=91cfa8a0c994634ba9a4a8639aa2ac6dff8453b9
+PCI_IDS_REV:=4ad9327b147ce7bb6ae27b68efe0c1d89d9eb9a1
PCI_IDS_FILE:=pci.ids.$(PCI_IDS_REV)
define Download/pci_ids
FILE:=$(PCI_IDS_FILE)
URL_FILE:=pci.ids
URL:=@GITHUB/pciutils/pciids/$(PCI_IDS_REV)
- HASH:=798528092d1c58eeac99c6505033ec4ce8fe3e19d7e0c41b06790d58753a89b6
+ HASH:=f8386c74ecc74f3c410b2f0f4885e7705c5dfcacd52fe924a931a63b246c8793
endef
$(eval $(call Download,pci_ids))
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4235
+PKG_SOURCE_URL:=https://pcsclite.apdu.fr/files/
PKG_HASH:=5a27262586eff39cfd5c19aadc8891dd71c0818d3d629539bd631b958be689c9
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
define Package/pcsc-lite/Default
TITLE:=Access a smart card using SCard API (PC/SC)
- URL:=http://pcsclite.alioth.debian.org/
+ URL:=https://pcsclite.apdu.fr/
endef
define Package/pcsc-lite/Default/description
include $(TOPDIR)/rules.mk
PKG_NAME:=pcsc-tools
-PKG_VERSION=1.5.2
+PKG_VERSION=1.5.3
PKG_RELEASE:=1
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ludovic.rousseau.free.fr/softwares/pcsc-tools/
-PKG_HASH:=ff4e087c76700aa5a25dd7d0bc4f55bb4a5e71cd4f0d6b5301babe0b434f86fc
+PKG_HASH:=daaa011c28daa00653bd8e2a3d8b0b9f8abae00f7344f50b1a94fbd2b01f1d14
PKG_FIXUP:=autoreconf
-Windows (Win32) doesn't support the analyze ATR perl-script and since we
-don't want to pull in perl as a dependency add the same workaround here.
+Disable the analyze ATR perl-script and as we don't want to pull in perl
+as a dependency.
diff --git a/pcsc_scan.c b/pcsc_scan.c
-index e1d8942..81344e1 100644
+index d89bc3e..134b675 100644
--- a/pcsc_scan.c
+++ b/pcsc_scan.c
-@@ -224,9 +224,7 @@ int main(int argc, char *argv[])
- printf("PC/SC device scanner\n");
- printf("V " PACKAGE_VERSION " (c) 2001-2017, Ludovic Rousseau <ludovic.rousseau@free.fr>\n");
-
--#ifdef WIN32
- analyse_atr = FALSE;
--#endif
-
- while ((opt = getopt(argc, argv, "Vhns")) != EOF)
- {
+@@ -241,7 +241,7 @@ static void initialize_options(options_t *options, const char *pname)
+ #ifdef WIN32
+ options->analyse_atr = False;
+ #else
+- options->analyse_atr = True;
++ options->analyse_atr = False;
+ #endif
+ options->stress_card = False;
+ options->print_version = False;
include $(TOPDIR)/rules.mk
PKG_NAME:=picocom
-PKG_VERSION:=1.7
-PKG_RELEASE:=2
+PKG_VERSION:=3.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/picocom
-PKG_HASH:=d0f31c8f7a215a76922d30c81a52b9a2348c89e02a84935517002b3bc2c1129e
+PKG_SOURCE_URL:=https://codeload.github.com/npat-efault/picocom/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=e6761ca932ffc6d09bd6b11ff018bdaf70b287ce518b3282d29e0270e88420bb
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
PKG_LICENSE:=GPL-2.0+
SECTION:=utils
CATEGORY:=Utilities
TITLE:=A minimal dumb-terminal emulation program
- URL:=http://code.google.com/p/picocom/
+ URL:=https://github.com/npat-efault/picocom
SUBMENU:=Terminal
endef
--- /dev/null
+diff --git a/Makefile b/Makefile
+index d6a4d60..a07d801 100644
+--- a/Makefile
++++ b/Makefile
+@@ -51,7 +51,6 @@ linenoise-1.0/linenoise.o : linenoise-1.0/linenoise.c linenoise-1.0/linenoise.h
+
+ OBJS += picocom.o term.o fdio.o split.o termios2.o custbaud_bsd.o
+ picocom : $(OBJS)
+- $(LD) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
+
+ picocom.o : picocom.c term.h fdio.h split.h custbaud.h
+ term.o : term.c term.h termios2.h custbaud_bsd.h custbaud.h
+++ /dev/null
-Index: picocom-1.7/term.c
-===================================================================
---- picocom-1.7.orig/term.c
-+++ picocom-1.7/term.c
-@@ -33,10 +33,11 @@
- #include <string.h>
- #include <errno.h>
- #include <unistd.h>
--#ifdef __linux__
-+#if defined(__linux__) && (defined(__GLIBC__) || defined(__UCLIBC__))
- #include <termio.h>
- #else
- #include <termios.h>
-+#include <sys/ioctl.h>
- #endif /* of __linux__ */
-
- #include "term.h"
include $(TOPDIR)/rules.mk
PKG_NAME:=procps-ng
-PKG_VERSION:=3.3.11
-PKG_RELEASE:=4
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=COPYING COPYING.LIB
+PKG_VERSION:=3.3.15
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://gitlab.com/procps-ng/procps.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=8a198e3eafbde0b627e9992b41d26e6762e4f8c7
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=60da7bd78e834112494e4019998c9de8d61f747eab244ef3c42cadc7fd0958cc
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@SF/procps-ng
+PKG_HASH:=10bd744ffcb3de2d591d2f6acf1a54a7ba070fdcc432a855931a5057149f0465
PKG_MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING COPYING.LIB
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
--- a/Makefile.am
+++ b/Makefile.am
-@@ -13,10 +13,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
+@@ -14,10 +14,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = \
LDADD = ./proc/libprocps.la $(CYGWINFLAGS)
--- a/configure.ac
+++ b/configure.ac
-@@ -256,8 +256,5 @@ AC_CHECK_FUNCS([__fpending alarm atexit
+@@ -292,8 +292,5 @@ AC_CHECK_FUNCS([__fpending alarm atexit dup2 gethostname getpagesize gettimeofda
AC_CONFIG_FILES([Makefile
include/Makefile
include $(TOPDIR)/rules.mk
PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2017.12.08
+PKG_VERSION:=2018.07.23
PKG_RELEASE:=1
-PKG_MAINTAINER:=Christian Simon <simon@swine.de>
+PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=Apache-2.0
include $(INCLUDE_DIR)/package.mk
DEPENDS:=prometheus-node-exporter-lua bmx7 +lua-cjson +bmx7-json
endef
+define Package/prometheus-node-exporter-lua-textfile
+ $(call Package/prometheus-node-exporter-lua/Default)
+ TITLE+= (textfile collector)
+ DEPENDS:=prometheus-node-exporter-lua +luci-lib-nixio
+endef
+
+define Package/prometheus-node-exporter-lua-openwrt
+ $(call Package/prometheus-node-exporter-lua/Default)
+ TITLE+= (openwrt collector)
+ DEPENDS:=prometheus-node-exporter-lua
+endef
+
Build/Compile=
define Package/prometheus-node-exporter-lua/install
$(INSTALL_BIN) ./files/usr/bin/prometheus-node-exporter-lua $(1)/usr/bin/prometheus-node-exporter-lua
$(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/cpu.lua $(1)/usr/lib/lua/prometheus-collectors/
+ $(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/conntrack.lua $(1)/usr/lib/lua/prometheus-collectors/
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/filefd.lua $(1)/usr/lib/lua/prometheus-collectors/
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/loadavg.lua $(1)/usr/lib/lua/prometheus-collectors/
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/meminfo.lua $(1)/usr/lib/lua/prometheus-collectors/
$(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/bmx7.lua $(1)/usr/lib/lua/prometheus-collectors/
endef
+define Package/prometheus-node-exporter-lua-textfile/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors
+ $(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/textfile.lua $(1)/usr/lib/lua/prometheus-collectors/
+endef
+
+define Package/prometheus-node-exporter-lua-openwrt/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors
+ $(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/openwrt.lua $(1)/usr/lib/lua/prometheus-collectors/
+endef
+
$(eval $(call BuildPackage,prometheus-node-exporter-lua))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-nat_traffic))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-netstat))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-wifi_stations))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx6))
$(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx7))
+$(eval $(call BuildPackage,prometheus-node-exporter-lua-textfile))
+$(eval $(call BuildPackage,prometheus-node-exporter-lua-openwrt))
}
metric_bmx7_rxRate(labels, interpret_suffix(link.rxRate))
metric_bmx7_txRate(labels, interpret_suffix(link.txRate))
+ end
+
+ local metric_bmx7_tunIn = metric("bmx7_tunIn", "gauge")
+ local parameters = json.decode(get_contents("/var/run/bmx7/json/parameters")).OPTIONS
+ for _, option in pairs(parameters) do
+ if option.name == "tunIn" then
+ for _, instance in pairs(option.INSTANCES) do
+ for _, child_instance in pairs(instance.CHILD_INSTANCES) do
+ local labels = {
+ name = instance.value,
+ network = child_instance.value
+ }
+ metric_bmx7_tunIn(labels, 1)
+ end
+ end
+ elseif option.name == "plugin" then
+ local metric_bmx7_plugin = metric("bmx7_plugin", "gauge")
+ for _, instance in pairs(option.INSTANCES) do
+ metric_bmx7_plugin({ name = instance.value }, 1)
+ end
end
+ end
end
return { scrape = scrape }
--- /dev/null
+local function scrape()
+ metric("node_nf_conntrack_entries", "gauge", nil,
+ string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_count"), 1, -2))
+ metric("node_nf_conntrack_entries_limit", "gauge", nil,
+ string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_max"), 1, -2))
+end
+
+return { scrape = scrape }
local stat = get_contents("/proc/stat")
-- system boot time, seconds since epoch
- metric("node_boot_time", "gauge", nil, string.match(stat, "btime ([0-9]+)"))
+ metric("node_boot_time_seconds", "gauge", nil,
+ string.match(stat, "btime ([0-9]+)"))
-- context switches since boot (all CPUs)
- metric("node_context_switches", "counter", nil, string.match(stat, "ctxt ([0-9]+)"))
+ metric("node_context_switches_total", "counter", nil,
+ string.match(stat, "ctxt ([0-9]+)"))
-- cpu times, per CPU, per mode
local cpu_mode = {"user", "nice", "system", "idle", "iowait", "irq",
"softirq", "steal", "guest", "guest_nice"}
local i = 0
- local cpu_metric = metric("node_cpu", "counter")
+ local cpu_metric = metric("node_cpu_seconds_total", "counter")
while true do
- local cpu = {string.match(stat, "cpu"..i.." (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+)")}
+ local cpu = {string.match(stat,
+ "cpu"..i.." (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+)")}
if #cpu ~= 10 then
break
end
end
-- interrupts served
- metric("node_intr", "counter", nil, string.match(stat, "intr ([0-9]+)"))
+ metric("node_intr_total", "counter", nil,
+ string.match(stat, "intr ([0-9]+)"))
-- processes forked
- metric("node_forks", "counter", nil, string.match(stat, "processes ([0-9]+)"))
+ metric("node_forks_total", "counter", nil,
+ string.match(stat, "processes ([0-9]+)"))
-- processes running
- metric("node_procs_running", "gauge", nil, string.match(stat, "procs_running ([0-9]+)"))
+ metric("node_procs_running_total", "gauge", nil,
+ string.match(stat, "procs_running ([0-9]+)"))
-- processes blocked for I/O
- metric("node_procs_blocked", "gauge", nil, string.match(stat, "procs_blocked ([0-9]+)"))
+ metric("node_procs_blocked_total", "gauge", nil,
+ string.match(stat, "procs_blocked ([0-9]+)"))
end
return { scrape = scrape }
if unit == 'kB' then
size = size * 1024
end
- metric("node_memory_" .. name:gsub("[):]", ""):gsub("[(]", "_"), "gauge", nil, size)
+ metric("node_memory_"..name:gsub("[):]", ""):gsub("[(]", "_").."_bytes",
+ "gauge", nil, size)
end
end
-local netdevsubstat = {"receive_bytes", "receive_packets", "receive_errs",
- "receive_drop", "receive_fifo", "receive_frame", "receive_compressed",
- "receive_multicast", "transmit_bytes", "transmit_packets",
- "transmit_errs", "transmit_drop", "transmit_fifo", "transmit_colls",
- "transmit_carrier", "transmit_compressed"}
+local netdevsubstat = {
+ "receive_bytes_total",
+ "receive_packets_total",
+ "receive_errs_total",
+ "receive_drop_total",
+ "receive_fifo_total",
+ "receive_frame_total",
+ "receive_compressed_total",
+ "receive_multicast_total",
+ "transmit_bytes_total",
+ "transmit_packets_total",
+ "transmit_errs_total",
+ "transmit_drop_total",
+ "transmit_fifo_total",
+ "transmit_colls_total",
+ "transmit_carrier_total",
+ "transmit_compressed_total"
+}
+
local pattern = "([^%s:]+):%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)"
local function scrape()
+local netsubstat = {
+ "IcmpMsg",
+ "Icmp",
+ "IpExt",
+ "Ip",
+ "TcpExt",
+ "Tcp",
+ "UdpLite",
+ "Udp"
+}
+
local function scrape()
-- NOTE: Both of these are missing in OpenWRT kernels.
-- See: https://dev.openwrt.org/ticket/15781
local netstat = get_contents("/proc/net/netstat") .. get_contents("/proc/net/snmp")
-- all devices
- local netsubstat = {"IcmpMsg", "Icmp", "IpExt", "Ip", "TcpExt", "Tcp", "UdpLite", "Udp"}
for i, nss in ipairs(netsubstat) do
local substat_s = string.match(netstat, nss .. ": ([A-Z][A-Za-z0-9 ]+)")
if substat_s then
--- /dev/null
+local labels = {
+ id = "",
+ release = "",
+ revision = "",
+ model = string.sub(get_contents("/tmp/sysinfo/model"), 1, -2),
+ board_name = string.sub(get_contents("/tmp/sysinfo/board_name"), 1, -2)
+}
+
+for k, v in string.gmatch(get_contents("/etc/openwrt_release"), "(DISTRIB_%w+)='(.-)'\n") do
+ if k == "DISTRIB_ID" then
+ labels["id"] = v
+ elseif k == "DISTRIB_RELEASE" then
+ labels["release"] = v
+ elseif k == "DISTRIB_REVISION" then
+ labels["revision"] = v
+ end
+end
+
+local function scrape()
+ metric("node_openwrt_info", "gauge", labels, 1)
+end
+
+return { scrape = scrape }
+
--- /dev/null
+#!/usr/bin/lua
+
+local fs = require "nixio.fs"
+
+local function scrape()
+ for metrics in fs.glob("/var/prometheus/*.prom") do
+ output(get_contents(metrics), '\n')
+ end
+end
+
+return { scrape = scrape }
local function scrape()
-- current time
- metric("node_time", "counter", nil, os.time())
+ metric("node_time_seconds", "counter", nil, os.time())
end
return { scrape = scrape }
local function scrape()
local metric_wifi_network_quality = metric("wifi_network_quality","gauge")
local metric_wifi_network_bitrate = metric("wifi_network_bitrate","gauge")
- local metric_wifi_network_noise = metric("wifi_network_noise","gauge")
- local metric_wifi_network_signal = metric("wifi_network_signal","gauge")
+ local metric_wifi_network_noise = metric("wifi_network_noise_dbm","gauge")
+ local metric_wifi_network_signal = metric("wifi_network_signal_dbm","gauge")
local u = ubus.connect()
local status = u:call("network.wireless", "status", {})
local iwinfo = require "iwinfo"
local function scrape()
- local metric_wifi_station_signal = metric("wifi_station_signal","gauge")
- local metric_wifi_station_tx_packets = metric("wifi_station_tx_packets","gauge")
- local metric_wifi_station_rx_packets = metric("wifi_station_rx_packets","gauge")
+ local metric_wifi_station_signal = metric("wifi_station_signal_dbm","gauge")
+ local metric_wifi_station_tx_packets = metric("wifi_station_tx_packets_total","gauge")
+ local metric_wifi_station_rx_packets = metric("wifi_station_rx_packets_total","gauge")
local u = ubus.connect()
local status = u:call("network.wireless", "status", {})
include $(TOPDIR)/rules.mk
PKG_NAME:=qemu
-PKG_VERSION:=2.11.1
+PKG_VERSION:=3.0.0
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb
-PKG_SOURCE_URL:=http://wiki.qemu-project.org/download/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_HASH:=8d7af64fe8bd5ea5c3bdf17131a8b858491bcce1ee3839425a6d91fb821b5713
+PKG_SOURCE_URL:=http://download.qemu.org/
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
$(INSTALL_DATA) ./files/bridge.conf $(1)/etc/qemu
endef
+define Package/qemu-img
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=Virtualization
+ TITLE:=QEMU Image utility
+ URL:=http://www.qemu.org
+ DEPENDS:=+glib2 $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST)
+endef
+
+define Package/qemu-img/install
+ $(INSTALL_DIR) $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-img $(1)/usr/bin/qemu-img
+endef
+
+define Package/qemu-nbd
+ SECTION:=utils
+ CATEGORY:=Utilities
+ SUBMENU:=Virtualization
+ TITLE:=QEMU Network Block Device Utility
+ URL:=http://www.qemu.org
+ DEPENDS:=+glib2 $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) +kmod-nbd
+endef
+
+define Package/qemu-nbd/install
+ $(INSTALL_DIR) $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-nbd $(1)/usr/sbin/qemu-nbd
+endef
+
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-ga
# Naming rules used in qemu Makefile.target
--disable-strip \
--disable-werror \
-QEMU_CONFIGURE_TARGET_LIST := $(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))
-CONFIGURE_ARGS += --target-list='$(QEMU_CONFIGURE_TARGET_LIST)'
-
-ifneq ($(CONFIG_PACKAGE_qemu-ga),)
-CONFIGURE_ARGS += --enable-guest-agent
-endif
+CONFIGURE_ARGS += --target-list='$(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
+CONFIGURE_ARGS += $(if $(CONFIG_PACKAGE_qemu-ga),--enable-guest-agent)
TARGET_LDFLAGS += -Wl,--as-needed
MAKE_VARS += V=s
QEMU_MAKE_TARGETS := \
$(if $(CONFIG_PACKAGE_qemu-ga),qemu-ga) \
$(if $(CONFIG_PACKAGE_qemu-bridge-helper),qemu-bridge-helper) \
+ $(if $(CONFIG_PACKAGE_qemu-img),qemu-img) \
+ $(if $(CONFIG_PACKAGE_qemu-nbd),qemu-nbd) \
$(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),subdir-$(target))) \
define Build/Compile
$(eval $(call BuildPackage,virtio-console-helper))
$(eval $(call BuildPackage,qemu-ga))
$(eval $(call BuildPackage,qemu-bridge-helper))
+$(eval $(call BuildPackage,qemu-img))
+$(eval $(call BuildPackage,qemu-nbd))
$(eval $(call BuildPackage,qemu-blobs))
$(foreach target,$(QEMU_TARGET_LIST), \
$(eval $(call BuildPackage,qemu-$(target))) \
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl-ais
-PKG_VERSION:=20151213
+PKG_VERSION:=0.3
+PKG_RELEASE:=1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/dgiardini/rtl-ais.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=b805be0164475e58a73b57763a8cbbf8a2bd0ded
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=0bf15869935e4496108ade4f7e9c1f7990b11ce53c9c1e0c9e81bc7f082b33b5
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/dgiardini/rtl-ais/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=01e2b675226ec403c409cec8b55999008f5c7aa9e82d6c0ba085ef13b200ceb1
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl-sdr
-PKG_VERSION:=0.5.3-20150608-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=2
+PKG_VERSION:=0.5.4
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://git.osmocom.org/rtl-sdr.git
-PKG_SOURCE_VERSION:=e3c03f738f5aef4dc51e2b741fbdb542b9cc1bb1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://git.osmocom.org/rtl-sdr/snapshot
+PKG_HASH:=f38da8a230de5fc997f83a19cff7f8c1a66b62a9cf70ddc997d44696b97ea1df
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
-PKG_MIRROR_HASH:=6b1a3ae95e6d9e896ec4f8dcca46b7cf5741533bb549d429ac3fd46c76e2d595
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_PARALLEL:=1
-
CMAKE_INSTALL:=1
PKG_LICENSE:=GPLv2
--- /dev/null
+From 6c01778cf7ff81d9a571291fee615b65961ca1d5 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <dwmw2@infradead.org>
+Date: Thu, 28 Jun 2018 16:21:11 +0100
+Subject: [PATCH] Fix inline functions to use 'static inline'
+
+With just 'inline', if the compiler decides not to inline them, it isn't
+required to emit them at all. For some targets with -Os that is causing
+build failures.
+
+Perhaps we might consider using '__attribute__((always_inline))' for
+GCC builds, but 'static inline' is a good start.
+---
+ src/rtl_adsb.c | 8 ++++----
+ src/rtl_power.c | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/rtl_adsb.c b/src/rtl_adsb.c
+index 9087de4..7aea8dd 100644
+--- a/src/rtl_adsb.c
++++ b/src/rtl_adsb.c
+@@ -183,7 +183,7 @@ int magnitute(uint8_t *buf, int len)
+ return len/2;
+ }
+
+-inline uint16_t single_manchester(uint16_t a, uint16_t b, uint16_t c, uint16_t d)
++static inline uint16_t single_manchester(uint16_t a, uint16_t b, uint16_t c, uint16_t d)
+ /* takes 4 consecutive real samples, return 0 or 1, BADSAMPLE on error */
+ {
+ int bit, bit_p;
+@@ -224,17 +224,17 @@ inline uint16_t single_manchester(uint16_t a, uint16_t b, uint16_t c, uint16_t d
+ return BADSAMPLE;
+ }
+
+-inline uint16_t min16(uint16_t a, uint16_t b)
++static inline uint16_t min16(uint16_t a, uint16_t b)
+ {
+ return a<b ? a : b;
+ }
+
+-inline uint16_t max16(uint16_t a, uint16_t b)
++static inline uint16_t max16(uint16_t a, uint16_t b)
+ {
+ return a>b ? a : b;
+ }
+
+-inline int preamble(uint16_t *buf, int i)
++static inline int preamble(uint16_t *buf, int i)
+ /* returns 0/1 for preamble at index i */
+ {
+ int i2;
+diff --git a/src/rtl_power.c b/src/rtl_power.c
+index 00f4d9f..625d818 100644
+--- a/src/rtl_power.c
++++ b/src/rtl_power.c
+@@ -250,7 +250,7 @@ void sine_table(int size)
+ }
+ }
+
+-inline int16_t FIX_MPY(int16_t a, int16_t b)
++static inline int16_t FIX_MPY(int16_t a, int16_t b)
+ /* fixed point multiply and scale */
+ {
+ int c = ((int)a * (int)b) >> 14;
+--
+2.7.4
+
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl_433
-PKG_VERSION:=6531ea4
-PKG_RELEASE:=$(PKG_SOURCE_VERSION)
+PKG_VERSION:=18.05
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/merbanan/rtl_433.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=6531ea48a7933ac8289724672059e54fd8aad8eb
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=f96301c8d7e87605b113aad4493f15b63a675fea6f00642b0606de5a3a858746
+PKG_SOURCE_URL:=https://codeload.github.com/merbanan/rtl_433/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=4710105234e3b71ae839e2d3f2628d6c12879fcda9c849fffe847d4de42a74f3
CMAKE_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=rtty
-PKG_VERSION:=4.1.1
+PKG_VERSION:=6.3.0
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_SOURCE_URL=https://github.com/zhaojh329/rtty.git
-PKG_MIRROR_HASH:=2689ffafc7a6b2e649173edff802ec6d7c8476f1998497fca36a26c21fdcdc1c
+PKG_SOURCE_URL=https://codeload.github.com/zhaojh329/rtty/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=8129cc3f2d83db618afb6bfc93e018adf03de156d7e15e087e9ae52ac9dcae2b
+CMAKE_INSTALL:=1
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
-define Package/rtty/default
+define Package/rtty/Default
+ TITLE:=Access your terminals from anywhere via the web
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Terminal
- TITLE:=A reverse proxy WebTTY
- DEPENDS:=+libblobmsg-json
+ URL:=https://github.com/zhaojh329/rtty
+ DEPENDS:=$(2)
+ VARIANT:=$(1)
+ PROVIDES:=rtty
endef
-define Package/rtty/default/description
-A reverse proxy WebTTY. This is the client part running on devices to be managed.
-endef
-
-define Package/rtty-nossl
- $(Package/rtty/default)
- TITLE += (NO SSL)
- DEPENDS += +libuwsc-nossl
- VARIANT:=nossl
- CONFLICTS:=rtty-openssl rtty-wolfssl rtty-mbedtls
-endef
-
-define Package/rtty-openssl
- $(Package/rtty/default)
- TITLE += (openssl)
- DEPENDS += +libuwsc-openssl
- VARIANT:=openssl
- CONFLICTS:=rtty-wolfssl rtty-mbedtls
-endef
-
-define Package/rtty-wolfssl
- $(Package/rtty/default)
- TITLE += (wolfssl)
- DEPENDS += +libuwsc-wolfssl
- VARIANT:=wolfssl
- CONFLICTS:=rtty-mbedtls
-endef
-
-define Package/rtty-mbedtls
- $(Package/rtty/default)
- TITLE += (mbedtls)
- DEPENDS += +libuwsc-mbedtls
- VARIANT:=mbedtls
-endef
+Package/rtty-openssl=$(call Package/rtty/Default,openssl,+PACKAGE_rtty-openssl:libuwsc-openssl)
+Package/rtty-wolfssl=$(call Package/rtty/Default,wolfssl,+PACKAGE_rtty-wolfssl:libuwsc-wolfssl)
+Package/rtty-mbedtls=$(call Package/rtty/Default,mbedtls,+PACKAGE_rtty-mbedtls:libuwsc-mbedtls)
+Package/rtty-nossl=$(call Package/rtty/Default,nossl,+PACKAGE_rtty-nossl:libuwsc-nossl)
-Package/rtty-nossl/description = $(Package/rtty/default/description)
-Package/rtty-openssl/description = $(Package/rtty/default/description)
-Package/rtty-wolfssl/description = $(Package/rtty/default/description)
-Package/rtty-mbedtls/description = $(Package/rtty/default/description)
-
-define Package/rtty/default/install
+define Package/rtty-$(BUILD_VARIANT)/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rtty $(1)/usr/sbin
$(INSTALL_BIN) ./files/rtty.init $(1)/etc/init.d/rtty
$(INSTALL_CONF) ./files/rtty.config $(1)/etc/config/rtty
endef
-Package/rtty-nossl/install = $(Package/rtty/default/install)
-Package/rtty-openssl/install = $(Package/rtty/default/install)
-Package/rtty-wolfssl/install = $(Package/rtty/default/install)
-Package/rtty-mbedtls/install = $(Package/rtty/default/install)
-
-$(eval $(call BuildPackage,rtty-nossl))
-$(eval $(call BuildPackage,rtty-mbedtls))
-$(eval $(call BuildPackage,rtty-wolfssl))
$(eval $(call BuildPackage,rtty-openssl))
-
+$(eval $(call BuildPackage,rtty-wolfssl))
+$(eval $(call BuildPackage,rtty-mbedtls))
+$(eval $(call BuildPackage,rtty-nossl))
# option host 'your-server-host' # Server host
# option port '5912' # Server Port
# option ssl 1 # Whether to use ssl
-# option ping 5 # heartbeat interval(second)
+# option keepalive 5 # keep alive in seconds for this client
'host:host' \
'port:port' \
'ssl:bool:0' \
- 'ping:uinteger:5'
+ 'keepalive:uinteger:5'
[ $? -ne 0 ] && {
echo "validation failed" >&2
}
procd_open_instance
- procd_set_param command $BIN -h $host -p $port -a -P $ping
+ procd_set_param command $BIN -h $host -p $port -a -k $keepalive
[ -n "$ifname" ] && procd_append_param command -i "$ifname"
[ -n "$id" ] && procd_append_param command -I "$id"
[ -n "$description" ] && procd_append_param command -d "$description"
#
# Copyright (C) 2006-2016 OpenWrt.org
-# Copyright (C) 2017 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+# Copyright (C) 2017-2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=sane-backends
PKG_VERSION:=1.0.27
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://fossies.org/linux/misc \
https://alioth.debian.org/frs/download.php/file/4146/
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=COPYING LICENSE
+PKG_CPE_ID:=cpe:/a:sane-backends_project:sane-backends
PKG_INSTALL:=1
$(call Package/sane-backends/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libusb-compat
+ DEPENDS:=+libusb-1.0
TITLE+= (libraries)
endef
$(CP) $(PKG_INSTALL_DIR)/usr/include/sane $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.{a,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/tools/sane-backends.pc $(1)/usr/lib/pkgconfig/
endef
# 1: short name
PKG_NAME:=setserial
PKG_VERSION:=2.17
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/setserial
--- /dev/null
+diff --git a/Makefile.in b/Makefile.in
+index 00b9eb1..2fdbae3 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -17,7 +17,7 @@ DEFS = @DEFS@
+ INCS = -I.
+ TAR = tar
+
+-all: setserial setserial.cat
++all: setserial
+
+ setserial: setserial.c
+ $(CC) $(CFLAGS) $(DEFS) $(INCS) setserial.c -o setserial
include $(TOPDIR)/rules.mk
PKG_NAME:=shadow
-PKG_VERSION:=4.2.1
-PKG_RELEASE:=8
+PKG_VERSION:=4.6
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://pkg-shadow.alioth.debian.org/releases
-PKG_HASH:=3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41
+PKG_SOURCE_URL:=https://github.com/shadow-maint/shadow/releases/download/$(PKG_VERSION)
+PKG_HASH:=0998c8d84242a231ab0acb7f8613927ff5bcff095f8aa6b79478893a03f05583
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
PKG_LICENSE:=BSD-3-Clause
SECTION:=utils
CATEGORY:=Utilities
TITLE:=The PLD Linux shadow utilities
- URL:=http://pkg-shadow.alioth.debian.org/
+ URL:=https://github.com/shadow-maint/shadow
endef
define Package/shadow
---- a/configure.in
-+++ b/configure.in
-@@ -197,7 +197,6 @@ dnl XXX - quick hack, should disappear b
+--- a/configure.ac
++++ b/configure.ac
+@@ -200,7 +200,6 @@ dnl XXX - quick hack, should disappear b
AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().])
if test "$ac_cv_func_ruserok" = "yes"; then
AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.])
+++ /dev/null
-From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001
-From: James Le Cuirot <chewi@aura-online.co.uk>
-Date: Sat, 23 Aug 2014 09:46:39 +0100
-Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF
-
-This built-in check is simpler than the previous method and, most
-importantly, works when cross-compiling.
-
-Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
----
- configure.in | 14 ++++----------
- 1 file changed, 4 insertions(+), 10 deletions(-)
-
---- a/configure.in
-+++ b/configure.in
-@@ -334,16 +334,10 @@ if test "$enable_subids" != "no"; then
- dnl
- dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
- dnl
-- AC_RUN_IFELSE([AC_LANG_SOURCE([
--#include <sys/types.h>
--int main(void) {
-- uid_t u;
-- gid_t g;
-- return (sizeof u < 4) || (sizeof g < 4);
--}
-- ])], [id32bit="yes"], [id32bit="no"])
-+ AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"])
-+ AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
-
-- if test "x$id32bit" = "xyes"; then
-+ if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then
- AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
- enable_subids="yes"
- else
--- a/src/su.c
+++ b/src/su.c
-@@ -1090,8 +1090,12 @@ int main (int argc, char **argv)
+@@ -1127,8 +1127,12 @@ int main (int argc, char **argv)
if (fd >= 0) {
err = ioctl (fd, TIOCNOTTY, (char *) 0);
include $(TOPDIR)/rules.mk
PKG_NAME:=sispmctl
-PKG_VERSION:=3.1+20120206
+PKG_VERSION:=4.0
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=5ff4a05a5bcb6a64a9d6f77fed47014512f66b11
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_HASH:=d09782160dbcc1ba3bd6a38941f38e130049d8383843f6f292409909678aed82
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=git://git.code.sf.net/p/sispmctl/git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)
+PKG_HASH:=442d9bb9774da7214c222144035ac68ad5d25171040ce2731cfdf49b3365cfd5
PKG_MAINTAINER:=Richard Kunze <richard.kunze@web.de>
PKG_LICENSE:=GPL-2.0+
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
+define Package/libsispmctl
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Silver Shield PM Control for Linux library
+ URL:=http://sispmctl.sourceforge.net
+ DEPENDS:=+libusb-compat
+endef
+
define Package/sispmctl
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Silver Shield PM Control for Linux
- URL:=http://sispmctl.sourceforge.net/
- DEPENDS:=+libusb-compat
+ URL:=http://sispmctl.sourceforge.net
+ DEPENDS:=+libsispmctl
endef
define Package/sispmctl/description
--enable-webless \
--disable-dependency-tracking
+define Package/libsispmctl/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libsispmctl* $(1)/usr/lib/
+endef
+
define Package/sispmctl/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sispmctl $(1)/usr/bin/
endef
+$(eval $(call BuildPackage,libsispmctl))
$(eval $(call BuildPackage,sispmctl))
+++ /dev/null
---- a/src/sispm_ctl.c
-+++ b/src/sispm_ctl.c
-@@ -33,6 +33,7 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <time.h>
-+#include <sys/types.h>
- #include <usb.h>
- #include <assert.h>
- #include "sispm_ctl.h"
---- a/src/main.c
-+++ b/src/main.c
-@@ -34,11 +34,11 @@
- #define __USE_XOPEN
- #include <time.h>
- #include <signal.h>
--#include <usb.h>
- #include <assert.h>
- #include <getopt.h>
- #include <sys/types.h>
- #include <sys/socket.h>
-+#include <usb.h>
-
- #include <fcntl.h>
-
#
-# Copyright (C) 2016, 2018 OpenWrt.org
+# Copyright (C) 2016, 2018 Jeffery To
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=slide-switch
-PKG_VERSION:=0.9.1
+PKG_VERSION:=0.9.2
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/jefferyto/openwrt-slide-switch.git
-PKG_SOURCE_VERSION:=d70b5a09f457050e7e3b45fe03787945aa8880a0
+PKG_SOURCE_VERSION:=234293255f919cc00dc799f4729401e91b5091c9
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=78227e0cdc36f105b4fc5657620e41d6bb429eeef76419ce2cd53d2b6700ce31
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(call version_abbrev,$(PKG_SOURCE_VERSION)).tar.xz
+PKG_MIRROR_HASH:=ca405699c826428a13b174d5ec70c8b60fdde6467184b1fa0a09df3643bf24d3
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=stm32flash
-PKG_VERSION:=0.4
+PKG_VERSION:=0.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://sourceforge.net/projects/stm32flash/files
-PKG_HASH:=023f28b01f644edc235c8815a4352e359d3ebdbe6368aaf6bbc28bab3e6ffa5b
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)
+PKG_HASH:=97aa9422ef02e82f7da9039329e21a437decf972cb3919ad817f70ac9a49e306
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_MAINTAINER:=Christian Pointner <equinox@spreadspace.org>
PKG_LICENSE:=GPL-2.0+
include $(TOPDIR)/rules.mk
PKG_NAME:=stoken
-PKG_VERSION:=0.8
-PKG_REV:=c4d79ffbf5053e44be4b64da22b1b7fb6a51daf2
-PKG_RELEASE:=2
+PKG_VERSION:=0.92
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/cernekee/stoken.git
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/stoken
+PKG_HASH:=aa2b481b058e4caf068f7e747a2dcf5772bcbf278a4f89bc9efcbf82bcc9ef5a
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
-PKG_MIRROR_HASH:=2f77c42b14a0b6b1e4d44dfd4d66b63ce6ed7484ca97debec0344f5c966e2e5c
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
PKG_LICENSE:=LGPL-2.1
PKG_INSTALL:=1
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
-
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/stoken/Default
TITLE:=tokencode generator compatible with RSA SecurID 128-bit (AES)
- URL:=http://sourceforge.net/p/stoken/
+ URL:=https://sourceforge.net/p/stoken/wiki/Home/
DEPENDS:= +libxml2 +libnettle
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=swig
-PKG_VERSION:=3.0.7
+PKG_VERSION:=3.0.12
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=06dc8816a225667ce1eee545af3caf87e1bbaa379c32838d4cea53152514348d
+PKG_HASH:=7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d
PKG_INSTALL:=1
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>, Hirokazu MORIKAWA <morikw2@gmail.com>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE
--- /dev/null
+From 1a5aadcd66e85c63d228bfd811a521d617c22a38 Mon Sep 17 00:00:00 2001
+From: Patrick Schneider <patrick.schneider@meetnow.eu>
+Date: Thu, 13 Apr 2017 15:02:53 +0200
+Subject: [PATCH] Add Node 7.x aka V8 5.2+ support
+
+* Use WeakCallbackInfo instead of WeakCallbackData
+* Use GetPrivate instead of GetHiddenValue
+* Adopted new signature for SetWeak to support destructor calling
+* SetAccessor deprecation fixed
+* Proper version checks where applicable
+
+Upstream-Status: Submitted [https://github.com/swig/swig/pull/968]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+---
+ Lib/javascript/v8/javascriptcode.swg | 27 +++++++++++++++++-----
+ Lib/javascript/v8/javascripthelpers.swg | 29 +++++++++++++++++++++---
+ Lib/javascript/v8/javascriptinit.swg | 16 +++++++++++--
+ Lib/javascript/v8/javascriptrun.swg | 40 ++++++++++++++++++++++++++++-----
+ 4 files changed, 95 insertions(+), 17 deletions(-)
+
+diff --git a/Lib/javascript/v8/javascriptcode.swg b/Lib/javascript/v8/javascriptcode.swg
+index fb7d55c..b8c5089 100644
+--- a/Lib/javascript/v8/javascriptcode.swg
++++ b/Lib/javascript/v8/javascriptcode.swg
+@@ -133,10 +133,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++ static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ if(proxy->swigCMemOwn && proxy->swigCObject) {
+@@ -147,7 +150,9 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ }
+ delete proxy;
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
++#endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+ object.Dispose();
+@@ -155,7 +160,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ object.Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x032100)
+ object->Dispose(isolate);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object->Dispose();
+ #endif
+ }
+@@ -177,10 +182,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ static void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ if(proxy->swigCMemOwn && proxy->swigCObject) {
+@@ -197,7 +205,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ object->Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ object->Dispose();
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
+ #endif
+ }
+@@ -211,7 +219,11 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ * ----------------------------------------------------------------------------- */
+ %fragment("js_getter", "templates")
+ %{
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static SwigV8ReturnValue $jswrapper(v8::Local<v8::String> property, const SwigV8PropertyCallbackInfo &info) {
++#else
++static SwigV8ReturnValue $jswrapper(v8::Local<v8::Name> property, const SwigV8PropertyCallbackInfo &info) {
++#endif
+ SWIGV8_HANDLESCOPE();
+
+ v8::Handle<v8::Value> jsresult;
+@@ -233,8 +245,11 @@ fail:
+ * ----------------------------------------------------------------------------- */
+ %fragment("js_setter", "templates")
+ %{
+-static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value,
+- const SwigV8PropertyCallbackInfoVoid &info) {
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
++static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
++#else
++static void $jswrapper(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
++#endif
+ SWIGV8_HANDLESCOPE();
+
+ $jslocals
+diff --git a/Lib/javascript/v8/javascripthelpers.swg b/Lib/javascript/v8/javascripthelpers.swg
+index 091467d..7461079 100644
+--- a/Lib/javascript/v8/javascripthelpers.swg
++++ b/Lib/javascript/v8/javascripthelpers.swg
+@@ -6,11 +6,16 @@ typedef v8::InvocationCallback SwigV8FunctionCallback;
+ typedef v8::AccessorGetter SwigV8AccessorGetterCallback;
+ typedef v8::AccessorSetter SwigV8AccessorSetterCallback;
+ typedef v8::AccessorInfo SwigV8PropertyCallbackInfoVoid;
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ typedef v8::FunctionCallback SwigV8FunctionCallback;
+ typedef v8::AccessorGetterCallback SwigV8AccessorGetterCallback;
+ typedef v8::AccessorSetterCallback SwigV8AccessorSetterCallback;
+ typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
++#else
++typedef v8::FunctionCallback SwigV8FunctionCallback;
++typedef v8::AccessorNameGetterCallback SwigV8AccessorGetterCallback;
++typedef v8::AccessorNameSetterCallback SwigV8AccessorSetterCallback;
++typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
+ #endif
+
+ /**
+@@ -65,18 +70,36 @@ SWIGRUNTIME void SWIGV8_AddStaticFunction(v8::Handle<v8::Object> obj, const char
+ */
+ SWIGRUNTIME void SWIGV8_AddStaticVariable(v8::Handle<v8::Object> obj, const char* symbol,
+ SwigV8AccessorGetterCallback getter, SwigV8AccessorSetterCallback setter) {
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ obj->SetAccessor(SWIGV8_SYMBOL_NEW(symbol), getter, setter);
++#else
++ obj->SetAccessor(SWIGV8_CURRENT_CONTEXT(), SWIGV8_SYMBOL_NEW(symbol), getter, setter);
++#endif
+ }
+
+-SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value,
+- const SwigV8PropertyCallbackInfoVoid& info)
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
++SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
++#else
++SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
++#endif
+ {
+ char buffer[256];
+ char msg[512];
+ int res;
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ property->WriteUtf8(buffer, 256);
+ res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
++#else
++ v8::Local<v8::String> sproperty;
++ if (property->ToString(SWIGV8_CURRENT_CONTEXT()).ToLocal(&sproperty)) {
++ sproperty->WriteUtf8(buffer, 256);
++ res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
++ }
++ else {
++ res = -1;
++ }
++#endif
+
+ if(res<0) {
+ SWIG_exception(SWIG_ERROR, "Tried to write read-only variable.");
+diff --git a/Lib/javascript/v8/javascriptinit.swg b/Lib/javascript/v8/javascriptinit.swg
+index 34befa7..86008d9 100644
+--- a/Lib/javascript/v8/javascriptinit.swg
++++ b/Lib/javascript/v8/javascriptinit.swg
+@@ -7,15 +7,27 @@ SWIG_V8_SetModule(void *, swig_module_info *swig_module) {
+ v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
+ v8::Local<v8::External> mod = SWIGV8_EXTERNAL_NEW(swig_module);
+ assert(!mod.IsEmpty());
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ global_obj->SetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"), mod);
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
++ global_obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, mod);
++#endif
+ }
+
+ SWIGRUNTIME swig_module_info *
+ SWIG_V8_GetModule(void *) {
+ v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ v8::Local<v8::Value> moduleinfo = global_obj->GetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
++ v8::Local<v8::Value> moduleinfo;
++ if (!global_obj->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&moduleinfo))
++ return 0;
++#endif
+
+- if (moduleinfo.IsEmpty())
++ if (moduleinfo.IsEmpty() || moduleinfo->IsNull() || moduleinfo->IsUndefined())
+ {
+ // It's not yet loaded
+ return 0;
+@@ -23,7 +35,7 @@ SWIG_V8_GetModule(void *) {
+
+ v8::Local<v8::External> moduleinfo_extern = v8::Local<v8::External>::Cast(moduleinfo);
+
+- if (moduleinfo_extern.IsEmpty())
++ if (moduleinfo_extern.IsEmpty() || moduleinfo_extern->IsNull() || moduleinfo_extern->IsUndefined())
+ {
+ // Something's not right
+ return 0;
+diff --git a/Lib/javascript/v8/javascriptrun.swg b/Lib/javascript/v8/javascriptrun.swg
+index 5ac52a5..30002c0 100644
+--- a/Lib/javascript/v8/javascriptrun.swg
++++ b/Lib/javascript/v8/javascriptrun.swg
+@@ -193,8 +193,10 @@ public:
+ void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Value> object, void *parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ void (*dtor) (const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data);
++#else
++ void (*dtor) (const v8::WeakCallbackInfo<SWIGV8_Proxy> &data);
+ #endif
+ };
+
+@@ -241,9 +243,12 @@ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Val
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ delete proxy;
+@@ -312,12 +317,18 @@ SWIGRUNTIME void SWIGV8_SetPrivateData(v8::Handle<v8::Object> obj, void *ptr, sw
+ } else {
+ cdata->handle.MakeWeak(cdata, SWIGV8_Proxy_DefaultDtor);
+ }
+-#else
++#elifif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
+ cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor);
+ } else {
+ cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor);
+ }
++#else
++ if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
++ cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor, v8::WeakCallbackType::kParameter);
++ } else {
++ cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor, v8::WeakCallbackType::kParameter);
++ }
+ #endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+@@ -470,7 +481,14 @@ int SwigV8Packed_Check(v8::Handle<v8::Value> valRef) {
+
+ v8::Handle<v8::Object> objRef = valRef->ToObject();
+ if(objRef->InternalFieldCount() < 1) return false;
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ v8::Handle<v8::Value> flag = objRef->GetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
++ v8::Local<v8::Value> flag;
++ if (!objRef->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&flag))
++ return false;
++#endif
+ return (flag->IsBoolean() && flag->BooleanValue());
+ }
+
+@@ -519,10 +537,13 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persist
+ SwigV8PackedData *cdata = static_cast<SwigV8PackedData *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SwigV8PackedData *cdata) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Object, SwigV8PackedData> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SwigV8PackedData *cdata = data.GetParameter();
++#else
++SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackInfo<SwigV8PackedData> &data) {
++ SwigV8PackedData *cdata = data.GetParameter();
+ #endif
+
+ delete cdata;
+@@ -537,7 +558,7 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Ob
+ object->Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ object->Dispose();
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
+ #endif
+ }
+@@ -550,7 +571,12 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
+ // v8::Handle<v8::Object> obj = SWIGV8_OBJECT_NEW();
+ v8::Local<v8::Object> obj = SWIGV8_OBJECT_NEW();
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ obj->SetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"), SWIGV8_BOOLEAN_NEW(true));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
++ obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, SWIGV8_BOOLEAN_NEW(true));
++#endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031511)
+ obj->SetPointerInInternalField(0, cdata);
+@@ -573,9 +599,11 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
+ cdata->handle.MakeWeak(v8::Isolate::GetCurrent(), cdata, _wrap_SwigV8PackedData_delete);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ cdata->handle.MakeWeak(cdata, _wrap_SwigV8PackedData_delete);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete);
+ // v8::V8::SetWeak(&cdata->handle, cdata, _wrap_SwigV8PackedData_delete);
++#else
++ cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete, v8::WeakCallbackType::kParameter);
+ #endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+--
+2.9.5
+
include $(TOPDIR)/rules.mk
PKG_NAME:=sysstat
-PKG_VERSION:=11.6.0
-PKG_RELEASE:=2
+PKG_VERSION:=11.6.4
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://pagesperso-orange.fr/sebastien.godard/
-PKG_HASH:=14bb696545cba0d99e3492092c9ed15fe9b6da79df349695251b41d345e969a7
+PKG_HASH:=6aa6398b200f09a2874fffc9c31eb943aea64d707a4afe5f5f1751d876157b09
PKG_INSTALL:=1
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
-
+ #include <ctype.h>
--- a/common.c
+++ b/common.c
-@@ -30,6 +30,7 @@
+@@ -32,6 +32,7 @@
#include <dirent.h>
#include <ctype.h>
#include <libgen.h>
+++ /dev/null
-From: Robert Luberda <robert@debian.org>
-Date: Wed, 9 Sep 2015 21:37:37 +0200
-Subject: Remove scscid()
-
-Remove sccsid() function togethwe with SCCSID string that
-contained __DATE__ and __TIME__ macros. This should cause
-binary to be more reproducible, see
-https://wiki.debian.org/ReproducibleBuilds/TimestampsFromCPPMacros
----
- cifsiostat.c | 3 ---
- iostat.c | 3 ---
- mpstat.c | 3 ---
- pidstat.c | 3 ---
- sadc.c | 3 ---
- sadf.c | 3 ---
- sar.c | 3 ---
- tapestat.c | 3 ---
- 8 files changed, 24 deletions(-)
-
-diff --git a/cifsiostat.c b/cifsiostat.c
-index a3c81d0..4668a7c 100644
---- a/cifsiostat.c
-+++ b/cifsiostat.c
-@@ -41,9 +41,6 @@
- #define _(string) (string)
- #endif
-
--#define SCCSID "@(#)sysstat-" VERSION ": " __FILE__ " compiled " __DATE__ " " __TIME__
--char *sccsid(void) { return (SCCSID); }
--
- unsigned long long uptime0[2] = {0, 0};
- struct cifs_stats *st_cifs[2];
- struct io_hdr_stats *st_hdr_cifs;
-diff --git a/iostat.c b/iostat.c
-index 7b346e2..a0199d2 100644
---- a/iostat.c
-+++ b/iostat.c
-@@ -48,9 +48,6 @@
- #define _(string) (string)
- #endif
-
--#define SCCSID "@(#)sysstat-" VERSION ": " __FILE__ " compiled " __DATE__ " " __TIME__
--char *sccsid(void) { return (SCCSID); }
--
- struct stats_cpu *st_cpu[2];
- unsigned long long uptime[2] = {0, 0};
- unsigned long long uptime0[2] = {0, 0};
-diff --git a/mpstat.c b/mpstat.c
-index 1c83ea2..e4a040b 100644
---- a/mpstat.c
-+++ b/mpstat.c
-@@ -43,9 +43,6 @@
- #define _(string) (string)
- #endif
-
--#define SCCSID "@(#)sysstat-" VERSION ": " __FILE__ " compiled " __DATE__ " " __TIME__
--char *sccsid(void) { return (SCCSID); }
--
- unsigned long long uptime[3] = {0, 0, 0};
- unsigned long long uptime0[3] = {0, 0, 0};
-
-diff --git a/pidstat.c b/pidstat.c
-index 876635c..5372176 100644
---- a/pidstat.c
-+++ b/pidstat.c
-@@ -47,9 +47,6 @@
- #define _(string) (string)
- #endif
-
--#define SCCSID "@(#)sysstat-" VERSION ": " __FILE__ " compiled " __DATE__ " " __TIME__
--char *sccsid(void) { return (SCCSID); }
--
- unsigned long long uptime[3] = {0, 0, 0};
- unsigned long long uptime0[3] = {0, 0, 0};
- struct pid_stats *st_pid_list[3] = {NULL, NULL, NULL};
-diff --git a/sadc.c b/sadc.c
-index 7cdbc38..bfb4dac 100644
---- a/sadc.c
-+++ b/sadc.c
-@@ -52,9 +52,6 @@
- #include "sensors/error.h"
- #endif
-
--#define SCCSID "@(#)sysstat-" VERSION ": " __FILE__ " compiled " __DATE__ " " __TIME__
--char *sccsid(void) { return (SCCSID); }
--
- long interval = 0;
- unsigned int flags = 0;
-
-diff --git a/sadf.c b/sadf.c
-index 160b485..0c0017c 100644
---- a/sadf.c
-+++ b/sadf.c
-@@ -41,9 +41,6 @@
- # define _(string) (string)
- #endif
-
--#define SCCSID "@(#)sysstat-" VERSION ": " __FILE__ " compiled " __DATE__ " " __TIME__
--char *sccsid(void) { return (SCCSID); }
--
- long interval = -1, count = 0;
-
- unsigned int flags = 0;
-diff --git a/sar.c b/sar.c
-index ccf426e..07a9b4a 100644
---- a/sar.c
-+++ b/sar.c
-@@ -42,9 +42,6 @@
- #define _(string) (string)
- #endif
-
--#define SCCSID "@(#)sysstat-" VERSION ": " __FILE__ " compiled " __DATE__ " " __TIME__
--char *sccsid(void) { return (SCCSID); }
--
- /* Interval and count parameters */
- long interval = -1, count = 0;
-
-diff --git a/tapestat.c b/tapestat.c
-index 268e4a5..df0a01b 100644
---- a/tapestat.c
-+++ b/tapestat.c
-@@ -58,9 +58,6 @@
- #define _(string) (string)
- #endif
-
--#define SCCSID "@(#)sysstat-" VERSION ": " __FILE__ " compiled " __DATE__ " " __TIME__
--char *sccsid(void) { return (SCCSID); }
--
- int cpu_nr = 0; /* Nb of processors on the machine */
- int flags = 0; /* Flag for common options and system state */
-
include $(TOPDIR)/rules.mk
PKG_NAME:=tio
-PKG_VERSION:=1.29
+PKG_VERSION:=1.31
PKG_RELEASE:=1
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0+
PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=371a11b69dd2e1b1af3ca2a1c570408b1452ae4523fe954d250f04b6b2147d23
+PKG_HASH:=4e72825914dac77c4587c0772accbd7a1292d5c5895bd49ad1477707b3203e42
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=tmux
-PKG_VERSION:=2.6
-PKG_RELEASE:=1
+PKG_VERSION:=2.7
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/tmux/tmux/releases/download/$(PKG_VERSION)
-PKG_HASH:=b17cd170a94d7b58c0698752e1f4f263ab6dc47425230df7e53a6435cc7cd7e8
+PKG_HASH:=9ded7d100313f6bc5a87404a4048b3745d61f2332f99ec1400a7c4ed9485d452
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=ISC
tmux is a modern, BSD-licensed alternative to GNU screen.
endef
+define Package/tmux/conffiles
+/etc/tmux.conf
+endef
+
define Package/tmux/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tmux $(1)/usr/bin/
include $(TOPDIR)/rules.mk
PKG_NAME:=ttyd
-PKG_VERSION:=1.3.3+git-04d5bc
+PKG_VERSION:=1.4.2
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/tsl0922/ttyd.git
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=04d5bc1ecb59667d025a94e1967a83c24141f911
-PKG_MIRROR_HASH=87ea900f7bf67daf5131ecfcec0917e175d168ce52771012139c06dbafcc641d
+PKG_SOURCE_URL:=https://codeload.github.com/tsl0922/ttyd/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE_VERSION=$(PKG_VERSION)
+PKG_HASH=ff1a66b418df6cd741868a8ea84f69cd63f15e52e3fa117641ec57d3c37a1315
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Command-line tool for sharing terminal over the web
- DEPENDS:=+libopenssl +libjson-c +libpthread +libwebsockets-openssl
+ DEPENDS:=+libopenssl +libjson-c +libpthread +libwebsockets-full
URL:=https://github.com/tsl0922/ttyd
SUBMENU:=Terminal
MAINTAINER:=Shuanglei Tao <tsl0922@gmail.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=unrar
-PKG_VERSION:=5.5.8
+PKG_VERSION:=5.6.5
PKG_RELEASE:=1
PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.rarlab.com/rar
-PKG_HASH:=9b66e4353a9944bc140eb2a919ff99482dd548f858f5e296d809e8f7cdb2fcf4
+PKG_SOURCE_URL:=https://www.rarlab.com/rar
+PKG_HASH:=eba36a421bf41491818dee9507d934064622bc0bd9db6bbb8422a4706f200898
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>, \
Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=UnRAR
PKG_LICENSE_FILES:=license.txt
+PKG_CPE_ID:=cpe:/a:rarlab:unrar
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/unrar
PKG_INSTALL:=1
define Package/unrar/Default
TITLE:=UnRAR
SUBMENU:=Compression
- URL:=http://www.rarlab.com/
+ URL:=https://www.rarlab.com/
DEPENDS:=$(CXX_DEPENDS) +libpthread
endef
# Linux using GCC
-CXX=c++
--CXXFLAGS=-O2
+-CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
+#CXX=c++
-+#CXXFLAGS=-O2
++#CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
LIBFLAGS=-fPIC
DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
STRIP=strip
include $(TOPDIR)/rules.mk
PKG_NAME:=uvcdynctrl
-PKG_VERSION:=0.2.4
-PKG_REV:=2
+PKG_VERSION:=0.2.5
+PKG_RELEASE:=1
PKG_SOURCE:=libwebcam-src-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/libwebcam
-PKG_HASH:=91741aca11f079eb6d043e31b7da6fe1f7927c28d7496590386928f8466b4297
+PKG_HASH:=3ca5199c7b8398b655a7c38e3ad4191bb053b1486503287f20d30d141bda9d41
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
-PKG_BUILD_DIR:=$(BUILD_DIR)/libwebcam-src-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/libwebcam-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CATEGORY:=Utilities
DEPENDS:=+libwebcam
TITLE:=Manage dynamic controls in uvcvideo
- URL:=http://sourceforge.net/projects/libwebcam/
+ URL:=https://sourceforge.net/projects/libwebcam/
MENU:=1
endef
CATEGORY:=Libraries
DEPENDS:=+libxml2 +libiconv-full
TITLE:=Webcam library
- URL:=http://sourceforge.net/projects/libwebcam/
+ URL:=https://sourceforge.net/projects/libwebcam/
endef
define Package/libwebcam/description
include $(TOPDIR)/rules.mk
PKG_NAME:=vim
-PKG_VERSION:=8.0.586
-PKG_RELEASE:=2
-VIMVER:=80
+PKG_VERSION:=8.1
+PKG_RELEASE:=1
+VIMVER:=81
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=ftp://ftp.vim.org/pub/vim/unix/
-PKG_HASH:=08bd0d1dd30ece3cb9905ccd48b82b2f81c861696377508021265177dc153a61
+PKG_SOURCE_URL:=http://ftp.vim.org/pub/vim/unix
+PKG_HASH:=8b69fbd01c877dd8ecbbeca1dc66e5e927228d631ac4c2174b9307eb5c827c86
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
+PKG_CPE_ID:=cpe:/a:vim:vim
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(VIMVER)
PKG_BUILD_PARALLEL:=1
vim_cv_tty_group=root \
vim_cv_tty_mode=0620
+ifneq ($(HOST_OS),Linux)
+ TARGET_PATH_PKG:=$(CURDIR)/scripts:$(TARGET_PATH_PKG)
+endif
+
define Build/Prepare
$(call Build/Prepare/Default)
$(MAKE) -C $(PKG_BUILD_DIR)/src autoconf
+ AC_DEFINE_UNQUOTED(BUILD_DATE, ["$BUILD_DATE"])
+fi
+
- dnl Check for the flag that fails if stuff are missing.
-
- AC_MSG_CHECKING(--enable-fail-if-missing argument)
+ dnl Check that the C99 features that Vim uses are supported:
+ if test x"$ac_cv_prog_cc_c99" != xno; then
+ dnl If the compiler doesn't explicitly support C99, then check
diff --git a/src/version.c b/src/version.c
index 65f5a4b..9422657 100644
--- a/src/version.c
--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
-@@ -310,7 +310,6 @@ all: tags vim.man evim.man vimdiff.man v
+@@ -317,7 +317,6 @@ all: tags vim.man evim.man vimdiff.man v
# Use Vim to generate the tags file. Can only be used when Vim has been
# compiled and installed. Supports multiple languages.
vimtags: $(DOCS)
--- /dev/null
+#!/bin/sh
+echo "Linux"
include $(TOPDIR)/rules.mk
PKG_NAME:=xz
-PKG_VERSION:=5.2.3
+PKG_VERSION:=5.2.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@SF/lzmautils \
- http://tukaani.org/xz
-PKG_HASH:=fd9ca16de1052aac899ad3495ad20dfa906c27b4a5070102a2ec35ca3a4740c1
+PKG_SOURCE_URL:=@SF/lzmautils
+PKG_HASH:=3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf
PKG_LICENSE:=Public-Domain LGPL-2.1+ GPL-2.0+ GPL-3.0+
PKG_LICENSE_FILES:=COPYING
SUBMENU:=Compression
SECTION:=utils
CATEGORY:=Utilities
- URL:=http://tukaani.org/xz
+ URL:=https://tukaani.org/xz
endef
define Package/xz-utils
default n
help
Create rules based on behavioral info generated by a Cuckoo sandbox
+
+ config YARA_module_dotnet
+ bool "Dotnet module"
+ default n
+ help
+ The dotnet module allows you to create more fine-grained rules
+ for .NET files by using attributes and features of the .NET file format
endif
include $(TOPDIR)/rules.mk
PKG_NAME:=yara
-PKG_VERSION:=3.7.0
+PKG_VERSION:=3.7.1
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/VirusTotal/yara/archive/v$(PKG_VERSION)/
-PKG_HASH:=01f0841e7387918c2b6d0b7fb48014bda41d1487be1cabf718a0576018969641
+PKG_HASH:=df077a29b0fffbf4e7c575f838a440f42d09b215fcb3971e6fb6360318a64892
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
URL:=http://virustotal.github.io/yara/
MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
DEPENDS:= +libopenssl
- DEPENDS+= +YARA_module_magic:libmagic
+ DEPENDS+= +YARA_module_magic:file
DEPENDS+= +YARA_module_cuckoo:jansson
MENU:=1
endef
endef
CONFIGURE_ARGS += \
- --disable-dotnet \
- $(if $(YARA_module_magic),--enable,--disable)-magic \
- $(if $(YARA_module_cuckoo),--enable,--disable)-cuckoo
+ $(if $(CONFIG_YARA_module_dotnet),--enable,--disable)-dotnet \
+ $(if $(CONFIG_YARA_module_magic),--enable,--disable)-magic \
+ $(if $(CONFIG_YARA_module_cuckoo),--enable,--disable)-cuckoo
define Package/yara/config
source "$(SOURCE)/Config.in"
include $(TOPDIR)/rules.mk
PKG_NAME:=yunbridge
-PKG_VERSION:=160
+PKG_VERSION:=1.6.0
+PKG_RELEASE:=1
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/arduino/YunBridge.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=f2042052115e71ad2c91f77e78d21db8275fcdd6
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=367db3667c6d2d8e20a0a214895e1bf2546918b008d084c3e7ca1adba9527dda
+PKG_SOURCE_URL:=https://codeload.github.com/arduino/YunBridge/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=9e5ffc7a0d0cc2c92e972e425adcc49b77cf39da075d31728e7755d316d910d8
+PKG_BUILD_DIR:=$(BUILD_DIR)/YunBridge-$(PKG_VERSION)
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
PKG_LICENSE:=GPL-2.0
include $(TOPDIR)/rules.mk
PKG_NAME:=zoneinfo
-PKG_VERSION:=2018d
-PKG_VERSION_CODE:=2018d
+PKG_VERSION:=2018e
+PKG_VERSION_CODE:=2018e
PKG_RELEASE:=1
#As i couldn't find real license used "Public Domain"
PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
PKG_SOURCE_CODE:=tzcode$(PKG_VERSION_CODE).tar.gz
PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
-PKG_HASH:=5106eddceb5f1ae3a91dbd3960e1b8b11ba0dc08579a31cf0724a7691b10c054
+PKG_HASH:=6b288e5926841a4cb490909fe822d85c36ae75538ad69baf20da9628b63b692e
include $(INCLUDE_DIR)/package.mk
define Download/tzcode
FILE=$(PKG_SOURCE_CODE)
URL=$(PKG_SOURCE_URL)
- HASH:=7de44e85baad748d217e3fd60706f599f9aec68bce6356b163f52b0dbd40a8d9
+ HASH:=ca340cf20e80b699d6e5c49b4ba47361b3aa681f06f38a0c88a8e8308c00ebce
endef
$(eval $(call Download,tzcode))
TITLE:=Zone Information (India)
endef
+define Package/zoneinfo-all
+$(call Package/zoneinfo/Default)
+ TITLE:=Zone Information (all zones)
+ DEPENDS:= \
+ +zoneinfo-simple \
+ +zoneinfo-core \
+ +zoneinfo-africa \
+ +zoneinfo-northamerica \
+ +zoneinfo-southamerica \
+ +zoneinfo-poles \
+ +zoneinfo-asia \
+ +zoneinfo-atlantic \
+ +zoneinfo-australia-nz \
+ +zoneinfo-pacific \
+ +zoneinfo-europe \
+ +zoneinfo-india
+endef
+
define Build/Prepare
(cd $(PKG_BUILD_DIR) && tar -xzf $(DL_DIR)/$(PKG_SOURCE_CODE) && tar -xzf $(DL_DIR)/$(PKG_SOURCE))
endef
$(eval $(call BuildPackage,zoneinfo-pacific))
$(eval $(call BuildPackage,zoneinfo-europe))
$(eval $(call BuildPackage,zoneinfo-india))
+$(eval $(call BuildPackage,zoneinfo-all))
include $(TOPDIR)/rules.mk
PKG_NAME:=zsh
-PKG_VERSION:=5.4.2
+PKG_VERSION:=5.6.2
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/zsh
-PKG_HASH:=957bcdb2c57f64c02f673693ea5a7518ef24b6557aeb3a4ce222cefa6d74acc9
+PKG_HASH:=a50bd66c0557e8eca3b8fa24e85d0de533e775d7a22df042da90488623752e9e
+
PKG_MAINTAINER:=Vadim A. Misbakh-Soloviov <openwrt-zsh@mva.name>
PKG_LICENSE:=ZSH
+PKG_LICENSE_FILES:=LICENCE
+PKG_CPE_ID:=cpe:/a:zsh_project:zsh
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Shells
TITLE:=The Z shell
DEPENDS:=+libcap +libncurses +libncursesw +libpcre +librt
- URL:=http://www.zsh.org/
+ URL:=https://www.zsh.org/
endef
define Package/zsh/description