Merge branch 'master' into stable-0.14.x
This commit is contained in:
commit
46e83ab833
18 changed files with 152 additions and 123 deletions
3
Makefile
3
Makefile
|
@ -56,9 +56,8 @@ SHARED_PKG = \
|
||||||
|
|
||||||
LIST_ISO = \
|
LIST_ISO = \
|
||||||
data/iso.list.d/default.list \
|
data/iso.list.d/default.list \
|
||||||
data/iso.list.d/official.list \
|
data/iso.list.d/manjaro.list \
|
||||||
data/iso.list.d/community.list \
|
data/iso.list.d/community.list \
|
||||||
data/iso.list.d/minimal.list \
|
|
||||||
data/iso.list.d/sonar.list
|
data/iso.list.d/sonar.list
|
||||||
|
|
||||||
BIN_ISO = \
|
BIN_ISO = \
|
||||||
|
|
15
README.md
15
README.md
|
@ -129,6 +129,18 @@ overriding
|
||||||
|
|
||||||
# set upload bandwidth limit in kB/s
|
# set upload bandwidth limit in kB/s
|
||||||
# limit=100
|
# limit=100
|
||||||
|
|
||||||
|
# the torrent tracker urls, comma separated
|
||||||
|
# tracker_url='udp://mirror.strits.dk:6969'
|
||||||
|
|
||||||
|
# Piece size, 2^n
|
||||||
|
# piece_size=21
|
||||||
|
|
||||||
|
# torrent meta comment
|
||||||
|
# torrent_meta="ManjaroLinux"
|
||||||
|
|
||||||
|
# iso mirrors
|
||||||
|
# iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent')
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
###2. buildpkg
|
###2. buildpkg
|
||||||
|
@ -197,7 +209,6 @@ buildiso is used to build manjaro-iso-profiles. It is run insde the profiles fol
|
||||||
|
|
||||||
#####Packages for livecd only:
|
#####Packages for livecd only:
|
||||||
|
|
||||||
* manjaro-livecd-cli-installer
|
|
||||||
* manjaro-livecd-openrc
|
* manjaro-livecd-openrc
|
||||||
* manjaro-livecd-systemd
|
* manjaro-livecd-systemd
|
||||||
|
|
||||||
|
@ -222,7 +233,6 @@ Usage: buildiso [options]
|
||||||
-x Build images only
|
-x Build images only
|
||||||
-z Generate iso only
|
-z Generate iso only
|
||||||
Requires pre built images (-x)
|
Requires pre built images (-x)
|
||||||
-w Create iso torrent
|
|
||||||
-v Verbose output to log file, show profile detail (-q)
|
-v Verbose output to log file, show profile detail (-q)
|
||||||
-q Query settings and pretend build
|
-q Query settings and pretend build
|
||||||
-h This help
|
-h This help
|
||||||
|
@ -371,6 +381,7 @@ Usage: deployiso [options]
|
||||||
-l Limit bandwidth in kB/s [default:80]
|
-l Limit bandwidth in kB/s [default:80]
|
||||||
-c Create new remote release directory
|
-c Create new remote release directory
|
||||||
-u Update remote directory
|
-u Update remote directory
|
||||||
|
-t Create iso torrent
|
||||||
-q Query settings and pretend upload
|
-q Query settings and pretend upload
|
||||||
-v Verbose output
|
-v Verbose output
|
||||||
-h This help
|
-h This help
|
||||||
|
|
|
@ -60,10 +60,6 @@ show_profile(){
|
||||||
msg2 "enable_openrc_live: %s" "${enable_openrc_live[*]}"
|
msg2 "enable_openrc_live: %s" "${enable_openrc_live[*]}"
|
||||||
[[ -n ${disable_openrc[*]} ]] && msg2 "disable_openrc: %s" "${disable_openrc[*]}"
|
[[ -n ${disable_openrc[*]} ]] && msg2 "disable_openrc: %s" "${disable_openrc[*]}"
|
||||||
fi
|
fi
|
||||||
if ${torrent};then
|
|
||||||
msg2 "tracker_url: %s" "${tracker_url}"
|
|
||||||
msg2 "piece_size: %s" "${piece_size}"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
reset_profile
|
reset_profile
|
||||||
}
|
}
|
||||||
|
@ -92,7 +88,6 @@ display_settings(){
|
||||||
msg2 "images_only: %s" "${images_only}"
|
msg2 "images_only: %s" "${images_only}"
|
||||||
msg2 "iso_only: %s" "${iso_only}"
|
msg2 "iso_only: %s" "${iso_only}"
|
||||||
msg2 "persist: %s" "${persist}"
|
msg2 "persist: %s" "${persist}"
|
||||||
msg2 "torrent: %s" "${torrent}"
|
|
||||||
|
|
||||||
msg "DIST SETTINGS:"
|
msg "DIST SETTINGS:"
|
||||||
msg2 "dist_name: %s" "${dist_name}"
|
msg2 "dist_name: %s" "${dist_name}"
|
||||||
|
@ -124,7 +119,6 @@ pretend=false
|
||||||
images_only=false
|
images_only=false
|
||||||
iso_only=false
|
iso_only=false
|
||||||
verbose=false
|
verbose=false
|
||||||
torrent=false
|
|
||||||
persist=false
|
persist=false
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
|
@ -145,7 +139,6 @@ usage() {
|
||||||
echo ' -x Build images only'
|
echo ' -x Build images only'
|
||||||
echo ' -z Generate iso only'
|
echo ' -z Generate iso only'
|
||||||
echo ' Requires pre built images (-x)'
|
echo ' Requires pre built images (-x)'
|
||||||
echo ' -w Create iso torrent'
|
|
||||||
echo ' -v Verbose output to log file, show profile detail (-q)'
|
echo ' -v Verbose output to log file, show profile detail (-q)'
|
||||||
echo ' -q Query settings and pretend build'
|
echo ' -q Query settings and pretend build'
|
||||||
echo ' -h This help'
|
echo ' -h This help'
|
||||||
|
@ -156,7 +149,7 @@ usage() {
|
||||||
|
|
||||||
orig_argv=("$@")
|
orig_argv=("$@")
|
||||||
|
|
||||||
opts='p:a:b:r:t:k:i:czxmwvqh'
|
opts='p:a:b:r:t:k:i:czxmvqh'
|
||||||
|
|
||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
|
@ -171,7 +164,6 @@ while getopts "${opts}" arg; do
|
||||||
x) images_only=true ;;
|
x) images_only=true ;;
|
||||||
z) iso_only=true ;;
|
z) iso_only=true ;;
|
||||||
m) persist=true ;;
|
m) persist=true ;;
|
||||||
w) torrent=true ;;
|
|
||||||
v) verbose=true ;;
|
v) verbose=true ;;
|
||||||
q) pretend=true ;;
|
q) pretend=true ;;
|
||||||
h|?) usage 0 ;;
|
h|?) usage 0 ;;
|
||||||
|
|
|
@ -22,7 +22,6 @@ import ${LIBDIR}/util-publish.sh
|
||||||
show_profile(){
|
show_profile(){
|
||||||
prepare_transfer "$1"
|
prepare_transfer "$1"
|
||||||
info "Profile: [$1]"
|
info "Profile: [$1]"
|
||||||
msg2 "project: %s" "${project}"
|
|
||||||
msg2 "src_dir: ${src_dir}"
|
msg2 "src_dir: ${src_dir}"
|
||||||
msg2 "target_dir: ${target_dir}"
|
msg2 "target_dir: ${target_dir}"
|
||||||
}
|
}
|
||||||
|
@ -45,11 +44,20 @@ display_settings(){
|
||||||
msg2 "update: %s" "${update}"
|
msg2 "update: %s" "${update}"
|
||||||
msg2 "release: %s" "${release}"
|
msg2 "release: %s" "${release}"
|
||||||
msg2 "verbose: %s" "${verbose}"
|
msg2 "verbose: %s" "${verbose}"
|
||||||
msg2 "rsync_args: %s" "${rsync_args[*]}"
|
# msg2 "rsync_args: %s" "${rsync_args[*]}"
|
||||||
|
msg2 "torrent: %s" "${torrent}"
|
||||||
|
|
||||||
|
if ${torrent};then
|
||||||
|
msg2 "tracker_url: %s" "${tracker_url}"
|
||||||
|
msg2 "piece_size: %s" "${piece_size}"
|
||||||
|
msg2 "iso_mirrors: %s" "${iso_mirrors[*]}"
|
||||||
|
msg2 "torrent_meta: %s" "${torrent_meta}"
|
||||||
|
fi
|
||||||
|
|
||||||
msg "REMOTE:"
|
msg "REMOTE:"
|
||||||
msg2 "account: %s" "${account}"
|
msg2 "account: %s" "${account}"
|
||||||
msg2 "host: %s" "${host}"
|
msg2 "host: %s" "${host}"
|
||||||
|
msg2 "project: %s" "${project}"
|
||||||
|
|
||||||
msg "UPLOAD QUEUE:"
|
msg "UPLOAD QUEUE:"
|
||||||
run show_profile "${build_list_iso}"
|
run show_profile "${build_list_iso}"
|
||||||
|
@ -66,6 +74,7 @@ release=false
|
||||||
update=false
|
update=false
|
||||||
verbose=false
|
verbose=false
|
||||||
exists=false
|
exists=false
|
||||||
|
torrent=false
|
||||||
|
|
||||||
rsync_args=(-aP --progress -e ssh)
|
rsync_args=(-aP --progress -e ssh)
|
||||||
|
|
||||||
|
@ -75,6 +84,7 @@ usage() {
|
||||||
echo " -l Limit bandwidth in kB/s [default:${limit}]"
|
echo " -l Limit bandwidth in kB/s [default:${limit}]"
|
||||||
echo ' -c Create new remote release directory'
|
echo ' -c Create new remote release directory'
|
||||||
echo ' -u Update remote directory'
|
echo ' -u Update remote directory'
|
||||||
|
echo ' -t Create iso torrent'
|
||||||
echo ' -q Query settings and pretend upload'
|
echo ' -q Query settings and pretend upload'
|
||||||
echo ' -v Verbose output'
|
echo ' -v Verbose output'
|
||||||
echo ' -h This help'
|
echo ' -h This help'
|
||||||
|
@ -83,7 +93,7 @@ usage() {
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
opts='p:l:cuvqh'
|
opts='p:l:cuvtqh'
|
||||||
|
|
||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
|
@ -91,6 +101,7 @@ while getopts "${opts}" arg; do
|
||||||
l) limit="$OPTARG" ;;
|
l) limit="$OPTARG" ;;
|
||||||
c) release=true ;;
|
c) release=true ;;
|
||||||
u) update=true; rsync_args+=(-u) ;;
|
u) update=true; rsync_args+=(-u) ;;
|
||||||
|
t) torrent=true ;;
|
||||||
v) verbose=true; rsync_args+=(-v --stats) ;;
|
v) verbose=true; rsync_args+=(-v --stats) ;;
|
||||||
q) pretend=true; rsync_args+=(-n) ;;
|
q) pretend=true; rsync_args+=(-n) ;;
|
||||||
h|?) usage 0 ;;
|
h|?) usage 0 ;;
|
||||||
|
|
5
data/deploy.map
Normal file
5
data/deploy.map
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# srv path : version attribute
|
||||||
|
|
||||||
|
release:none
|
||||||
|
|
||||||
|
development:alpha[0-9],beta[0-9],rc[0-9]
|
|
@ -2,13 +2,5 @@ bspwm
|
||||||
budgie
|
budgie
|
||||||
cinnamon
|
cinnamon
|
||||||
deepin
|
deepin
|
||||||
fluxbox
|
|
||||||
gnome
|
|
||||||
i3
|
i3
|
||||||
jwm
|
|
||||||
lumina
|
|
||||||
lxde
|
|
||||||
lxqt
|
|
||||||
mate
|
mate
|
||||||
netbook
|
|
||||||
pantheon
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
kde
|
kde
|
||||||
netinstall
|
|
||||||
xfce
|
xfce
|
||||||
|
gnome
|
||||||
|
lxqt
|
||||||
|
netinstall
|
|
@ -1,7 +0,0 @@
|
||||||
budgie-minimal
|
|
||||||
cinnamon-minimal
|
|
||||||
deepin-minimal
|
|
||||||
gnome-minimal
|
|
||||||
kde-minimal
|
|
||||||
lxqt-minimal
|
|
||||||
xfce-minimal
|
|
|
@ -76,6 +76,20 @@
|
||||||
# the server user
|
# the server user
|
||||||
# account=[SetUser]
|
# account=[SetUser]
|
||||||
|
|
||||||
|
# the server project
|
||||||
|
# project="manjarolinux"
|
||||||
|
|
||||||
# set upload bandwidth limit in kB/s
|
# set upload bandwidth limit in kB/s
|
||||||
# limit=100
|
# limit=100
|
||||||
|
|
||||||
|
# the torrent tracker urls, comma separated
|
||||||
|
# tracker_url='udp://mirror.strits.dk:6969'
|
||||||
|
|
||||||
|
# Piece size, 2^n
|
||||||
|
# piece_size=21
|
||||||
|
|
||||||
|
# torrent meta comment
|
||||||
|
# torrent_meta="ManjaroLinux"
|
||||||
|
|
||||||
|
# iso mirrors
|
||||||
|
# iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent')
|
||||||
|
|
|
@ -14,14 +14,6 @@
|
||||||
# use extra packages as defined in pkglist to activate a full profile
|
# use extra packages as defined in pkglist to activate a full profile
|
||||||
# extra="false"
|
# extra="false"
|
||||||
|
|
||||||
################ torrent ################
|
|
||||||
|
|
||||||
# the torrent tracker urls, comma separated
|
|
||||||
# tracker_url='udp://mirror.strits.dk:6969'
|
|
||||||
|
|
||||||
# Piece size, 2^n
|
|
||||||
# piece_size=21
|
|
||||||
|
|
||||||
################ install ################
|
################ install ################
|
||||||
|
|
||||||
# default displaymanager: none
|
# default displaymanager: none
|
||||||
|
|
|
@ -61,7 +61,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
<para>With buildiso you can build ISOs suitable to be booted from a removable media
|
<para>With buildiso you can build ISOs suitable to be booted from a removable media
|
||||||
like a DVD o a USB Stick, it will automatically create the necessary files to
|
like a DVD o a USB Stick, it will automatically create the necessary files to
|
||||||
install this ISO using calamares or the cli installer.</para>
|
install this ISO using calamares.</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
@ -145,12 +145,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
<listitem><para>Generate iso from already created images, for example created with the -x option.</para></listitem>
|
<listitem><para>Generate iso from already created images, for example created with the -x option.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><option>-w</option></term>
|
|
||||||
|
|
||||||
<listitem><para>Create a torrent from iso file.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-v</option></term>
|
<term><option>-v</option></term>
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
<para><command>deployiso</command> is used to upload a particular ISO or a set of ISOs. </para>
|
<para><command>deployiso</command> is used to upload a particular ISO or a set of ISOs. </para>
|
||||||
|
|
||||||
<para>deployiso is a script to upload a specific iso or a buiildset to SF.
|
<para>deployiso is a script to upload a specific iso or a buiildset to SF.</para>
|
||||||
It needs to be run inside the iso-profiles directory.</para>
|
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
@ -95,6 +94,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
<listitem><para>Update remote iso.</para></listitem>
|
<listitem><para>Update remote iso.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-t</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Create a torrent from iso file.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-v</option></term>
|
<term><option>-v</option></term>
|
||||||
|
|
||||||
|
|
|
@ -278,6 +278,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>torrent_meta=</varname></term>
|
||||||
|
|
||||||
|
<listitem><para>Default meta comment for the torrent.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>limit=</varname></term>
|
<term><varname>limit=</varname></term>
|
||||||
|
|
||||||
|
@ -285,6 +292,28 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>tracker_url=</varname></term>
|
||||||
|
|
||||||
|
<listitem><para>Default tracker announce for the torrent.
|
||||||
|
The tracker url can also contain comma separated urls.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>piece_size=</varname></term>
|
||||||
|
|
||||||
|
<listitem><para>Default priece size for the torrent in 2^n.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>iso_mirrors=</varname></term>
|
||||||
|
|
||||||
|
<listitem><para>Array of iso mirrors that will be
|
||||||
|
used for webseeds.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
|
@ -242,21 +242,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>tracker_url=</varname></term>
|
|
||||||
|
|
||||||
<listitem><para>Default tracker announce for the torrent.
|
|
||||||
The tracker url can also contain comma separated urls.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>piece_size=</varname></term>
|
|
||||||
|
|
||||||
<listitem><para>Default priece size for the torrent in 2^n.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
|
@ -238,8 +238,6 @@ make_image_root() {
|
||||||
pacman -Qr "${path}" > "${path}/rootfs-pkgs.txt"
|
pacman -Qr "${path}" > "${path}/rootfs-pkgs.txt"
|
||||||
copy_overlay "${profile_dir}/root-overlay" "${path}"
|
copy_overlay "${profile_dir}/root-overlay" "${path}"
|
||||||
|
|
||||||
prepare_initcpio "${path}"
|
|
||||||
|
|
||||||
reset_pac_conf "${path}"
|
reset_pac_conf "${path}"
|
||||||
|
|
||||||
configure_lsb "${path}"
|
configure_lsb "${path}"
|
||||||
|
@ -352,6 +350,8 @@ make_image_boot() {
|
||||||
mount_fs_net "${path}"
|
mount_fs_net "${path}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
prepare_initcpio "${path}"
|
||||||
|
|
||||||
# if [[ ${gpg_key} ]]; then
|
# if [[ ${gpg_key} ]]; then
|
||||||
# gpg --export ${gpg_key} >${work_dir}/gpgkey
|
# gpg --export ${gpg_key} >${work_dir}/gpgkey
|
||||||
# exec 17<>${work_dir}/gpgkey
|
# exec 17<>${work_dir}/gpgkey
|
||||||
|
@ -462,18 +462,9 @@ check_requirements(){
|
||||||
import ${LIBDIR}/util-iso-${iso_fs}.sh
|
import ${LIBDIR}/util-iso-${iso_fs}.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
make_torrent(){
|
|
||||||
local fn=${iso_file}.torrent
|
|
||||||
msg2 "Creating (%s) ..." "${fn}"
|
|
||||||
[[ -f ${iso_dir}/${fn} ]] && rm ${iso_dir}/${fn}
|
|
||||||
mktorrent ${mktorrent_args[*]} -o ${iso_dir}/${fn} ${iso_dir}/${iso_file}
|
|
||||||
}
|
|
||||||
|
|
||||||
compress_images(){
|
compress_images(){
|
||||||
local timer=$(get_timer)
|
local timer=$(get_timer)
|
||||||
run_safe "make_iso"
|
run_safe "make_iso"
|
||||||
${torrent} && make_torrent
|
|
||||||
user_own "${iso_dir}" "-R"
|
user_own "${iso_dir}" "-R"
|
||||||
show_elapsed_time "${FUNCNAME}" "${timer}"
|
show_elapsed_time "${FUNCNAME}" "${timer}"
|
||||||
}
|
}
|
||||||
|
@ -522,10 +513,6 @@ make_profile(){
|
||||||
${verbose} && archive_logs
|
${verbose} && archive_logs
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# if ${boot_only}; then
|
|
||||||
# prepare_boot_loaders
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
if ${images_only}; then
|
if ${images_only}; then
|
||||||
prepare_images
|
prepare_images
|
||||||
${verbose} && archive_logs
|
${verbose} && archive_logs
|
||||||
|
@ -555,18 +542,6 @@ get_pacman_conf(){
|
||||||
echo "$conf"
|
echo "$conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
gen_webseed(){
|
|
||||||
local webseed url project=$(get_project "${edition}")
|
|
||||||
url=${host}/project/${project}/${dist_release}/${profile}/${iso_file}
|
|
||||||
|
|
||||||
local mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent')
|
|
||||||
|
|
||||||
for m in ${mirrors[@]};do
|
|
||||||
webseed=${webseed:-}${webseed:+,}"http://${m}.dl.${url}"
|
|
||||||
done
|
|
||||||
echo ${webseed}
|
|
||||||
}
|
|
||||||
|
|
||||||
load_profile(){
|
load_profile(){
|
||||||
conf="${profile_dir}/profile.conf"
|
conf="${profile_dir}/profile.conf"
|
||||||
|
|
||||||
|
@ -583,7 +558,7 @@ load_profile(){
|
||||||
mkchroot_args+=(-C ${pacman_conf} -S ${mirrors_conf} -B "${build_mirror}/${target_branch}" -K)
|
mkchroot_args+=(-C ${pacman_conf} -S ${mirrors_conf} -B "${build_mirror}/${target_branch}" -K)
|
||||||
work_dir=${chroots_iso}/${profile}/${target_arch}
|
work_dir=${chroots_iso}/${profile}/${target_arch}
|
||||||
|
|
||||||
iso_dir="${cache_dir_iso}/${edition}/${dist_release}/${profile}"
|
iso_dir="${cache_dir_iso}/${edition}/${profile}/${dist_release}"
|
||||||
|
|
||||||
iso_root=${chroots_iso}/${profile}/iso
|
iso_root=${chroots_iso}/${profile}/iso
|
||||||
mnt_dir=${chroots_iso}/${profile}/mnt
|
mnt_dir=${chroots_iso}/${profile}/mnt
|
||||||
|
@ -591,8 +566,6 @@ load_profile(){
|
||||||
|
|
||||||
prepare_dir "${iso_dir}"
|
prepare_dir "${iso_dir}"
|
||||||
user_own "${iso_dir}"
|
user_own "${iso_dir}"
|
||||||
|
|
||||||
mktorrent_args=(-v -p -l ${piece_size} -a ${tracker_url} -w $(gen_webseed))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_profile(){
|
prepare_profile(){
|
||||||
|
|
|
@ -9,32 +9,68 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# get_project(){
|
||||||
|
# local project
|
||||||
|
# case "$1" in
|
||||||
|
# 'community') project='manjarolinux-community' ;;
|
||||||
|
# 'manjaro') project='manjarolinux' ;;
|
||||||
|
# 'sonar') project='sonargnulinux' ;;
|
||||||
|
# # manjarotest
|
||||||
|
# # manjarotest-community
|
||||||
|
# esac
|
||||||
|
# echo ${project}
|
||||||
|
# }
|
||||||
|
|
||||||
create_release(){
|
create_release(){
|
||||||
msg "Create release (%s) ..." "${dist_release}"
|
msg "Create release (%s) ..." "${target_dir}"
|
||||||
rsync ${rsync_args[*]} /dev/null ${url}/${dist_release}/
|
rsync ${rsync_args[*]} /dev/null ${url}/${profile}/
|
||||||
|
rsync ${rsync_args[*]} /dev/null ${url}/${target_dir}/
|
||||||
show_elapsed_time "${FUNCNAME}" "${timer_start}"
|
show_elapsed_time "${FUNCNAME}" "${timer_start}"
|
||||||
msg "Done (%s)" "${dist_release}"
|
msg "Done (%s)" "${target_dir}"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_edition(){
|
get_edition(){
|
||||||
local result=$(find ${run_dir} -maxdepth 3 -name "$1") path
|
local result=$(find ${run_dir} -maxdepth 3 -name "${profile}") path
|
||||||
[[ -z $result ]] && die "%s is not a valid profile or build list!" "$1"
|
[[ -z $result ]] && die "%s is not a valid profile or build list!" "${profile}"
|
||||||
path=${result%/*}
|
path=${result%/*}
|
||||||
path=${path%/*}
|
|
||||||
echo ${path##*/}
|
echo ${path##*/}
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(){
|
connect(){
|
||||||
local home="/home/frs/project"
|
local home="/home/frs/project"
|
||||||
echo "${account},$1@frs.${host}:${home}/$1"
|
echo "${account},${project}@frs.${host}:${home}/${profile}"
|
||||||
|
}
|
||||||
|
|
||||||
|
gen_webseed(){
|
||||||
|
local webseed seed="$1"
|
||||||
|
for mirror in ${iso_mirrors[@]};do
|
||||||
|
webseed=${webseed:-}${webseed:+,}"http://${mirror}.dl.${seed}"
|
||||||
|
done
|
||||||
|
echo ${webseed}
|
||||||
|
}
|
||||||
|
|
||||||
|
make_torrent(){
|
||||||
|
find ${src_dir} -type f -name "*.torrent" -delete
|
||||||
|
|
||||||
|
if [[ -n $(find ${src_dir} -type f -name "*.iso") ]]; then
|
||||||
|
for iso in $(ls ${src_dir}/*.iso);do
|
||||||
|
local seed=${host}/project/${project}/${target_dir}/${iso##*/}
|
||||||
|
local mktorrent_args=(-c "${torrent_meta}" -p -l ${piece_size} -a ${tracker_url} -w $(gen_webseed ${seed}))
|
||||||
|
${verbose} && mktorrent_args+=(-v)
|
||||||
|
msg2 "Creating (%s) ..." "${iso##*/}.torrent"
|
||||||
|
mktorrent ${mktorrent_args[*]} -o ${iso}.torrent ${iso}
|
||||||
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_transfer(){
|
prepare_transfer(){
|
||||||
local edition=$(get_edition $1)
|
profile="$1"
|
||||||
project=$(get_project "${edition}")
|
edition=$(get_edition)
|
||||||
url=$(connect "${project}")
|
url=$(connect)
|
||||||
target_dir="${dist_release}/$1"
|
|
||||||
|
target_dir="${profile}/${dist_release}"
|
||||||
src_dir="${run_dir}/${edition}/${target_dir}"
|
src_dir="${run_dir}/${edition}/${target_dir}"
|
||||||
|
${torrent} && make_torrent
|
||||||
}
|
}
|
||||||
|
|
||||||
sync_dir(){
|
sync_dir(){
|
||||||
|
|
|
@ -382,6 +382,7 @@ write_netgroup_yaml(){
|
||||||
echo " description: '$1'" >> "$2"
|
echo " description: '$1'" >> "$2"
|
||||||
echo " selected: false" >> "$2"
|
echo " selected: false" >> "$2"
|
||||||
echo " hidden: false" >> "$2"
|
echo " hidden: false" >> "$2"
|
||||||
|
echo " critical: false" >> "$2"
|
||||||
echo " packages:" >> "$2"
|
echo " packages:" >> "$2"
|
||||||
for p in ${packages[@]};do
|
for p in ${packages[@]};do
|
||||||
echo " - $p" >> "$2"
|
echo " - $p" >> "$2"
|
||||||
|
|
31
lib/util.sh
31
lib/util.sh
|
@ -133,16 +133,6 @@ show_elapsed_time(){
|
||||||
info "Time %s: %s minutes" "$1" "$(elapsed_time $2)"
|
info "Time %s: %s minutes" "$1" "$(elapsed_time $2)"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_project(){
|
|
||||||
local project
|
|
||||||
case "$1" in
|
|
||||||
'community'|'minimal') project='manjarolinux-community' ;;
|
|
||||||
'official') project='manjarolinux' ;;
|
|
||||||
'sonar') project='sonargnulinux' ;;
|
|
||||||
esac
|
|
||||||
echo ${project}
|
|
||||||
}
|
|
||||||
|
|
||||||
lock() {
|
lock() {
|
||||||
eval "exec $1>"'"$2"'
|
eval "exec $1>"'"$2"'
|
||||||
if ! flock -n $1; then
|
if ! flock -n $1; then
|
||||||
|
@ -228,8 +218,6 @@ init_common(){
|
||||||
[[ -z ${build_mirror} ]] && build_mirror='http://mirror.netzspielplatz.de/manjaro/packages'
|
[[ -z ${build_mirror} ]] && build_mirror='http://mirror.netzspielplatz.de/manjaro/packages'
|
||||||
|
|
||||||
[[ -z ${tmp_dir} ]] && tmp_dir='/tmp/manjaro-tools'
|
[[ -z ${tmp_dir} ]] && tmp_dir='/tmp/manjaro-tools'
|
||||||
|
|
||||||
[[ -z ${host} ]] && host="sourceforge.net"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init_buildtree(){
|
init_buildtree(){
|
||||||
|
@ -314,9 +302,21 @@ init_buildiso(){
|
||||||
|
|
||||||
init_deployiso(){
|
init_deployiso(){
|
||||||
|
|
||||||
|
host="sourceforge.net"
|
||||||
|
|
||||||
|
[[ -z ${project} ]] && project="manjarolinux"
|
||||||
|
|
||||||
[[ -z ${account} ]] && account="[SetUser]"
|
[[ -z ${account} ]] && account="[SetUser]"
|
||||||
|
|
||||||
[[ -z ${limit} ]] && limit=100
|
[[ -z ${limit} ]] && limit=100
|
||||||
|
|
||||||
|
[[ -z ${tracker_url} ]] && tracker_url='udp://mirror.strits.dk:6969'
|
||||||
|
|
||||||
|
[[ -z ${piece_size} ]] && piece_size=21
|
||||||
|
|
||||||
|
[[ -z ${iso_mirrors[@]} ]] && iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent')
|
||||||
|
|
||||||
|
[[ -z ${torrent_meta} ]] && torrent_meta="ManjaroLinux"
|
||||||
}
|
}
|
||||||
|
|
||||||
load_config(){
|
load_config(){
|
||||||
|
@ -440,10 +440,6 @@ load_profile_config(){
|
||||||
enable_systemd+=("$(get_svc)")
|
enable_systemd+=("$(get_svc)")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -z ${tracker_url} ]] && tracker_url='udp://mirror.strits.dk:6969'
|
|
||||||
|
|
||||||
[[ -z ${piece_size} ]] && piece_size=21
|
|
||||||
|
|
||||||
[[ -z ${netinstall} ]] && netinstall='false'
|
[[ -z ${netinstall} ]] && netinstall='false'
|
||||||
|
|
||||||
[[ -z ${chrootcfg} ]] && chrootcfg='false'
|
[[ -z ${chrootcfg} ]] && chrootcfg='false'
|
||||||
|
@ -494,13 +490,12 @@ reset_profile(){
|
||||||
unset packages_desktop
|
unset packages_desktop
|
||||||
unset packages_mhwd
|
unset packages_mhwd
|
||||||
unset login_shell
|
unset login_shell
|
||||||
unset tracker_url
|
|
||||||
unset piece_size
|
|
||||||
unset netinstall
|
unset netinstall
|
||||||
unset chrootcfg
|
unset chrootcfg
|
||||||
unset netgroups
|
unset netgroups
|
||||||
unset geoip
|
unset geoip
|
||||||
unset plymouth_boot
|
unset plymouth_boot
|
||||||
|
unset basic
|
||||||
unset extra
|
unset extra
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue