(another) Tool to manage packages in slackbuilds local repository
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
(another) Tool to manage packages in slackbuilds local repository
Hello,
Initially, my aim was to have a tool to search my local copy of slackbuilds obtained from http://slackbuilds.org/ via git, but then I added more options so that now its become like a package manager for slackbuilds, which searches, displays info, gets, builds, and installs/removes the packages
It supports following functions/options:
1) search the repository (-s)
2) info about specified package (-i)
3) readme about specified package (-r)
4) goto the package directory (-g)
5) view slackbuild (-v)
6) list files contained in specified package directory (-l)
7) description about specified package (-d)
8) get/download the package (-G)
9) build the package (-B)
10) install the built package (-I)
11) upgrade installed package with built package (-U)
12) remove installed package (-R)
13) query installed packages (-q)
14) view all packages installed from the slackbuilds repo (-a)
15) update git repo of slackbuilds (-u)
Installation:
Download the tarball, extract it, and then (as root)
Hello, for anyone who is interested, name changed from slack to asbt, and it currently stands at version 0.8.1, with the following changes-
Code:
0.4.0 (26/01/2014)
Add 2 new options: find and process + re-organisation of code + bugfixes.
0.4.1 (31/01/2014)
Refine find option to include only SBo packages + simplify search result.
0.5.0 (31/01/2014)
Add giving path of slackbuild package instead of simply its name + bugfixes.
0.5.1 (01/02/2014)
Made using package path more robust.
0.5.2 (01/02/2014)
Bugfixes and refinements.
0.6.0 (01/02/2014)
Add option (-c) to check for upgrades to installed packages.
0.6.1 (01/02/2014)
Made output more verbose + refinements and bugfixes.
0.6.2 (01/02/2014)
Fix regressions and bugs.
0.7.0 (03/02/2014)
Add checking if source is already present.
0.7.1 (04/02/2014)
Refinements + bugfixes + make output more verbose.
0.7.2 (07/02/2014)
Bugfix for case when slackbuilds repo dir is a symlink +
getting source option enhanced.
0.7.3 (07/02/2014)
More bugfixes on building and getting packages + make output more verbose.
0.7.4 (08/02/2014)
Name changed from slack to asbt.
0.8.0 (08/02/14)
Check for built package before building + cleanup + bugfixes.
+ Use vim/nano as editor instead of just viewing the slackbuild using less.
+ Change wget options for getting source.
0.8.1 (10/02/14)
Refinements on getting package name if package directory was specified.
+ Update the documentation.
~ $ asbt -s screenfetch
desktop/screenfetch
~ $ asbt -r screenfetch
Screenfetch is a Bash Screenshot Information Tool. This handy
Bash script can be used to generate one of those nifty terminal
theme information + ASCII distribution logos you see in everyone's
screenshots nowadays. It will auto-detect your distribution and
display an ASCII version of that distribution's logo and some
valuable information to the right.
scrot is an optional dependency. Without it you won't be able to
use -t option (take screenshot).
~ $ asbt -P screenfetch
Processing screenfetch...
asbt: /home/aaditya/slackbuilds/desktop/screenfetch/screenfetch.info sourced.
Source: screenfetch-3.2.2.tar.bz2 present.
Package: screenfetch-3.2.2 already built.
Upgrading screenfetch
Password:
+==============================================================================
| Skipping package screenfetch-3.2.2-noarch-1_SBo (already installed)
+==============================================================================
~ $ asbt -u
Updating git repo /home/aaditya/git/slackbuilds/.git
From git://slackbuilds.org/slackbuilds
* branch master -> FETCH_HEAD
Already up-to-date.
~ $ asbt -c
brasero: 2.32.1 -> 3.11.3
virtualbox-kernel: 4.3.4_3.10.17 -> 4.3.4
virtualbox-kernel: 4.3.4_3.10.28_custom -> 4.3.4
virtualbox-kernel: 4.3.4_3.13.2custom -> 4.3.4
volumeicon: 0.5.0 -> 0.4.6
webkitgtk: 1.10.2 -> 2.2.2
~ $ asbt -h
Usage: asbt <option> [package]
Options-
[search,-s] [query,-q] [find,-f]
[info,-i] [readme,-r] [desc,-d]
[view,-v] [goto,-g] [list,-l]
[get,-G] [build,-B] [install,-I]
[upgrade,-U] [remove,-R] [process,-P]
[--update,-u] [--check,-c] [--all,-a]
[--help,-h] [--version,-V]
Using repository: /home/aaditya/slackbuilds
For more info, see the man page and/or the README.
Update 25/02/2014:
Now its at version 0.8.4 with some new options as well as bugfixes-
Code:
0.8.2 (16/02/14)
Small refinements + change the config file a little.
0.8.3 (17/02/14)
Add options (-C) for viewing ChangeLog.txt from the local slackbuilds repo
(SBo) and (-t) for tracking source and built package for specified package.
+ refinement of getting package option to rename src with only version to
name-version format + Bugfixes.
0.8.4 (22/02/14)
Bugfixes (mainly on getting a package and on track option).
Last edited by aaditya; 02-24-2014 at 10:54 AM.
Reason: Update 25/02/2014
Hi guys, some new features have been added and some bugs fixed.
The changelog since the last post is,
Quote:
0.8.5 (28/02/14)
Bugfixes and refinements; add option to re-download a package.
+ Add options -L for longlisting files in the specified package folder.
0.8.6 (03/03/14)
Bugfixes and refinements.
0.9.0 (08/05/14)
Add option -e (enlist) for enlisting all packages which have given package name
in their .info files. (Can be usefull to find which packages depend on given
package.)
This last feature originated when I wanted to find out whether package pygobject3 from SBo was being used by any other package or not, ie,
and on seeing the above, I knew that as none of these packages were installed, hence pygobject3 could be removed.
asbt-0.8.6 is available from SBo, and can be updated to 0.9.0 by downloading the 0.8.6 slackbuild and changing the version to 0.9.0 in the info file and slackbuild.
I think I can give it a shot in a VM. Good going there.
Regards.
Thanks for the encouragement.
Speaking of VMs, I think I should add a setup function that allows new users to configure the tool.
Using it on my main system without much problems; its designed in such a way that it should ask you before performing any operation that could potentially harm your system.
Its more like an informational tool that one can used to gather info about the SBo packages and maintain them; and depends on the core Slackware package management system for installing and removing packages.
Edit-
Setup function implemented.
Quote:
0.9.1 (09/05/14)
Add option (-D) for getting details about installed packages + Add option (-S)
to allow users to setup and configure the tool.
0.9.2 (14/05/14)
Add option -T for tidying the srcdir and pkgdir by removing all but the latest
three (by date) source or built packages +
Bugfix setup and associated functions and try to make them more robust +
Add facility of adding command-line options when building packages +
Stash git changes instead of failing to update +
Add option to take ownership of SlackBuild if chmod +x is not allowed.
I have submitted an update to Sbo for version 0.9.6. Some notable changes are that it now supports specifying multiple packages for some options, and improvement in getting and installing packages.
The changelog reads as follows:
Code:
0.9.3 (18/05/14)
Display version also in find option +
Update documentation and comments in code +
Small bugfixes.
0.9.4 (30/05/14)
Fix detection of extra arguments specified +
Use bash specific [[ ]] in place of [ ] to optimise the code where required +
Change order of functions in code +
Add test cases (not finished, will be continued).
0.9.5 (28/06/15)
Try to install correct package when more than one package has same part of
name +
Prevent hang on tidying built packages by force removing the old packages +
Add support for processing multiple packages for some options like get,
install, upgrade, remove, and process.
0.9.6 (29/06/15)
Dislay contents of README.Slackware along with README in the -r option +
Renaming of src files where pkgname is not in the link made more transparent.
After about a year of development, version 1.0 got released (learned lots along the way).
I learned about various shell intricacies (like how ~ is converted to the home directory while "~" is treated simply as ~), and not using sudo all the time (or using sudo -i when building packages)
I use it 95% of my time when dealing with SBo, and it serves me as an informational tool and for building and managing my packages.
It uses git to clone a copy git://slackbuilds.org/slackbuilds, which is used as primary source of information and Slackbuilds, and by updating the git copy and rebuilding the packages one can keep upto date
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.