Re: [SOLVED] Re: wine-unstable 64 bit

2014-06-20 Thread berenger . morel



Le 19.06.2014 16:22, Henrique de Moraes Holschuh a écrit :

On Thu, 19 Jun 2014, berenger.mo...@neutralite.org wrote:

This syntax $(command) is not portable.


It is a POSIX shell construct.  Anything that doesn't implement it 
should

not be linked to /bin/sh in the first place.


So I was wrong. Not really surprising honestly, but I think I have seen 
such assertion somewhere else from someone more knowledgeable than me.




http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
section 2.6.3.

HOWEVER, $(something) and `something` are not equivalent in POSIX, 
they have
different behavior re. expansion of something.  The code appears to 
be

using $() correctly, though.


What is the difference then? Expansion in shell is a frequent issue for 
me when I try to write my scripts.



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/5f2009c37331affe78778ffd16b5b...@neutralite.org



Re: [SOLVED] Re: wine-unstable 64 bit

2014-06-20 Thread Henrique de Moraes Holschuh
On Fri, 20 Jun 2014, berenger.mo...@neutralite.org wrote:
 So I was wrong. Not really surprising honestly, but I think I have
 seen such assertion somewhere else from someone more knowledgeable
 than me.

Now you have the URL to the spec ;-)

http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html

 HOWEVER, $(something) and `something` are not equivalent in POSIX,
 they have
 different behavior re. expansion of something.  The code appears
 to be
 using $() correctly, though.
 
 What is the difference then? Expansion in shell is a frequent issue
 for me when I try to write my scripts.

According to POSIX 2.6.3 (linked above):

8

Within the backquoted style of command substitution, backslash shall retain
its literal meaning, except when followed by: '$', '`', or '\' (dollar sign,
backquote, backslash). The search for the matching backquote shall be
satisfied by the first backquote found without a preceding backslash; during
this search, if a non-escaped backquote is encountered within a shell
comment, a here-document, an embedded command substitution of the $(
command) form, or a quoted string, undefined results occur. A single-quoted
or double-quoted string that begins, but does not end, within the `...`
sequence produces undefined results.

With the $( command ) form, all characters following the open parenthesis to
the matching closing parenthesis constitute the command. Any valid shell
script can be used for command, except a script consisting solely of
redirections which produces unspecified results.

8

Which is kinda hard to parse, but still... 

http://mywiki.wooledge.org/BashFAQ/082
http://stackoverflow.com/questions/4708549/shell-programming-whats-the-difference-between-command-and-command
http://stackoverflow.com/questions/9449778/what-is-the-benefit-of-using-instead-of-backticks-in-shell-scripts
http://unix.stackexchange.com/questions/5778/whats-the-difference-between-stuff-and-stuff

Read them all, and you'll get the picture.  Just say no to backticks :)

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140620214817.ga15...@khazad-dum.debian.net



Re: [SOLVED] Re: wine-unstable 64 bit

2014-06-19 Thread berenger . morel

Le 11.06.2014 14:42, Floris a écrit :

If someone have any tips, tricks or commands on the shell script. I
love  to hear them.


	if [ $(dpkg --print-architecture) = amd64 -a $(dpkg 
--print-foreign-architectures) != i386 ]; then


This syntax $(command) is not portable.
If you want to write portable scripts, and I guess so since you used 
#!/bin/sh, you want the `command` syntax.

Otherwise, you want to use #!/bin/bash.

Other than that, but it is only a coding style potential issue, I would 
say that mixing test -foo ...  and [ -foo ... ] is quite confusing.


I do not have anything else to say, I am a newbie when things comes to 
shell scripting. Except than sorry to reply so late, I let my mailbox 
filling a lot so noticing mails on threads I have participated is not 
easy. Not enough time.



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/c4dd40e53160604bd7f059c3f54bf...@neutralite.org



Re: [SOLVED] Re: wine-unstable 64 bit

2014-06-19 Thread Martin Read

On 19/06/14 14:18, berenger.mo...@neutralite.org wrote:

This syntax $(command) is not portable.


The $() syntax for command substitution is *not* a bashism. It's been a 
POSIX Shell Command Language construct for at least a decade.


http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: https://lists.debian.org/53a2ed71.8010...@zen.co.uk



Re: [SOLVED] Re: wine-unstable 64 bit

2014-06-19 Thread Henrique de Moraes Holschuh
On Thu, 19 Jun 2014, berenger.mo...@neutralite.org wrote:
 This syntax $(command) is not portable.

It is a POSIX shell construct.  Anything that doesn't implement it should
not be linked to /bin/sh in the first place.

http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
section 2.6.3.

HOWEVER, $(something) and `something` are not equivalent in POSIX, they have
different behavior re. expansion of something.  The code appears to be
using $() correctly, though.

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140619142259.gc31...@khazad-dum.debian.net



Re: [SOLVED] Re: wine-unstable 64 bit

2014-06-19 Thread Floris

Op Thu, 19 Jun 2014 15:18:34 +0200 schreef berenger.mo...@neutralite.org:


Le 11.06.2014 14:42, Floris a écrit :

If someone have any tips, tricks or commands on the shell script. I
love  to hear them.


	if [ $(dpkg --print-architecture) = amd64 -a $(dpkg  
--print-foreign-architectures) != i386 ]; then


This syntax $(command) is not portable.
If you want to write portable scripts, and I guess so since you used  
#!/bin/sh, you want the `command` syntax.

Otherwise, you want to use #!/bin/bash.

Other than that, but it is only a coding style potential issue, I would  
say that mixing test -foo ...  and [ -foo ... ] is quite confusing.




Funny, this part of the script is just a copy-paste from the original one.
But I admit that mixing test -foo ...  and [ -foo ... ] is not neatly

Thanks,

floris


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/op.xhpsma0a5k9...@alice.jkfloris.demon.nl



[SOLVED] Re: wine-unstable 64 bit

2014-06-11 Thread Floris
Op Mon, 09 Jun 2014 13:44:04 +0200 schreef Ralf Mardorf  
ralf.mard...@alice-dsl.net:



On Mon, 2014-06-09 at 11:45 +0200, berenger.mo...@neutralite.org wrote:


Thank you both for your little compile-it-yourself-how-to. I have add a  
patch [1] to the wine source package and successfully rebuild it.


Also I have modified the /usr/bin/wine-unstable script to:


#!/bin/sh
set -e

bindir=/usr/lib/$(basename $0)

wine32=$bindir/wine
wine64=$bindir/wine64

if test ! -x $wine32 -a ! -x $wine64; then
echo error: unable to find wine executable.  this shouldn't happen.
exit 1
fi
if test -x $wine32; then
wine=$wine32
echo 32-bit Wine is possible
fi
if test -x $wine64; then
wine=$wine64
echo 64-bit Wine is possible
	if [ $(dpkg --print-architecture) = amd64 -a $(dpkg  
--print-foreign-architectures) != i386 ]; then
  	echo it looks like multiarch needs to be enabled.  as root,  
please
	echo execute \dpkg --add-architecture i386  apt-get install  
wine32\

fi
fi
if test -x $wine32 -a -x $wine64; then
if test $WINEARCH = win64; then
echo Running a 64-bit Wine
wine=$wine64
else
echo Running a 32-bit Wine
echo Use WINEARCH=win64 $(basename $0) for a 64-bit wineserver
wine=$wine32
fi
fi
if test -z $WINELOADER; then
wineloader=$wine
else
wineloader=$WINELOADER
fi
if test -z $WINEDEBUG; then
winedebug=-all
else
winedebug=$WINEDEBUG
fi
WINELOADER=$wineloader WINEDEBUG=$winedebug $wine $@



If someone have any tips, tricks or commands on the shell script. I love  
to hear them.


Thanks,

floris


[1] http://bugs.winehq.org/attachment.cgi?id=48593


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: https://lists.debian.org/op.xhaiw5ab5k9...@alice.jkfloris.demon.nl



wine-unstable 64 bit

2014-06-09 Thread Floris
With the current version of wine64-unstable  (1.7.19-1) there is no  
possibility to run a 64-bit wineserver


floris@Alice:~$ rm -R win64
floris@Alice:~$ WINEPREFIX=/home/floris/win64 WINEARCH=win64 wine-unstable  
wincfg

wine: created the configuration directory '/home/floris/win64'
wine: WINEARCH set to win64 but '/home/floris/win64' is a 32-bit  
installation.


Bug #742561 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742561 is  
know by the Debian Wine maintainers


Does someone know a workaround, or can point me to a site to compile and  
make it myself the Debian way?


thanks,

