Re: New mpd available

Paulo Cavalcanti <[email protected]> Thu, 25 Jul 2013 11:01:36 -0300
Newsgroups gmane.linux.redhat.rpm.atrpms.devel
Message-ID <CAMgUmn=_Huf=S_tJLjKpmWA86-DSWsjy97xZ0vDV8mNHH3pP1Q@mail.gmail.com>
--===============5635280243362558138==
Content-Type: multipart/alternative; boundary=089e01419b1ce07e1104e2567635

--089e01419b1ce07e1104e2567635
Content-Type: text/plain; charset=ISO-8859-1

mpd has a directory where, among other things, its database and pid are
stored.

If mpd is run system wide as root, this is /var/lib/mpd, as you should set
in
/etc/mpd.conf:

cascavel:~] ls -al /var/lib/mpd
total 12604
drwxr-xr-x.  5 mpd  mpd            4096 Jul 18 07:12 .
drwxrwxr-x. 78 root procgrafico    4096 Jul 14 22:37 ..
-rw-r--r--.  1 mpd  mpd         3350971 Jul 20 17:37 database
-rw-------.  1 mpd  mpd              16 Jul  5  2012 .esd_auth
-rw-r--r--.  1 root root        9508991 Jul 24 18:20 log
drwxr-xr-x.  2 mpd  mpd            4096 Jul 10 09:08 music
-rw-r--r--.  1 mpd  mpd               5 Jul 18 07:12 pid
drwxr-xr-x.  2 mpd  mpd            4096 Jul 10 09:08 playlists
drwx------.  2 mpd  mpd            4096 Feb  9 00:09 .pulse
-rw-------.  1 mpd  mpd             256 Jul  5  2012 .pulse-cookie
-rw-r--r--.  1 mpd  mpd            3258 Jul 20 17:42 state


If mpd is run for a single user this is generally ~/.mpd:

[cascavel:~] ls -al ~/.mpd
total 8260
drwxrwxr-x.   4 roma roma    4096 Mar 11 08:45 .
drwxr-xr-x. 115 roma roma   12288 Jul 24 17:10 ..
drwxrwxr-x.   2 roma roma    4096 Sep  2  2012 .AppleDouble
-rw-rw-r--.   1 roma roma 3313663 Mar  7 09:00 database
-rw-rw-r--.   1 roma roma 5093395 Mar 11 17:30 log
-rw-r--r--.   1 roma roma   13727 Jul  7  2012 mpd.conf
-rw-rw-r--.   1 roma roma       5 Mar 11 08:45 pid
drwxrwxr-x.   2 roma roma    4096 Oct 14  2012 playlists
-rw-rw-r--.   1 roma roma    3917 Mar  7 09:32 state

Therefore, there has never been a /var/run/mpd. To use the system wide
approach with selinux active, the files must be labelled "audio_home_t".

