Results 1 to 8 of 8

Thread: How best to build a local mirror of Packamn repository?

  1. #1
    Join Date
    Jan 2018
    Location
    Annandale, VA
    Posts
    200

    Default How best to build a local mirror of Packamn repository?

    I will be installing LEAP 15.1 on a desktop with no Internet access, and would like to mirror all relevant repositories. For openSUSE itself the is an rsync server, and "rsync -avz --delete rsync://foo bar" should do the job.

    rsync -avz --delete rsync://download.opensuse.org/distribution/leap/15.1/repo/oss/ foo
    rsync -avz --delete rsync://download.opensuse.org/distribution/leap/15.1/repo/non-oss/ foo
    rsync -avz --delete rsync://download.opensuse.org/update/leap/15.1/oss/ foo
    rsync -avz --delete rsync://download.opensuse.org/update/leap/15.1/non-oss foo

    However, I don't know whether there is an ftp or rsync server for packman, although the host name ftp.gwdg.de is suggestive.

    Also, is there anything that I should exclude? Is it better to mirror only the rpm files and then run makerepo?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,149
    Blog Entries
    15

    Default Re: How best to build a local mirror of Packamn repository?

    Hi
    I would look at setting up an rmt-server and the YaST rmt module to configure, then mirror down the repositories.

    Whilst designed for SUSE and SCC, read the documentation as it works with openSUSE

    https://github.com/SUSE/rmt

    https://build.opensuse.org/package/s...RMT/rmt-server
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Jan 2018
    Location
    Annandale, VA
    Posts
    200

    Default Re: How best to build a local mirror of Packamn repository?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    I would look at setting up an rmt-server and the YaST rmt module to configure, then mirror down the repositories.

    Whilst designed for SUSE and SCC, read the documentation as it works with openSUSE

    https://github.com/SUSE/rmt

    https://build.opensuse.org/package/s...RMT/rmt-server
    My primary concern is with mirroring packman, which is in a diferent server. The options that I'm aware of are


    1. Use wget to download the entire repository
    2. Use wget to download only the RPM files, then run makerepo


    Which of those is preferable, and is there a better option.

    Even for openSUSE oss, nonoss and update archives, I'd like to know whether it is better to use the documented rsynch servers for the entire repositories or to download only the RPM files and run makerepo. Thanks

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,149
    Blog Entries
    15

    Default Re: How best to build a local mirror of Packamn repository?

    Quote Originally Posted by shmuelmetz View Post
    My primary concern is with mirroring packman, which is in a diferent server. The options that I'm aware of are


    1. Use wget to download the entire repository
    2. Use wget to download only the RPM files, then run makerepo


    Which of those is preferable, and is there a better option.

    Even for openSUSE oss, nonoss and update archives, I'd like to know whether it is better to use the documented rsynch servers for the entire repositories or to download only the RPM files and run makerepo. Thanks
    Hi
    Well I would look at lftp perhaps instead, you should only need the files from the 'essentials' you could use createrepo else just make it a plain rpm directory.

    eg
    Code:
    lftp ftp://packman.inode.at/suse/openSUSE_Leap_15.1/Essentials/
    cd ok, cwd=/suse/openSUSE_Leap_15.1/Essentials                                         
    
    lftp packman.inode.at:/suse/openSUSE_Leap_15.1/Essentials> mirror
    Tweak the lftp command as required along with suitable options to grab only the newer files.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Jan 2018
    Location
    Annandale, VA
    Posts
    200

    Default Re: How best to build a local mirror of Packamn repository?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Well I would look at lftp perhaps instead, you should only need the files from the 'essentials' you could use createrepo else just make it a plain rpm directory.

    eg
    Code:
    lftp ftp://packman.inode.at/suse/openSUSE_Leap_15.1/Essentials/
    cd ok, cwd=/suse/openSUSE_Leap_15.1/Essentials                                         
    
    lftp packman.inode.at:/suse/openSUSE_Leap_15.1/Essentials> mirror
    Tweak the lftp command as required along with suitable options to grab only the newer files.
    I'm a bit confused by the examples. Don't I need to follow the first example with a mirror command? The second example seems to be redirecting the output to ./mirror rather than specifying the command. From the documentation it appears that I need to specify a mirror command with −c commands or -e commands, but it's not clear what separates the commands from each other and from the site parameter. Ideally I'd like to drive all of the mirror downloads from a script. Thanks.

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,149
    Blog Entries
    15

    Default Re: How best to build a local mirror of Packamn repository?

    Quote Originally Posted by shmuelmetz View Post
    I'm a bit confused by the examples. Don't I need to follow the first example with a mirror command? The second example seems to be redirecting the output to ./mirror rather than specifying the command. From the documentation it appears that I need to specify a mirror command with −c commands or -e commands, but it's not clear what separates the commands from each other and from the site parameter. Ideally I'd like to drive all of the mirror downloads from a script. Thanks.
    Hi
    It's pretty simple

    Code:
    mkdir -p /some/path/packman
    cd /some/path/packman
    lftp -c mirror --only-newer ftp://packman.inode.at/suse/openSUSE_Leap_15.1/Essentials/x86_64/
    lftp -c mirror --only-newer ftp://packman.inode.at/suse/openSUSE_Leap_15.1/Essentials/noarch/
    createrepo .
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,149
    Blog Entries
    15

    Default Re: How best to build a local mirror of Packamn repository?

    Hi
    If you want to exclude the debug files.... and just add the arch types your after to the loop...

    Code:
    #!/bin/bash
    mkdir -p /some/path/packman
    cd /some/path/packman
    for arch in x86_64 noarch; do
       lftp -c mirror --only-newer --exclude-glob *debuginfo* --exclude-glob *debugsource* ftp://packman.inode.at/suse/openSUSE_Leap_15.1/Essentials/$arch/
    done
    createrepo .
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8
    Join Date
    Jan 2018
    Location
    Annandale, VA
    Posts
    200

    Default Re: How best to build a local mirror of Packamn repository?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    It's pretty simple

    Code:
    mkdir -p /some/path/packman
    cd /some/path/packman
    lftp -c mirror --only-newer ftp://packman.inode.at/suse/openSUSE_Leap_15.1/Essentials/x86_64/
    lftp -c mirror --only-newer ftp://packman.inode.at/suse/openSUSE_Leap_15.1/Essentials/noarch/
    createrepo .
    Thanks. Will this work:

    Code:
    lftp -c mirror --delete --only-newer ftp://packman.inode.at/suse/openSUSE_Leap_15.1/Essentials/x86_64/ /foo/bar
    Also, do I have to deal with hidden files, or is that something that doesn't occur in repositories?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •