From a7158a6772f830ae8b40430e3c974356384eb3a4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 12 Nov 2012 16:43:36 -0500 Subject: libretools.conf: clean up .ssh/config recomendation --- src/libretools.conf | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/libretools.conf b/src/libretools.conf index 8032397..d310776 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -33,6 +33,13 @@ CACHEDIR=`grep "^#\?CacheDir" /etc/pacman.conf | cut -d'=' -f2` ## Parabola hostname (should be the same used on ssh_config PARABOLAHOST=parabola +## Assumes something similar in your .ssh/config: + +## Repo server +# Host parabola +# Port 1863 +# HostName repo.parabolagnulinux.org +# User repo ## Server destination of libre packages # Don't change unless you know what you're doing and you won't screw @@ -96,27 +103,3 @@ source /usr/bin/libremessages ## These are architecture specific files. ## Uncomment them if you installed libretools-mips64el # source /etc/libretools.d/mips64el.conf - -## Recommended SSH Config follows -# SSH host, it's better if you have it configured on ~/.ssh/config -# with ControlMaster auto (and a shell opened somewhere else) -# -# Example: -# Host * -# Protocol 2 -# ControlMaster auto -# ControlPath /tmp/ssh-%r@%h:%p -# -## Repo server -# Host parabola -# Port 22 -# HostName repo.parabolagnulinux.org -# User parabolavnx -# IdentityFile ~/.ssh/id_rsa -# -## Git server -# Host vparabola -# Port 1863 -# HostName parabolagnulinux.org -# User parabola -# IdentityFile ~/.ssh/id_rsa -- cgit v1.2.2 From 53da04831f410d86412361564b1018e9c72e4b66 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 12 Nov 2012 16:54:55 -0500 Subject: libretools.conf: improve the "code" section at the end * verify that XDG_CONFIG_HOME is set; if not, then set it * warn about all unconfigured variables, not just the first one * source the user-specific libretools.conf, if it exists --- src/libretools.conf | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/libretools.conf b/src/libretools.conf index d310776..cc8a8f1 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -84,22 +84,36 @@ TORUPATH=/var/lib/libretools/toru #SIGEXT=".sig" #SIGID="0xYOURID" -# Checks if vars aren't empty - +################################################################################ +# This probably shouldn't be in a .conf file... # +################################################################################ + +if [[ -z $XDG_CONFIG_HOME ]]; then + if [[ -n $SUDO_USER ]]; then + SUDO_HOME="$(eval echo ~$SUDO_USER)" + export XDG_CONFIG_HOME="${SUDO_HOME}/.config" + unset SUDO_HOME + else + export XDG_CONFIG_HOME="${HOME}/.config" + fi +fi +if [[ -e "$XDG_CONFIG_HOME/libretools/libretools.conf" ]]; then + . "$XDG_CONFIG_HOME/libretools/libretools.conf" +fi + +ret=0 for VAR in CHROOTDIR CHROOT CACHEDIR PARABOLAHOST LIBREDESTDIR \ - BLACKLIST WORKDIR REPOS ARCHES ABSLIBREGIT \ - COMMITCMD DIFFTOOL FULLBUILDCMD; do - - ret=0 - [[ -z ${!VAR} ]] && { - echo "Configure $VAR var in /etc/libretools.conf" - ret=1 - } - [ $ret -ne 0 ] && exit 1 -done + BLACKLIST WORKDIR REPOS ARCHES ABSLIBREGIT \ + COMMITCMD DIFFTOOL FULLBUILDCMD; do -source /usr/bin/libremessages + if [[ -z ${!VAR} ]]; then + echo "Configure $VAR var in /etc/libretools.conf" + ret=1 + fi +done +if [[ $ret != 0 ]]; then + exit 1 +fi +unset ret -## These are architecture specific files. -## Uncomment them if you installed libretools-mips64el -# source /etc/libretools.d/mips64el.conf +. /usr/bin/libremessages -- cgit v1.2.2 From 803ec5f8b5f1450d0ecd6f52463bd3882f03c05c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 12 Nov 2012 16:57:01 -0500 Subject: libretools.conf: remove CACHEDIR (grep confirms it is unused) --- src/libretools.conf | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/libretools.conf b/src/libretools.conf index cc8a8f1..01c93e6 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -28,9 +28,6 @@ CHROOTEXTRAPKG=(distcc ccache tsocks tokyocabinet) # CHROOT=$SUDO_USER # CHROOT=root -## Obtains CacheDir from pacman.conf -CACHEDIR=`grep "^#\?CacheDir" /etc/pacman.conf | cut -d'=' -f2` - ## Parabola hostname (should be the same used on ssh_config PARABOLAHOST=parabola ## Assumes something similar in your .ssh/config: @@ -102,7 +99,7 @@ if [[ -e "$XDG_CONFIG_HOME/libretools/libretools.conf" ]]; then fi ret=0 -for VAR in CHROOTDIR CHROOT CACHEDIR PARABOLAHOST LIBREDESTDIR \ +for VAR in CHROOTDIR CHROOT PARABOLAHOST LIBREDESTDIR \ BLACKLIST WORKDIR REPOS ARCHES ABSLIBREGIT \ COMMITCMD DIFFTOOL FULLBUILDCMD; do -- cgit v1.2.2 From a5f4fb2d351c2972daa6bffad4e74e0a49f5760b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 12 Nov 2012 17:04:51 -0500 Subject: libretools.conf: add [prc] and [java] to REPOS --- src/libretools.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libretools.conf b/src/libretools.conf index 01c93e6..e62dd90 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -12,7 +12,7 @@ WORKDIR=/home/$USER/packages # inverted order of precedence. Put testing repos first so fullpkg find new # PKGBUILDs first, for instance. Toru-path uses reverse order to enforce repo # precedence on the path cache (the last path added replaces the rest) -REPOS=('core' 'libre' 'extra' 'community' 'libre-testing' 'social' 'sugar') +REPOS=('core' 'libre' 'extra' 'community' 'libre-testing' 'social' 'sugar' 'pcr' 'java') # The architectures ARCHES=('i686' 'x86_64' 'mips64el' 'any') -- cgit v1.2.2 From f607063e49984bfd5286001699ff101f0bf3663b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 12 Nov 2012 17:05:37 -0500 Subject: libretools.conf: autodetect DIFFTOOL --- src/libretools.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libretools.conf b/src/libretools.conf index e62dd90..75d47fe 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -2,7 +2,7 @@ BLACKLIST=http://repo.parabolagnulinux.org/docs/blacklist.txt # Diff tool (vimdiff, gvimdiff, meld, etc) -DIFFTOOL=vimdiff +DIFFTOOL=`which vimdiff gvimdiff meld colordiff 2>/dev/null|sed 's/\s.*//'` # The dir where you work on WORKDIR=/home/$USER/packages -- cgit v1.2.2 From 96ae7c177a39d09e5c1cd0116d7199259a20f239 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 12 Nov 2012 17:06:09 -0500 Subject: libretools.conf: add a shebang to help editors out --- src/libretools.conf | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/libretools.conf b/src/libretools.conf index 75d47fe..f3e327a 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -1,3 +1,5 @@ +#!/bin/bash + ## Blacklist URL BLACKLIST=http://repo.parabolagnulinux.org/docs/blacklist.txt -- cgit v1.2.2 From 7d455f70d317d36693e2d3d194b2bed299ad194e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 12 Nov 2012 17:06:54 -0500 Subject: libretools.conf: set COMMITCMD=git by default --- src/libretools.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libretools.conf b/src/libretools.conf index f3e327a..4a69998 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -51,7 +51,7 @@ ABSLIBREGIT=http://projects.parabolagnulinux.org/abslibre.git ## Commit Command ## Should be git or hg ## Uncomment only one of those -#COMMITCMD=git +COMMITCMD=git #COMMITCMD=hg ## Uncomment one of those or make one of your choice -- cgit v1.2.2 From 027db84b180a16a17a9414a88e7a35a7669983fa Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 12 Nov 2012 17:10:23 -0500 Subject: libretools.conf: clean up CHROOT* settings: * CHROOTEXTRAPKG: add libretools, remove tokyocabinet (dep of libretools) * CHROOT=default new devtools does NOT like 'root' --- src/libretools.conf | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/libretools.conf b/src/libretools.conf index 4a69998..70d2eca 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -21,14 +21,11 @@ ARCHES=('i686' 'x86_64' 'mips64el' 'any') ## The directory where the chroots are stored CHROOTDIR=/home/chroot -# Extra packages to have installed on the chroot (besides base base-devel and sudo) -CHROOTEXTRAPKG=(distcc ccache tsocks tokyocabinet) - -## The working chroot -## A chroot is useful to build packages isolated from the current system and avoid -## unwanted (as in not in dependencies) automatic library linking -# CHROOT=$SUDO_USER -# CHROOT=root +## Extra packages to have installed on the chroot (besides base base-devel and sudo) +CHROOTEXTRAPKG=(distcc ccache tsocks libretools) +## The meaning of this changes based on the version of libretools+devtools +## do NOT set it to 'root' +CHROOT=default ## Parabola hostname (should be the same used on ssh_config PARABOLAHOST=parabola -- cgit v1.2.2 From 487602793c43a5858b734fde4bbb8d0fdb80e96b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 12 Nov 2012 17:18:14 -0500 Subject: libretools.conf: organize into sections --- src/libretools.conf | 49 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/libretools.conf b/src/libretools.conf index 70d2eca..631ca89 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -1,24 +1,33 @@ #!/bin/bash +################################################################################ +# misc # +################################################################################ + ## Blacklist URL +## Used by `pkgbuild-check-nonfree` BLACKLIST=http://repo.parabolagnulinux.org/docs/blacklist.txt -# Diff tool (vimdiff, gvimdiff, meld, etc) +## Diff tool (vimdiff, gvimdiff, meld, etc) +## Used by `aur`, `diff-unfree` DIFFTOOL=`which vimdiff gvimdiff meld colordiff 2>/dev/null|sed 's/\s.*//'` -# The dir where you work on -WORKDIR=/home/$USER/packages -# The repos you'll be packaging for -# +## The repos you'll be packaging for +## Used by `toru`, `createworkdir`, `prfullpkg` # Tip: As early repos take precedence on $REPOS loops, you can use this as # inverted order of precedence. Put testing repos first so fullpkg find new # PKGBUILDs first, for instance. Toru-path uses reverse order to enforce repo # precedence on the path cache (the last path added replaces the rest) REPOS=('core' 'libre' 'extra' 'community' 'libre-testing' 'social' 'sugar' 'pcr' 'java') -# The architectures +## The architectures +## Used by `librestage` ARCHES=('i686' 'x86_64' 'mips64el' 'any') +################################################################################ +# chroot # +################################################################################ + ## The directory where the chroots are stored CHROOTDIR=/home/chroot ## Extra packages to have installed on the chroot (besides base base-devel and sudo) @@ -27,7 +36,19 @@ CHROOTEXTRAPKG=(distcc ccache tsocks libretools) ## do NOT set it to 'root' CHROOT=default -## Parabola hostname (should be the same used on ssh_config +################################################################################ +# abslibre # +################################################################################ + +# The dir where you work on +WORKDIR=/home/$USER/packages + +## Package signing +# Leave commented to disable signing +#SIGEXT=".sig" +#SIGID="0xYOURID" + +## Parabola hostname PARABOLAHOST=parabola ## Assumes something similar in your .ssh/config: @@ -51,6 +72,10 @@ ABSLIBREGIT=http://projects.parabolagnulinux.org/abslibre.git COMMITCMD=git #COMMITCMD=hg +################################################################################ +# fullpkg # +################################################################################ + ## Uncomment one of those or make one of your choice # Normal fullpkg FULLBUILDCMD="sudo libremakepkg -cuN" @@ -71,15 +96,13 @@ HOOKPRERELEASE="ssh -fN parabola" # succesfully # HOOKLOCALRELEASE="" -## Toru +################################################################################ +# toru # +################################################################################ + # Section for toru's vars TORUPATH=/var/lib/libretools/toru -## Package signing -# Leave commented to disable signing -#SIGEXT=".sig" -#SIGID="0xYOURID" - ################################################################################ # This probably shouldn't be in a .conf file... # ################################################################################ -- cgit v1.2.2