Skip to content

Instantly share code, notes, and snippets.

@M0ses
Last active July 2, 2018 10:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save M0ses/b09dc1e6e606b24d39b85bb2682d0abe to your computer and use it in GitHub Desktop.
Save M0ses/b09dc1e6e606b24d39b85bb2682d0abe to your computer and use it in GitHub Desktop.

Prepare

export OBS_USERNAME=M0ses

APPImage

Create new project

Create temporary config file

cat <<EOF > tmp.txt
 <project name="home:$OBS_USERNAME:WorkShop:AppImage">
   <title/>
   <description/>
   <person userid="$OBS_USERNAME" role="bugowner"/>
   <person userid="$OBS_USERNAME" role="maintainer"/>
   <repository name="AppImage">
     <path project="OBS:AppImage:Templates" repository="AppImage"/>
     <arch>x86_64</arch>
   </repository>
 </project>
EOF

Create new project based on temporary config file

osc meta prj home:$OBS_USERNAME:WorkShop:AppImage -F tmp.txt

Branch package to newly created project

osc branch OBS:AppImage:Templates AppImageTemplate home:$OBS_USERNAME:WorkShop myFirstAppImage

Docker with kiwi

Create temporary config file

cat <<EOF > tmp.txt
 <project name="home:$OBS_USERNAME:WorkShop:DockerWithKiwi">
   <title/>
   <description/>
   <person userid="$OBS_USERNAME" role="bugowner"/>
   <person userid="$OBS_USERNAME" role="maintainer"/>
   <repository name="images">
     <path project="openSUSE:Templates:Images:42.3" repository="images"/>
     <arch>x86_64</arch>
   </repository>
 </project>
EOF

Create new project based on temporary config file

osc meta prj home:$OBS_USERNAME:WorkShop:DockerWithKiwi -F tmp.txt

Branch package to newly created project

osc branch openSUSE:Templates:Images:42.3 openSUSE-Leap-42.3-Container-kiwi home:$OBS_USERNAME:WorkShop:DockerWithKiwi myFirstKiwiContainer

Docker native

Create temporary config file

cat <<EOF > tmp.txt
 <project name="home:$OBS_USERNAME:WorkShop:DockerNative">
   <title/>
   <description/>
   <person userid="$OBS_USERNAME" role="bugowner"/>
   <person userid="$OBS_USERNAME" role="maintainer"/>
   <repository name="containers">
     <path project="openSUSE:Templates:Images:42.3" repository="containers"/>
     <arch>x86_64</arch>
   </repository>
 </project>
EOF

Create new project based on temporary config file

osc meta prj home:$OBS_USERNAME:WorkShop:DockerNative -F tmp.txt

Branch package to newly created project

osc branch openSUSE:Templates:Images:42.3 openSUSE-Leap-42.3-Container home:$OBS_USERNAME:WorkShop:DockerNative myFirstNativeContainer

Result

osc co <project>/<package>
cd <project>/<package>
osc r -w
@s-leroux
Copy link

I suggest that change:
https://gist.github.com/s-leroux/f19c582033c970b935a38dc63b36b0f3/revisions?diff=unified#diff-e3fd926989fece9117b9e2c863ba86dc

for consistency with the way Docker w/Kiwi and Docker native Packages are branched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment