Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: local repository help wanted.

  1. #1
    Join Date
    Sep 2016
    Beans
    32

    local repository help wanted.

    Hi guys. So I've been using apt-mirror to create a local repository I seem to be half way to getting it to work. I've read a lot of tutorials on how this is done but I'm still not sure what I'm doing wrong.

    I thought I got most of the local repository working but Ubuntu doesn't seem to want to use it.

    Also my antivirus alerted to some of the files in the repository. Weird

    I’ll send a few screen shots of what I’m doing. I seem to be able to create the local repo but I can’t seem to get ubuntu to pull resources from it.

    This was done in a virtual machine.

    Here is the directory structure
    https://drive.google.com/file/d/0B5P...ew?usp=sharing

    Mirror List
    https://drive.google.com/open?id=0B5...kRLOHBJNjU5Vlk

    Sources
    https://drive.google.com/open?id=0B5...kthdXRkLXlqWDg

    Terminal error
    https://drive.google.com/open?id=0B5...TEwSEhNSmRjWVU

  2. #2
    Join Date
    Sep 2006
    Location
    United States
    Beans
    624

    Re: local repository help wanted.

    Your repository is not configured properly. I'd check that you have your paths set up correctly.

    The terminal error is the result of not being able to retrieve the Packages index file inside of the repository. You need to generate this if you are hosting your own personal packages, or do a complete mirroring instead of a partial, if they are official packages.

    An easy way you can generate your own indexes is by installing the dpkg-dev package and using dpkg-scanpackages. However, all packages have to be signed with a valid signing key that you have on your keychain. Without it, you will get a security warning every single time.

    Also, just a comment, it looks in the screenshot as if you are using a Windows drive for storage. If that is the case, I recommend against it vigorously. Windows and NTFS do not respect UNIX file conventions. It can and will mangle files. For example, UNIX systems (like Linux) are case sensitive, Windows is not. If you must use a Windows machine, I recommend a drive image or a native EXT4 partition for storing the files from the mirror.
    Last edited by T.J.; September 16th, 2016 at 07:09 PM.
    T.J.

  3. #3
    Join Date
    Sep 2016
    Beans
    32

    Re: local repository help wanted.

    I've learned that the hard way yes. So what I'm trying to do is a complete mirror of the repositories. I'm not sure if EXT 4 will work with a virtual machine but it's worth a try. As for the configure. Isn't scan packages for downloaded .debs? Also I'd like the repo to be protable so I can take to any ubuntu based system and use it. Would apache2 be better for this?

  4. #4
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,952

    Re: local repository help wanted.

    Creating your mirror isn't a big deal. Maintaining and updating the mirror can become cumbersome without a bit of planning.

    I'm not sure how portability helps you, unless you are working with offline machines.
    The problem of installing and updating to offline machines has been solved several times: aptoncd and apt-zip are both excellent, safe, secure solutions.

  5. #5
    Join Date
    Sep 2016
    Beans
    32

    Re: local repository help wanted.

    I simply prefer it for control. I also have an offline machine. What methods would be good to maintain the entire repo and keep it portable? apache2?

  6. #6
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,952

    Re: local repository help wanted.

    Look at the apt-mirror package for mirroring all or part of the Ubuntu repositories across a network to your online server. (You said you did this part already)
    Look at the apt-zip package for installing and updating offline systems from whatever mirror you prefer.
    Neither requires Apache.
    Last edited by ian-weisser; September 17th, 2016 at 12:44 PM.

  7. #7
    Join Date
    Sep 2016
    Beans
    32

    Re: local repository help wanted.

    So how do I make the system use the local repo?

  8. #8
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,952

    Re: local repository help wanted.

    Change a system's /etc/apt/sources.list to point to the new mirror. (You did this part already)
    Did you generate an index file like T.J. pointed out in post #2?

  9. #9
    Join Date
    Sep 2016
    Beans
    32

    Re: local repository help wanted.

    I type dpkg-scanpackages /mnt/hgfs/repo/mirror/archive.ubuntu.com/ubuntu so far it just seems to hang there.

    I don't know I can't seem to get this to work I don't know why it isn't working.

  10. #10
    Join Date
    Sep 2016
    Beans
    32

    Re: local repository help wanted.

    Quote Originally Posted by T.J. View Post
    Your repository is not configured properly. I'd check that you have your paths set up correctly.

    The terminal error is the result of not being able to retrieve the Packages index file inside of the repository. You need to generate this if you are hosting your own personal packages, or do a complete mirroring instead of a partial, if they are official packages.

    An easy way you can generate your own indexes is by installing the dpkg-dev package and using dpkg-scanpackages. However, all packages have to be signed with a valid signing key that you have on your keychain. Without it, you will get a security warning every single time.

    Also, just a comment, it looks in the screenshot as if you are using a Windows drive for storage. If that is the case, I recommend against it vigorously. Windows and NTFS do not respect UNIX file conventions. It can and will mangle files. For example, UNIX systems (like Linux) are case sensitive, Windows is not. If you must use a Windows machine, I recommend a drive image or a native EXT4 partition for storing the files from the mirror.

    The scanpackges didn't work for me I'm not sure why I typed dpkg-scanpackages /mnt/hgfs/repo/mirror/archive.ubuntu.com/ubuntu


    I'm not sure what to do here. Half the tutorials I find say to create a symbolic links with apache2 but that's just not working either

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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