How to make a custom openSuSE DVD installer?

I want to add others rpm packages like teamviewer, fbpanel and openbox on openSuSE 42.x DVD ISO. I will use it with autoyast.

Is there a tool to build a “media” or “offline” repository to Yast2? Or a manual, doc, wiki, anything that explains in detail how to create a yast2 repository?

Tools I’ve tried:
makeSuseDVD
create_update_source.sh
createrepo

Links of manuals i’ve read:
https://en.opensuse.org/openSUSE:Standards_YaST2_Repository_Metadata
https://doc.opensuse.org/projects/libzypp/HEAD/zypp-pattern-packages.html
https://build.opensuse.org/package/show/system:install:head/patterns-openSUSE

No, I do not want to use the SuseStudio

Hi and welcome to the forum :slight_smile:
Have a look at yast2-product-creator, createrepo should work fine to create a local repo, it’s sorting out the signing of the rpms that needs work…

Then you can also look at using Kiwi for the image creation.
https://en.opensuse.org/SDB:KIWI_Cookbook_Start_Cooking

Thanks malcolmlewis!

yast2-product-creator and kiwi seem to be good. I’ll study them better. But now I would like to understand and create a yast2 repository as well.

Does the createrepo work to create a DVD repository?

Hi
The standard openSUSE iso image or if it’s extracted is already a repository, you can add your image via YaST or zypper to create it.

If you have a bunch of rpms, just create the file directory structure eg;


malcolml@big-bird:~> mkdir myrepo
malcolml@big-bird:~> cd myrepo/
malcolml@big-bird:~/myrepo> mkdir noarch src x86_64

malcolml@big-bird:~/myrepo> ls -la .
total 0
drwxr-xr-x 1 malcolml users   30 Dec 15 10:39 .
drwxr-xr-x 1 malcolml users 7056 Dec 15 10:39 ..
drwxr-xr-x 1 malcolml users  136 Dec 15 10:41 noarch
drwxr-xr-x 1 malcolml users   52 Dec 15 10:41 src
drwxr-xr-x 1 malcolml users  462 Dec 15 10:41 x86_64

malcolml@big-bird:~/myrepo> ls -la *
noarch:
total 412
drwxr-xr-x 1 malcolml users    136 Dec 15 10:41 .
drwxr-xr-x 1 malcolml users     30 Dec 15 10:39 ..
-rw-r--r-- 1 malcolml users  95774 Jun 14  2016 python3-onionshare-0.9-0.noarch.rpm
-rw-r--r-- 1 malcolml users 322266 Jun 14  2016 python3-stem-1.4.1-1.1.noarch.rpm

src:
total 26136
drwxr-xr-x 1 malcolml users       52 Dec 15 10:41 .
drwxr-xr-x 1 malcolml users       30 Dec 15 10:39 ..
-rw-r--r-- 1 malcolml users 26759863 Jun 27 22:03 handbrake-0.10.2-0.src.rpm

x86_64:
total 76012
drwxr-xr-x 1 malcolml users      462 Dec 15 10:41 .
drwxr-xr-x 1 malcolml users       30 Dec 15 10:39 ..
-rw-r--r-- 1 malcolml users 62780327 Apr 17  2016 google-earth-stable_current_x86_64.rpm
-rw-r--r-- 1 malcolml users  4194126 Jun 27 22:03 handbrake-cli-0.10.2-0.x86_64.rpm
-rw-r--r-- 1 malcolml users  9490320 Jun 27 22:03 handbrake-gtk-0.10.2-0.x86_64.rpm
-rw-r--r-- 1 malcolml users   188366 May  9  2016 libatalk17-3.1.8-327.15.x86_64.rpm
-rw-r--r-- 1 malcolml users   321186 May  9  2016 netatalk-3.1.8-327.15.x86_64.rpm
-rw-r--r-- 1 malcolml users   341446 Jul 20 17:17 qsynergy-1.7.6-35.20.x86_64.rpm
-rw-r--r-- 1 malcolml users   510707 Jul 20 17:17 synergy-1.7.6-35.20.x86_64.rpm

malcolml@big-bird:~/myrepo> createrepo .
Spawning worker 0 with 3 pkgs
Spawning worker 1 with 3 pkgs
Spawning worker 2 with 2 pkgs
Spawning worker 3 with 2 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata

malcolml@big-bird:~/myrepo> ls
noarch  repodata  src  x86_64

malcolml@big-bird:~/myrepo> ls -la *
noarch:
total 412
drwxr-xr-x 1 malcolml users    136 Dec 15 10:41 .
drwxr-xr-x 1 malcolml users     46 Dec 15 10:42 ..
-rw-r--r-- 1 malcolml users  95774 Jun 14  2016 python3-onionshare-0.9-0.noarch.rpm
-rw-r--r-- 1 malcolml users 322266 Jun 14  2016 python3-stem-1.4.1-1.1.noarch.rpm

repodata:
total 36
drwxr-xr-x 1 malcolml users   494 Dec 15 10:42 .
drwxr-xr-x 1 malcolml users    46 Dec 15 10:42 ..
-rw-r--r-- 1 malcolml users  4990 Dec 15 10:42 001f8afb03c3c00be1a1a98bed80e818c4427cdacab06e6ef7dfbed7315c0353-filelists.xml.gz
-rw-r--r-- 1 malcolml users  5222 Dec 15 10:42 5509e9cfbb1a654125c2f96ddab1f932ee5cf5c277a669bab4327c80a1afa93d-primary.xml.gz
-rw-r--r-- 1 malcolml users 15068 Dec 15 10:42 c2a8db35f589adfa5c3db955e62861138e4c8dfe554c4b41435a0b488bd2dca1-other.xml.gz
-rw-r--r-- 1 malcolml users  1506 Dec 15 10:42 repomd.xml

src:
total 26136
drwxr-xr-x 1 malcolml users       52 Dec 15 10:41 .
drwxr-xr-x 1 malcolml users       46 Dec 15 10:42 ..
-rw-r--r-- 1 malcolml users 26759863 Jun 27 22:03 handbrake-0.10.2-0.src.rpm

x86_64:
total 76012
drwxr-xr-x 1 malcolml users      462 Dec 15 10:41 .
drwxr-xr-x 1 malcolml users       46 Dec 15 10:42 ..
-rw-r--r-- 1 malcolml users 62780327 Apr 17  2016 google-earth-stable_current_x86_64.rpm
-rw-r--r-- 1 malcolml users  4194126 Jun 27 22:03 handbrake-cli-0.10.2-0.x86_64.rpm
-rw-r--r-- 1 malcolml users  9490320 Jun 27 22:03 handbrake-gtk-0.10.2-0.x86_64.rpm
-rw-r--r-- 1 malcolml users   188366 May  9  2016 libatalk17-3.1.8-327.15.x86_64.rpm
-rw-r--r-- 1 malcolml users   321186 May  9  2016 netatalk-3.1.8-327.15.x86_64.rpm
-rw-r--r-- 1 malcolml users   341446 Jul 20 17:17 qsynergy-1.7.6-35.20.x86_64.rpm
-rw-r--r-- 1 malcolml users   510707 Jul 20 17:17 synergy-1.7.6-35.20.x86_64.rpm

So you need all the gpg keys for the files as well else you would need to add the repo without gpg checks (not a good thing).

Assuming that the standard zypper command and options work here, too
There is another option to automatically accept GPG keys when you do your first refresh

As described in my Wiki page
https://en.opensuse.org/User:Tsu2/BASH_zypper

TSU

Thanks malcolmlewis and tsu2!

I did what malcolmlewis said and works.
Just add information, for automatic install I add this on my autoyast.xml:

for usb media:


  <add-on>
    <add_on_products config:type="list">
      <listentry>
        <media_url><![CDATA[hd:///myrepo?device=/dev/disk/by-label/openSUSE-Leap-42.2-DVD-x86_64028&filesystem=auto]]></media_url>
        <product>My Repository</product>
        <product_dir>/</product_dir>
      </listentry>
    </add_on_products>
  </add-on>

for DVD media:


  <add-on>
    <add_on_products config:type="list">
      <listentry>
        <media_url><![CDATA[dvd:///myrepo/]]></media_url>
        <product>My Repository</product>
        <product_dir>/</product_dir>
      </listentry>
    </add_on_products>
  </add-on>