Pagina 1 di 2

slackpkg+ e upgrade-all [risolto]

Inviato: mer 23 dic 2015, 11:24
da cespo
Uso slackware64-current, dopo aver aggiornato slackpkg+ ottengo il seguente errore eseguendo slackpkg upgrade-all:

# slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... grep: write error
grep: write error: Broken pipe
grep: write error
grep: write error
grep: write error
grep: write error
grep: write error
grep: write error: Broken pipe
grep: write error: Broken pipe
DONE

No packages match the pattern for upgrade. Try:

/usr/sbin/slackpkg install|reinstall


#

Le versioni di slackpkg e slackpkg+ installate sono:

slackpkg+-1.6.1-noarch-4mt
slackpkg-2.82.0-noarch-16

E' una regressione in slackpkg+?

Re: slackpkg+ e upgrade-all

Inviato: mer 23 dic 2015, 19:44
da cespo
Ho provato le versioni precedenti di slackpkg+, il problema non si presenta con la versione 1.5.1-noarch-2mt ma solo con la versione 1.5.2-noarch-1mt e successive. Inoltre, almeno con l'ultima versione (la 1.6.1-noarch-4mt), slackpkg upgrade-all non da errore se eseguito dopo essersi loggati da console come root. Da errore se eseguito dopo essersi loggati da console come utente normale ed avere aperto una shell con i privilegi di root tramite "sudo su -" (che è il modo in cui eseguo slackpkg abitualmente).

Re: slackpkg+ e upgrade-all

Inviato: mer 23 dic 2015, 20:22
da ponce
per aprire una shell di root con tutte le funzionalita' e' sconsigliato l'uso di sudo: usa direttamente "su -".

Re: slackpkg+ e upgrade-all

Inviato: dom 27 dic 2015, 15:29
da ZeroUno
Io uso sempre "sudo su -" e non ho mai avuto problemi.

@cespo
il problema persiste?
posti il file di configurazione?

la 1.5.2 ha introdotto un bel po' di nuove funzionalità

Codice: Seleziona tutto

    Version 1.5.2 - 18/Dec/2015
      - Fixed a missed $ROOT
      - Added SHOWORDER option. It's a way to sort packages in dialog box to help
        reviewing large upgrade from many repositories. The SHOWORDER option
        accepts "package" "repository" "tag" "path" "arch".
      - Fixed some repository url. There are already some 14.2 repositories!!!
      - slackpkg+ advise you to update the pkglist before use it
      - Added a script in /usr/doc/slackpkg+-* to a fast check of repositories
      - slackpkg -dialog=off now show repository name as with dialog
      - Added SENSITIVE_SEARCH option to search case-insensitive
        (thanks to phenixia2003)
      - Important fixes in the priority manager. Many thanks to all people that
        reported the bugs and a Big thanks to phenixia2003 for the fix. Now we need
        your help to test it.
ma anche qualche bug.
la slackpkg+-1.6.1-noarch-4mt ha introdotto un bug su slackware-14.1 (non -current) risolto dalla -5mt

eventualmente può anche essere utile eseguire

Codice: Seleziona tutto

# bash -x slackpkg upgrade-all
e postare l'intero output.

Grazie
Matteo

Re: slackpkg+ e upgrade-all

Inviato: ven 1 gen 2016, 11:18
da cespo
@ZeroUno, il problema persiste anche dopo gli ultimi aggiornamenti:

Codice: Seleziona tutto

# ls /var/log/packages/ | grep slackpkg
slackpkg+-1.6.1-noarch-5mt
slackpkg-2.82.0-noarch-16
#

Codice: Seleziona tutto

# slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... grep: write error
grep: write error
grep: write error
grep: write error
grep: write error
grep: write error
grep: write error
grep: write error: Broken pipe
grep: write error: Broken pipe
grep: write error: Broken pipe
grep: write error
DONE

No packages match the pattern for upgrade. Try:

        /usr/sbin/slackpkg install|reinstall 
#
Questo è il file di configurazione:

Codice: Seleziona tutto

# grep ^[^#] /etc/slackpkg/slackpkgplus.conf
SLACKPKGPLUS=on
VERBOSE=1
ALLOW32BIT=off
USEBL=1
WGETOPTS="--timeout=20 --tries=2"
CACHEUPDATE=off
GREYLIST=on
SENSITIVE_SEARCH=on
SHOWORDER=package
PKGS_PRIORITY=( multilib )
TAG_PRIORITY=off
REPOPLUS=( multilib slackpkgplus )
MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/
MIRRORPLUS['multilib']=http://taper.alienbase.nl/mirrors/people/alien/multilib/current/
#
Allego il file creato con:

Codice: Seleziona tutto

# bash -x slackpkg upgrade-all 2> log.txt

Re: slackpkg+ e upgrade-all

Inviato: ven 1 gen 2016, 11:59
da ZeroUno
Grazie
Dopo gli do una occhiata.
Intanto buon anno.

Re: slackpkg+ e upgrade-all

Inviato: ven 1 gen 2016, 22:26
da ZeroUno
non è questo il problema, ma per curiosità... da quanto tempo non dai un install-new? a detta del log ti mancano un po' di pacchetti.

Al momento non sono riuscito ad individuare il problema. Gli stessi comandi da me non falliscono, ma ci sono anche altre persone che riscontrano lo stesso problema.

Re: slackpkg+ e upgrade-all

Inviato: sab 2 gen 2016, 0:26
da ZeroUno
però non capisco ancora questa storia del sudo su - o del login, cioè che funziona con uno e con l'altro no.

Prova a darmi l'output del comando 'env' in un caso e nell'altro.

Re: slackpkg+ e upgrade-all

Inviato: sab 2 gen 2016, 10:51
da cespo
ZeroUno ha scritto:non è questo il problema, ma per curiosità... da quanto tempo non dai un install-new? a detta del log ti mancano un po' di pacchetti.

Al momento non sono riuscito ad individuare il problema. Gli stessi comandi da me non falliscono, ma ci sono anche altre persone che riscontrano lo stesso problema.
Faccio un install-new dopo ogni aggiornamento. Durante la prima installazione di slackware non ho installato kde, xfce e sorgenti del kernel (in pratica i pacchetti che nei mirror sono situati nelle directory k, kde, kdei, xfce)... è a questi che ti riferisci o ci sono anche altri pacchetti che mancano?
ZeroUno ha scritto:però non capisco ancora questa storia del sudo su - o del login, cioè che funziona con uno e con l'altro no.

Prova a darmi l'output del comando 'env' in un caso e nell'altro.
Allego l'output di env dopo login come root e dopo login come utente + "sudo su -".

P.S.: Facendo ulteriori test, ho notato questo:

Codice: Seleziona tutto

$ sudo su -
Password: 

I hate mankind, for I think myself one of the best of them,
and I know how bad I am.
                -- Samuel Johnson

# slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... grep: write error
grep: write error
grep: write error
grep: write error
grep: write error
grep: write error: Broken pipe
grep: write error
grep: write error
grep: write error: Broken pipe
grep: write error
DONE

No packages match the pattern for upgrade. Try:

        /usr/sbin/slackpkg install|reinstall 


# slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... grep: write error
grep: write error
grep: write error
grep: write error
grep: write error
grep: write error
grep: write error
grep: write error
grep: write error: Broken pipe
grep: write error
DONE

No packages match the pattern for upgrade. Try:

        /usr/sbin/slackpkg install|reinstall 


# exit
logout
$ sudo su -

But the greatest Electrical Pioneer of them all was Thomas Edison, who
was a brilliant inventor despite the fact that he had little formal
education and lived in New Jersey.  Edison's first major invention in
1877, was the phonograph, which could soon be found in thousands of
American homes, where it basically sat until 1923, when the record was
invented.  But Edison's greatest achievement came in 1879, when he
invented the electric company.  Edison's design was a brilliant
adaptation of the simple electrical circuit: the electric company sends
electricity through a wire to a customer, then immediately gets the
electricity back through another wire, then (this is the brilliant
part) sends it right back to the customer again.

This means that an electric company can sell a customer the same batch
of electricity thousands of times a day and never get caught, since
very few customers take the time to examine their electricity closely.
In fact the last year any new electricity was generated in the United
States was 1937; the electric companies have been merely re-selling it
ever since, which is why they have so much free time to apply for rate
increases.
                -- Dave Barry, "What is Electricity?"

# slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE

No packages match the pattern for upgrade. Try:

        /usr/sbin/slackpkg install|reinstall 


# slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE

No packages match the pattern for upgrade. Try:

        /usr/sbin/slackpkg install|reinstall 


# exit
logout
$ sudo su - (comando dato dopo aver lasciato aperta la shell una ventina di minuti per fare scadere la sessione di sudo)
Password: 

Even though they raised the rate for first class mail in the United
States we really shouldn't complain -- it's still only 2 cents a day.

root@darkstar:~# slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... grep: write error
grep: write error: Broken pipe
grep: write error: Broken pipe
grep: write error
grep: write error
grep: write error
grep: write error
grep: write error: Broken pipe
grep: write error
DONE

No packages match the pattern for upgrade. Try:

        /usr/sbin/slackpkg install|reinstall 


# slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... grep: write error
grep: write error: Broken pipe
grep: write error
grep: write error: Broken pipe
grep: write error
grep: write error
grep: write error: Broken pipe
DONE

No packages match the pattern for upgrade. Try:

        /usr/sbin/slackpkg install|reinstall 


# exit
logout
$ sudo su -

The mark of a good party is that you wake up the next morning
wanting to change your name and start a new life in different city.
                -- Vance Bourjaily, "Esquire"

# slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE

No packages match the pattern for upgrade. Try:

        /usr/sbin/slackpkg install|reinstall 


# 
L'errore si presenta solo quando "sudo su -" chiede la password, quindi alla prima esecuzione o quando scade la sessione. E se aggiungo /bin/su alla lista dei comandi per cui non viene richiesta la password (la lista dei comandi dopo "NOPASSWD: " in /etc/sudoers), il problema scompare.

Re: slackpkg+ e upgrade-all

Inviato: sab 2 gen 2016, 11:11
da ZeroUno
Interessante.
Considera che io ho NOPASSWD:ALL in sudoers

Dopo faccio la controprova.

A questo punto per completezza fai la prova anche senza sudo, con solo su -

Re: slackpkg+ e upgrade-all

Inviato: sab 2 gen 2016, 13:33
da cespo
ZeroUno ha scritto:A questo punto per completezza fai la prova anche senza sudo, con solo su -
Mi ero dimenticato di scriverlo dopo il suggerimento di ponce, con "su -" funziona correttamente.

Re: slackpkg+ e upgrade-all

Inviato: sab 2 gen 2016, 15:30
da ZeroUno
Fai questa prova.

Edita /usr/libexec/slackpkg/functions.d/slackpkgplus.sh

cerca

Codice: Seleziona tutto

        PKGINFOS=$(grep -n "^${DIR} " ${TMPDIR}/pkglist | grep -w "${PAT}" | grep -m 1 "^[[:digit:]]\+:${DIR} ${ARGUMENT} ")
sostituisci con

Codice: Seleziona tutto

        PKGINFOS=$(grep -n "^${DIR} " ${TMPDIR}/pkglist | grep -w "${PAT}" | grep -m 1 "^[0-9]\+:${DIR} ${ARGUMENT} ")

Re: slackpkg+ e upgrade-all

Inviato: sab 2 gen 2016, 18:13
da ZeroUno
A detta di alcuni il bug persiste se vengono resettate le credenziali di sudo con
$ sudo --remove-timestamp
prima di un
$ sudo su -

ma non ho verificato.

Re: slackpkg+ e upgrade-all

Inviato: sab 2 gen 2016, 18:57
da ponce
non e' un bug, e' sudo che fa cacare.

la soluzione, che ho imparato a mie spese gia' da un po', e' non usarlo.

Re: slackpkg+ e upgrade-all

Inviato: sab 2 gen 2016, 19:43
da ZeroUno
Sarà vero, ma lo trovo troppo utile, e per gli script è fondamentale (a meno che non vuoi tornare agli script con suid).

Comunque più tardi rilascio il workaround.