mirror of
https://github.com/mudler/luet.git
synced 2025-06-23 14:07:35 +00:00
668 lines
53 KiB
HTML
668 lines
53 KiB
HTML
<!doctype html>
|
|
<html lang="en" class="no-js">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<meta name="generator" content="Hugo 0.91.2" />
|
|
<meta name="robots" content="index, follow">
|
|
|
|
|
|
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
|
<link rel="apple-touch-icon" href="/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
|
<link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16">
|
|
<link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32">
|
|
<link rel="icon" type="image/png" href="/favicons/android-36x36.png" sizes="36x36">
|
|
<link rel="icon" type="image/png" href="/favicons/android-48x48.png" sizes="48x48">
|
|
<link rel="icon" type="image/png" href="/favicons/android-72x72.png" sizes="72x72">
|
|
<link rel="icon" type="image/png" href="/favicons/android-96x96.png" sizes="96x96">
|
|
<link rel="icon" type="image/png" href="/favicons/android-144x144.png" sizes="144x144">
|
|
<link rel="icon" type="image/png" href="/favicons/android-192x192.png" sizes="192x192">
|
|
|
|
<title>Build a package | Luet</title>
|
|
<meta name="description" content="Example on how to build a package and run it locally with luet box
|
|
">
|
|
<meta property="og:title" content="Build a package" />
|
|
<meta property="og:description" content="Example on how to build a package and run it locally with luet box
|
|
" />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="https://luet.io/docs/tutorials/build_package/" /><meta property="article:section" content="docs" />
|
|
<meta property="article:published_time" content="2017-01-04T00:00:00+00:00" />
|
|
<meta property="article:modified_time" content="2023-02-02T13:37:09+01:00" /><meta property="og:site_name" content="Luet" />
|
|
|
|
<meta itemprop="name" content="Build a package">
|
|
<meta itemprop="description" content="Example on how to build a package and run it locally with luet box
|
|
"><meta itemprop="datePublished" content="2017-01-04T00:00:00+00:00" />
|
|
<meta itemprop="dateModified" content="2023-02-02T13:37:09+01:00" />
|
|
<meta itemprop="wordCount" content="1345">
|
|
<meta itemprop="keywords" content="" /><meta name="twitter:card" content="summary"/>
|
|
<meta name="twitter:title" content="Build a package"/>
|
|
<meta name="twitter:description" content="Example on how to build a package and run it locally with luet box
|
|
"/>
|
|
|
|
|
|
|
|
|
|
<link rel="preload" href="/scss/main.min.d6aacf1fb98a9ab81dae96c64f7d8c4a8d9a49e02fe439f5e923fda4c8fab074.css" as="style">
|
|
<link href="/scss/main.min.d6aacf1fb98a9ab81dae96c64f7d8c4a8d9a49e02fe439f5e923fda4c8fab074.css" rel="stylesheet" integrity="">
|
|
|
|
<script
|
|
src="https://code.jquery.com/jquery-3.6.0.min.js"
|
|
integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK"
|
|
crossorigin="anonymous"></script>
|
|
<script
|
|
src="https://unpkg.com/lunr@2.3.9/lunr.min.js"
|
|
integrity="sha384-203J0SNzyqHby3iU6hzvzltrWi/M41wOP5Gu+BiJMz5nwKykbkUx8Kp7iti0Lpli"
|
|
crossorigin="anonymous"></script>
|
|
|
|
<script type="application/javascript">
|
|
var doNotTrack = false;
|
|
if (!doNotTrack) {
|
|
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
|
ga('create', 'UA-00000000-0', 'auto');
|
|
|
|
ga('send', 'pageview');
|
|
}
|
|
</script>
|
|
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
|
|
|
</head>
|
|
<body class="td-page">
|
|
<header>
|
|
|
|
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
|
<a class="navbar-brand" href="/">
|
|
<span class="navbar-logo"><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 500" style="enable-background:new 0 0 500 500"><g><path style="fill:#fff" d="M116.8525 421.9722c-5.7041.0-10.3442-4.3127-10.3442-9.6129V88.183c0-5.3002 4.6401-9.6117 10.3442-9.6117H320.858c3.0347.0 9.3959.5498 11.7506 2.6302l.3545.3442 58.905 63.2912c2.3101 2.491 2.9202 8.4928 2.9202 11.3184v256.2039c0 5.3002-4.6407 9.6129-10.3436 9.6129H116.8525z"/><g><g><g><path style="fill:#767676" d="M384.4445 423.2066H116.852c-6.3839.0-11.5786-4.8658-11.5786-10.8474V88.1831c0-5.9804 5.1947-10.8461 11.5786-10.8461h204.0062c.377.0 9.2786.0329 12.568 2.9389l.3947.3833 58.9508 63.337c3.2135 3.4652 3.2514 11.7924 3.2514 12.1593v256.2036C396.0231 418.3408 390.8284 423.2066 384.4445 423.2066zM116.5079 411.9189c.0848.0278.1999.0531.3441.0531h267.5925c.1442.0.2581-.0253.3441-.0531V156.1556c-.0076-.9033-.3593-3.7347-.7034-5.0037l-57.6527-61.9416c-1.4651-.3176-4.4533-.6389-5.5742-.6389H116.852c-.143.0-.2594.024-.3441.0531V411.9189zm267.4533-261.149zM327.0321 89.371v.0013V89.371z"/></g></g></g><g><g><path style="fill:#5b7fc0" d="M189.0874 210.1754l.0012-.0012c7.7751.0012 15.0295 4.1862 18.932 10.9234 1.9177 3.3159 2.9305 7.1011 2.9293 10.9378.0 5.8394-2.2733 11.3304-6.4032 15.4604-4.1288 4.1288-9.6186 6.4032-15.458 6.4032s-11.328-2.2733-15.458-6.4032-6.4032-9.6186-6.4056-15.4628c.0012-6.025 2.454-11.4897 6.4116-15.4473C177.5953 212.627 183.0601 210.1742 189.0874 210.1754zm7.993 21.8576c.0012-1.4042-.3687-2.7868-1.063-3.9887-1.4293-2.4684-4.0833-3.9995-6.9299-4.0019-4.4077.0024-7.993 3.5877-7.993 7.993.0 2.1356.832 4.1431 2.3427 5.6539 1.5083 1.5083 3.5159 2.3403 5.6503 2.3415 2.1356.0 4.1443-.8308 5.6539-2.3403S197.0816 234.1722 197.0804 232.033z"/><path style="opacity:.3;fill:#fff" d="M189.0898 210.176c7.7763.0 15.0283 4.1826 18.926 10.9151 1.9201 3.3136 2.9377 7.0988 2.9353 10.9462.0024 12.0643-9.8065 21.8636-21.8613 21.8613-12.0547.0024-21.8636-9.8066-21.8612-21.8613.0-6.0285 2.4516-11.4921 6.4116-15.452C177.5977 212.6276 183.0612 210.176 189.0898 210.176zm7.9941 21.8612c0-1.4078-.3711-2.7892-1.0702-3.9959-1.4269-2.466-4.0797-3.9983-6.924-3.9983-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0024 4.4077 3.5865 7.9918 7.9942 7.9942 2.2027.0 4.2018-.8978 5.6479-2.3439C196.1861 236.239 197.0839 234.2399 197.0839 232.0372z"/><g><defs><path id="SVGID_1_" d="M194.7376 237.6875c-1.4461 1.4461-3.4452 2.3439-5.6479 2.3439-4.4077-.0024-7.9918-3.5865-7.9942-7.9942.0024-4.4125 3.5937-7.999 7.9942-7.9942 2.8443.0 5.497 1.5323 6.924 3.9983.6991 1.2067 1.0702 2.5881 1.0702 3.9959C197.0839 234.2399 196.1861 236.239 194.7376 237.6875z"/></defs><clipPath id="SVGID_2_"><use xlink:href="#SVGID_1_" style="overflow:visible"/></clipPath><path style="clip-path:url(#SVGID_2_);fill:#fff" d="M190.0704 225.0237c-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0011 1.9546.7088 3.7452 1.8782 5.1354-1.7447-1.4674-2.8575-3.663-2.8588-6.116.0024-4.4125 3.5936-7.999 7.9942-7.9942 2.3802-1e-4 4.616 1.0833 6.1218 2.8788C193.7885 225.7247 191.9774 225.0237 190.0704 225.0237z"/><path style="opacity:.13;clip-path:url(#SVGID_2_);fill:#020202" d="M190.0704 225.0237c-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0011 1.9546.7088 3.7452 1.8782 5.1354-1.7447-1.4674-2.8575-3.663-2.8588-6.116.0024-4.4125 3.5936-7.999 7.9942-7.9942 2.3802-1e-4 4.616 1.0833 6.1218 2.8788C193.7885 225.7247 191.9774 225.0237 190.0704 225.0237z"/></g><g><defs><path id="SVGID_3_" d="M189.0898 210.176c7.7763.0 15.0283 4.1826 18.926 10.9151 1.9201 3.3136 2.9377 7.0988 2.9353 10.9462.0024 12.0643-9.8065 21.8636-21.8613 21.8613-12.0547.0024-21.8636-9.8066-21.8612-21.8613.0-6.0285 2.4516-11.4921 6.4116-15.452C177.5977 212.6276 183.0612 210.176 189.0898 210.176zm7.9941 21.8612c0-1.4078-.3711-2.7892-1.0702-3.9959-1.4269-2.466-4.0797-3.9983-6.924-3.9983-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0024 4.4077 3.5865 7.9918 7.9942 7.9942 2.2027.0 4.2018-.8978 5.6479-2.3439C196.1861 236.239 197.0839 234.2399 197.0839 232.0372z"/></defs><clipPath id="SVGID_4_"><use xlink:href="#SVGID_3_" style="overflow:visible"/></clipPath><path style="clip-path:url(#SVGID_4_);fill:#5b7fc0" d="M172.6595 215.6045c-3.96 3.96-6.4116 9.4235-6.4116 15.452-.0024 12.0547 9.8066 21.8636 21.8613 21.8612 12.0547.0024 21.8636-9.797 21.8613-21.8612.0024-3.8475-1.0151-7.6326-2.9353-10.9462-3.8977-6.7324-11.1497-10.9151-18.926-10.9151C182.0806 209.1953 176.6171 211.647 172.6595 215.6045z"/></g></g><rect x="198.8952" y="225.1043" style="fill:#5b7fc0" width="122.6266" height="13.8671"/></g><g><path style="fill:#d95140" d="M189.0874 155.7611l.0012-.0012c7.7751.0012 15.0295 4.1862 18.932 10.9234 1.9177 3.3159 2.9305 7.1011 2.9293 10.9378.0 5.8394-2.2733 11.3304-6.4032 15.4604-4.1288 4.1288-9.6186 6.4032-15.458 6.4032s-11.328-2.2733-15.458-6.4032-6.4032-9.6186-6.4056-15.4628c.0012-6.0249 2.454-11.4897 6.4116-15.4473C177.5953 158.2128 183.0601 155.7599 189.0874 155.7611zm7.993 21.8577c.0012-1.4042-.3687-2.7868-1.063-3.9887-1.4293-2.4684-4.0833-3.9995-6.9299-4.0019-4.4077.0024-7.993 3.5877-7.993 7.993.0 2.1356.832 4.1431 2.3427 5.6539 1.5083 1.5083 3.5159 2.3403 5.6503 2.3415 2.1356.0 4.1443-.8308 5.6539-2.3403C196.2508 181.7667 197.0816 179.758 197.0804 177.6188z"/><path style="opacity:.3;fill:#fff" d="M189.0898 155.7617c7.7763.0 15.0283 4.1826 18.926 10.9151 1.9201 3.3135 2.9377 7.0987 2.9353 10.9462.0024 12.0643-9.8065 21.8636-21.8613 21.8613-12.0547.0024-21.8636-9.8066-21.8612-21.8613.0-6.0285 2.4516-11.4921 6.4116-15.452C177.5977 158.2134 183.0612 155.7617 189.0898 155.7617zm7.9941 21.8613c0-1.4078-.3711-2.7892-1.0702-3.9959-1.4269-2.466-4.0797-3.9983-6.924-3.9983-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0024 4.4077 3.5865 7.9918 7.9942 7.9942 2.2027.0 4.2018-.8978 5.6479-2.3439C196.1861 181.8248 197.0839 179.8256 197.0839 177.623z"/><g><defs><path id="SVGID_5_" d="M194.7376 183.2733c-1.4461 1.4461-3.4452 2.3439-5.6479 2.3439-4.4077-.0024-7.9918-3.5865-7.9942-7.9942.0024-4.4125 3.5937-7.9989 7.9942-7.9942 2.8443.0 5.497 1.5323 6.924 3.9983.6991 1.2067 1.0702 2.5881 1.0702 3.9959C197.0839 179.8256 196.1861 181.8248 194.7376 183.2733z"/></defs><clipPath id="SVGID_6_"><use xlink:href="#SVGID_5_" style="overflow:visible"/></clipPath><path style="clip-path:url(#SVGID_6_);fill:#fff" d="M190.0704 170.6095c-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0011 1.9546.7088 3.7452 1.8782 5.1354-1.7447-1.4674-2.8575-3.663-2.8588-6.116.0024-4.4125 3.5936-7.999 7.9942-7.9942 2.3802-1e-4 4.616 1.0833 6.1218 2.8788C193.7885 171.3104 191.9774 170.6095 190.0704 170.6095z"/><path style="opacity:.13;clip-path:url(#SVGID_6_);fill:#020202" d="M190.0704 170.6095c-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0011 1.9546.7088 3.7452 1.8782 5.1354-1.7447-1.4674-2.8575-3.663-2.8588-6.116.0024-4.4125 3.5936-7.999 7.9942-7.9942 2.3802-1e-4 4.616 1.0833 6.1218 2.8788C193.7885 171.3104 191.9774 170.6095 190.0704 170.6095z"/></g><g><defs><path id="SVGID_7_" d="M189.0898 155.7617c7.7763.0 15.0283 4.1826 18.926 10.9151 1.9201 3.3135 2.9377 7.0987 2.9353 10.9462.0024 12.0643-9.8065 21.8636-21.8613 21.8613-12.0547.0024-21.8636-9.8066-21.8612-21.8613.0-6.0285 2.4516-11.4921 6.4116-15.452C177.5977 158.2134 183.0612 155.7617 189.0898 155.7617zm7.9941 21.8613c0-1.4078-.3711-2.7892-1.0702-3.9959-1.4269-2.466-4.0797-3.9983-6.924-3.9983-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0024 4.4077 3.5865 7.9918 7.9942 7.9942 2.2027.0 4.2018-.8978 5.6479-2.3439C196.1861 181.8248 197.0839 179.8256 197.0839 177.623z"/></defs><clipPath id="SVGID_8_"><use xlink:href="#SVGID_7_" style="overflow:visible"/></clipPath><path style="clip-path:url(#SVGID_8_);fill:#d95140" d="M172.6595 161.1903c-3.96 3.96-6.4116 9.4235-6.4116 15.452-.0024 12.0547 9.8066 21.8636 21.8613 21.8613 12.0547.0024 21.8636-9.797 21.8613-21.8613.0024-3.8474-1.0151-7.6326-2.9353-10.9462-3.8977-6.7324-11.1497-10.9151-18.926-10.9151C182.0806 154.7811 176.6171 157.2327 172.6595 161.1903z"/></g><rect x="198.8952" y="170.69" style="fill:#d95140" width="122.6266" height="13.8671"/></g><g><g><path style="fill:#56a55c" d="M189.5379 264.6147l.0012-.0012c7.7751.0012 15.0294 4.1862 18.932 10.9235 1.9177 3.3159 2.9305 7.1011 2.9293 10.9378.0 5.8394-2.2733 11.3304-6.4032 15.4604-4.1288 4.1288-9.6186 6.4032-15.458 6.4032-5.8394.0-11.3281-2.2733-15.458-6.4032-4.13-4.13-6.4032-9.6186-6.4056-15.4628.0012-6.0249 2.454-11.4897 6.4116-15.4472C178.0458 267.0663 183.5105 264.6135 189.5379 264.6147zm7.993 21.8576c.0012-1.4042-.3687-2.7868-1.063-3.9887-1.4293-2.4684-4.0833-3.9995-6.9299-4.0019-4.4077.0024-7.993 3.5877-7.993 7.993.0 2.1356.832 4.1431 2.3427 5.6538 1.5083 1.5083 3.5159 2.3403 5.6503 2.3415 2.1356.0 4.1443-.8308 5.6539-2.3403C196.7013 290.6202 197.5321 288.6115 197.5309 286.4723z"/><path style="opacity:.3;fill:#fff" d="M189.5403 264.6153c7.7763.0 15.0283 4.1826 18.926 10.9151 1.9201 3.3135 2.9377 7.0987 2.9353 10.9462.0024 12.0643-9.8065 21.8636-21.8613 21.8613-12.0547.0024-21.8636-9.8065-21.8612-21.8613.0-6.0285 2.4516-11.492 6.4116-15.452C178.0482 267.0669 183.5117 264.6153 189.5403 264.6153zm7.9941 21.8612c0-1.4078-.3711-2.7892-1.0702-3.9959-1.4269-2.466-4.0797-3.9983-6.924-3.9983-4.4005-.0048-7.9918 3.5817-7.9942 7.9941.0024 4.4077 3.5865 7.9918 7.9942 7.9942 2.2027.0 4.2018-.8978 5.6479-2.3439C196.6366 290.6783 197.5344 288.6792 197.5344 286.4765z"/><g><defs><path id="SVGID_9_" d="M195.1881 292.1268c-1.4461 1.4461-3.4452 2.3439-5.6479 2.3439-4.4077-.0024-7.9918-3.5865-7.9942-7.9942.0024-4.4125 3.5937-7.9989 7.9942-7.9941 2.8443.0 5.497 1.5323 6.924 3.9983.6991 1.2067 1.0702 2.5881 1.0702 3.9959C197.5344 288.6792 196.6366 290.6783 195.1881 292.1268z"/></defs><clipPath id="SVGID_10_"><use xlink:href="#SVGID_9_" style="overflow:visible"/></clipPath><path style="clip-path:url(#SVGID_10_);fill:#fff" d="M190.5209 279.463c-4.4005-.0048-7.9918 3.5817-7.9942 7.9941.0011 1.9547.7088 3.7452 1.8782 5.1354-1.7446-1.4674-2.8575-3.6631-2.8588-6.1161.0024-4.4125 3.5936-7.999 7.9942-7.9941 2.3802-1e-4 4.616 1.0833 6.1218 2.8788C194.239 280.164 192.4279 279.463 190.5209 279.463z"/><path style="opacity:.13;clip-path:url(#SVGID_10_);fill:#020202" d="M190.5209 279.463c-4.4005-.0048-7.9918 3.5817-7.9942 7.9941.0011 1.9547.7088 3.7452 1.8782 5.1354-1.7446-1.4674-2.8575-3.6631-2.8588-6.1161.0024-4.4125 3.5936-7.999 7.9942-7.9941 2.3802-1e-4 4.616 1.0833 6.1218 2.8788C194.239 280.164 192.4279 279.463 190.5209 279.463z"/></g><g><defs><path id="SVGID_11_" d="M189.5403 264.6153c7.7763.0 15.0283 4.1826 18.926 10.9151 1.9201 3.3135 2.9377 7.0987 2.9353 10.9462.0024 12.0643-9.8065 21.8636-21.8613 21.8613-12.0547.0024-21.8636-9.8065-21.8612-21.8613.0-6.0285 2.4516-11.492 6.4116-15.452C178.0482 267.0669 183.5117 264.6153 189.5403 264.6153zm7.9941 21.8612c0-1.4078-.3711-2.7892-1.0702-3.9959-1.4269-2.466-4.0797-3.9983-6.924-3.9983-4.4005-.0048-7.9918 3.5817-7.9942 7.9941.0024 4.4077 3.5865 7.9918 7.9942 7.9942 2.2027.0 4.2018-.8978 5.6479-2.3439C196.6366 290.6783 197.5344 288.6792 197.5344 286.4765z"/></defs><clipPath id="SVGID_12_"><use xlink:href="#SVGID_11_" style="overflow:visible"/></clipPath><path style="clip-path:url(#SVGID_12_);fill:#56a55c" d="M173.11 270.0439c-3.96 3.96-6.4116 9.4235-6.4116 15.452-.0024 12.0547 9.8066 21.8636 21.8613 21.8613 12.0547.0024 21.8636-9.797 21.8613-21.8613.0024-3.8474-1.0151-7.6326-2.9353-10.9462-3.8977-6.7325-11.1497-10.9151-18.926-10.9151C182.5311 263.6346 177.0676 266.0863 173.11 270.0439z"/></g></g><rect x="199.3456" y="279.5436" style="fill:#56a55c" width="122.6266" height="13.8671"/></g><g><g><path style="fill:#f1bc42" d="M189.0874 318.7208l.0012-.0012c7.7751.0012 15.0295 4.1862 18.932 10.9234 1.9177 3.3159 2.9305 7.1011 2.9293 10.9378.0 5.8394-2.2733 11.3305-6.4032 15.4604-4.1288 4.1288-9.6186 6.4032-15.458 6.4032s-11.328-2.2733-15.458-6.4032-6.4032-9.6186-6.4056-15.4628c.0012-6.025 2.454-11.4897 6.4116-15.4472C177.5953 321.1724 183.0601 318.7196 189.0874 318.7208zm7.993 21.8576c.0012-1.4042-.3687-2.7868-1.063-3.9887-1.4293-2.4684-4.0833-3.9995-6.9299-4.0019-4.4077.0024-7.993 3.5877-7.993 7.993.0 2.1356.832 4.1431 2.3427 5.6539 1.5083 1.5083 3.5159 2.3403 5.6503 2.3415 2.1356.0 4.1443-.8308 5.6539-2.3403S197.0816 342.7176 197.0804 340.5784z"/><path style="opacity:.3;fill:#fff" d="M189.0898 318.7214c7.7763.0 15.0283 4.1826 18.926 10.915 1.9201 3.3136 2.9377 7.0988 2.9353 10.9462.0024 12.0643-9.8065 21.8636-21.8613 21.8612-12.0547.0024-21.8636-9.8065-21.8612-21.8612.0-6.0285 2.4516-11.4921 6.4116-15.452C177.5977 321.173 183.0612 318.7214 189.0898 318.7214zm7.9941 21.8612c0-1.4078-.3711-2.7892-1.0702-3.9959-1.4269-2.466-4.0797-3.9983-6.924-3.9983-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0024 4.4077 3.5865 7.9918 7.9942 7.9942 2.2027.0 4.2018-.8978 5.6479-2.3439C196.1861 344.7844 197.0839 342.7853 197.0839 340.5826z"/><g><defs><path id="SVGID_13_" d="M194.7376 346.2329c-1.4461 1.4461-3.4452 2.3439-5.6479 2.3439-4.4077-.0024-7.9918-3.5865-7.9942-7.9942.0024-4.4125 3.5937-7.999 7.9942-7.9942 2.8443.0 5.497 1.5323 6.924 3.9983.6991 1.2067 1.0702 2.5881 1.0702 3.9959C197.0839 342.7853 196.1861 344.7844 194.7376 346.2329z"/></defs><clipPath id="SVGID_14_"><use xlink:href="#SVGID_13_" style="overflow:visible"/></clipPath><path style="clip-path:url(#SVGID_14_);fill:#fff" d="M190.0704 333.5691c-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0011 1.9547.7088 3.7452 1.8782 5.1354-1.7447-1.4674-2.8575-3.6631-2.8588-6.1161.0024-4.4125 3.5936-7.999 7.9942-7.9942 2.3802-1e-4 4.616 1.0834 6.1218 2.8788C193.7885 334.2701 191.9774 333.5691 190.0704 333.5691z"/><path style="opacity:.13;clip-path:url(#SVGID_14_);fill:#020202" d="M190.0704 333.5691c-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0011 1.9547.7088 3.7452 1.8782 5.1354-1.7447-1.4674-2.8575-3.6631-2.8588-6.1161.0024-4.4125 3.5936-7.999 7.9942-7.9942 2.3802-1e-4 4.616 1.0834 6.1218 2.8788C193.7885 334.2701 191.9774 333.5691 190.0704 333.5691z"/></g><g><defs><path id="SVGID_15_" d="M189.0898 318.7214c7.7763.0 15.0283 4.1826 18.926 10.915 1.9201 3.3136 2.9377 7.0988 2.9353 10.9462.0024 12.0643-9.8065 21.8636-21.8613 21.8612-12.0547.0024-21.8636-9.8065-21.8612-21.8612.0-6.0285 2.4516-11.4921 6.4116-15.452C177.5977 321.173 183.0612 318.7214 189.0898 318.7214zm7.9941 21.8612c0-1.4078-.3711-2.7892-1.0702-3.9959-1.4269-2.466-4.0797-3.9983-6.924-3.9983-4.4005-.0048-7.9918 3.5817-7.9942 7.9942.0024 4.4077 3.5865 7.9918 7.9942 7.9942 2.2027.0 4.2018-.8978 5.6479-2.3439C196.1861 344.7844 197.0839 342.7853 197.0839 340.5826z"/></defs><clipPath id="SVGID_16_"><use xlink:href="#SVGID_15_" style="overflow:visible"/></clipPath><path style="clip-path:url(#SVGID_16_);fill:#f1bc42" d="M172.6595 324.15c-3.96 3.96-6.4116 9.4235-6.4116 15.452-.0024 12.0547 9.8066 21.8636 21.8613 21.8612 12.0547.0024 21.8636-9.797 21.8613-21.8612.0024-3.8474-1.0151-7.6327-2.9353-10.9462-3.8977-6.7324-11.1497-10.9151-18.926-10.9151C182.0806 317.7407 176.6171 320.1924 172.6595 324.15z"/></g></g><rect x="198.8952" y="333.6497" style="fill:#f1bc42" width="122.6266" height="13.8671"/></g></g></svg></span><span class="font-weight-bold">Luet</span>
|
|
</a>
|
|
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
|
<ul class="navbar-nav mt-2 mt-lg-0">
|
|
|
|
|
|
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a class="nav-link" href="/about/" ><span>About</span></a>
|
|
</li>
|
|
|
|
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a class="nav-link active" href="/docs/" ><span class="active">Documentation</span></a>
|
|
</li>
|
|
|
|
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a class="nav-link" href="/blog/" ><span>Blog</span></a>
|
|
</li>
|
|
|
|
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a class="nav-link" href="/community/" ><span>Community</span></a>
|
|
</li>
|
|
|
|
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a class="nav-link" href="https://github.com/mudler/luet/contribute" target="_blank" ><i class='fab fa-github'></i><span>Contribution guidelines</span></a>
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
<div class="navbar-nav d-none d-lg-block"><input
|
|
type="search"
|
|
class="form-control td-search-input"
|
|
placeholder=" Search this site…"
|
|
aria-label="Search this site…"
|
|
autocomplete="off"
|
|
|
|
data-offline-search-index-json-src="/offline-search-index.54d26642acd21db9481ce04552f6e2b5.json"
|
|
data-offline-search-base-href="/"
|
|
data-offline-search-max-results="10"
|
|
>
|
|
</div>
|
|
</nav>
|
|
|
|
</header>
|
|
<div class="container-fluid td-outer">
|
|
<div class="td-main">
|
|
<div class="row flex-xl-nowrap">
|
|
<aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
|
|
|
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
|
<form class="td-sidebar__search d-flex align-items-center">
|
|
<input
|
|
type="search"
|
|
class="form-control td-search-input"
|
|
placeholder=" Search this site…"
|
|
aria-label="Search this site…"
|
|
autocomplete="off"
|
|
|
|
data-offline-search-index-json-src="/offline-search-index.54d26642acd21db9481ce04552f6e2b5.json"
|
|
data-offline-search-base-href="/"
|
|
data-offline-search-max-results="10"
|
|
>
|
|
|
|
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
|
</button>
|
|
</form>
|
|
<nav class="collapse td-sidebar-nav" id="td-section-nav">
|
|
<ul class="td-sidebar-nav__section pr-md-3 ul-0">
|
|
<li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child active-path" id="m-docs-li">
|
|
<a href="/docs/" class="align-left pl-0 td-sidebar-link td-sidebar-link__section tree-root" id="m-docs"><span class="">Documentation</span></a>
|
|
<ul class="ul-1">
|
|
<li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsgetting-started-li">
|
|
<a href="/docs/getting-started/" class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id="m-docsgetting-started"><span class="">Getting Started</span></a>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id="m-docsconcepts-li">
|
|
<a href="/docs/concepts/" class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id="m-docsconcepts"><span class="">Concepts</span></a>
|
|
<ul class="ul-2 foldable">
|
|
<li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id="m-docsconceptsoverview-li">
|
|
<a href="/docs/concepts/overview/" class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id="m-docsconceptsoverview"><span class="">Overview</span></a>
|
|
<ul class="ul-3 foldable">
|
|
<li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsconceptsoverviewbuild_packages-li">
|
|
<a href="/docs/concepts/overview/build_packages/" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsconceptsoverviewbuild_packages"><span class="">Building packages</span></a>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsconceptsoverviewrepositories-li">
|
|
<a href="/docs/concepts/overview/repositories/" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsconceptsoverviewrepositories"><span class="">Creating Luet repositories</span></a>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsconceptsoverviewusage-li">
|
|
<a href="/docs/concepts/overview/usage/" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsconceptsoverviewusage"><span class="">CLI usage</span></a>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsconceptsoverviewconstraints-li">
|
|
<a href="/docs/concepts/overview/constraints/" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsconceptsoverviewconstraints"><span class="">CSP, SAT && RL</span></a>
|
|
</li>
|
|
</ul>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id="m-docsconceptspackages-li">
|
|
<a href="/docs/concepts/packages/" class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id="m-docsconceptspackages"><span class="">Packages</span></a>
|
|
<ul class="ul-3 foldable">
|
|
<li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsconceptspackagesspecfile-li">
|
|
<a href="/docs/concepts/packages/specfile/" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsconceptspackagesspecfile"><span class="">Specfile</span></a>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsconceptspackagestemplates-li">
|
|
<a href="/docs/concepts/packages/templates/" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsconceptspackagestemplates"><span class="">Templated packages</span></a>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsconceptspackagescollections-li">
|
|
<a href="/docs/concepts/packages/collections/" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsconceptspackagescollections"><span class="">Collections</span></a>
|
|
</li>
|
|
</ul>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsconceptsplugins-and-extensions-li">
|
|
<a href="/docs/concepts/plugins-and-extensions/" class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id="m-docsconceptsplugins-and-extensions"><span class="">Plugins and Extensions</span></a>
|
|
</li>
|
|
</ul>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child active-path" id="m-docstutorials-li">
|
|
<a href="/docs/tutorials/" class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id="m-docstutorials"><span class="">Tutorials</span></a>
|
|
<ul class="ul-2 foldable">
|
|
<li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docstutorialshello_world-li">
|
|
<a href="/docs/tutorials/hello_world/" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docstutorialshello_world"><span class="">Hello world!</span></a>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child active-path" id="m-docstutorialsbuild_package-li">
|
|
<a href="/docs/tutorials/build_package/" class="align-left pl-0 active td-sidebar-link td-sidebar-link__page" id="m-docstutorialsbuild_package"><span class="td-sidebar-nav-active-item">Build a package</span></a>
|
|
</li>
|
|
</ul>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id="m-docsresources-li">
|
|
<a href="/docs/resources/" class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id="m-docsresources"><span class="">Resources</span></a>
|
|
<ul class="ul-2 foldable">
|
|
<li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsresourcesarm-li">
|
|
<a href="/docs/resources/arm/" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsresourcesarm"><span class="">ARM images</span></a>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsresourcesbuilding-li">
|
|
<a href="/docs/resources/building/" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsresourcesbuilding"><span class="">Building</span></a>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsresourcesfaq-li">
|
|
<a href="/docs/resources/faq/" title="Frequently Asked Questions" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsresourcesfaq"><span class="">FAQ</span></a>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsresourcesscratch-li">
|
|
<a href="/docs/resources/scratch/" title="Images from scratch" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsresourcesscratch"><span class="">ScratchImages</span></a>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docsresourcesreferences-li">
|
|
<a href="/docs/resources/references/" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docsresourcesreferences"><span class="">References</span></a>
|
|
</li>
|
|
</ul>
|
|
</li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child" id="m-docscontribution-guidelines-li">
|
|
<a href="/docs/contribution-guidelines/" title="Contributing" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id="m-docscontribution-guidelines"><span class="">Contribution guidelines</span></a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
|
|
</aside>
|
|
<aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none">
|
|
|
|
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
|
<a href="https://github.com/mudler/luet/tree/master/docs/content/en/docs/Tutorials/build_package.md" class="td-page-meta--view" target="_blank" rel="noopener"><i class="fa fa-file-alt fa-fw"></i> View page source</a>
|
|
<a href="https://github.com/mudler/luet/edit/master/docs/content/en/docs/Tutorials/build_package.md" class="td-page-meta--edit" target="_blank" rel="noopener"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
|
<a href="https://github.com/mudler/luet/new/master/docs/content/en/docs/Tutorials/build_package.md?filename=change-me.md&value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edit+the+%22front+matter%22+section+at+the+top+of+the+page+%28weight+controls+how+its+ordered+amongst+other+pages+in+the+same+directory%3B+lowest+number+first%29.%0A%2A+Add+a+good+commit+message+at+the+bottom+of+the+page+%28%3C80+characters%3B+use+the+extended+description+field+for+more+detail%29.%0A%2A+Create+a+new+branch+so+you+can+preview+your+new+file+and+request+a+review+via+Pull+Request.%0A" class="td-page-meta--child" target="_blank" rel="noopener"><i class="fa fa-edit fa-fw"></i> Create child page</a>
|
|
<a href="https://github.com/mudler/luet/issues/new?title=Build%20a%20package" class="td-page-meta--issue" target="_blank" rel="noopener"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
|
<a href="https://github.com/mudler/luet/issues/new" class="td-page-meta--project-issue" target="_blank" rel="noopener"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="td-toc"><nav id="TableOfContents">
|
|
<ul>
|
|
<li><a href="#prerequisites">Prerequisites</a></li>
|
|
<li><a href="#1-create-the-package">1) Create the package</a>
|
|
<ul>
|
|
<li><a href="#11-build-spec">1.1) Build spec</a></li>
|
|
<li><a href="#12-runtime-spec">1.2) Runtime spec</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#2-build-it">2) Build it!</a></li>
|
|
<li><a href="#3-create-a-local-repository">3) Create a local repository</a></li>
|
|
<li><a href="#4-lets-test-it">4) Let’s test it!</a></li>
|
|
</ul>
|
|
</nav></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</aside>
|
|
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="td-content">
|
|
<h1>Build a package</h1>
|
|
<div class="lead">Example on how to build a package and run it locally with luet box</div>
|
|
<header class="article-meta">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</header>
|
|
|
|
|
|
<div class="alert alert-warning" role="alert">
|
|
<h4 class="alert-heading">Warning</h4>
|
|
|
|
This article contains references to Luet repositories that were deprecated, and needs to be updated.
|
|
Please refer to the <a href="../../tutorials/hello_world/">“Hello World”</a> tutorial instead.
|
|
|
|
</div>
|
|
|
|
<p><img src="https://github.com/BarkyTheDog/catclock/raw/master/catclock.gif" alt="catclock"></p>
|
|
<h1 id="catclock-example">Catclock example</h1>
|
|
<p>In this example, we will build the awesome <a href="https://github.com/BarkyTheDog/catclock">CatClock</a> on containers we will run it locally in a Luet box.</p>
|
|
<p>We will do this experiment to prove two things:</p>
|
|
<ol>
|
|
<li>how we can build a package with Luet and</li>
|
|
<li>two packages from different distributions can (sometime) work together.</li>
|
|
</ol>
|
|
<h2 id="prerequisites">Prerequisites</h2>
|
|
<p>To build packages with Luet, you must have installed Docker and container-diff, follow our <a href="../../getting-started">setup guide</a>.</p>
|
|
<h2 id="1-create-the-package">1) Create the package</h2>
|
|
<p>To prove our point, we will build our package from an OpenSUSE image, and later on we will consume
|
|
entropy repositories for runtime dependencies. To note, this is not the main focus of Luet, and this is a restricted example on its features on build-time resolution. For more syntax examples, see also <a href="../../concepts/specfile/#build-specs">Build specs</a> and <a href="../../concepts/packages/#package-types">Package types</a>.</p>
|
|
<p>Run this commands in any directory you choose to be your workspace:</p>
|
|
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">
|
|
<span style="color:#8f5902;font-style:italic"># Let's create a directory to store our package spec:</span>
|
|
mkdir -p tree/misc/catclock/
|
|
</code></pre></div><h3 id="11-build-spec">1.1) Build spec</h3>
|
|
<p>Now, let’s generate our <strong>build</strong> spec:</p>
|
|
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Create a build file. We use here opensuse/leap to build the package, as an example</span>
|
|
cat <span style="color:#4e9a06"><<EOF > tree/misc/catclock/build.yaml
|
|
</span><span style="color:#4e9a06">image: opensuse/leap
|
|
</span><span style="color:#4e9a06">
|
|
</span><span style="color:#4e9a06"># Preparation phase
|
|
</span><span style="color:#4e9a06">prelude:
|
|
</span><span style="color:#4e9a06">- zypper in -y git make libXt-devel xmh gcc motif-devel libXext-devel libpulse-devel libaubio-devel
|
|
</span><span style="color:#4e9a06">- git clone https://github.com/BarkyTheDog/catclock
|
|
</span><span style="color:#4e9a06">
|
|
</span><span style="color:#4e9a06"># Here we define the steps that Luet will follow
|
|
</span><span style="color:#4e9a06">steps:
|
|
</span><span style="color:#4e9a06">- cd catclock && make DEFINES="-Wno-incompatible-pointer-types"
|
|
</span><span style="color:#4e9a06">- mv catclock/xclock /usr/bin/xclock
|
|
</span><span style="color:#4e9a06">
|
|
</span><span style="color:#4e9a06"># (optional) File list that will be included in the final package
|
|
</span><span style="color:#4e9a06"># Luet will filter out files that won't match any entry in the list (regex syntax IS supported)
|
|
</span><span style="color:#4e9a06">includes:
|
|
</span><span style="color:#4e9a06">- /usr/bin/xclock
|
|
</span><span style="color:#4e9a06">EOF</span>
|
|
|
|
</code></pre></div><p><code>build.yaml</code> is what an ebuild is for Gentoo and for e.g. what PKGBUILD is for Arch.</p>
|
|
<ul>
|
|
<li><em>image: opensuse/leap</em> tells luet to use opensuse/leap as a build image. We collect the build time dependencies with <code>zypper</code> (the openSUSE package manager), and the <a href="https://github.com/BarkyTheDog/catclock">CatClock</a> with <code>git</code>. When we declare an <code>image</code> keyword in a spec, it becomes a <em>seed</em> package ( <a href="../../concepts/packages/#package-types">Package types</a> ) as doesn’t depend on any package in build time, we will cover more use cases in other examples.</li>
|
|
<li><em>prelude</em> is a list of commands that will happen during the build phase.
|
|
They might generate binaries, or download sources, but those are not took into consideration when generating the final package.</li>
|
|
<li><em>steps</em> is a list of commands that will happen during the build phase.
|
|
Luet will execute those commands and all the binaries generated from them become part of the final package</li>
|
|
<li><em>includes</em> is a (optional) list of regex that tells to Luet what files to filter out from the final artifact.</li>
|
|
</ul>
|
|
<h3 id="12-runtime-spec">1.2) Runtime spec</h3>
|
|
<p>Now we generate the runtime spec, it’s the part about the binary end which will be installed in the system. It also holds the metadata relative to the package definition (<code>name</code>, <code>category</code>, <code>version</code>).</p>
|
|
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Create a runtime definition.</span>
|
|
<span style="color:#8f5902;font-style:italic"># We will leverage packages already present on Sabayon Entropy repositories</span>
|
|
<span style="color:#8f5902;font-style:italic"># the end-system needs to have the Luet Sabayon Entropy repositories enabled.</span>
|
|
cat <span style="color:#4e9a06"><<EOF > tree/misc/catclock/definition.yaml
|
|
</span><span style="color:#4e9a06">category: "misc"
|
|
</span><span style="color:#4e9a06">name: "catclock"
|
|
</span><span style="color:#4e9a06">version: "0.20200318"
|
|
</span><span style="color:#4e9a06">requires:
|
|
</span><span style="color:#4e9a06">- category: meta
|
|
</span><span style="color:#4e9a06"> name: users
|
|
</span><span style="color:#4e9a06"> version: ">=0"
|
|
</span><span style="color:#4e9a06">- category: x11-libs
|
|
</span><span style="color:#4e9a06"> name: motif
|
|
</span><span style="color:#4e9a06"> version: ">=0.1"
|
|
</span><span style="color:#4e9a06">- category: media-libs
|
|
</span><span style="color:#4e9a06"> name: libjpeg-turbo
|
|
</span><span style="color:#4e9a06"> version: ">=0.1"
|
|
</span><span style="color:#4e9a06">EOF</span>
|
|
</code></pre></div><ul>
|
|
<li><em>category</em>, <em>name</em>, and <em>version</em>: identifies the package in a Luet tree. This is the unique identifier for a package.</li>
|
|
<li><em>requires</em> it’s a list of packages which our <strong>catclock</strong> depends on during runtime (when we will execute catclock inside a small-container!). To find out what’s required by your binaries it can be a try-learn-fail effort. If the package you wish to build is specifying the deps it requires, and those are available in a Luet repository, you are all set, just point them there. Otherwise you have to figure out after you build the binary the first time (for example, with <code>ldd</code>) to which libraries it depends on.
|
|
In this example we consume the dependencies from the <a href="https://github.com/Luet-lab/luet-entropy-repo">Luet Entropy Repo</a>, that we will enable on the following steps.</li>
|
|
</ul>
|
|
<h2 id="2-build-it">2) Build it!</h2>
|
|
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo /usr/bin/luet build <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--tree<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">$PWD</span>/tree misc/catclock <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--destination <span style="color:#000">$PWD</span>/build <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--compression gzip
|
|
|
|
sudo chown -R <span style="color:#000">$USER</span> <span style="color:#000">$PWD</span>/build <span style="color:#8f5902;font-style:italic"># So later on, we can access to the repository with our user</span>
|
|
</code></pre></div><p>We are building the specs in this step.</p>
|
|
<ul>
|
|
<li><em>tree</em>: is the path where our specs are, in our case it’s <code>tree</code>.</li>
|
|
<li><em>destination</em>: is the path where our packages will be stored, in our case this is <code>build</code>.</li>
|
|
<li><em>compression</em>: is the compression algorithm used to compress the final artifacts</li>
|
|
</ul>
|
|
<p>Note, we need <em>sudo</em> to keep the permissions properly mapped in the artifact which is produced
|
|
this is not always the case. Depends on the package content.</p>
|
|
<h2 id="3-create-a-local-repository">3) Create a local repository</h2>
|
|
<p>We will generate now our repository metadata:</p>
|
|
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">/usr/bin/luet create-repo --tree <span style="color:#4e9a06">"tree"</span> <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--output <span style="color:#000">$PWD</span>/build <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--packages <span style="color:#000">$PWD</span>/build <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--name <span style="color:#4e9a06">"test repo"</span> <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--descr <span style="color:#4e9a06">"Test Repo"</span> <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--tree-compression gzip <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--meta-compression gzip
|
|
</code></pre></div><p>Creating a repository in Luet is about adding metadata and make our spec tree available to other systems running Luet to intall the package.</p>
|
|
<ul>
|
|
<li><strong>output</strong>: a path which is where Luet will store the repository metadata.</li>
|
|
<li><strong>packages</strong>: a path containing the packages that were built during the build step</li>
|
|
<li><strong>name</strong>: Repository name</li>
|
|
<li><strong>descr</strong>: Repository description</li>
|
|
<li><strong>tree-compression</strong>: optional, algorithm to use when compression the tree metadata</li>
|
|
<li><strong>meta-compression</strong>: optional, algorithm to use when compression the repository metadata</li>
|
|
</ul>
|
|
<h2 id="4-lets-test-it">4) Let’s test it!</h2>
|
|
<p>Now we are all set. We have the packages compiled, and we are ready to consume them. We don’t want to break our host system, and we want to test this from our user.</p>
|
|
<p>Let’s create a directory, we will try to setup a full running system, and install everything there.</p>
|
|
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Let's create a directory for our "fake" rootfilesystem</span>
|
|
<span style="color:#8f5902;font-style:italic"># it will be populated with a minimal set of packages needed to run </span>
|
|
<span style="color:#8f5902;font-style:italic"># our amazing catclock</span>
|
|
mkdir -p <span style="color:#000">$PWD</span>/rootfs
|
|
</code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Let's also create a directory to store our config files</span>
|
|
mkdir -p <span style="color:#000">$PWD</span>/conf
|
|
</code></pre></div><p>We will generate now a Luet config. The Luet config is used to read where install things from, and in which directory.
|
|
It also lists the repositories that are used by the client to retrieve packages remotely.</p>
|
|
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># We create here a config file which references the rootfs.</span>
|
|
<span style="color:#8f5902;font-style:italic"># In this way, luet instead installing packages to your host system, will populate the rootfs</span>
|
|
<span style="color:#8f5902;font-style:italic"># (note, all the steps are run by a user here, no root required!)</span>
|
|
cat <span style="color:#4e9a06"><<EOF > conf/luet-dso-local.yaml
|
|
</span><span style="color:#4e9a06">system:
|
|
</span><span style="color:#4e9a06"> rootfs: $PWD/rootfs # our "fake" rootfs that we created before
|
|
</span><span style="color:#4e9a06"> database_path: "/" # this is where our Luet DB will live
|
|
</span><span style="color:#4e9a06"> database_engine: "boltdb" # this is the Luet DB engine
|
|
</span><span style="color:#4e9a06">repositories:
|
|
</span><span style="color:#4e9a06"> - name: "main"
|
|
</span><span style="color:#4e9a06"> type: "disk"
|
|
</span><span style="color:#4e9a06"> priority: 3
|
|
</span><span style="color:#4e9a06"> enable: true
|
|
</span><span style="color:#4e9a06"> urls:
|
|
</span><span style="color:#4e9a06"> - "$PWD/build" # This is the repository we have created before!
|
|
</span><span style="color:#4e9a06"> - name: "sabayonlinux.org"
|
|
</span><span style="color:#4e9a06"> description: "Sabayon Linux Repository"
|
|
</span><span style="color:#4e9a06"> type: "http"
|
|
</span><span style="color:#4e9a06"> enable: true
|
|
</span><span style="color:#4e9a06"> cached: true
|
|
</span><span style="color:#4e9a06"> priority: 2
|
|
</span><span style="color:#4e9a06"> urls:
|
|
</span><span style="color:#4e9a06"> - "https://dispatcher.sabayon.org/sbi/namespace/luet-entropy-repo"
|
|
</span><span style="color:#4e9a06"> - name: "luet-repo"
|
|
</span><span style="color:#4e9a06"> description: "Luet Official Repository"
|
|
</span><span style="color:#4e9a06"> type: "http"
|
|
</span><span style="color:#4e9a06"> enable: true
|
|
</span><span style="color:#4e9a06"> cached: true
|
|
</span><span style="color:#4e9a06"> priority: 1
|
|
</span><span style="color:#4e9a06"> urls:
|
|
</span><span style="color:#4e9a06"> - "https://raw.githubusercontent.com/Luet-lab/luet-repo/gh-pages"
|
|
</span><span style="color:#4e9a06">EOF</span>
|
|
<span style="color:#8f5902;font-style:italic"># we have specified an additional repository, one that is luet-entropy-repo (which contains</span>
|
|
<span style="color:#8f5902;font-style:italic"># the runtime dependencies we specified in our package)</span>
|
|
</code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Let's populate our rootfs with some minimal things: base-gcc, and bash</span>
|
|
<span style="color:#8f5902;font-style:italic"># meta/users is a meta package providing minimal base to run things with a full</span>
|
|
<span style="color:#8f5902;font-style:italic"># user-level support.</span>
|
|
<span style="color:#204a87">export</span> <span style="color:#000">LUET_NOLOCK</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#204a87">true</span>
|
|
luet install <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--config <span style="color:#000">$PWD</span>/conf/luet-dso-local.yaml <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>meta/users
|
|
</code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># catclock is a X11 app! we want to be able to play with it locally from our host :)</span>
|
|
<span style="color:#8f5902;font-style:italic"># Let's copy the .Xauthority file to allow the X app to communicate with our X server</span>
|
|
<span style="color:#8f5902;font-style:italic"># Note: This can be achieved in other ways (set up a tcp X server, and so on)</span>
|
|
cp -rfv <span style="color:#000">$HOME</span>/.Xauthority <span style="color:#000">$PWD</span>/rootfs/
|
|
</code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">luet install <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--config <span style="color:#000">$PWD</span>/conf/luet-dso-local.yaml <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>misc/catclock
|
|
</code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#8f5902;font-style:italic"># Let's run our beautiful catclock :)</span>
|
|
luet box <span style="color:#204a87">exec</span> --rootfs <span style="color:#000">$PWD</span>/rootfs <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--stdin --stdout --stderr --env <span style="color:#000">DISPLAY</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">$DISPLAY</span> <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--env <span style="color:#000">XAUTHORITY</span><span style="color:#ce5c00;font-weight:bold">=</span>/.Xauthority --mount /tmp --entrypoint /usr/bin/xclock
|
|
</code></pre></div><p>Spawn a bash shell inside our box (with permission to access to our running X):</p>
|
|
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">luet box <span style="color:#204a87">exec</span> --rootfs <span style="color:#000">$PWD</span>/rootfs <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--stdin --stdout --stderr --env <span style="color:#000">DISPLAY</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">$DISPLAY</span> <span style="color:#4e9a06">\
|
|
</span><span style="color:#4e9a06"></span>--env <span style="color:#000">XAUTHORITY</span><span style="color:#ce5c00;font-weight:bold">=</span>/.Xauthority --mount /tmp --entrypoint /bin/bash
|
|
</code></pre></div>
|
|
|
|
<style>
|
|
.feedback--answer {
|
|
display: inline-block;
|
|
}
|
|
.feedback--answer-no {
|
|
margin-left: 1em;
|
|
}
|
|
.feedback--response {
|
|
display: none;
|
|
margin-top: 1em;
|
|
}
|
|
.feedback--response__visible {
|
|
display: block;
|
|
}
|
|
</style>
|
|
<div class="d-print-none">
|
|
<h2 class="feedback--title">Feedback</h2>
|
|
<p class="feedback--question">Was this page helpful?</p>
|
|
<button class="btn btn-primary mb-4 feedback--answer feedback--answer-yes">Yes</button>
|
|
<button class="btn btn-primary mb-4 feedback--answer feedback--answer-no">No</button>
|
|
<p class="feedback--response feedback--response-yes">
|
|
Glad to hear it! Please <a href="https://github.com/Luet-lab/docs/issues/new">tell us how we can improve</a>.
|
|
</p>
|
|
<p class="feedback--response feedback--response-no">
|
|
Sorry to hear that. Please <a href="https://github.com/Luet-lab/docs/issues/new">tell us how we can improve</a>.
|
|
</p>
|
|
</div>
|
|
<script>
|
|
const yesButton = document.querySelector('.feedback--answer-yes');
|
|
const noButton = document.querySelector('.feedback--answer-no');
|
|
const yesResponse = document.querySelector('.feedback--response-yes');
|
|
const noResponse = document.querySelector('.feedback--response-no');
|
|
const disableButtons = () => {
|
|
yesButton.disabled = true;
|
|
noButton.disabled = true;
|
|
};
|
|
const sendFeedback = (value) => {
|
|
if (typeof ga !== 'function') return;
|
|
const args = {
|
|
command: 'send',
|
|
hitType: 'event',
|
|
category: 'Helpful',
|
|
action: 'click',
|
|
label: window.location.pathname,
|
|
value: value
|
|
};
|
|
ga(args.command, args.hitType, args.category, args.action, args.label, args.value);
|
|
};
|
|
yesButton.addEventListener('click', () => {
|
|
yesResponse.classList.add('feedback--response__visible');
|
|
disableButtons();
|
|
sendFeedback(1);
|
|
});
|
|
noButton.addEventListener('click', () => {
|
|
noResponse.classList.add('feedback--response__visible');
|
|
disableButtons();
|
|
sendFeedback(0);
|
|
});
|
|
</script>
|
|
|
|
<br />
|
|
|
|
|
|
<div class="text-muted mt-5 pt-3 border-top">
|
|
Last modified February 2, 2023: <a href="https://github.com/mudler/luet/commit/fd698e8554106817856430770034eb7655d8ea64">:arrow_up: Bump github.com/opencontainers/runc from 1.1.1 to 1.1.2 (#322) (fd698e8)</a>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</main>
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="bg-dark py-5 row d-print-none">
|
|
<div class="container-fluid mx-sm-5">
|
|
<div class="row">
|
|
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
|
|
|
|
|
|
|
</div>
|
|
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
|
|
|
|
|
|
|
<ul class="list-inline mb-0">
|
|
|
|
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
|
<a class="text-white" target="_blank" rel="noopener" href="https://github.com/mudler/luet" aria-label="GitHub">
|
|
<i class="fab fa-github"></i>
|
|
</a>
|
|
</li>
|
|
|
|
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="Slack" aria-label="Slack">
|
|
<a class="text-white" target="_blank" rel="noopener" href="https://join.slack.com/t/luet/shared_invite/enQtOTQxMjcyNDQ0MDUxLWQ5ODVlNTI1MTYzNDRkYzkyYmM1YWE5YjM0NTliNDEzNmQwMTkxNDRhNDIzM2Y5NDBlOTZjZTYxYWQyNDE4YzY" aria-label="Slack">
|
|
<i class="fab fa-slack"></i>
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
|
<small class="text-white">© 2023 Ettore Di Giacinto All Rights Reserved</small>
|
|
<small class="ml-1"><a href="https://policies.google.com/privacy" target="_blank" rel="noopener">Privacy Policy</a></small>
|
|
|
|
<p class="mt-2"><a href="/about/">About Luet</a></p>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
|
|
</div>
|
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
|
|
integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.min.js"
|
|
integrity="sha512-UR25UO94eTnCVwjbXozyeVd6ZqpaAE9naiEUBK/A+QDbfSTQFhPGj5lOR6d8tsgbBk84Ggb5A3EkjsOgPRPcKA=="
|
|
crossorigin="anonymous"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<script src='/js/tabpane-persist.js'></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script src="/js/main.min.8ab8f81ff7e1454d30024cd6f956d4d341c3a97e2a673f988065f2ee4e147922.js" integrity="sha256-irj4H/fhRU0wAkzW+VbU00HDqX4qZz+YgGXy7k4UeSI=" crossorigin="anonymous"></script>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html> |