A cluster of changes related to creating symlinks in the
/etc/{renames,repos}.d directories that point to the corresponding
README in sbopkg's docdir and then generally updating most
build-related files and getting it all documented.
* 50-default: renamed to 50-default.renames
* NEWS: note symlink docs and rename issues
* README-renames: update to reflect new default filename and the fact
that the files must end in '.renames'.
* sbopkg.conf.5, sbopkg.8: update to reflect the new renames stuff
(and the earlier repo file/dir-related changes I forgot to document
there).
* sbopkg: get_new_name(), get_old_name(): have grep only look through
*.renames files and not, say, symlinks to READMEs.
* doinst.sh: bring into alignment with the current SBo template.
* tools/sbopkg.SlackBuild: make links from README-repos and
README-renames to READMEs in the corresponding /etc/sbopkg/*.d
directories.
* tools/slack-desc: bring into alignment with the current SBo
template.
* tools/sspm: update address, add printe() and use it.
If we keep the Id keyword in sbopkg's config file, users having their
'sbopkg.conf' Id'ed as 'sbopkg.conf.new' can cause confusion, as seen on
LQ. So call it 'sbopkg.conf' in revision control and append '.new' when
creating the package.
This is a cluster of changes that fell out from adding the new repo
file earlier.
* select_repository(): changed the function to create a larger box
with a different title and text and reordered menu items, both
vertically (via the previously changed repos.d files) and
horizontally (via reordering the item text). Also fixed a bug
discovered while testing, which involves changing the repo even when
directory creation is aborted. Now we store OLD_* vars and restore
them and re-run set_repo_vars() on abort.
* utilities_menu(): equivalent reordering.
* dir_init(): changed to produce hopefully better output rather than
wrongly implying that a directory that does exist doesn't. Also some
ad hackery for git. I'm tempted to throw the whole function out -
some programs might ask about mucking with a users $HOME but most
don't ask to create necessary system files.
* main: modified how we acquire REPO_NAME and REPO_BRANCH when
CUSTOMVER is set.
* NEWS: caught up with this and other recent changes.
Adding ponce's branch/fork thing of SBo for -current - it's supported as
far as including this to make it easier for people to use but no
further. Also got rid of most of the comments in the other files - there
are no user-serviceable parts inside and the filenames and descriptions
describe the files well enough, so this just keeps the key line. We'll
be linking the README in the repos.d directory so we can just say 'read
the README', especially as I recently changed the filename of the
README.
Set this to anything and avoid the stupid sucking side effects of
redirecting stderr.
Also abbreviated a comment right above what I added - it's not first run
but every run and the end of functions pretty much implies the start of
main.
/etc/sbopkg/repos.d/50-sb64.repo -> /etc/sbopkg/repos.d/70-sb64.repo
/etc/sbopkg/repos.d/60-local.repo -> /etc/sbopkg/repos.d/50-local.repo
This places the unsupported repo after the local repo and makes ?0 room
for Ponce's (also unsupported) repo.
Some more of this snuck back in or never got split in the first place -
this is just whitespace/escaped newline stuff except I did create a
local VER variable in get_source_names() to shorten a line with several
references to VERSION.
- KNOWN_ISSUES: rephrase the dialog navigation section in a way that
should be more suitable for the forthcoming (when it's ready)
Slackware release which will have an updated dialog. Rephrase the
certcheck section to discuss the prompt behavior and to point out
how the 'openssl-certs' package can help with, but not eliminate,
the issue.
- NEWS: add an item summarizing these document revisions and add the
branch ChangeLog sections.
When we started what became 0.30.0, we created an 0.27.0 stable
branch and the changes in that branch were only included in that
branch's ChangeLog.txt. Ditto the 0.33.1 security branch. But all
releases should be documented in the NEWS file, so now they are.
- README: add a block that describes all the other doc/ files, add a
note about GPG checking, change the name of the HELP section to
GETTING HELP.
Some of the doc files are mentioned in the CONTRIBUTING section but
a comprehensive list with descriptions in the GETTING HELP section
is more, um, helpful.
- README-*: tweak the wording, mostly to reflect the last commit's
name change, and reorder some text to put the emphasis on the files
rather than the directory. Also make a couple of other tweaks.
- THANKS: add a note about making corrections and slightly reorder the
text around that change for better flow and emphasis.
The .d is treated as an extension which triggers unwanted syntax
highlighting in vim - there are multiple ways around this but the .d
extension isn't necessary (queuefiles are also kept in a directory but
it isn't 'README-queuefiles.d' and the READMEs discuss files and formats
as much as directories) and removing it is the simplest, most effective,
most general change.
If foo and foobar were in a list and foobar was deselected, it would get
switched back on because foo would equally address foobar. So
s/$LINE/^$LINE /
This modifies list_packages() to call view_readmes() if VIEW_READMES is
set (and that variable was changed from PREVIEW_READMES). And it
documents it in the manual, help output, and NEWS.
- remove_files(): this had an 'Invert all' button which didn't
entirely work, as it simply toggled all on/off rather than
reflecting selection state (it was more 'Select/Deselect All'). By
changing the order of the buttons and using selection_state(), it
now can now 'Invert Sel'ections. The button order had to be juggled
because dialog only outputs a list on 0/3. So now it asks to delete
and defaults to Cancel with '--defaultno' rather than asking to keep
and defaulting to OK. Also cleaned up the dialog invocation in
general and cleaned up the sed/redirect creation of
$FILES_CHECKLIST. Also changed the 'ERROR' title for not finding
anything to 'NOTICE' since it's not an error to, e.g., not have any
obsolete sources.
- reverse_choices(): deleted since it was no longer used.
- remove_obsolete_sources(), browse_categories(): similar sed cleanups
as above.
- selection_state(): clarified comments, remembered to add LINE as a
local var, and anchored a regex whose $ got lost.
This creates selection_state() (so that the user's selections can be
preserved when the menu is regenerated in the loop) and breaks out
mk_pkg_lists() (so that, when packages are removed, they are also
removed from the menu). Before, this simply broke out of the loop but
that forced the user to re-enter the menu if they wanted to do anything
else with it.
Wrap list_packages()'s main dialog widget in a while loop so the user
can return to deletion selection after reading readmes. Also correct the
text in the widget (s/uninstall/remove./).
PKG_LIST is now no longer used directly but makes for easier
manipulation into both PKG_CHECKLIST for the dialog menu and README_LIST
(created via nvabt2n()) as input for view_readmes(). Added the extra
button that calls view_readmes() with README_LIST.
While I was here, changed the package removal confirmation dialog to use
'--separate-output' and dumped the tr that was removing the quotes
dialog otherwise puts in.
view_readmes() now takes two arguments for header text and input,
doesn't bother displaying 'DISABLED' packages if not displaying from a
queue, and has a fuzzier dialog title.
Document the fact that (since 0.25.0) settings in the system
configuration file can be overridden with a private configuration file.
Thanks to Bill Kirkpatrick on sbopkg-users for raising this issue.
Also catch up on the NEWS file while adding this item.
When an http url 301ed to an https and the certificate check failed,
sbopkg's certcheck code was not being triggered, causing the download to
fail. Thanks to vbatts for raising this issue.
Changed a line which made it almost sound like sbopkg might randomly
replace the config file, making it clear it's under user control.
Modified (mostly removed) the paragraph (similar to one in the README
that was also recently modified/removed) about sbopkg not really
supporting build chains. It isn't *guaranteed*, but doesn't need to
sound like some random fluke.
Major reformatting and some textual modifications of
src/usr/doc/sbopkg-*/* including breaking out the credits from the
script into a detailed THANKS file, renaming and reformatting
ChangeLog.txt into NEWS, renaming the sample queuefiles from *.sqf to
*.sqf.sample, and making lesser modifications to all the other docs.
Move the assignment to SBOPKGTMP (via mktemp and its TMPDIR) to after
sourcing the config file. Thanks to Ken Roberts for reporting the issue
and providing a preliminary fix.
Also modify config_check() to check for obsolete variables as it does
for required variables. Also modify cleanup() to only try to remove
SBOPKGTMP if it exists.
Remove documentation for removed config file option SBOPKGTMP and
document its replacement, TMPDIR. Add TMPDIR (and comments) to the
config file.
Thanks to dive for raising this issue.
r845 addresses part of a problem with sbopkg code and bash 3x array
handling but not all of it. When creating an array with the += operator,
if the array creation code was triggered, the item doing so should have
been assigned to index 0 and, instead, an empty string was being
assigned to 0 and the item was being assigned to index 1, resulting in a
blank line being output before the proper item. Thanks to greinze for
pointing this out. Explicitly declaring the variable an array seems to
solve this.
Applied patch by Mauro which modified get_source_names() to only attempt
to ls SRCNAME if SRCNAME is not empty so that it doesn't list the entire
cache directory and break get_obsolete_sources(). This was triggered by
django, whose DOWNLOAD was given as
"http://www.djangoproject.com/download/1.2.3/tarball/"
Signed-off-by: slakmagik <slakmagik@gmail.com>
r819 mostly replaced directory_checks() and ck_dir() with dir_init() but
forgot about the MKDIR_PROMPT variable used in ck_dir(). So again wrapped
the prompting in a conditional based on that setting and moved the
action outside the conditional.
Also added a rename to the bugfix branch which had been added to trunk after
the branch point - now the two files are in sync (just in case we do another
0.33.x release).
This revision corrects a security issue introduced in r762 and a trap
lost in r819. The basic idea is to revert the unsafe operator from r762
and then replace sbopkg's static SBOPKGTMP directory with a more secure,
volatile one created by mktemp and to use it and a new batch of traps to
simplify creation and cleanup of tmp dirs and files.
Tmp/trap/cleanup changes:
* /etc/sbopkg/sbopkg.conf.new: removed old SBOPKGTMP variable.
* config_check(): ditto. Also removed everything about unexpected files
since the new SBOPKGTMP should take care of that.
* dir_init(): removed SBOPKGTMP variable and its use. Dumped the
ALLOW_MULTI/mcookie part, since the new SBOPKGTMP should take care of
that.
* script-wide: removed all calls to cleanup(), except for the new call
from the traps.
* check_for_updates(): reverted the redirection operator
* build_package(): now uses the volatile SBOPKGTMP directly if/when we
CLEANUP, rather than a volatile subdir in a static SBOPKGTMP.
* cleanup(): changed all the specific deletions of the contents of the
old SBOPKGTMP to a general deletion of the entire new SBOPKGTMP.
Dumped the ALLOW_MULTI stuff since it can't be triggered now (rm -r of
a mktemp vs. a rmdir of an mcookie).
* control_c(): made a comment more specific; made the function a lot
quieter; removed the cleanup/exit parts now trapped.
* main: added traps; assigned to SBOPKGTMP internally with a mktemp
invocation that respects TMPDIR and moved up all SBOPKGTMP variables
that had to wait on sourcing the config file since they no longer have
to wait for that.
Unrelated changes that I tripped over along the way:
* pid_check(): combine PIDFILE declaration and assignment and shorten
comment.
* info_item(): changed use of filenames to use of variables.
* sync_repo(): made an error condition exit 1 rather than 0.
* get_source(): changed PIDLIST to SBOPKG_PIDLIST like it is elsewhere.
* pick_file(): establish a RETURN trap to clean out files which are now
referred to by variables rather than semi-random deletions of files
referred to by filenames.
* process_queue(): now moves the built package from the tmpdir before
installing rather than after so people's PACKAGE LOCATION lines aren't
screwed up in their package db.
* main: combined a command and exit status check into the one 'if'. Also
changed some more filenames to vars and removed two that didn't need
to be declared there. (They can be local to their functions since r831
or so.)