Commit graph

56 commits

Author SHA1 Message Date
shamilbi
a278359a9a fix: grep warning: stray \ before / 2022-09-08 21:23:46 +02:00
shamilbi
efd23c6ca3 fix: egrep and fgrep commands have been deprecated since 2007
https://news.slashdot.org/story/22/09/05/0135254/
The egrep and fgrep commands have been deprecated since 2007.
Beginning with GNU Grep 3.8 today, calling these commands will now issue
a warning to the user that instead they should use
grep -E and grep -F, respectively
2022-09-05 16:22:59 +02:00
piterpunk
f8dfb7722f File to flag if the system needs restart
Creates /var/run/needs_restarting file if any "critical" package got
upgraded. As the /var/run/ is ephemeral and renewed each boot, the
file disappears after reboot.

The packages that flags the restart need are:

- kernel-generic, kernel-huge: as a new kernel needs a restart to be
  running.
- glibc, glibc-solibs: Restart is the only way to be sure that all
  running binaries are using the new glibc.
- eudev, elogind, dbus: those provides some very basic system
  services.
- openssl, openssl-solibs: security bugs on those libs are dangerous,
  the reboot makes sure that all running binaries are using the newer
  version.
2022-01-16 02:52:09 -06:00
piterpunk
ea08809a75 Automatically rebuild package lists if missing
Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-11-28 01:35:37 -06:00
piterpunk
13c79b1eb2 New exit status for different situations
To make easier to do an unattended slackpkg update/upgrade process,
this commit provides different exit codes to many situations:

  0    Successful slackpkg execution.
  1    Something wrong happened.
  20   No package found to be downloaded, installed, reinstalled,
       upgraded, or removed.
  50   Slackpkg itself was upgraded and you need to re-run it.
  100  There are pending updates.

Code and the main manpage are updated accordingly.

In addition, this commit also:

  - removes the ChangeLog.txt in doinst.sh, so the needed
    'slackpkg update' after Slackpkg upgrade won't says it's all OK
    and don't need to redo the package lists
  - removes AUTHORS from manpage. Nowadays there are code from many
    people in Slackpkg and shows a bit unfair to have only my and
    Evaldo's name listed there.

Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-10-12 00:34:27 -05:00
JK Wood
f9f1004bc7 Allow "slackpkg help" to work after slackpkg is upgraded
Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-07-11 02:53:04 -05:00
Robby Workman
bd0e7982f8 Fix getting gpg key on ARM ; use only www.slackware.com 2021-07-05 22:46:39 -05:00
Robby Workman
58dabfd6a9 Remove support for Slackintosh project - it's dead, Jim 2021-06-09 11:53:22 -05:00
Robby Workman
3c4c175de8 Harden slackpkg with respect to obtaining GPG key
Co-authored-by: CRTS <crts@gmx.net>
Reviewed-by: Piter PUNK <piterpunk@slackware.com>
2021-06-04 22:23:27 -05:00
Dave Woodfall
3f318af8ed Fix 'continue' error message. 2021-04-21 15:42:51 +00:00
PiterPUNK
065f4fd00f core-functions.sh: Fix package duplicate bug 2021-04-20 17:18:15 -05:00
Dave Woodfall
af7d21a99e Remove now pointless if/then/else 2021-04-05 05:17:43 +00:00
Dave Woodfall
9cd55c9ae2 Don't create blacklist when running update. 2021-04-04 22:17:52 -05:00
Dave Woodfall
a1dd8f3f53 Add show-changelog & help to non-root commands 2021-03-31 14:42:04 +00:00
Dave Woodfall
3d99ab68d3 Improve search blacklisting. 2021-03-20 18:56:53 +00:00
Dave Woodfall
14566ba1b0 Modifiy blacklist regex line ending. 2021-03-14 10:16:29 -05:00
Dave Woodfall
0080f0810d Fix exit code for pending updates. 2021-03-12 19:48:41 -06:00
Dave Woodfall
844b3a5424 Avoid matching txz/tgz etc extension when blacklisting.
Make blacklist file a full package name regex.
Replace redundant 'print $0 } else { print $0' in cutpkg.awk.
Fix formatting on 'blacklist or ignore' message.
2021-03-06 08:01:53 +00:00
Dave Woodfall
85c9f01361 Add blacklist to search option.
This avoid matching against the last field in pkglist - txz, tgz
which prints multiple false positives with 'slackpkg search xz' etc.
2021-02-25 01:25:42 +00:00
Dave Woodfall
a96e181033 Move applyblacklist to end of makelist()
Change -E to -F in applyblacklist()
Remove '>' prompt in answer()
2021-02-24 23:14:18 +00:00
Robby Workman
fe99f902eb Clarify how to blacklist duplicate packages 2021-02-22 01:32:38 -06:00
Dave Woodfall
2cd5131e83 Fix new-config dialog 2021-02-20 23:51:59 -06:00
Dave Woodfall
612b6553ae Reduce false positives in DOUBLEFILES detection
Add extra formatting for search/doublefiles
2021-02-20 23:51:30 -06:00
Dave Woodfall
7faebfbdb1 Remove spaces in awk. 2021-02-20 23:49:50 -06:00
Dave Woodfall
07df0b6304 More blacklisting fixups (see full commit msg)
Merge server and local lists in subshell.  Filter once.

This takes the server and local package lists, sorts, applies blacklist,
sorts again to make a large list of package names in blacklist.

Use internal printf rather than external ls to build local list.

Also pass local package list to blacklist
2021-02-20 23:48:51 -06:00
Dave Woodfall
0a37c5eee7 Escape plus signs in blacklist regex
Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-02-16 22:27:25 -06:00
Dave Woodfall
f20d83a658 Convert ${ROOT}/${WORKDIR} > ${WORKDIR}
All ${WORKDIR} == old ${ROOT}/${WORKDIR}
Set ${CONF} depending on ${ROOT}

Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-02-16 22:20:06 -06:00
Dave Woodfall
4b07c4226c Convert ${ROOT}/${CONF} -> ${CONF} and tweak blacklists
Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-02-13 16:34:49 -06:00
Robby Workman
9c2719ff0f Further fixup/enhancement to blacklisting issues 2021-02-11 19:06:31 -06:00
Dave Woodfall
3ea13bebcb Fixup internal blacklist handling, i.e. see remainder of commit
This creates a blacklist of package names from regexp in original
file (/etc/slackpkg/blacklist) and uses the precreated list for
later comparison

Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-02-11 17:10:25 -06:00
Dave Woodfall
f87bf1bf68 Use ERE for sanity_check() function
Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-02-11 17:01:03 -06:00
piterpunk
5edf86dceb Allow new-config after slackpkg upgrade itself
Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-02-08 16:51:23 -06:00
Robby Workman
b0f1bdb485 Do not allow adding blacklist packages from slackpkg exec
As of slackpkg shipped with Slackware 15.0, it is no longer
supported to add packages to /etc/slackpkg/blacklist using
the slackpkg executable; this should only be done with an
editor pointing at /etc/slackpkg/blacklist
2021-02-04 19:52:21 -06:00
Peter Hyman
a9e490297b Add 'download' to options in usage() ; remove dupes from manpage
Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-02-04 19:52:18 -06:00
Stuart Winter
89d4761f19 Add support for Slackware-AArch64
Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-01-18 13:42:55 -06:00
Peter Hyman
23640d912d Add show-changelog option and update manpage
Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-01-04 23:08:49 -06:00
Peter Hyman
f62ecabf6c Changes to checkchangelog function
* Modify checkchangelog() function to only check CHECKSUMS.md5.asc.
* Remove unneeded check of ChangeLog.txt from checkchangelog() function.
* Move fetching of ChangeLog.txt to updatefilelists() function.
* Modify check-updates to output need to update to stderr so cron
  jobs will notify sysadmin.

Signed-off-by: Robby Workman <rworkman@slackware.com>
2021-01-04 23:04:25 -06:00
Robby Workman
266f09477b core-functions.sh: Replace tempfile with mktemp
Thanks to I.G.O.R. on LQ for the suggestion and reminder.
2020-07-30 00:41:19 -05:00
Robby Workman
dda9a37537 Revert "More fixups for alternate ROOT ; thanks to zerouno."
This reverts commit fcc58ff506
because it breaks lxc container creation; ponce stated on LQ
that "seems that forcing $CONF under $ROOT is what break things
here: $CONF in the template is used to have a temporary location,
outside of the container, in which to store the template, a
blacklist and a mirror configuration for the container creation"
2020-02-26 21:49:44 -06:00
Robby Workman
fcc58ff506 More fixups for alternate ROOT ; thanks to zerouno. 2020-02-19 20:37:55 -06:00
Robby Workman
7658ac7c89 Remove subshell usage and save a trivial amount of time 2019-01-16 00:21:54 -06:00
Robby Workman
c7216fb599 Catch errors and return exit status 1 if they occur
Thanks to mcandre on LQ for the suggestion.
2019-01-16 00:15:57 -06:00
Robby Workman
a9c7e7d4c7 Fixup blacklist checking and appending when using alt $ROOT
Thanks to dive for the report.
2019-01-14 23:17:13 -06:00
Dave Woodfall
7a62e902c7 Fix support for package sets (try #2)
This adds ./$PKGMAIN/ to a blacklisted set line, which
ought to say turn kde/ into ./slackware64/kde as it listed in the
temp pkglist.  I've tightened up the patches/pasture/extra etc. lines
too.

Signed-off-by: Robby Workman <rworkman@slackware.com>
2018-12-30 19:56:58 -06:00
Dave Woodfall
a14cc9c888 Fix support for blacklisting entire package sets
Blacklisted sets now need a trailing / (eg. kde/)

Anything with a trailing slash is excluded from having \s added to it.
Then the slash is removed so the set is picked up by the old
functionality.

Signed-off-by: Robby Workman <rworkman@slackware.com>
2018-12-30 04:18:24 -06:00
Dave Woodfall
532b90838e Fix (hopefully) blacklisting of specific packages
In short, it seems impossible to blacklist some packages without
catching other undesirable packages. As an example, blacklisting
glibc will also catch glibc-zoneinfo (and the other glibc-*)
packages. It would be good to have the ability to blacklist only
the glibc package without it catching the others.

With this change, if sysadmin wants the blacklist to be "greedy,"
then adding "glibc.*" to the blacklist will do that.

Reported-by: Peter Hyman <pete@peterhyman.com>
Signed-off-by: Robby Workman <rworkman@slackware.com>
2018-11-22 23:28:39 -06:00
Robby Workman
098a71bc1f Minor grammatical fixup
Thanks to Gerard Lally on LQ.
2018-11-20 23:25:04 -06:00
Robby Workman
ff0b9ff70a Mention possible stale mirror if CHECKSUMS.md5 gpg verify fails
Signed-off-by: Robby Workman <rworkman@slackware.com>
2018-09-05 22:50:09 -05:00
Robby Workman
10b2f7d493 Fix for /var/log/packages/ possibly being a symlink to elsewhere 2018-06-07 23:00:02 -05:00
Patrick J. Volkerding
e1fc7d9987 Use CHECKSUMS.md5.asc to determine ChangeLog newness
Thanks to drgibbon on LQ for the suggestion.

Signed-off-by: Robby Workman <rworkman@slackware.com>
2018-06-07 19:03:40 -05:00