LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   /usr/sbin/sqg configuration to use sqg to manage queue files (https://www.linuxquestions.org/questions/slackware-14/usr-sbin-sqg-configuration-to-use-sqg-to-manage-queue-files-4175708483/)

amikoyan 02-23-2022 02:26 PM

/usr/sbin/sqg configuration to use sqg to manage queue files
 
Here is a snippet of my /usr/sbin/sqg configuration:
Code:

#!/bin/sh

# $Id$

# sqg - sbopkg queuefile generator
# A script designed to generate queuefiles for sbopkg with recursively-listed
# dependencies from the REQUIRES line of the .info files.

# Copyright 2013 Chess Griffin <chess@chessgriffin.com> and
# slakmagik <slakmagik@gmail.com>
# Copyright 2016-2021 Willy Sudiarto Raharjo <willysr@sbopkg.org>

# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
#  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
#  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
#  NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
#  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
#  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
#  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
#  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
#  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

### OPTIONAL CONFIGURATION BELOW ###

LOCAL_SBOPKG_CONF=${LOCAL_SBOPKG_CONF:-/root/.sbopkg.conf}
SBOPKG_CONF=${SBOPKG_CONF:-/etc/sbopkg/sbopkg.conf}

### NO CHANGES SHOULD BE NECESSARY BELOW THIS LINE ###

I want to use sqg to manage queuefiles e.g. issuing the command sqg -p "pkg1 pkg2" to generate queue file for pkg1 and pkg2.

Do I need to add
Code:

REPO_ROOT=${REPO_ROOT:-/var/lib/sbopkg}
REPO_NAME=${REPO_NAME:-master}
REPO_BRANCH=${REPO_BRANCH:-SBo}
SKIP_EMPTY=${SKIP_EMPTY:-NO}

in the optional configuration section?

teckk 02-23-2022 03:46 PM

You are probably going to have to read the docs.
https://docs.slackware.com/howtos:sl...es_with_sbopkg
https://github.com/chessgriffin/sqg/blob/master/sqg
https://raw.githubusercontent.com/sb...ools/sqg8.html

ethelack 02-23-2022 07:36 PM

Yes looks good just make sure sqg's REPO_NAME and REPO_BRANCH are the same as those you have defined in /etc/sbopkg/sbopkg.conf. Good idea using skip_empty:-no as that adds a package to the queue even if it has no dependencies.

amikoyan 02-24-2022 01:55 AM

Quote:

Originally Posted by teckk (Post 6332649)
You are probably going to have to read the docs.
https://github.com/chessgriffin/sqg/blob/master/sqg

This links to this file:https://github.com/chessgriffin/sqg/blob/master/sqg

However, the file on my system is this one: https://github.com/sbopkg/sbopkg/blo...c/usr/sbin/sqgfrom willysr, which is significantly different.

Is it okay to add

Quote:

REPO_ROOT=${REPO_ROOT:-/var/lib/sbopkg}
REPO_NAME=${REPO_NAME:-master}
REPO_BRANCH=${REPO_BRANCH:-SBo}
SKIP_EMPTY=${SKIP_EMPTY:-NO}
to the (newer) 'willysr' /usr/sbin/sqg currently on my system?

Or do I need to completely replace my /usr/sbin/sqg with the one from Chess Griffin?

ponce 02-24-2022 02:07 AM

it's ok to use the unmodified last one, the one from this package (that I seem to understand you are already using): it should already source the sbopkg configuration files (the sanity_checks() function in /usr/libexec/sbopkg/sqg/functions), as you pasted in your first post
Code:

LOCAL_SBOPKG_CONF=${LOCAL_SBOPKG_CONF:-/root/.sbopkg.conf}
SBOPKG_CONF=${SBOPKG_CONF:-/etc/sbopkg/sbopkg.conf}

and use the variables defined there, so if you already have configured the correct repository in those files you shouldn't need to add any additional configuration in /usr/sbin/sqg.

amikoyan 02-24-2022 11:33 AM

Quote:

Originally Posted by ponce (Post 6332759)
it's ok to use the unmodified last one, the one from this package (that I seem to understand you are already using): it should already source the sbopkg configuration files (the sanity_checks() function in /usr/libexec/sbopkg/sqg/functions), as you pasted in your first post
Code:

LOCAL_SBOPKG_CONF=${LOCAL_SBOPKG_CONF:-/root/.sbopkg.conf}
SBOPKG_CONF=${SBOPKG_CONF:-/etc/sbopkg/sbopkg.conf}

and use the variables defined there, so if you already have configured the correct repository in those files you shouldn't need to add any additional configuration in /usr/sbin/sqg.

Thank you Matteo, that is the information I required.
sqg works as desired.


All times are GMT -5. The time now is 01:50 AM.