Nonetheless, you have to edit /etc/mpd.conf and set your choices,
removing the pounds (#) at least until:

#state_file                     "/var/lib/mpd/state"

Otherwise, I doubt mpd will work...



On Thu, Jul 25, 2013 at 8:14 AM, Kim Bisgaard
<[email protected]>wrote:

>  Hi Paulo,
>
> I have tried to use it on F19. THANKS!!
>
> I could not get it to start. It threw a very misleading error - "Failed to
> bind to 'localhost': No such file or directory", but the real reason was
> that the directory "/var/run/mpd" was not created.
>
> This in it self has nothing to do with systemd as such, just because
> Fedora introduced the empty /var at the same time (tmpfs mounted /var) .
>
> Hope this clears it up?
>
> Regards,
> Kim
>
>
> On 2013-07-25 12:25, Paulo Cavalcanti wrote:
>
>  Hi,
>
>  the version for F17 uses systemd, ant the other for rhel6, does not.
>
>  What version do you mean?
>
>
>
>
>  On Tue, Jul 23, 2013 at 8:51 AM, Kim Bisgaard <
> [email protected]> wrote:
>
>>  Hi Paulo,
>>
>> Could I persuade you to create the directory with the socket file in the
>> package? This prevents the package to work on distributions with systemd.
>>
>> The spec-file-fu is something like the following:
>> file mpd.tpmfilesd with this line:
>> d /var/run/mpd 0755 mpd audio -
>>
>> Source10: mpd.tmpfilesd
>>
>> %if %{with systemd}
>> #install -p -D -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_tmpfilesdir}/mpd.conf
>> install -p -D -m 644 %{SOURCE10} $RPM_BUILD_ROOT/etc/tmpfiles.d/mpd.conf
>> %endif
>>
>> Regards,
>> Kim
>>
>>
>>
>> On 2013-07-10 14:30, Paulo Cavalcanti wrote:
>>
>>    Hi, Axel
>>
>>  I have two versions. One for Fedora, which uses mpd.service,
>>  and another for rhel6 with /etc/rc.d/init.d/mpd.
>>
>>  The fedora version is the same we had before, but the rhel6 will allow
>>  an upgrade from the previous 0.16.7 we have at ATrpms.
>>
>>  Thanks.
>>
>>
>> http://people.atrpms.net/~pcavalcanti/srpms/mpd-0.17.4-25.el6.src.rpm
>>
>>
>> http://people.atrpms.net/~pcavalcanti/srpms/mpd-0.17.4-27.fc17.src.rpm
>>
>>
>>
>> --
>> Paulo Roma Cavalcanti
>> LCG - UFRJ
>>
>>
>>  _______________________________________________
>> atrpms-devel mailing [email protected]://lists.atrpms.net/mailman/listinfo/atrpms-devel
>>
>>
>>
>> _______________________________________________
>> atrpms-devel mailing list
>> [email protected]
>> http://lists.atrpms.net/mailman/listinfo/atrpms-devel
>>
>
>
>
> --
> Paulo Roma Cavalcanti
> DCC - UFRJ
>
>
> _______________________________________________
> atrpms-devel mailing [email protected]://lists.atrpms.net/mailman/listinfo/atrpms-devel
>
>
>
> _______________________________________________
> atrpms-devel mailing list
> [email protected]
> http://lists.atrpms.net/mailman/listinfo/atrpms-devel
>



-- 
Paulo Roma Cavalcanti
DCC - UFRJ

--089e01419b1ce07e1104e2567635
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><div><div>mpd has a directory where, a=
mong other things, its database and pid are stored.<br><br></div>If mpd is =
run system wide as root, this is /var/lib/mpd, as you should set in<br></di=
v>
/etc/mpd.conf:<br><br>cascavel:~] ls -al /var/lib/mpd<br>total 12604<br>drw=
xr-xr-x.=A0 5 mpd=A0 mpd=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 4096 Jul 18 07:12=
 .<br>drwxrwxr-x. 78 root procgrafico=A0=A0=A0 4096 Jul 14 22:37 ..<br>-rw-=