floris


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: https://lists.debian.org/op.xg6j6uqu5k9...@alice.jkfloris.demon.nl



Re: wine-unstable 64 bit

2014-06-09 Thread berenger . morel

Hello.

Le 09.06.2014 11:19, Floris a écrit :

With the current version of wine64-unstable  (1.7.19-1) there is no
possibility to run a 64-bit wineserver

floris@Alice:~$ rm -R win64
floris@Alice:~$ WINEPREFIX=/home/floris/win64 WINEARCH=win64
wine-unstable  wincfg
wine: created the configuration directory '/home/floris/win64'
wine: WINEARCH set to win64 but '/home/floris/win64' is a 32-bit
installation.

Bug #742561 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742561
is  know by the Debian Wine maintainers

Does someone know a workaround, or can point me to a site to compile
and  make it myself the Debian way?


Never tried to do that myself, but it should work:

_ install build-dependencies of the package you want ( #aptitude 
build-dep package )

_ download the source package ( $apt-get source package )
_ replace the source code with official one ( unarchive the file 
apt-get gave you, download upstream's source-code, unarchive it needed 
-- not if you use git for example --, search for source code in apt's 
stuff, replace it with upstream's )
_ pray the gnu to not give you build errors ( it should not, but... 
should and will are different words, right? anyway we might be able to 
help you here if there are some )

_ compile and make the package(s)
_ install the packages
_ try to use the package



thanks,

floris



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/c548e34047e4b7238c34eecc7c0dd...@neutralite.org



Re: wine-unstable 64 bit

2014-06-09 Thread Floris

Op Mon, 09 Jun 2014 11:19:32 +0200 schreef Floris jkflo...@dds.nl:

With the current version of wine64-unstable  (1.7.19-1) there is no  
possibility to run a 64-bit wineserver


floris@Alice:~$ rm -R win64
floris@Alice:~$ WINEPREFIX=/home/floris/win64 WINEARCH=win64  
wine-unstable wincfg

wine: created the configuration directory '/home/floris/win64'
wine: WINEARCH set to win64 but '/home/floris/win64' is a 32-bit  
installation.


Bug #742561 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742561 is  
know by the Debian Wine maintainers


Does someone know a workaround, or can point me to a site to compile and  
make it myself the Debian way?


thanks,

floris



Maybe there will be another way to fix this.

After removing the wine32-unstable package, the wine64-unstable  
installation is able to create a 64-bit wine prefix. Nevertheless, after  
reinstalling the wine32-unstable package only a 32-bit prefix is possible.



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: https://lists.debian.org/op.xg6nijws5k9...@alice.jkfloris.demon.nl



Re: wine-unstable 64 bit

2014-06-09 Thread Ralf Mardorf
On Mon, 2014-06-09 at 11:45 +0200, berenger.mo...@neutralite.org wrote:
 Never tried to do that myself, but it should work:
 
 _ install build-dependencies of the package you want ( #aptitude 
 build-dep package )
 _ download the source package ( $apt-get source package )
 _ replace the source code with official one ( unarchive the file 
 apt-get gave you, download upstream's source-code, unarchive it needed 
 -- not if you use git for example --, search for source code in apt's 
 stuff, replace it with upstream's )
 _ pray the gnu to not give you build errors ( it should not, but... 
 should and will are different words, right? anyway we might be able to 
 help you here if there are some )
 _ compile and make the package(s)
 _ install the packages
 _ try to use the package

The following example shows how to use a source from the Debian repos,
replace the source code with source code from upstream and to build a
new Debian package. This does work often, but also fails often, so good
luck!

Here's a pragmatic way to make a .deb of libasound2 - alsa-lib-1.0.24.1

cd /tmp/
apt-get source libasound2
sudo apt-get build-dep libasound2
mv -vi alsa-lib-1.0.23/ alsa-lib-1.0.24.1
curl ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.24.1.tar.bz2 \
| tar xvj
cd alsa-lib-1.0.24.1
# edit debian/changelog - alsa-lib (1.0.24.1-1) unstable; urgency=low
# edit debian/rules - remove line 15-18 (biarch builds)
libtoolize --force --copy --automake
aclocal
autoreconf
debuild -b -us -uc
sudo dpkg -i ../*asound2*.deb -
http://lists.linuxaudio.org/pipermail/linux-audio-user/2011-June/078885.html



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1402314244.813.52.camel@archlinux