0

I am trying to write a script that prepare an offline installable custom ISO. The customized ISO should have include some other packages which do not come with the official Ubuntu server ISO. (like samba, ifupdown, tcpdump etc.). As far as I observe Ubuntu ISOs have compatible directory structure of packages with the repo.

So I wonder if it is possible to download a package with dependencies (even if they are installed already). And place them ISO directory.

for example ifupdown has a directory in the repo as follows:

http://ddebs.ubuntu.com/pool/main/i/ifupdown/

before assembling the custom ISO, after downloading and placing it should be my local directory as follows:

/iso-disk/pool/main/i/ifupdown/ifupdown_0.8.36+nmu1ubuntu3.1_amd64.deb

Secondly, let's assume somehow I put packages in to correct locations and add package names into packages: section of user-data file. Would cloud-init install my packages?

Thanks.

10
  • The information should be available using the apt (or apt-get) --print-uris option - see for example How can I get all the URL of the dependencies of a deb package? Commented Apr 19 at 13:38
  • True, but it does not work if the package is already installed. Since I am doing these operations in the development environment, most probably these packages are already installed.
    – rido
    Commented Apr 19 at 13:58
  • Does it not do so if you include the --reinstall option? Commented Apr 19 at 14:04
  • No it does not.
    – rido
    Commented Apr 19 at 14:13
  • 1
    I'm sorry for mis/incomplete understanding. I have edited my question. I'm not sure if you see the edited one, because the comments are only about the path. My problem isnt only to grab full path of a package, yet download with dependencies (even if they installed on development machine) and place them on the proper location before assembling the ISO. And dependency resolution should not be done wrt development machine. I was achieving this on yum installer with the options --installroot --downloadonly --downloaddir. Since Centos7 packages arent divided by wrt prefixes, I didnt have to worry
    – rido
    Commented Apr 19 at 16:35

0

You must log in to answer this question.

Browse other questions tagged .