r--r--.=A0 1 mpd=A0 mpd=A0=A0=A0=A0=A0=A0=A0=A0 3350971 Jul 20 17:37 databa=
se<br>
-rw-------.=A0 1 mpd=A0 mpd=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 16 Jul=
=A0 5=A0 2012 .esd_auth<br>-rw-r--r--.=A0 1 root root=A0=A0=A0=A0=A0=A0=A0 =
9508991 Jul 24 18:20 log<br>drwxr-xr-x.=A0 2 mpd=A0 mpd=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 4096 Jul 10 09:08 music<br>-rw-r--r--.=A0 1 mpd=A0 mpd=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 5 Jul 18 07:12 pid<br>
drwxr-xr-x.=A0 2 mpd=A0 mpd=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 4096 Jul 10 09=
:08 playlists<br>drwx------.=A0 2 mpd=A0 mpd=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 4096 Feb=A0 9 00:09 .pulse<br>-rw-------.=A0 1 mpd=A0 mpd=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 256 Jul=A0 5=A0 2012 .pulse-cookie<br>-rw-r--r--.=
=A0 1 mpd=A0 mpd=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 3258 Jul 20 17:42 state<b=
r>
<br><br></div>If mpd is run for a single user this is generally ~/.mpd:<br>=
<br>[cascavel:~] ls -al ~/.mpd<br>total 8260<br>drwxrwxr-x.=A0=A0 4 roma ro=
ma=A0=A0=A0 4096 Mar 11 08:45 .<br>drwxr-xr-x. 115 roma roma=A0=A0 12288 Ju=
l 24 17:10 ..<br>
drwxrwxr-x.=A0=A0 2 roma roma=A0=A0=A0 4096 Sep=A0 2=A0 2012 .AppleDouble<b=
r>-rw-rw-r--.=A0=A0 1 roma roma 3313663 Mar=A0 7 09:00 database<br>-rw-rw-r=
--.=A0=A0 1 roma roma 5093395 Mar 11 17:30 log<br>-rw-r--r--.=A0=A0 1 roma =
roma=A0=A0 13727 Jul=A0 7=A0 2012 mpd.conf<br>
-rw-rw-r--.=A0=A0 1 roma roma=A0=A0=A0=A0=A0=A0 5 Mar 11 08:45 pid<br>drwxr=
wxr-x.=A0=A0 2 roma roma=A0=A0=A0 4096 Oct 14=A0 2012 playlists<br>-rw-rw-r=
--.=A0=A0 1 roma roma=A0=A0=A0 3917 Mar=A0 7 09:32 state<br><br></div>There=
fore, there has never been a /var/run/mpd. To use the system wide approach =
with selinux active, the files must be labelled &quot;audio_home_t&quot;.<b=
r>
<br></div>Nonetheless, you have to edit /etc/mpd.conf and set your choices,=
<br>removing the pounds (#) at least until:<br><br>#state_file=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &quot;/var/lib/mpd/state&q=
uot;<br><br>Otherwise, I doubt mpd will work...<br>
</div><div><div><div><br></div></div></div></div><div class=3D"gmail_extra"=
><br><br><div class=3D"gmail_quote">On Thu, Jul 25, 2013 at 8:14 AM, Kim Bi=
sgaard <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]=
" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    Hi Paulo,<br>
    <br>
    I have tried to use it on F19. THANKS!!<br>
    <br>
    I could not get it to start. It threw a very misleading error -
    &quot;Failed to bind to &#39;localhost&#39;: No such file or directory&=
quot;, but the
    real reason was that the directory &quot;/var/run/mpd&quot; was not cre=
ated.<br>
    <br>
    This in it self has nothing to do with systemd as such, just because
    Fedora introduced the empty /var at the same time (tmpfs mounted
    /var) .<br>
    <br>
    Hope this clears it up?<br>
    <br>
    Regards,<br>
    Kim<div><div class=3D"h5"><br>
    <br>
    <div>On 2013-07-25 12:25, Paulo Cavalcanti
      wrote:<br>
    </div>
    <blockquote type=3D"cite">
     =20
      <div dir=3D"ltr">
        <div>
          <div>Hi,<br>
            <br>
          </div>
          the version for F17 uses systemd, ant the other for rhel6,
          does not.<br>
          <br>
        </div>
        What version do you mean?<br>
        <div><br>
          <br>
        </div>
      </div>
      <div class=3D"gmail_extra"><br>
        <br>
        <div class=3D"gmail_quote">
          On Tue, Jul 23, 2013 at 8:51 AM, Kim Bisgaard <span dir=3D"ltr">&=
