/
How to create local repository in the zone for test package
How to create local repository in the zone for test package
creating a new repository pool, don't use rpool:
$ sudo zpool create data c2t1d0
create new dataset for repository:
$ sudo zfs create -o compression=on -o mountpoint=/data/repo data/repo
creating a new directory to store the repository configuration:
$ mkdir -p /data/repo/conf
create configuration file :
$ vim /data/repo/conf/distributions
Codename: du2-prebuild
Suite: unstable
Version: 2.0
Origin: DilOS
Label: DilOS prebuild
Description: DilOS Prebuild Repository
Architectures: solaris-i386 solaris-sparc
Components: main contrib non-free
#SignWith: default
DebIndices: Packages Release . .gz .bz2 .xz
#DscIndices: Sources Release . .gz .bz2 .xz
Contents: . .gz .bz2 .xz
:wq!
create new zone for build package and use this guide for build package.
after building the package, put it in the repository:
$ cd /export/builds/du2/components/lynx/build/
$ reprepro -Vb /data/repo --export=never include du2-prebuild *.changes
$ reprepro -Vb /data/repo export du2-prebuild
after that, you should see the following structure in /data/report:
$ cd /data/repo/
$ ls -la
total 4
drwxr-xr-x 6 root root 6 февр. 11 15:28 .
drwxr-xr-x 4 root root 4 февр. 11 15:10 ..
drwxr-xr-x 2 root root 3 февр. 11 14:54 conf
drwxr-xr-x 2 root root 8 февр. 11 15:28 db
drwxr-xr-x 3 root root 3 февр. 11 15:28 dists
drwxr-xr-x 3 root root 3 февр. 11 15:26 pool
create an apache2 deployment zone. Add zone access to this directory:
add fs
set dir="/data/repo"
set special="/data/repo"
set type="lofs"
end
$ sudo zonecfg -z apache_repo
create -t SUNWdpkg
set zonepath=/zones/apache_repo
set ip-type=exclusive
add fs
set dir="/export/home/admin"
set special="/export/home/admin"
set type="lofs"
end
add fs
set dir="/export/builds"
set special="/export/builds"
set type="lofs"
end
add fs
set dir="/data/repo"
set special="/data/repo"
set type="lofs"
end
add net
set physical="vnic2"
set global-nic="stub0"
add property (name=ip,value="192.168.0.2")
add property (name=netmask,value="255.255.255.0")
add property (name=gateway,value="192.168.0.254")
add property (name=primary,value="true")
end
add attr
set name="resolvers"
set type="string"
set value="192.168.0.254"
end
verify
commit
exit
$ sudo zoneadm -z apache_repo install
$ sudo zoneadm -z apache_repo boot
check your zone directories.
installing, configuring, and running apache2:
$ sudo apt install apache2
...
$ sudo ln -s /data/repo /var/www/html/dilos
$ sudo svcadm enable http
$ sudo svcs http
STATE STIME FMRI
online 15:46:59 svc:/network/http:apache2
create a zone for testing the repository:
$ sudo zonecfg -z test_repo
create -t SUNWdpkg
set zonepath=/zones/apache_repo
set ip-type=exclusive
add fs
set dir="/export/home/admin"
set special="/export/home/admin"
set type="lofs"
end
add fs
set dir="/export/builds"
set special="/export/builds"
set type="lofs"
end
add fs
add net
set physical="vnic3"
set global-nic="stub0"
add property (name=ip,value="192.168.0.3")
add property (name=netmask,value="255.255.255.0")
add property (name=gateway,value="192.168.0.254")
add property (name=primary,value="true")
end
add attr
set name="resolvers"
set type="string"
set value="192.168.0.254"
end
verify
commit
exit
$ sudo zoneadm -z test_repo install
$ sudo zoneadm -z test_repo boot
write to /etc/apt/sources.list in test zone:
$ vim /etc/apt/sources.list
deb [trusted=yes] http://192.168.0.2/dilos du2-prebuild main contrib non-free
:wq
$ sudo apt update
now you can install your package.
, multiple selections available,
Related content
How to create local repository in the zone
How to create local repository in the zone
More like this
The algorithm of actions for the local assembly of the component
The algorithm of actions for the local assembly of the component
Read with this
How to make local build DU4 on VM environment
How to make local build DU4 on VM environment
More like this
All build depends for build components from DU2
All build depends for build components from DU2
Read with this
How to make local build DU2 on VM environment
How to make local build DU2 on VM environment
More like this
How to build a DEB package in du3 (dilos-userland)
How to build a DEB package in du3 (dilos-userland)
Read with this