From ts at websafe.pl Sun Dec 14 20:58:47 2014 From: ts at websafe.pl (Thomas Szteliga) Date: Sun, 14 Dec 2014 21:58:47 +0100 Subject: [sbopkg-users] Problem with understanding how the `-V` option works Message-ID: <548DFA07.9040104@websafe.pl> Hello, I have a problem with understanding how the `-V` option works. Short example, I run this command: ~~~~ sbopkg -B -e stop -V local -k \ -i dovecot \ -i dovecot-pigeonhole \ -i perl-Socket6 \ -i perl-IO-Socket-INET6 \ -i Net-SSLeay \ -i perl-Net-LibIDN \ -i perl-IO-Socket-SSL \ -i perl-digest-sha1 \ -i perl-digest-hmac \ -i perl-Authen-SASL \ -i perl-net-ip \ -i perl-net-dns \ -i perl-TermReadKey \ -i sieve-connect \ -i libsieve \ -i postfix \ -i perl-BerkeleyDB \ -i perl-IO-Multiplex \ -i perl-Net-Server \ -i postgrey \ -i clamav \ -i clamav-unofficial-sigs \ -i perl-Crypt-OpenSSL-Bignum \ -i perl-Encode-Detect \ -i perl-IP-Country \ -i perl-Image-Info \ -i perl-Net-Ident \ -i perl-Crypt-OpenSSL-Random \ -i perl-Crypt-OpenSSL-RSA \ -i perl-TimeDate \ -i perl-MailTools \ -i perl-Mail-DKIM \ -i perl-Net-DNS-Resolver-Programmable \ -i perl-NetAddr-IP \ -i perl-Mail-SPF \ -i re2c \ -i pysetuptools \ -i perl-www-robotrules \ -i perl-http-date \ -i perl-file-listing \ -i perl-IO-HTML \ -i perl-encode-locale \ -i perl-lwp-mediatypes \ -i perl-html-tagset \ -i perl-html-parser \ -i perl-http-message \ -i perl-http-negotiate \ -i perl-http-cookies \ -i perl-http-daemon \ -i perl-net-http \ -i perl-Geo-IP \ -i perl-IO-Socket-IP \ -i libwww-perl \ -i spamassassin \ -i sipcalc ~~~~ All packages listed above are located in `/var/lib/sbopkg/local/local`, but only a few of them were modified by me. They were copied from `/var/lib/sbopkg/SBo/14.1`. Is it possible to have in `local/local` only modified packages, and somehow tell sbopkg to use a slackbuild from `/var/lib/sbopkg/SBo/14.1` if the required one is not available in `local/local`? Because now I have to copy all slackbuilds required by my command from `/var/lib/sbopkg/SBo/14.1` to `/var/lib/sbopkg/local/local`. ~~~ -V repo/branch Set the repository/branch. The repo is optional and, if not given, sbopkg will try to make the best match, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ starting with the default repo. For a list of valid ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ repos, issue '-V ?' ~~~ In other words, can I tell sboppg to prioritize packages in `local`, and if the package is not found there THEN fall back to `SBo/14.1`? -- Thomas Szteliga -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3692 bytes Desc: S/MIME Cryptographic Signature URL: From ts at websafe.pl Mon Dec 15 22:35:34 2014 From: ts at websafe.pl (Thomas Szteliga) Date: Mon, 15 Dec 2014 23:35:34 +0100 Subject: [sbopkg-users] Preventing prompt when using options in batch (-B) mode. Message-ID: <548F6236.4040106@websafe.pl> Hello, is it possible to prevent this prompt: > One or more build option files for the qemu > SlackBuild script were found: > > Command line options: TARGETS="all" VNC_ENABLE="yes" > > Use (N)one, (C)ommand line options, or (A)bort?: when running sbopkg in batch mode (-B)? My command is: sbopkg -B -e stop -V local -k \ -i ... ... (~60 packages without options here) -i qemu:TARGETS=all:VNC_ENABLE=yes I tried with a queue file, but the only difference is I have to enter Q instead of C. Any chance to automate this? I guess doing: TARGETS=all VNC_ENABLE=yes sbopkg -B -e stop -V local \ -k \ -i ... ... (~60 packages without options here) -i qemu:TARGETS=all:VNC_ENABLE=yes would help, but this could affect other packages... -- Thomas Szteliga -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3692 bytes Desc: S/MIME Cryptographic Signature URL: From jbernts at broadpark.no Mon Dec 15 22:43:45 2014 From: jbernts at broadpark.no (Jostein Berntsen) Date: Mon, 15 Dec 2014 23:43:45 +0100 Subject: [sbopkg-users] Preventing prompt when using options in batch (-B) mode. In-Reply-To: <548F6236.4040106@websafe.pl> References: <548F6236.4040106@websafe.pl> Message-ID: <20141215224345.GA5314@jostein> On 15.12.14,23:35, Thomas Szteliga wrote: > Hello, > > is it possible to prevent this prompt: > > > One or more build option files for the qemu > > SlackBuild script were found: > > > > Command line options: TARGETS="all" VNC_ENABLE="yes" > > > > Use (N)one, (C)ommand line options, or (A)bort?: > > when running sbopkg in batch mode (-B)? > > > My command is: > > > sbopkg -B -e stop -V local -k \ > -i ... > ... (~60 packages without options here) > -i qemu:TARGETS=all:VNC_ENABLE=yes > > > I tried with a queue file, but the only difference is > I have to enter Q instead of C. Any chance to automate > this? > > I guess doing: > > TARGETS=all VNC_ENABLE=yes sbopkg -B -e stop -V local \ > -k \ > -i ... > ... (~60 packages without options here) > -i qemu:TARGETS=all:VNC_ENABLE=yes > > > would help, but this could affect other packages... > Does it help adding the "-q" option? Jostein From ts at websafe.pl Mon Dec 15 23:30:31 2014 From: ts at websafe.pl (Thomas Szteliga) Date: Tue, 16 Dec 2014 00:30:31 +0100 Subject: [sbopkg-users] Preventing prompt when using options in batch (-B) mode. In-Reply-To: <20141215224345.GA5314@jostein> References: <548F6236.4040106@websafe.pl> <20141215224345.GA5314@jostein> Message-ID: <548F6F17.9050507@websafe.pl> On 12/15/2014 11:43 PM, Jostein Berntsen wrote: > Does it help adding the "-q" option? Unfortunately not. -- Thomas Szteliga From ncoleman at internode.on.net Tue Dec 16 02:45:58 2014 From: ncoleman at internode.on.net (Nick Coleman) Date: Tue, 16 Dec 2014 10:45:58 +0800 Subject: [sbopkg-users] Show requirements in -g option In-Reply-To: References: Message-ID: <20141216104558.7127cf35@laptop.nick> On Mon, 15 Dec 2014 22:35:49 +0000 sbopkg-users-request at sbopkg.org wrote: > Date: Sun, 20 Apr 2014 15:32:30 -0300 > From: Alexandre Souza > Subject: [sbopkg-users] Show requirements in -g option > hi everyone... > I'm think that can be useful when we use "sbopkg -g " > show the requirements file.(e.g pip needs pysetuptools) What do you > thinks? Co-incidentally, I had been writing something for my own use. This shell function will do what you want. I intended to release it to this list soon, but was working to tidy it up to ignore already-installed packages. Currently it produces a list including packages already installed. The list is in order of requirements; in other words it can simply be cut and pasted after "sbopkg -i ". Usage: sbodeps pip Output:: "pysetuptools pip" Put this function in .bashrc or similar. If you change the name of the function, you also need to change the name of function call 'get_dep "$dep"'. For software engineers: WITNESS THE POWER OF THIS FULLY FUNCTIONAL AND OPERATIONAL battle station... oops, recursive function. ;-0 # Written by Nick Coleman 22/10/14 # Licence: "X11" # # Find all requirements, recursively all # deps on deps, for a SBo package. # Find path of package. # Find all requirements for that package. # If "" return. # Store values. # Recurse. function get_dep () { if [ ! $1 ] ; then return ; fi dir=$(find /var/lib/sbopkg/SBo/14.1 -type d -iname $1) if [ -s "$dir" ] ; then deps=($(sed -n 's/^REQUIRES="\(.*\)"$/\1/p' "$dir/${1}.info")) for dep in ${deps[@]} ; do echo "$dep " get_dep "$dep" done else echo "Can't find $1" return 1 fi } # Copyright (c) Nick Coleman 2014 # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall # not be used in advertising or otherwise to promote the sale, use or # other dealings in this Software without prior written authorization # from the X Consortium. From ncoleman at internode.on.net Tue Dec 16 03:37:49 2014 From: ncoleman at internode.on.net (Nick Coleman) Date: Tue, 16 Dec 2014 11:37:49 +0800 Subject: [sbopkg-users] Show requirements in -g option In-Reply-To: <20141216104558.7127cf35@laptop.nick> References: <20141216104558.7127cf35@laptop.nick> Message-ID: <20141216113749.48ee23d7@laptop.nick> On Tue, 16 Dec 2014 10:45:58 +0800 Nick Coleman wrote: As is the nature of things, I pasted completely the wrong function. Also, this requires the tac utility, which is part of the Slackware package "coreutils". You probably aready have it installed. Here is the correct function: function sbodeps () { # Find all requirements, recursively all deps on deps, for a SBo package # Written by Nick Coleman 22/10/14 # Licence: "X11" # # Usage: sbodeps [ char ] # Output is in correct order to install, left to right, to paste after 'sbopkg [-k] -i '. # Note: Duplicate deps aren't detected in this version. # [char] is an optional flag of any character(s) which outputs raw results. # # The recursive functions aren't tail-call optimised, but it doesn't # matter as most lists are only a few elements long. # Colour me surprised, Bash sub-functions are local. function get_deps () { if [ ! $1 ] ; then return ; fi echo "$1 " dir=$(find /var/lib/sbopkg/SBo/14.1 -type d -iname $1) if [ -s "$dir" ] ; then deps=($(sed -n 's/^REQUIRES="\(.*\)"$/\1/p'"$dir/${1}.info")) for dep in ${deps[@]} ; do get_deps "$dep" done else echo "can't find " return 1 fi } # simple function to remove dups. # Recursively iterate through all words and don't echo dups. # TODO not working yet function remove_dups () { if [ ${#2[@]} ] ; then return ; fi # end of list if [ $1 != ${2[0]} ] ; then echo $1 ; fi # no dup remove_dups ${2[@]:1:1} ${2[@]:2} } # tac reverses lines, tr removes new lines,sed puts quotes around the lot. { [ $2 ] && get_deps "$1" || tac <(get_deps "$1") ; } | tr -d '\n' | sed 's/^\(.*\) $/"\1"/g' ; echo } # # Copyright (c) Nick Coleman 2014 # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without limitation the rights to use, copy, # modify, merge, publish, distribute, sublicense, and/or sell copies # of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR # ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium # shall not be used in advertising or otherwise to promote the sale, # use or other dealings in this Software without prior written # authorization from the X Consortium.