lt;<a href=3D"mailto:[email protected]" target=3D"_blank">kim+j2=
@alleroedderne.adsl.dk</a>&gt;</span>
          wrote:<br>
          <blockquote class=3D"gmail_quote">
            <div> Hi Paulo,<br>
              <br>
              Could I persuade you to create the directory with the
              socket file in the package? This prevents the package to
              work on distributions with systemd.<br>
              <br>
              The spec-file-fu is something like the following:<br>
              file mpd.tpmfilesd with this line:<br>
              d /var/run/mpd 0755 mpd audio -<br>
              <br>
              Source10: mpd.tmpfilesd<br>
              <br>
              %if %{with systemd}<br>
              #install -p -D -m 644 %{SOURCE10}
              $RPM_BUILD_ROOT%{_tmpfilesdir}/mpd.conf<br>
              install -p -D -m 644 %{SOURCE10}
              $RPM_BUILD_ROOT/etc/tmpfiles.d/mpd.conf<br>
              %endif<br>
              <br>
              Regards,<br>
              Kim
              <div>
                <div><br>
                  <br>
                  <br>
                  <div>On 2013-07-10 14:30, Paulo Cavalcanti wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type=3D"cite">
                <div>
                  <div>
                    <div dir=3D"ltr">
                      <div>
                        <div>
                          <div>
                            <div>Hi, Axel<br>
                              <br>
                            </div>
                            I have two versions. One for Fedora, which
                            uses mpd.service,<br>
                          </div>
                          and another for rhel6 with
                          /etc/rc.d/init.d/mpd.<br>
                          <br>
                        </div>
                        The fedora version is the same we had before,
                        but the rhel6 will allow<br>
                      </div>
                      an upgrade from the previous 0.16.7 we have at
                      ATrpms.<br>
                      <div>
                        <div><br>
                          <div>
                            <div>
                              <div>Thanks.<br>
                              </div>
                              <div><br>
                                <br>
                                <a href=3D"http://people.atrpms.net/%7Epcav=
alcanti/srpms/mpd-0.17.4-25.el6.src.rpm" target=3D"_blank">http://people.at=
rpms.net/~pcavalcanti/srpms/mpd-0.17.4-25.el6.src.rpm</a><br>
                                <br>
                                <br>
                                <a href=3D"http://people.atrpms.net/%7Epcav=
alcanti/srpms/mpd-0.17.4-27.fc17.src.rpm" target=3D"_blank">http://people.a=
trpms.net/~pcavalcanti/srpms/mpd-0.17.4-27.fc17.src.rpm</a><br>
                                <br>
                                <br>
                                <br>
                                -- <br>
                                Paulo Roma Cavalcanti<br>
                                LCG - UFRJ </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
atrpms-devel mailing list
<a href=3D"mailto:[email protected]" target=3D"_blank">atrpms-devel@a=
trpms.net</a>
<a href=3D"http://lists.atrpms.net/mailman/listinfo/atrpms-devel" target=3D=
"_blank">http://lists.atrpms.net/mailman/listinfo/atrpms-devel</a></pre>
              </blockquote>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            atrpms-devel mailing list<br>
            <a href=3D"mailto:[email protected]" target=3D"_blank">at=
[email protected]</a><br>
            <a href=3D"http://lists.atrpms.net/mailman/listinfo/atrpms-deve=
l" target=3D"_blank">http://lists.atrpms.net/mailman/listinfo/atrpms-devel<=
/a><br>
          </blockquote>
        </div>
        <br>
        <br>
        <br>
        -- <br>
        Paulo Roma Cavalcanti<br>
        DCC - UFRJ
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
atrpms-devel mailing list
<a href=3D"mailto:[email protected]" target=3D"_blank">atrpms-devel@a=
trpms.net</a>
<a href=3D"http://lists.atrpms.net/mailman/listinfo/atrpms-devel" target=3D=
"_blank">http://lists.atrpms.net/mailman/listinfo/atrpms-devel</a></pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
atrpms-devel mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]</a><br>
<a href=3D"http://lists.atrpms.net/mailman/listinfo/atrpms-devel" target=3D=
"_blank">http://lists.atrpms.net/mailman/listinfo/atrpms-devel</a><br></blo=
ckquote></div><br><br clear=3D"all"><br>-- <br>Paulo Roma Cavalcanti<br>DCC=
 - UFRJ
</div>

--089e01419b1ce07e1104e2567635--


--===============5635280243362558138==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline