Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[RISOLTO]:use flag : un chiarimento
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
trigg
Apprentice
Apprentice


Joined: 14 Jun 2018
Posts: 179

PostPosted: Tue Jun 26, 2018 6:31 am    Post subject: [RISOLTO]:use flag : un chiarimento Reply with quote

buongiorno
in questi giorni sto cercando di studiare gentoo,
ma vista le innumerevoli documentazioni on-line è facile perders e confondersi
mi sento come una barchetta in un mare in burrasca dove l'unico faro e porto sicuro è il
forum italiano di gentoo.

riguardo le use flag ho capito che bisogna digitare
-pv pacchetto
in questo modo si ha una serie d'informazioni sul pacchetto e di cosa ha bisogno

voglio capire se l'utilizzo di
euse -i flag1
euse -i flag2
emerge pacchetto
è uguale a
USE "flag1 flag2" emerge pacchetto

non riesco a trovare il bandolo della matassa


Last edited by trigg on Tue Jun 26, 2018 8:33 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30885
Location: here

PostPosted: Tue Jun 26, 2018 7:04 am    Post subject: Reply with quote

Per prima cosa il comando euse -i flag1 ti da solo l'informazione per una determinata use flag e quindi non fa nessuna modifica.
Le use flag le puoi gestire in modo globale, ovvero la abiliti per tutti i pacchetti che hanno questa determinata use flag, o per singolo pacchetto.
Io non uso comandi specifici per abilitare le use flag ma faccio tutto manualmente e per tanto ti indichero' come io le gestisco.

Per abilitarle in modo globale devi farlo tramite /etc/portage/make.conf editando la variabile USE. esempio della mia variabile in make.conf:
Code:
USE="mmx sse sse2 alsa pulseaudio icu infinality elogind -bindist -gnome -mysql -modemmanager -gnome-keyring -libressl -llvm_targets_AMDGPU -qt4 -qt3support -consolekit"

Come vedi globalmente non attivo troppe use flags ma preferisco abilitarle solo nei pacchetti che ho bisogno, comunque gia' il profilo che hai scelto abilita di default tutte quelle che sono necessarie per il determinato profilo.
Una volta che aggiungi una use flag globale e' buona norma lanciare il comando
Code:
# emerge -UD @world

che ti ricompila tutti i pacchetti che hanno la use flag che hai abilitato/disabilitato.

L'altro metodo e' quello di abilitare/disabilitare le use flag per pacchetto tramite il file o directory (vale la stessa cosa che per package.accept_keywords) /etc/portage/package.use dove potrai abilitare e disabilitare le use flag che vuoi
Code:
# echo "category/pacchetto -flag1 flag2" >> /etc/portage/package.use


Riguardo al comando USE="flag1 flag2" emerge pacchetto , e' da evitare perche' stai abilitando le use flag solo per il comando emerge che dai in quel momento, se piu' tardi dai un emerge pacchetto o farai un update vedrai che emerge vorra' disabilitarti le use flag.
In pratica stai solo modificando una variabile per quel determinato comando ma non ha nessuna influenza nei prossimi comandi di emerge che darai.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
trigg
Apprentice
Apprentice


Joined: 14 Jun 2018
Posts: 179

PostPosted: Tue Jun 26, 2018 7:42 am    Post subject: Reply with quote

quindi ero completamente fuori strada

ho aggiunto inmake.conf la riga USE

Code:
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -pipe"

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C

GENTOO_MIRRORS="http://mirrors.soeasyto.com/distfiles.gentoo.org/"


MAKEOPTS="-j4"


FEATURES="ccache"
CCACHE_SIZE="5G"
CCACHE_DIR="/mnt/DATI/gentoo/system/ccache/"



ACCEPT_KEYWORDS = "~amd64"

USE="alsa opengl pam qt5 sdk udev -debug -doc -headless -java -libressl -lvm -pax_kernel -pulseaudio -python -vboxwebsrv -vnc ipv6 pam static -debug -livecd -make-symlinks -math -mdev -savedconfig (-selinux) -sep-usr -syslog -systemd "


ho dato il comando emerge -UD @world

ed ho ricevuto

Code:
emerge -UD @world
Calculating dependencies \

!!! Problem resolving dependencies for sys-apps/busybox from @system
... done!

!!! The ebuild selected to satisfy "sys-apps/busybox" has unmet requirements.
- sys-apps/busybox-1.28.4::gentoo USE="ipv6 pam static -debug -livecd -make-symlinks -math -mdev -savedconfig (-selinux) -sep-usr -syslog -systemd" ABI_X86="(64)"

  The following REQUIRED_USE flag constraints are unsatisfied:
    pam? ( !static )

(dependency required by "@system" [set])
(dependency required by "@world" [argument])
[/code]
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30885
Location: here

PostPosted: Tue Jun 26, 2018 7:50 am    Post subject: Reply with quote

Code:
  The following REQUIRED_USE flag constraints are unsatisfied:
    pam? ( !static )

Questo messaggio indica che se hai la use flag pam (pam?) allora non puoi avera anche la use flag static (!static).
Quindi ho disabiliti pam o disabiliti static.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
trigg
Apprentice
Apprentice


Joined: 14 Jun 2018
Posts: 179

PostPosted: Tue Jun 26, 2018 7:58 am    Post subject: Reply with quote

ok
quindi userò d'ora in avanti euse che è lo strumento che più mi si addice

disabiliterò static con il comando
euse --disable static
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30885
Location: here

PostPosted: Tue Jun 26, 2018 8:09 am    Post subject: Reply with quote

trigg wrote:
ok
quindi userò d'ora in avanti euse che è lo strumento che più mi si addice

disabiliterò static con il comando
euse --disable static

Cosi' facendo la disabiliti globalmente, meglio sarebbe farlo solo per lo specifico pacchetto
Code:
# euse --disable static --package sys-apps/busybox

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
trigg
Apprentice
Apprentice


Joined: 14 Jun 2018
Posts: 179

PostPosted: Tue Jun 26, 2018 8:19 am    Post subject: Reply with quote

ecco ç ç

va bene

allora lo riattivo con --enable
e lo disabilito per busybox :P

metto risolto se ho capito bene il comportamento di USE

con euse posso abilitare con il comando --enable (globale) ; mentre --enable --package radice/pacchetto (localmente)

con disable allo stesso modo posso disabilitare le use flag.

tutto il resto è nella corretta interpretazione delle informazioni date dal terminale .

in conclusione con euse posso gestire le flag senza dover modificare il make.conf
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30885
Location: here

PostPosted: Tue Jun 26, 2018 8:32 am    Post subject: Reply with quote

trigg wrote:
metto risolto se ho capito bene il comportamento di USE

con euse posso abilitare con il comando --enable (globale) ; mentre --enable --package radice/pacchetto (localmente)

con disable allo stesso modo posso disabilitare le use flag.

tutto il resto è nella corretta interpretazione delle informazioni date dal terminale .

in conclusione con euse posso gestire le flag senza dover modificare il make.conf

Mi pare che sia tutto corretto :D
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
trigg
Apprentice
Apprentice


Joined: 14 Jun 2018
Posts: 179

PostPosted: Tue Jun 26, 2018 8:34 am    Post subject: Reply with quote

[risolto] :)
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 509

PostPosted: Sat Jun 30, 2018 8:26 am    Post subject: Reply with quote

fedeliallalinea wrote:

Code:
USE="mmx sse sse2 alsa pulseaudio icu infinality elogind -bindist -gnome -mysql -modemmanager -gnome-keyring -libressl -llvm_targets_AMDGPU -qt4 -qt3support -consolekit"



Ciao fedeliallalinea,
una domanda, cosa si ottiene mettendo "mmx sse sse2" nelle USE flags?
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1012

PostPosted: Sat Jun 30, 2018 11:21 am    Post subject: Reply with quote

quelle flags (relative al processore) abilitano il supporto ad alcune applicazioni (tipicamente grafiche)

sono state "spostate" con l'utilizzo di
Code:
pp-portage/cpuid2cpuflags-5
     Available versions:  1 5 **9999 {PYTHON_TARGETS="pypy python2_7 python3_4"}
     Homepage:            https://github.com/mgorny/cpuid2cpuflags
     Description:         Tool to guess CPU_FLAGS_X86 flags for the host


il cui utilizzo ti elenca le flags corrette per la tua CPU da inserire nella variabile espansa

Code:
CPU_FLAGS_X86
(è indicato X86 , ma funziona anche su proci 64)

Esempio per il mio processore:
Code:
# cpuid2cpuflags
CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3


nel make.conf andrai ad inserire le flags indicate:
Code:
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"



E' la forma ridotta di
https://packages.gentoo.org/useflags/cpu_flags_x86_mmxext

Wiki : https://wiki.gentoo.org/wiki/CPU_FLAGS_X86
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 509

PostPosted: Sat Jun 30, 2018 11:49 am    Post subject: Reply with quote

sabayonino wrote:
quelle flags (relative al processore) abilitano il supporto ad alcune applicazioni (tipicamente grafiche)

sono state "spostate" con l'utilizzo di
Code:
pp-portage/cpuid2cpuflags-5
     Available versions:  1 5 **9999 {PYTHON_TARGETS="pypy python2_7 python3_4"}
     Homepage:            https://github.com/mgorny/cpuid2cpuflags
     Description:         Tool to guess CPU_FLAGS_X86 flags for the host


il cui utilizzo ti elenca le flags corrette per la tua CPU da inserire nella variabile espansa

Code:
CPU_FLAGS_X86
(è indicato X86 , ma funziona anche su proci 64)

Esempio per il mio processore:
Code:
# cpuid2cpuflags
CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3


nel make.conf andrai ad inserire le flags indicate:
Code:
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"



E' la forma ridotta di
https://packages.gentoo.org/useflags/cpu_flags_x86_mmxext

Wiki : https://wiki.gentoo.org/wiki/CPU_FLAGS_X86


Grazie

Sapete da dove equery prende le info sulle USE flags?

tipo in questo caso alcune sono unknow

Quote:
U I
+ + aac : Enable support for MPEG-4 AAC Audio
+ + dsd : <unknown>
- - ffmpeg : Enable ffmpeg/libav-based audio/video codec support
+ + flac : Add support for FLAC: Free Lossless Audio Codec
- + gpio : <unknown>
+ + mad : Add support for mad (high-quality mp3 decoder library and cli frontend)
+ + mpg123 : <unknown>
+ + pulseaudio : Add support for PulseAudio sound server
- - resample : <unknown>
- - visexport : <unknown>
+ + vorbis : Add support for the OggVorbis audio codec


vorrei cambiare unknow....

spero di non essere andato OT
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1012

PostPosted: Sat Jun 30, 2018 4:17 pm    Post subject: Reply with quote

"Unknow" (sconosciuta) è la descrizione della USE flag. . Se indicato vuol dire che non c'è alcuna descrizione per quella USE :mrgreen:
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 509

PostPosted: Sat Jun 30, 2018 4:57 pm    Post subject: Reply with quote

sabayonino wrote:
"Unknow" (sconosciuta)


si certo, quello l avevo capito.... :D pensavo ci fosse qualche modo per cambiare la descrizione (cioé metterla a mano da qualche parte) 8O
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1012

PostPosted: Sat Jun 30, 2018 6:03 pm    Post subject: Reply with quote

dipende dal profilo in uso ,

trovi le descrizioni generali e singole per pacchetto in

/usr/portage/profiles/use.desc
/usr/portage/profiles/use.local.desc

se utilizzi qualche overlay , potresti averne da qualche parte in /var/lib/layman

se vuoi divertirti a modificarle , sappi che verranno sovrascritte ad ogni sync
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
trigg
Apprentice
Apprentice


Joined: 14 Jun 2018
Posts: 179

PostPosted: Sun Jul 01, 2018 8:03 am    Post subject: Reply with quote

