Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tools
development-tools
manjaro-tools
Commits
46e83ab8
Commit
46e83ab8
authored
Feb 13, 2017
by
udeved
Browse files
Merge branch 'master' into stable-0.14.x
parents
901aa6f5
33aa00bd
Changes
18
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
46e83ab8
...
...
@@ -56,9 +56,8 @@ SHARED_PKG = \
LIST_ISO
=
\
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/minimal.list
\
data/iso.list.d/sonar.list
BIN_ISO
=
\
...
...
README.md
View file @
46e83ab8
...
...
@@ -129,6 +129,18 @@ overriding
# set upload bandwidth limit in kB/s
# 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
...
...
@@ -197,7 +209,6 @@ buildiso is used to build manjaro-iso-profiles. It is run insde the profiles fol
#####Packages for livecd only:
*
manjaro-livecd-cli-installer
*
manjaro-livecd-openrc
*
manjaro-livecd-systemd
...
...
@@ -222,7 +233,6 @@ Usage: buildiso [options]
-x Build images only
-z Generate iso only
Requires pre built images (-x)
-w Create iso torrent
-v Verbose output to log file, show profile detail (-q)
-q Query settings and pretend build
-h This help
...
...
@@ -371,6 +381,7 @@ Usage: deployiso [options]
-l Limit bandwidth in kB/s [default:80]
-c Create new remote release directory
-u Update remote directory
-t Create iso torrent
-q Query settings and pretend upload
-v Verbose output
-h This help
...
...
bin/buildiso.in
View file @
46e83ab8
...
...
@@ -60,10 +60,6 @@ show_profile(){
msg2
"enable_openrc_live: %s"
"
${
enable_openrc_live
[*]
}
"
[[
-n
${
disable_openrc
[*]
}
]]
&&
msg2
"disable_openrc: %s"
"
${
disable_openrc
[*]
}
"
fi
if
${
torrent
}
;
then
msg2
"tracker_url: %s"
"
${
tracker_url
}
"
msg2
"piece_size: %s"
"
${
piece_size
}
"
fi
fi
reset_profile
}
...
...
@@ -92,7 +88,6 @@ display_settings(){
msg2
"images_only: %s"
"
${
images_only
}
"
msg2
"iso_only: %s"
"
${
iso_only
}
"
msg2
"persist: %s"
"
${
persist
}
"
msg2
"torrent: %s"
"
${
torrent
}
"
msg
"DIST SETTINGS:"
msg2
"dist_name: %s"
"
${
dist_name
}
"
...
...
@@ -124,7 +119,6 @@ pretend=false
images_only
=
false
iso_only
=
false
verbose
=
false
torrent
=
false
persist
=
false
usage
()
{
...
...
@@ -145,7 +139,6 @@ usage() {
echo
' -x Build images only'
echo
' -z Generate iso only'
echo
' Requires pre built images (-x)'
echo
' -w Create iso torrent'
echo
' -v Verbose output to log file, show profile detail (-q)'
echo
' -q Query settings and pretend build'
echo
' -h This help'
...
...
@@ -156,7 +149,7 @@ usage() {
orig_argv
=(
"
$@
"
)
opts
=
'p:a:b:r:t:k:i:czxm
w
vqh'
opts
=
'p:a:b:r:t:k:i:czxmvqh'
while
getopts
"
${
opts
}
"
arg
;
do
case
"
${
arg
}
"
in
...
...
@@ -171,7 +164,6 @@ while getopts "${opts}" arg; do
x
)
images_only
=
true
;;
z
)
iso_only
=
true
;;
m
)
persist
=
true
;;
w
)
torrent
=
true
;;
v
)
verbose
=
true
;;
q
)
pretend
=
true
;;
h|?
)
usage 0
;;
...
...
bin/deployiso.in
View file @
46e83ab8
...
...
@@ -22,7 +22,6 @@ import ${LIBDIR}/util-publish.sh
show_profile
(){
prepare_transfer
"
$1
"
info
"Profile: [
$1
]"
msg2
"project: %s"
"
${
project
}
"
msg2
"src_dir:
${
src_dir
}
"
msg2
"target_dir:
${
target_dir
}
"
}
...
...
@@ -45,11 +44,20 @@ display_settings(){
msg2
"update: %s"
"
${
update
}
"
msg2
"release: %s"
"
${
release
}
"
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:"
msg2
"account: %s"
"
${
account
}
"
msg2
"host: %s"
"
${
host
}
"
msg2
"project: %s"
"
${
project
}
"
msg
"UPLOAD QUEUE:"
run show_profile
"
${
build_list_iso
}
"
...
...
@@ -66,6 +74,7 @@ release=false
update
=
false
verbose
=
false
exists
=
false
torrent
=
false
rsync_args
=(
-aP
--progress
-e
ssh
)
...
...
@@ -75,6 +84,7 @@ usage() {
echo
" -l Limit bandwidth in kB/s [default:
${
limit
}
]"
echo
' -c Create new remote release directory'
echo
' -u Update remote directory'
echo
' -t Create iso torrent'
echo
' -q Query settings and pretend upload'
echo
' -v Verbose output'
echo
' -h This help'
...
...
@@ -83,7 +93,7 @@ usage() {
exit
$1
}
opts
=
'p:l:cuvqh'
opts
=
'p:l:cuv
t
qh'
while
getopts
"
${
opts
}
"
arg
;
do
case
"
${
arg
}
"
in
...
...
@@ -91,6 +101,7 @@ while getopts "${opts}" arg; do
l
)
limit
=
"
$OPTARG
"
;;
c
)
release
=
true
;;
u
)
update
=
true
;
rsync_args+
=(
-u
)
;;
t
)
torrent
=
true
;;
v
)
verbose
=
true
;
rsync_args+
=(
-v
--stats
)
;;
q
)
pretend
=
true
;
rsync_args+
=(
-n
)
;;
h|?
)
usage 0
;;
...
...
data/deploy.map
0 → 100644
View file @
46e83ab8
# srv path : version attribute
release:none
development:alpha[0-9],beta[0-9],rc[0-9]
data/iso.list.d/community.list
View file @
46e83ab8
...
...
@@ -2,13 +2,5 @@ bspwm
budgie
cinnamon
deepin
fluxbox
gnome
i3
jwm
lumina
lxde
lxqt
mate
netbook
pantheon
data/iso.list.d/
official
.list
→
data/iso.list.d/
manjaro
.list
View file @
46e83ab8
kde
netinstall
xfce
gnome
lxqt
netinstall
data/iso.list.d/minimal.list
deleted
100644 → 0
View file @
901aa6f5
budgie-minimal
cinnamon-minimal
deepin-minimal
gnome-minimal
kde-minimal
lxqt-minimal
xfce-minimal
data/manjaro-tools.conf
View file @
46e83ab8
...
...
@@ -76,6 +76,20 @@
# the server user
# account=[SetUser]
# the server project
# project="manjarolinux"
# set upload bandwidth limit in kB/s
# 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')
data/profile.conf.example
View file @
46e83ab8
...
...
@@ -14,14 +14,6 @@
# use extra packages as defined in pkglist to activate a full profile
# extra="false"
################ torrent ################
# the torrent tracker urls, comma separated
# tracker_url='udp://mirror.strits.dk:6969'
# Piece size, 2^n
# piece_size=21
################ install ################
# default displaymanager: none
...
...
docbook/buildiso.xml
View file @
46e83ab8
...
...
@@ -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
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>
...
...
@@ -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>
</varlistentry>
<varlistentry>
<term><option>
-w
</option></term>
<listitem><para>
Create a torrent from iso file.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>
-v
</option></term>
...
...
docbook/deployiso.xml
View file @
46e83ab8
...
...
@@ -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>
deployiso is a script to upload a specific iso or a buiildset to SF.
It needs to be run inside the iso-profiles directory.
</para>
<para>
deployiso is a script to upload a specific iso or a buiildset to SF.
</para>
</refsect1>
...
...
@@ -95,6 +94,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<listitem><para>
Update remote iso.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>
-t
</option></term>
<listitem><para>
Create a torrent from iso file.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>
-v
</option></term>
...
...
docbook/manjaro-tools.conf.xml
View file @
46e83ab8
...
...
@@ -278,6 +278,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>
torrent_meta=
</varname></term>
<listitem><para>
Default meta comment for the torrent.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>
limit=
</varname></term>
...
...
@@ -285,6 +292,28 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</para></listitem>
</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>
</refsect1>
...
...
docbook/profile.conf.xml
View file @
46e83ab8
...
...
@@ -242,21 +242,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</para></listitem>
</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>
</refsect1>
...
...
lib/util-iso.sh
View file @
46e83ab8
...
...
@@ -238,8 +238,6 @@ make_image_root() {
pacman
-Qr
"
${
path
}
"
>
"
${
path
}
/rootfs-pkgs.txt"
copy_overlay
"
${
profile_dir
}
/root-overlay"
"
${
path
}
"
prepare_initcpio
"
${
path
}
"
reset_pac_conf
"
${
path
}
"
configure_lsb
"
${
path
}
"
...
...
@@ -352,6 +350,8 @@ make_image_boot() {
mount_fs_net
"
${
path
}
"
fi
prepare_initcpio
"
${
path
}
"
# if [[ ${gpg_key} ]]; then
# gpg --export ${gpg_key} >${work_dir}/gpgkey
# exec 17<>${work_dir}/gpgkey
...
...
@@ -462,18 +462,9 @@ check_requirements(){
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
(){
local
timer
=
$(
get_timer
)
run_safe
"make_iso"
${
torrent
}
&&
make_torrent
user_own
"
${
iso_dir
}
"
"-R"
show_elapsed_time
"
${
FUNCNAME
}
"
"
${
timer
}
"
}
...
...
@@ -522,10 +513,6 @@ make_profile(){
${
verbose
}
&&
archive_logs
exit
1
fi
# if ${boot_only}; then
# prepare_boot_loaders
# exit 1
# fi
if
${
images_only
}
;
then
prepare_images
${
verbose
}
&&
archive_logs
...
...
@@ -555,18 +542,6 @@ get_pacman_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
(){
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
)
work_dir
=
${
chroots_iso
}
/
${
profile
}
/
${
target_arch
}
iso_dir
=
"
${
cache_dir_iso
}
/
${
edition
}
/
${
dist_releas
e
}
/
${
profil
e
}
"
iso_dir
=
"
${
cache_dir_iso
}
/
${
edition
}
/
${
profile
}
/
${
dist_release
}
"
iso_root
=
${
chroots_iso
}
/
${
profile
}
/iso
mnt_dir
=
${
chroots_iso
}
/
${
profile
}
/mnt
...
...
@@ -591,8 +566,6 @@ load_profile(){
prepare_dir
"
${
iso_dir
}
"
user_own
"
${
iso_dir
}
"
mktorrent_args
=(
-v
-p
-l
${
piece_size
}
-a
${
tracker_url
}
-w
$(
gen_webseed
)
)
}
prepare_profile
(){
...
...
lib/util-publish.sh
View file @
46e83ab8
...
...
@@ -9,32 +9,68 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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
(){
msg
"Create release (%s) ..."
"
${
dist_release
}
"
rsync
${
rsync_args
[*]
}
/dev/null
${
url
}
/
${
dist_release
}
/
msg
"Create release (%s) ..."
"
${
target_dir
}
"
rsync
${
rsync_args
[*]
}
/dev/null
${
url
}
/
${
profile
}
/
rsync
${
rsync_args
[*]
}
/dev/null
${
url
}
/
${
target_dir
}
/
show_elapsed_time
"
${
FUNCNAME
}
"
"
${
timer_start
}
"
msg
"Done (%s)"
"
${
dist_release
}
"
msg
"Done (%s)"
"
${
target_dir
}
"
}
get_edition
(){
local
result
=
$(
find
${
run_dir
}
-maxdepth
3
-name
"
$
1
"
)
path
[[
-z
$result
]]
&&
die
"%s is not a valid profile or build list!"
"
$
1
"
local
result
=
$(
find
${
run_dir
}
-maxdepth
3
-name
"
$
{
profile
}
"
)
path
[[
-z
$result
]]
&&
die
"%s is not a valid profile or build list!"
"
$
{
profile
}
"
path
=
${
result
%/*
}
path
=
${
path
%/*
}
echo
${
path
##*/
}
}
connect
(){
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
(){
local
edition
=
$(
get_edition
$1
)
project
=
$(
get_project
"
${
edition
}
"
)
url
=
$(
connect
"
${
project
}
"
)
target_dir
=
"
${
dist_release
}
/
$1
"
profile
=
"
$1
"
edition
=
$(
get_edition
)
url
=
$(
connect
)
target_dir
=
"
${
profile
}
/
${
dist_release
}
"
src_dir
=
"
${
run_dir
}
/
${
edition
}
/
${
target_dir
}
"
${
torrent
}
&&
make_torrent
}
sync_dir
(){
...
...
lib/util-yaml.sh
View file @
46e83ab8
...
...
@@ -382,6 +382,7 @@ write_netgroup_yaml(){
echo
" description: '
$1
'"
>>
"
$2
"
echo
" selected: false"
>>
"
$2
"
echo
" hidden: false"
>>
"
$2
"
echo
" critical: false"
>>
"
$2
"
echo
" packages:"
>>
"
$2
"
for
p
in
${
packages
[@]
}
;
do
echo
" -
$p
"
>>
"
$2
"
...
...
lib/util.sh
View file @
46e83ab8
...
...
@@ -133,16 +133,6 @@ show_elapsed_time(){
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
()
{
eval
"exec
$1
>"
'"$2"'
if
!
flock
-n
$1
;
then
...
...
@@ -228,8 +218,6 @@ init_common(){
[[
-z
${
build_mirror
}
]]
&&
build_mirror
=
'http://mirror.netzspielplatz.de/manjaro/packages'
[[
-z
${
tmp_dir
}
]]
&&
tmp_dir
=
'/tmp/manjaro-tools'
[[
-z
${
host
}
]]
&&
host
=
"sourceforge.net"
}
init_buildtree
(){
...
...
@@ -314,9 +302,21 @@ init_buildiso(){
init_deployiso
(){
host
=
"sourceforge.net"
[[
-z
${
project
}
]]
&&
project
=
"manjarolinux"
[[
-z
${
account
}
]]
&&
account
=
"[SetUser]"
[[
-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
(){
...
...
@@ -440,10 +440,6 @@ load_profile_config(){
enable_systemd+
=(
"
$(
get_svc
)
"
)
fi
[[
-z
${
tracker_url
}
]]
&&
tracker_url
=
'udp://mirror.strits.dk:6969'
[[
-z
${
piece_size
}
]]
&&
piece_size
=
21
[[
-z
${
netinstall
}
]]
&&
netinstall
=
'false'
[[
-z
${
chrootcfg
}
]]
&&
chrootcfg
=
'false'
...
...
@@ -494,13 +490,12 @@ reset_profile(){
unset
packages_desktop
unset
packages_mhwd
unset
login_shell
unset
tracker_url
unset
piece_size
unset
netinstall
unset
chrootcfg
unset
netgroups
unset
geoip
unset
plymouth_boot
unset
basic
unset
extra
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment