LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   slackpkg vs. third-party package repository (https://www.linuxquestions.org/questions/slackware-14/slackpkg-vs-third-party-package-repository-4175427364/)

phenixia2003 04-29-2016 05:06 AM

1 Attachment(s)
Hello,

Quote:

Originally Posted by zerouno (Post 5537846)

Yes, I will include it (so you can patch it directly)

Attachment 21644


Cheers.

--
SeB

zerouno 05-02-2016 03:46 PM

uploaded.
Great work

gegechris99 05-05-2016 04:50 AM

Hello,

I've just upgraded to Slackware current. I cleaned up all third-party packages during the upgrade and I'm now slowly adding back some of them using stable slackpkg+ 1.6.1p2.

Everything is OK except for one package from alienBOB current repository: rhino-1_7R3-noarch-1alien.tgz

I get the error message when running "slackpkg install rhino":
Quote:

ERROR - Package not installed! md5sum error!
It's strange because I can install other packages from the repository (so it's not a GPG key issue). Also when I download manually the tgz, asc and md5 files, the checks are correct.

Could it be an issue with the stable version of slackpkg+?

zerouno 05-05-2016 05:02 AM

the tgz package is not failing.

If you see entire output you can see that fails the asc file.

Code:

2016-05-05 11:52:52 (45.6 MB/s) - '/var/cache/packages/./SLACKPKGPLUS_alienbob/rhino/rhino-1_7R3-noarch-1alien.tgz.asc' saved [198/198]

        ERROR - Package not installed! md5sum error!

is not a slackpkg+ problem; may be a problem in repository; contact Eric (that however should follow this thread)

Code:

$ wget http://bear.alienbase.nl/mirrors/people/alien/sbrepos/current/x86_64/CHECKSUMS.md5
--2016-05-05 11:59:47--  http://bear.alienbase.nl/mirrors/people/alien/sbrepos/current/x86_64/CHECKSUMS.md5
Resolving bear.alienbase.nl (bear.alienbase.nl)... 163.172.25.142
Connecting to bear.alienbase.nl (bear.alienbase.nl)|163.172.25.142|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 169841 (166K) [text/plain]
Saving to: 'CHECKSUMS.md5'

CHECKSUMS.md5                                100%[===============================================================================================>] 165.86K  89.2KB/s    in 1.9s   

2016-05-05 11:59:49 (89.2 KB/s) - 'CHECKSUMS.md5' saved [169841/169841]



$ wget http://bear.alienbase.nl/mirrors/people/alien/sbrepos/current/x86_64/rhino/rhino-1_7R3-noarch-1alien.tgz.asc
--2016-05-05 11:53:26--  http://bear.alienbase.nl/mirrors/people/alien/sbrepos/current/x86_64/rhino/rhino-1_7R3-noarch-1alien.tgz.asc
Resolving bear.alienbase.nl (bear.alienbase.nl)... 163.172.25.142
Connecting to bear.alienbase.nl (bear.alienbase.nl)|163.172.25.142|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 198 [text/plain]
Saving to: 'rhino-1_7R3-noarch-1alien.tgz.asc'

rhino-1_7R3-noarch-1alien.tgz.asc            100%[===============================================================================================>]    198  --.-KB/s    in 0s     

2016-05-05 11:53:26 (60.0 MB/s) - 'rhino-1_7R3-noarch-1alien.tgz.asc' saved [198/198]

root@rossini:~# md5sum rhino-1_7R3-noarch-1alien.tgz.asc
95daa4ecf38381032f401f5a576f3916  rhino-1_7R3-noarch-1alien.tgz.asc
$ grep rhino-1_7R3-noarch-1alien.tgz.asc CHECKSUMS.md5
d331cf2751e6e98cb0007b1a28ff20f3  ./rhino/rhino-1_7R3-noarch-1alien.tgz.asc


gegechris99 05-05-2016 05:52 AM

Thanks zerouno for the explanation.

I left a message on alienBOB blog to make sure he notices.

[EDIT]
rhino package has been updated in alienBOB repository. No more problem, I could upgrade the package using slackpkg.
[/EDIT]

zerouno 05-11-2016 02:25 AM

Quote:

Wed May 11 05:20:01 UTC 2016
ap/slackpkg-2.82.1-noarch-1.txz: Upgraded.
Updated x86* mirrors lists for Slackware 14.2.
it's the time to release a slackpkg+ rc.
:)

zerouno 05-19-2016 02:50 PM

rc1 is here

just some fix.
Please test it

Quote:

Version 1.7.0rc1 - 19/May/2016
- WW_FILE_SEARCH did affect file search AND package search
- fixed warning in update when one repository does not have the changelog
- ignore the package extension in package selection
- fixed a regression in dir: repository

zerouno 05-21-2016 08:41 AM

the regex for changelog detect does fail in some slackware update (Fri May 20 21:20:29 UTC 2016):

Code:

xap/vim-gvim-7.4.1832-i586-1.txz:  Upgraded.
extra/linux-4.4.11-nosmp-sdk/*:  Upgraded.
isolinux/initrd.img:  Rebuilt.
kernels/*:  Upgraded.
usb-and-pxe-installers/usbboot.img:  Rebuilt.
+--------------------------+

in dialog does show
Code:

slackware::xap/vim-gvim-7.4.1832-i586-1.txz:  Upgraded.
    extra/linux-4.4.11-nosmp-sdk/*:  Upgraded.
    isolinux/initrd.img:  Rebuilt.
    kernels/*:  Upgraded.
    usb-and-pxe-installers/usbboot.img:  Rebuilt.

this should solve, but I dont known if it generate some regression:
Code:

--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -14,7 +14,8 @@ SLACKDIR_REGEXP="^((slackware)|(slackware64)|(extra)|(pasture)|(patches)|(testin
 
  # CLOG_PKGREGEX : regular expression used to find package entry in ChangeLog files
  # CLOG_SEPREGEX : regular expression that match the "standard" entry separator in a ChangeLog file
-CLOG_PKGREGEX="[.]t[blxg]z[:][ ]+(added|moved|rebuilt|upgraded)"
+#CLOG_PKGREGEX="[.]t[blxg]z[:][ ]+(added|moved|rebuilt|upgraded)"
+CLOG_PKGREGEX="^[^ ]*:[ ]+(added|moved|rebuilt|upgraded)"
 CLOG_SEPREGEX="^[+][-]+[+][ ]*$"
 
 if [ -e $CONF/slackpkgplus.conf ];then


phenixia2003 what do you think?

phenixia2003 05-21-2016 02:13 PM

1 Attachment(s)
Hello,

Quote:

Originally Posted by zerouno (Post 5548673)
the regex for changelog detect does fail in some slackware update (Fri May 20 21:20:29 UTC 2016):

Code:

xap/vim-gvim-7.4.1832-i586-1.txz:  Upgraded.
extra/linux-4.4.11-nosmp-sdk/*:  Upgraded.
isolinux/initrd.img:  Rebuilt.
kernels/*:  Upgraded.
usb-and-pxe-installers/usbboot.img:  Rebuilt.
+--------------------------+

in dialog does show
Code:

slackware::xap/vim-gvim-7.4.1832-i586-1.txz:  Upgraded.
    extra/linux-4.4.11-nosmp-sdk/*:  Upgraded.
    isolinux/initrd.img:  Rebuilt.
    kernels/*:  Upgraded.
    usb-and-pxe-installers/usbboot.img:  Rebuilt.


Quote:

Originally Posted by zerouno (Post 5548673)
this should solve, but I dont known if it generate some regression:
Code:

--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -14,7 +14,8 @@ SLACKDIR_REGEXP="^((slackware)|(slackware64)|(extra)|(pasture)|(patches)|(testin
 
  # CLOG_PKGREGEX : regular expression used to find package entry in ChangeLog files
  # CLOG_SEPREGEX : regular expression that match the "standard" entry separator in a ChangeLog file
-CLOG_PKGREGEX="[.]t[blxg]z[:][ ]+(added|moved|rebuilt|upgraded)"
+#CLOG_PKGREGEX="[.]t[blxg]z[:][ ]+(added|moved|rebuilt|upgraded)"
+CLOG_PKGREGEX="^[^ ]*:[ ]+(added|moved|rebuilt|upgraded)"
 CLOG_SEPREGEX="^[+][-]+[+][ ]*$"
 
 if [ -e $CONF/slackpkgplus.conf ];then


phenixia2003 what do you think?


I'm ok with that. I did some tests with the attached script and all seems ok. This script downloads a slackware changelog, extract the packages informations using the old and new regex and show the diff (in vim) between these two set of data.

for instance, if you want to see the impact of the new regex for slackware64-current, run it as below :

Code:

$ sh show-clog-diff.sh.txt current 64
Downloading Slackware64-current ChangeLog.txt
extracting infos from ChangeLog64.current using NEW regex in Infos64-NEW-regex.current ...
    3351/3352                 
extracting infos from ChangeLog64.current using OLD regex in Infos64-OLD-regex.current ...
    3351/3352                 
prepare diff between Infos64-OLD-regex.current and Infos64-NEW-regex.current ...
hit return to see diff in vim ...

--
SeB

zerouno 05-21-2016 03:51 PM

You are what an italian people call "Pazzo scatenato" :D

the script has found a bug in changelog :)
Code:

n/openssl-1.0.1j-x86_64-1.tx:  Upgraded.
xap/seamonkey-2.26-x86_64-1.tx:  Upgraded.


I've readapted the script for thirdy party repository. It has found other bugs in other changelogs.

But as regression I intend another thing.

With the new regex we have many other things in .idx file.
slackware:
Code:

29:xap/vim-gvim-7.4.1832-i586-1.txz:  Upgraded.
30:extra/linux-4.4.11-nosmp-sdk/*:  Upgraded.
31:isolinux/initrd.img:  Rebuilt.

alienbob:
Code:

27:qt5-webkit: added v5.6.0 - this is a component of Qt5 which was split off
30:libxkbcommon: added v0.5.0 - a dependency for the qt5 package.
67:heimdall: Upgraded to 1.4.1 for Slackware 14.2. This package no longer

...

I don't think that this can cause problems or regressions in changelog search code but I must to consider that possibility.

phenixia2003 05-22-2016 05:48 AM

Quote:

Originally Posted by zerouno (Post 5548881)
You are what an italian people call "Pazzo scatenato" :D

:cool:

Quote:

Originally Posted by zerouno (Post 5548881)
the script has found a bug in changelog :)
Code:

n/openssl-1.0.1j-x86_64-1.tx:  Upgraded.
xap/seamonkey-2.26-x86_64-1.tx:  Upgraded.


The only way to prevent this is to change the expression used to build the index (see at the end of this post)


Quote:

Originally Posted by zerouno (Post 5548881)
I've readapted the script for thirdy party repository. It has found other bugs in other changelogs.

But as regression I intend another thing.

With the new regex we have many other things in .idx file.
slackware:
Code:

29:xap/vim-gvim-7.4.1832-i586-1.txz:  Upgraded.
30:extra/linux-4.4.11-nosmp-sdk/*:  Upgraded.
31:isolinux/initrd.img:  Rebuilt.

alienbob:
Code:

27:qt5-webkit: added v5.6.0 - this is a component of Qt5 which was split off
30:libxkbcommon: added v0.5.0 - a dependency for the qt5 package.
67:heimdall: Upgraded to 1.4.1 for Slackware 14.2. This package no longer

...

I don't think that this can cause problems or regressions in changelog search code but I must to consider that possibility.

This will cause no problems, nor regressions. showChangeLogInfos() uses the index to only get informations (start position in changelog, pathname, status) about the packages listed in file TMPDIR/dialog.out, which, contains package names (ie. basename-version-arch-build.t[gx]z) only. But, if you want to avoid this, you can use the "old" regular-expression to create the index at line #646-#648 (slackpkg/devel).

Current code:
Code:

646:for PREPO in slackware ${REPOPLUS[*]} ; do
647:    grep -inE "$CLOG_PKGREGEX" ${TMPDIR}/ChangeLogs/$PREPO.txt > ${TMPDIR}/ChangeLogs/$PREPO.idx
648:done

New code:
Code:

646:for PREPO in slackware ${REPOPLUS[*]} ; do
647:    grep -inE "[.]t[blxg]z?[ ]*[:][ ]+(added|moved|rebuilt|upgraded)" ${TMPDIR}/ChangeLogs/$PREPO.txt > ${TMPDIR}/ChangeLogs/$PREPO.idx
648:done

Note, that the regular expression above is a bit different from the one currently used by slackpkg+ :

1. I added "[ ]*" after "t[blxg]z" because I've found an entry (in slackware 13.0 changelog) which match this particular case.

2. the "z?" is to prevent the malformed entries, like those you mentioned earlier (ie.n/openssl-1.0.1j-x86_64-1.tx and xap/seamonkey-2.26-x86_64-1.tx: )

Code:

$ CLOG_PKGREGEX="[.]t[blxg]z[:][ ]+(added|moved|rebuilt|upgraded)"
$ CLOG_PKGREGEX_NEW="[.]t[blxg]z?[ ]*[:][ ]+(added|moved|rebuilt|upgraded)"
$ diff -u <(grep -inE "$CLOG_PKGREGEX" ChangeLog64.current) <(grep -inE "$CLOG_PKGREGEX_NEW" ChangeLog64.current)
--- /dev/fd/63  2016-05-22 12:49:46.250211376 +0200
+++ /dev/fd/62  2016-05-22 12:49:46.250211376 +0200
@@ -2938,6 +2938,7 @@
 5254:e/emacs-24.4-x86_64-1.txz:  Upgraded.
 5257:n/openssh-6.7p1-x86_64-1.txz:  Upgraded.
 5266:a/openssl-solibs-1.0.1j-x86_64-1.txz:  Upgraded.
+5268:n/openssl-1.0.1j-x86_64-1.tx:  Upgraded.
 5305:xap/mozilla-firefox-33.0-x86_64-1.txz:  Upgraded.
 5310:xap/mozilla-thunderbird-31.2.0-x86_64-1.txz:  Upgraded.
 5317:a/elilo-3.16-x86_64-1.txz:  Upgraded.
@@ -3215,6 +3216,7 @@
 6007:xap/ddd-3.3.12-x86_64-2.txz:  Rebuilt.
 6014:l/seamonkey-solibs-2.26-x86_64-1.txz:  Upgraded.
 6015:xap/mozilla-firefox-29.0.1-x86_64-1.txz:  Upgraded.
+6016:xap/seamonkey-2.26-x86_64-1.tx:  Upgraded.
 6023:a/glibc-solibs-2.19-x86_64-1.txz:  Upgraded.
 6024:a/glibc-zoneinfo-2014b-noarch-1.txz:  Upgraded.
 6025:a/kernel-firmware-20140506git-noarch-1.txz:  Upgraded.

Cheers.


--
SeB

zerouno 05-22-2016 05:58 AM

I've no a computer in this moment, but I don't think that we must manage the exceptions to the normality.

The best way is to report the bug to Patrick (but that problem is about two years old).
Sometime a user may not see a changelog, this is not a real problem.

zerouno 06-02-2016 05:18 PM

Patrik gave us a "Last call"
Quote:

This could be the last batch of updates before 14.2 stable, so please test!
I decided to reciprocate with a "Last Call" for slackpkg+1.7, so please test! :)

zerouno 06-03-2016 01:58 PM

Seems that
Code:

sed -e 1d -e 1iTEXT filename
does not means exactly "remove first line and insert TEXT instead it", so if both expressions start with the same number, the line is dropped instead replaced.
So if $LINEIDX == $PRIORITYIDX the selected package is dropped from pkglist in givepriority():
Code:

sed --expression "${LINEIDX}d" --expression "${PRIORITYIDX}i${PKGDATA[*]}" ${TMPDIR}/pkglist.old > ${TMPDIR}/pkglist
They have a similar case when using "slackpkg upgrade file:./package-1-x86-1.txz"; the package is added on top of pkglist and that sed drop it.

Seems that
Code:

sed -e 1iTEXT -e 1d filename
does work, but I'm not sure that
Code:

sed --expression "${PRIORITYIDX}i${PKGDATA[*]}"  --expression "${LINEIDX}d" ${TMPDIR}/pkglist.old > ${TMPDIR}/pkglist
does work for any $PRIORITYIDX and for any $LINEIDX


currently I've solved with
Code:

if [ ${PRIORITYIDX} -ne ${LINEIDX} ];then
  mv ${TMPDIR}/pkglist ${TMPDIR}/pkglist.old
  sed --expression "${LINEIDX}d" --expression "${PRIORITYIDX}i${PKGDATA[*]}" ${TMPDIR}/pkglist.old > ${TMPDIR}/pkglist
fi

since it is not useful to remove and reinsert the same line at the same point

zerouno 06-03-2016 05:30 PM

1 Attachment(s)
Do you like bash-completation?

install the bash-completation package, then copy following code in /etc/bash_completion.d/slackpkg the close and reopen the shell, then test and give me feedback.

Code:

# Slackware slackpkg(8) completion                            -*- shell-script -*-


_slackpkg()
{
    local cur prev words cword
    _init_completion || return

    local special i
    for (( i=0; i < ${#words[@]}-1; i++ )); do
        if [[ ${words[i]} == @(upgrade|install|remove|update) ]]; then
            special=${words[i]}
        fi
    done

    if [[ -n $special ]]; then
        case $special in
            upgrade|remove)
                COMPREPLY=( $( cd /var/log/packages; ls $cur*|rev|cut -f4- -d-|rev ) )
                return 0
                ;;
            update) COMPREPLY=( gpg )
              return 0
              ;;
            install)
                COMPREPLY=( $( cd /var/log/packages
                                grep "^[^ ]* $cur" /var/lib/slackpkg/pkglist|awk '{print $2}'|
                                      grep -v -f <(ls $cur*|rev|cut -f4- -d-|rev|sed -r "s/^/^/")
                            ) )
                return 0
                ;;
            update)
                COMPREPLY=( gpg )
                return 0
                ;;
        esac
    fi

    if [[ "$cur" == -* ]]; then
        COMPREPLY=( $( compgen -W '
                                    -delall=off -checkmd5=off -checkgpg=off -checksize=on
                                    -postinst=off -onoff=off -download_all=off -dialog=off
                                    -batch=on -only_new_dotnew=on
                                    -use_includes=off -spinning=off -default_answer=yes
            ' -- "$cur" ) )
    else

        COMPREPLY=( $( compgen -W 'install remove search upgrade reinstall
                                    clean-system upgrade-all install-new
                                    search file-search
                                    info update new-config check-updates
                                    - ' -- "$cur" ) )

    fi

    return 0
} &&
complete -F _slackpkg slackpkg



All times are GMT -5. The time now is 04:42 AM.