ciao sabayonino
leggendo attentamente le use ho selezionato queste
X - Add support for X11
Quote:
a52 - Enable support for decoding ATSC A/52 streams used in DVD
aac - Enable support for MPEG-4 AAC Audio
alsa - Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
cairo - Enable support for the cairo graphics library
cups - Add support for CUPS (Common Unix Printing System)
curl - Add support for client-side URL transfer library
ffmpeg - Enable ffmpeg/libav-based audio/video codec support
ftp - Add FTP (File Transfer Protocol) support
gimp - Build a plugin for the GIMP
git - Enable git (version control system) support
gstreamer - Add support for media-libs/gstreamer (Streaming media)
gtk - Add support for x11-libs/gtk+ (The GIMP Toolkit)
hddtemp - Enable monitoring of hdd temperature (app-admin/hddtemp)
imagemagick - Enable support for Imagemagick (image converter)
ios - Enable support for Apple's iDevice with iOS operating system (iPad, iPhone, iPod, etc)
jack - Add support for the JACK Audio Connection Kit
java - Add support for Java
lame - Prefer using LAME libraries for MP3 encoding support
libav - Prefer libav over ffmpeg whenever both are supported
libcaca - Add support for colored ASCII-art graphics
lm_sensors - Add linux lm_sensors (hardware sensors) support
lua - Enable Lua scripting support
matroska - Add support for the matroska container format (extensions .mkv, .mka and .mks)
mp3 - Add support for reading mp3 files
mp4 - Support for MP4 container format
mpeg - Add libmpeg3 support to various packages
mpi - Add MPI (Message Passing Interface) layer to the apps that support it
mplayer - Enable mplayer support for playback or encoding
networkmanager - Enable net-misc/networkmanager support
pdf - Add general support for PDF (Portable Document Format), this replaces the pdflib and cpdflib flags
pulseaudio - Add support for PulseAudio sound server
qmail-spp - Add support for qmail SMTP plugins
qt4 - Add support for the Qt GUI/Application Toolkit version 4.x
qt5 - Add support for the Qt 5 application and UI framework
samba - Add support for SAMBA (Windows File and Printer sharing)
smp - Enable support for multiprocessors or multicore systems
svg - Add support for SVG (Scalable Vector Graphics)
svga - Add support for SVGAlib (graphics library)
udisks - Enable storage management support (automounting, volume monitoring, etc)
usb - Add USB support to applications that have optional USB support (e.g. cups)
vorbis - Add support for the OggVorbis audio codec
x264 - Enable h264 encoding using x264


non ho ancora aggiunto queste use in make.conf ;
la domanda è :
usando queste use in make.conf mi incasino o semplifico le compilazioni?
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1012

PostPosted: Sun Jul 01, 2018 10:16 am    Post subject: Reply with quote

Gran parte delle USE indicate saranno già abilitate tramite il profilo da te scelto

Code:
$ emerge --info | grep ^USE


Una nota sulle QT4 :
Se non hai applicazioni che ne richiedono l'utilizzo , le qt4 non sono più mantenute. La maggior parte delle applicazioni QT hanno ricevuto il porting alle qt5 , quindi se non strettamente necessaro , le disabilitierei.

Se hai dei dubbi riguardo l'utilizzo delle USE flag , ti invito alla lettura di

https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/USE/it

Già da parte del profilo vengono abilitate numerose USE flag necessarie , cercherei di evitare di abbondare inutilmente le USE del make.conf e mi concentrerei più sulle USE per pacchetto. Ma questi sono solo gusti personali.
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
trigg
Apprentice
Apprentice


Joined: 14 Jun 2018
Posts: 179

PostPosted: Mon Jul 02, 2018 5:23 am    Post subject: Reply with quote

quello che non riesco ancora a capire è il procedimento

quando installo con emerge --ask mi modifica package.use /zz-autonmask
aggiungendo le voci in zz-autonmask.

se per esempio voglio aggiungere dei file di testo in /package.use dedicati con il comando
echo "radeice/pacchetto USE1 USE2" >> /etc/portage/package.use/pacchetto
come devo fare?

in questo esempio
Code:
gentoo /home/trigg # emerge --pretend --verbose net-p2p/transmission

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] net-libs/libnatpmp-20130911::gentoo  USE="-static-libs" 19 KiB
[ebuild  N     ] dev-libs/libevent-2.1.8:0/2.1-6::gentoo  USE="ssl threads -debug -libressl -static-libs {-test}" ABI_X86="(64) -32 (-x32)" 1003 KiB
[ebuild  N     ] sys-apps/lsb-release-1.4::gentoo  11 KiB
[ebuild  N     ] net-libs/miniupnpc-2.0.20180222:0/16::gentoo  USE="ipv6 -static-libs" 85 KiB
[ebuild  N     ] dev-qt/qtnetwork-5.9.4:5/5.9::gentoo  USE="ssl -bindist -connman -debug -libproxy -libressl -networkmanager {-test}" 0 KiB
[ebuild  N     ] dev-qt/linguist-tools-5.9.4:5/5.9::gentoo  USE="-debug -qml {-test}" 9551 KiB
[ebuild  N     ] net-p2p/transmission-2.93::gentoo  USE="gtk qt5 (-ayatana) -libressl -lightweight -systemd -xfs" 3286 KiB


devo creare 7 file separati ad esempio
echo "net-libs/libnatpmp static-libs" >> /etc/portage/package.use/libnatpmp
echo "dev-libs/libeven ssl threads -debug -libressl -static-libs {-test}" ABI_X86="(64) -32 (-x32)" >> /etc/portage/package.use/libeven
etc etc

oppure devo fare un file di testo in questa maniera
echo "net-p2p/transmission -static-lib ssl threads -debug -libressl -static-libs {-test}" ABI_X86="(64) -32 (-x32)" >> /etc/portage/package.use/transmission
(dove vado ad aggiungere le use degli altri pacchetti )


fino ad oggi uso emerge --ask e le use vengono aggiunte nel file zz-autonmask
però mi piacerebbe avere dei file separati e dedicati
:?:
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30885
Location: here

PostPosted: Mon Jul 02, 2018 6:26 am    Post subject: Reply with quote

In quel esempio non devi fare nulla. Infatti non hai dei conflitti di use flag (se no portage ti avvisa), semplicemente portage ti mostra cosa e' attivo e cosa no.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
trigg
Apprentice
Apprentice


Joined: 14 Jun 2018
Posts: 179

PostPosted: Mon Jul 02, 2018 6:49 am    Post subject: Reply with quote

ç ç
va bene
da quello che ho capito è sempre bene usare emerge --ask per installare i pacchetti

quando mi capiterà una caso vero per l'uso delle use lo posterò qui .

gli avvisi dono questi
Code:
Esempio    Descrizione
REQUIRED_USE="foo? ( bar )"    Se foo è impostato, anche bar deve esserlo.
REQUIRED_USE="foo? ( !bar )"    Se foo è impostato, bar non deve esserlo.
REQUIRED_USE="foo? ( || ( bar baz ) )"    Se foo è impostato, bar o baz devono esserlo.
REQUIRED_USE="^^ ( foo bar baz )"    Esattamente uno tra foo bar e baz va impostato.
REQUIRED_USE="|| ( foo bar baz )"    Almeno uno tra foo bar e baz va impostato.
REQUIRED_USE="?? ( foo bar baz )"    Non più di uno tra foo bar e baz va impostato.


in questo caso potrò usare echo "eccetera/eccetera use -use" >> /etc/portage/package.use/nome.file
per creare un file di testo specifico per il pacchetto.

:) credo di aver capito
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30885
Location: here

PostPosted: Mon Jul 02, 2018 9:16 am    Post subject: Reply with quote

Si gli avvisi sono quelli anche se portage te li mostrera' con una frase, esempio:
Code:
!!! The ebuild selected to satisfy "chrony" has unmet requirements.
- net-misc/chrony-3.1::gentoo USE="adns cmdmon ipv6 libedit ntp phc readline refclock rtc -caps (-html) -pps (-selinux)" ABI_X86="(64)"

  The following REQUIRED_USE flag constraints are unsatisfied:
    at-most-one-of ( libedit readline )

Inoltre le use flag ABI_X86, I10N,... sono dette use expand (vedi ultima sezione )
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum